/* ══════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
══════════════════════════════════════════════════════ */

/* ── Left column ─────────────────────────────────────── */

.product-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-default);
    overflow: hidden;
    background: var(--color-bg-section-grey);
    margin-bottom: var(--space-lg);
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-delivery {
    background: #ecf8fe;
    border-radius: var(--radius-default);
    padding: 4px var(--space-lg);
    display: flex;
    align-items: center;
    gap: 27px;
    margin-bottom: var(--space-lg);
}

.product-delivery__icon {
    flex-shrink: 0;
    width: 92px;
    height: 92px;
    color: var(--color-primary);
}

.product-delivery__body {
    padding: var(--space-md) 0;
}

.product-delivery__title {
    font-size: 21px;
    font-weight: 700;
    color: #2074a4;
    margin-bottom: 3px;
}

.product-delivery__text {
    font-size: 18px;
    color: var(--color-text-body);
    line-height: 1.5;
}

.product-section-label {
    font-size: 19px;
    font-weight: 700;
    color: var(--color-text-heading);
    margin: 0 0 var(--space-md);
}

.product-description {
    margin-bottom: var(--space-xl);
    font-size: var(--product-text-size);
    line-height: var(--product-text-lh);
}

.product-description p {
    font-size: var(--product-text-size);
    line-height: var(--product-text-lh);
    color: var(--color-text-body);
    margin-bottom: var(--space-md);
}

.product-description p:last-child {
    margin-bottom: 0;
}

.product-downloads {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.product-download-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px var(--space-md);
    border: 1px solid var(--color-border-card);
    border-radius: var(--radius-button);
    background: var(--color-bg-white);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
    cursor: pointer;
}

.product-download-item:hover {
    border-color: var(--color-primary);
}

.product-download-item__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: block;
}

.product-download-item__name {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-body);
    transition: color 0.15s;
}

.product-download-item:hover .product-download-item__name {
    color: var(--color-primary);
}

/* ── Right column ────────────────────────────────────── */

.product-page__title {
    font-size: var(--font-size-section-title);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    margin: 0;
}

.product-page__subtitle {
    font-size: var(--product-text-size);
    line-height: var(--product-text-lh);
    color: var(--color-text-body);
    margin: var(--space-md) 0 0;
}

.product-page__subtitle p {
    font-size: var(--product-text-size);
    line-height: var(--product-text-lh);
}

/* Options container */
.product-options {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: var(--space-xl);
}

.product-option__label {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: 15px;
}

/* Square selector cards (sides, lamination) */
.product-option__cards {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.product-option__card {
    width: 124px;
    height: 124px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border: 1.5px solid var(--color-border-card);
    border-radius: calc(var(--radius-default) / 2);
    background: var(--color-bg-white);
    cursor: pointer;
    font-family: var(--font-family);
    transition: border-color 0.15s, background 0.15s;
    overflow: hidden;
    padding: 0;
}

.product-option__card:hover {
    border-color: var(--color-primary);
}

.product-option__card.is-selected {
    border-color: var(--color-primary);
    background: var(--color-accent-blue-light);
}

.product-option__card-img {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px 0;
    min-height: 0;
}

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

.product-option__card-label {
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-body);
    text-align: center;
    line-height: 1.2;
    padding: 0 5px 5px;
    margin-top: -1px;
    flex-shrink: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.product-option__card.is-selected .product-option__card-label {
    color: var(--color-primary);
}

/* Button selector (text-only, matches card style with halved radius) */
.product-option__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.product-option__btn {
    padding: 8px 18px;
    border: 1.5px solid var(--color-border-card);
    border-radius: calc(var(--radius-default) / 2);
    background: var(--color-bg-white);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text-body);
    line-height: 1.2;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.product-option__btn:hover {
    border-color: var(--color-primary);
}

.product-option__btn.is-selected {
    border-color: var(--color-primary);
    background: var(--color-accent-blue-light);
    color: var(--color-primary);
}

/* Quantity buttons */
.product-qty-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.product-qty-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 64px;
    padding: 0 var(--space-md);
    border: 1.5px solid var(--color-border-card);
    border-radius: calc(var(--radius-default) / 2);
    background: var(--color-bg-white);
    cursor: pointer;
    font-family: var(--font-family);
    gap: 2px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.product-qty-btn:hover {
    border-color: var(--color-primary);
}

.product-qty-btn.is-selected {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.product-qty-btn__qty {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.product-qty-btn__price {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.8;
}

.product-qty-btn.is-selected .product-qty-btn__price {
    opacity: 0.9;
}

/* Dropdown selector */
.product-option__select {
    padding: 8px 36px 8px 18px;
    border: 1.5px solid var(--color-border-card);
    border-radius: calc(var(--radius-default) / 2);
    background: var(--color-bg-white);
    font-family: var(--font-family);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text-body);
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s;
}

.product-option__select:hover,
.product-option__select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Artwork toggle */
.product-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    user-select: none;
}

.product-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.product-toggle__switch {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 28px;
    background: var(--color-border-button);
    border-radius: 999px;
    transition: background 0.2s;
}

.product-toggle__switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.product-toggle__input:checked ~ .product-toggle__switch {
    background: var(--color-primary);
}

.product-toggle__input:checked ~ .product-toggle__switch::after {
    transform: translateX(24px);
}

.product-toggle__text {
    font-size: 19px;
    color: var(--color-text-body);
    line-height: 1.4;
}

/* Upload area */
.product-upload {
    border: 2px dashed var(--color-border-button);
    border-radius: var(--radius-default);
    background: var(--color-bg-section-grey);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.product-upload.is-dragover {
    border-color: var(--color-primary);
    background: var(--color-accent-blue-light);
}

.product-upload__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto var(--space-sm);
    color: #a9b2b7;
}

.product-upload__text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-body);
    margin-bottom: 4px;
}

.product-upload__sub {
    font-size: 13px;
    color: #a9b2b7;
    margin-bottom: var(--space-md);
}

.product-upload__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.product-upload__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 var(--space-xl);
    border: 1.5px solid var(--color-border-button);
    border-radius: var(--radius-button);
    background: var(--color-bg-white);
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-body);
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: border-color 0.15s, color 0.15s;
}

.product-upload__btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Price includes summary */
.product-includes {
    margin-top: 24px;
}

.product-includes::before {
    content: '';
    display: block;
    border-top: 2px solid #e4e7eb;
    margin-right: 40px;
    margin-bottom: 21px;
}

.product-includes__heading {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-body);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}

.product-includes__tags {
    font-size: 18px;
    color: var(--color-text-body);
    line-height: 1.5;
}

.product-includes__sep {
    color: #c8cdd2;
    padding: 0 5px;
}

/* CTA row */
.product-cta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding-top: var(--space-lg);
}

.product-cta__price-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
}

.product-cta__label {
    font-size: 13px;
    color: var(--color-text-body);
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-cta__price {
    font-size: 30px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.product-cta .btn-filled-pill {
    flex: 1;
    height: 56px;
    font-size: 18px;
    padding: 0 var(--space-xl) 2px;
    background: var(--color-primary);
    color: #fff;
}

.product-cta .btn-filled-pill:hover {
    background: var(--color-primary-hover);
    opacity: 1;
}

/* ── Image gallery ───────────────────────────────────── */

.product-gallery {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.product-gallery__main .product-image-wrap {
    margin-bottom: 0;
}

.product-gallery__main .product-image-wrap:hover {
    opacity: 0.93;
}

.product-gallery__main {
    grid-column: 2;
    grid-row: 1;
}

.product-gallery__thumbs {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.product-gallery__thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-small);
    overflow: hidden;
    border: 1px solid var(--color-border-card);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.product-gallery__thumb:hover {
    border-color: var(--color-primary);
}

.product-gallery__thumb.is-active {
    border-color: var(--color-border-card);
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* ── Product lightbox ────────────────────────────────── */

.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.product-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.product-lightbox__img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.product-lightbox__close {
    position: fixed;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: background 0.15s;
    line-height: 1;
}

.product-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.product-lightbox__prev,
.product-lightbox__next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: background 0.15s;
    line-height: 1;
}

.product-lightbox__prev { left: 16px; }
.product-lightbox__next { right: 16px; }

.product-lightbox__prev:hover,
.product-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .product-detail-grid {
        gap: 16px;
    }

    .pdg-panel {
        padding-top: 6px;
        padding-bottom: 8px;
    }

    .product-options {
        gap: 18px;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }

    .product-gallery__main {
        grid-column: auto;
        grid-row: auto;
    }

    .product-gallery__thumbs {
        grid-column: auto;
        grid-row: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
        overflow: hidden;
    }

    /* 4 thumbs exactly fill the row: each = 25% minus 3/4 of total gap */
    .product-gallery__thumb {
        flex: 0 0 calc(25% - 6px);
        width: auto;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .product-option__card {
        width: 110px;
        height: 110px;
    }

    .product-qty-btn {
        min-width: 76px;
        height: 58px;
    }

    .product-qty-btn__qty  { font-size: 15px; }
    .product-qty-btn__price { font-size: 13px; }

    .product-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .product-cta__price-wrap {
        align-items: center;
    }

    .product-cta .btn-filled-pill {
        width: 100%;
    }
}
