/**
 * Single product detail — two-column product layout.
 */

.vn-product-detail {
    --vn-green: #7ed321;
    --vn-dark-green: #123817;
    background: #fff;
}

.vn-product-detail__container {
    padding: 34px 0 0;
}

.vn-product-detail__breadcrumb {
    margin-bottom: 24px;
    color: #888;
    font-size: 13px;
    line-height: 1.6;
}

.vn-product-detail__breadcrumb a {
    color: #777;
    text-decoration: none;
}

.vn-product-detail__breadcrumb a:hover {
    color: var(--vn-green, #7ed321);
}

.vn-product-detail__breadcrumb-current {
    color: #111;
}

.vn-product-detail__summary {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
    gap: clamp(38px, 5vw, 72px);
    align-items: start;
    padding-bottom: clamp(48px, 6vw, 2px);
}

.vn-product-gallery__main {
    position: relative;
    margin: 0;
    background: #f7f7f5;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vn-product-gallery__magnifier {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.vn-product-gallery__magnifier .vn-product-gallery__image {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.vn-product-gallery__zoom-pane {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background-color: #f7f7f5;
    background-repeat: no-repeat;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}

.vn-product-gallery__magnifier.is-hover-zoom .vn-product-gallery__zoom-pane {
    opacity: 1;
    visibility: visible;
}

.vn-product-gallery__zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(18, 56, 23, 0.88);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.vn-product-gallery__zoom:hover,
.vn-product-gallery__zoom:focus-visible {
    background: var(--vn-green, #7ed321);
    color: var(--vn-dark-green, #123817);
    outline: none;
}

.vn-product-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 18, 12, 0.92);
    box-sizing: border-box;
}

.vn-product-gallery-lightbox[hidden] {
    display: none !important;
}

.vn-product-gallery-lightbox__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vn-product-gallery-lightbox__close:hover,
.vn-product-gallery-lightbox__close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.vn-product-gallery-lightbox__stage {
    width: min(96vw, 1200px);
    height: min(88vh, 900px);
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

.vn-product-gallery-lightbox__image {
    display: block;
    max-width: none;
    width: auto;
    height: auto;
    max-height: none;
    object-fit: contain;
    cursor: zoom-out;
}

.vn-product-gallery-lightbox.is-fit .vn-product-gallery-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    cursor: zoom-in;
}

html.vn-gallery-lightbox-open,
html.vn-gallery-lightbox-open body {
    overflow: hidden;
}

.vn-product-gallery__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eee, #f8f8f6);
}

.vn-product-gallery__thumb-wrap {
    position: relative;
    margin-top: 16px;
}

.vn-product-gallery__thumbs {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0 46px;
}

.vn-product-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.vn-product-gallery__thumb {
    flex: 0 0 86px;
    width: 86px;
    height: 86px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8f8f6;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease;
    overflow: hidden;
}

.vn-product-gallery__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--vn-green, #7ed321);
    color: var(--vn-dark-green, #123817);
    font-size: 24px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.vn-product-gallery__nav.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.vn-product-gallery__nav--prev {
    left: 0;
}

.vn-product-gallery__nav--next {
    right: 0;
}

.vn-product-gallery__thumb.is-active {
    border-color: var(--vn-green, #7ed321);
}

.vn-product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vn-product-detail__title {
    margin: 0 0 12px;
    color: #111;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.2;
    font-weight: 800;
}

.vn-product-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.vn-product-detail__badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}

.vn-product-detail__badge--sale {
    background: #e53935;
}

.vn-product-detail__badge--new {
    background: var(--vn-dark-green, #123817);
}

.vn-product-detail__price-wrap {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.vn-product-detail__price,
.vn-product-detail__price-wrap .vn-price-sale {
    color: #f37022;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.vn-product-detail__price-old,
.vn-product-detail__price-wrap .vn-price-regular {
    color: #999;
    font-size: 16px;
    text-decoration: line-through;
    white-space: nowrap;
}

.vn-product-detail__price-contact {
    color: #666;
    font-size: 16px;
    font-weight: 600;
}

.vn-product-detail__excerpt {
    margin: 0 0 20px;
    max-width: 520px;
    color: #666;
    font-size: 15px;
    line-height: 1.75;
}

.vn-product-detail__actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 10px 12px;
    align-items: start;
    margin: 26px 0;
}

/* Phase 6A — purchase block (children join parent grid) */
.vn-product-purchase {
    display: contents;
}

.vn-product-quantity {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 40px 54px 40px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
}

.vn-product-quantity__button,
.vn-product-quantity__input {
    min-width: 0;
    height: 46px;
    border: 0;
    background: transparent;
    text-align: center;
}

.vn-product-quantity__button {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.vn-product-quantity__button:hover {
    background: rgba(126, 211, 33, 0.1);
}

.vn-product-quantity__input {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    appearance: textfield;
    font-size: 15px;
}

.vn-product-quantity__input::-webkit-outer-spin-button,
.vn-product-quantity__input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.vn-product-action {
    min-height: var(--vn-button-height-lg);
    text-transform: uppercase;
}

.vn-product-action--buy-now {
    /* Visual distinction via typography; colors from button tokens */
    letter-spacing: 0.02em;
}

.vn-product-action:disabled,
.vn-product-quantity__button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.vn-product-quantity__button:focus-visible,
.vn-product-quantity__input:focus-visible {
    outline: 2px solid var(--vn-color-primary-hover);
    outline-offset: 2px;
}

.vn-product-action--cart {
    grid-column: 2;
    grid-row: 1;
}

.vn-product-action--buy-now {
    grid-column: 3;
    grid-row: 1;
}

.vn-product-detail__secondary-actions {
    grid-column: 1;
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-self: start;
}

.vn-product-purchase__message {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 20px;
    color: #667085;
    font-size: 13px;
}

.vn-product-purchase__message.is-success {
    color: #257a2c;
}

.vn-product-purchase__message.is-error {
    color: #c62828;
}

.vn-product-purchase__message a {
    color: #2d6a2d;
    font-weight: 600;
    text-decoration: underline;
}

.vn-product-detail__unavailable {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 15px;
}

.vn-product-detail__qty {
    width: 76px;
    height: 46px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-align: center;
    font-size: 15px;
    box-sizing: border-box;
}

.vn-product-detail__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 34px;
    border: 0;
    background: var(--vn-dark-green, #123817);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.vn-product-detail__button:hover {
    background: var(--vn-green, #7ed321);
    color: var(--vn-dark-green, #123817);
}

.vn-product-detail__button--disabled {
    background: #999;
    cursor: not-allowed;
}

.vn-product-detail__wishlist {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.vn-product-detail__brand-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 6px 10px;
    border: 1px solid #e5e9e2;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.vn-product-detail__brand-chip:hover,
.vn-product-detail__brand-chip:focus-visible {
    border-color: #c5d4bc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    outline: none;
}

.vn-product-detail__brand-chip--static {
    cursor: default;
}

.vn-product-detail__brand-chip--static:hover {
    transform: none;
    box-shadow: none;
}

.vn-product-detail__brand-chip img {
    display: block;
    max-width: 72px;
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.vn-product-detail__brand-name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #123817;
    line-height: 1.2;
    max-width: 72px;
    text-align: center;
}

.vn-product-basic-info {
    margin-top: 2px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.vn-product-basic-info__title {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--vn-dark-green, #123817);
}

.vn-product-basic-info__list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.vn-product-basic-info__list.vn-product-fields--basic .vn-product-fields__row,
.vn-product-basic-info__row {
    display: block;
    margin: 0;
    line-height: 1.55;
    font-size: 14px;
}

.vn-product-basic-info__list.vn-product-fields--basic .vn-product-fields__row dt,
.vn-product-basic-info__list.vn-product-fields--basic .vn-product-fields__row dd,
.vn-product-basic-info__row dt,
.vn-product-basic-info__row dd {
    display: inline;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

.vn-product-basic-info__list.vn-product-fields--basic .vn-product-fields__row dt,
.vn-product-basic-info__row dt {
    color: #7b8491;
    font-weight: 700;
}

.vn-product-basic-info__list.vn-product-fields--basic .vn-product-fields__row dd,
.vn-product-basic-info__row dd {
    color: #111;
    font-weight: 600;
    margin-left: 0.2em;
}

.vn-product-basic-info__list.vn-product-fields--basic .vn-product-fields__row {
    padding: 0;
    border: 0;
}

.vn-product-detail__description {
    color: #555;
    font-size: 15px;
    line-height: 1.85;
}

.vn-product-detail__description p {
    margin: 0 0 16px;
}

.vn-product-specs__empty {
    margin: 0;
    color: #888;
    font-size: 15px;
}

.vn-product-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.vn-product-specs-table th,
.vn-product-specs-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: left;
    vertical-align: top;
}

.vn-product-specs-table th {
    width: 38%;
    color: #7b8491;
    font-weight: 700;
    background: #fafaf8;
}

.vn-product-specs-table td {
    color: #111;
    font-weight: 600;
}

/* Tabs */
.vn-product-tabs {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 34px;
}

.vn-product-tabs__nav {
    display: flex;
    justify-content: center;
    gap: 42px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 42px;
}

.vn-product-tabs__button {
    position: relative;
    border: 0;
    background: transparent;
    padding: 0 0 14px;
    color: #777;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.vn-product-tabs__button.is-active {
    color: #111;
}

.vn-product-tabs__button.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 52px;
    height: 2px;
    background: var(--vn-green, #7ed321);
    transform: translateX(-50%);
}

.vn-product-tabs__panel {
    display: none;
}

.vn-product-tabs__panel.is-active {
    display: block;
}

/* Reviews */
.vn-product-reviews__summary {
    margin: 0 0 28px;
    color: #111;
    font-size: 16px;
    font-weight: 700;
}

.vn-product-reviews__empty {
    margin: 0 0 24px;
    color: #888;
    font-size: 15px;
}

.vn-product-reviews__list {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    display: grid;
    gap: 28px;
}

.vn-product-review {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.vn-product-review__avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.vn-product-review__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 6px;
}

.vn-product-review__author {
    color: #111;
    font-size: 15px;
}

.vn-product-review__date {
    color: #999;
    font-size: 13px;
}

.vn-product-review__stars {
    display: inline-flex;
    gap: 2px;
    margin-bottom: 8px;
}

.vn-product-review__star {
    color: #ddd;
    font-size: 14px;
}

.vn-product-review__star.is-filled {
    color: #d96b45;
}

.vn-product-review__content {
    color: #555;
    font-size: 15px;
    line-height: 1.75;
}

.vn-product-reviews__login-notice {
    padding: 24px;
    background: #f7f7f5;
    border-radius: 6px;
    text-align: center;
}

.vn-product-reviews__login-notice p {
    margin: 0 0 12px;
    color: #666;
}

.vn-product-reviews__login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 24px;
    background: var(--vn-dark-green, #123817);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.vn-product-reviews__login-link:hover {
    background: var(--vn-green, #7ed321);
    color: var(--vn-dark-green, #123817);
}

.vn-product-review-form {
    max-width: 640px;
}

.vn-product-review-form p {
    margin-bottom: 16px;
}

.vn-product-review-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.vn-product-review-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
}

.vn-review-rating-field {
    display: inline-flex;
    gap: 3px;
}

.vn-review-rating-field__star {
    border: 0;
    background: transparent;
    color: #cfcfcf;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.vn-review-rating-field__star.is-active,
.vn-review-rating-field__star.is-hover {
    color: #d96b45;
}

.vn-product-review-form__submit,
.vn-product-review-form input[type='submit'] {
    min-height: var(--vn-button-height-md);
    padding: 0 28px;
    text-transform: uppercase;
}

/* Related */
.vn-related-products {
    padding: clamp(54px, 7vw, 86px) 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.vn-related-products__title {
    position: relative;
    margin: 0 0 34px;
    text-align: center;
    color: #111;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vn-related-products__title::after {
    content: '';
    display: block;
    width: 54px;
    height: 2px;
    background: var(--vn-green, #7ed321);
    margin: 12px auto 0;
}

.vn-related-products__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

@media (max-width: 991px) {
    .vn-product-detail__summary {
        grid-template-columns: 1fr;
    }

    .vn-related-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .vn-product-gallery__thumb {
        flex-basis: 72px;
        width: 72px;
        height: 72px;
    }

    .vn-product-basic-info__row {
        display: block;
        gap: 0;
    }

    .vn-product-basic-info__row dt,
    .vn-product-basic-info__row dd {
        display: inline;
    }

    .vn-product-specs-table th,
    .vn-product-specs-table td {
        display: block;
        width: 100%;
    }

    .vn-product-specs-table th {
        border-bottom: 0;
        padding-bottom: 6px;
    }

    .vn-product-detail__actions {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        margin: 20px 0;
    }

    .vn-product-quantity {
        grid-column: 1;
        grid-row: 1;
        width: max-content;
    }

    .vn-product-detail__secondary-actions {
        grid-column: 1;
        grid-row: 2;
    }

    .vn-product-action--cart {
        grid-column: 1;
        grid-row: 3;
    }

    .vn-product-action--buy-now {
        grid-column: 1;
        grid-row: 4;
    }

    .vn-product-purchase__message {
        grid-column: 1;
        grid-row: 5;
    }

    .vn-product-detail__unavailable {
        grid-column: 1;
        grid-row: 1;
    }

    .vn-product-action {
        width: 100%;
    }

    .vn-product-detail__wishlist {
        width: 46px;
    }

    .vn-product-tabs__nav {
        justify-content: flex-start;
        overflow-x: auto;
        gap: 28px;
    }

    .vn-related-products__grid {
        grid-template-columns: 1fr;
    }
}
