/* PDP Adidas-style layout — Glamour */

.pdp-shell {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1024px) {
    .pdp-shell {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1280px) {
    .pdp-shell {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Outer grid — 24 cols so 0.5/12 steps are exact */
.pdp-grid {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
    width: 100%;
    align-items: start;
    overflow: visible;
}

/*
 * Same column split for single + multi products (gallery 7.5/12, buybox 4.5/12).
 * Single-image products keep this buybox width; the photo itself is capped below.
 */
.pdp-grid--single .pdp-gallery-wrap,
.pdp-grid--multi .pdp-gallery-wrap {
    grid-column: 1 / span 15;
    grid-row: 1;
}

.pdp-grid--single .pdp-below,
.pdp-grid--multi .pdp-below {
    grid-column: 1 / span 15;
    grid-row: 2;
}

.pdp-grid--single .pdp-buybox,
.pdp-grid--multi .pdp-buybox {
    grid-column: 16 / span 9;
    grid-row: 1 / span 2;
}

.pdp-buybox {
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 0;
    align-self: start;
}

.pdp-below {
    min-width: 0;
    width: 100%;
    margin-top: 0.5rem;
}

.pdp-below__tabs {
    display: block;
}

.pdp-below__accordions {
    display: none;
    gap: 0.75rem;
}

@media (min-width: 1181px) {
    .pdp-grid,
    .pdp-shell {
        overflow: visible;
    }

    .pdp-buybox {
        position: sticky !important;
        top: 5rem;
        max-height: none;
        overflow: visible;
    }
}

/* Stack below ~1180px (Bagisto breakpoint) */
@media (max-width: 1180px) {
    .pdp-grid,
    .pdp-grid--single,
    .pdp-grid--multi {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .pdp-grid--single .pdp-gallery-wrap,
    .pdp-grid--multi .pdp-gallery-wrap,
    .pdp-grid--single .pdp-buybox,
    .pdp-grid--multi .pdp-buybox,
    .pdp-grid--single .pdp-below,
    .pdp-grid--multi .pdp-below {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
    }

    .pdp-buybox {
        position: relative !important;
        top: auto;
        max-height: none;
        overflow: visible;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        order: 2;
    }

    .pdp-gallery-wrap {
        order: 1;
    }

    .pdp-below {
        order: 3;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .pdp-below__tabs {
        display: none;
    }

    .pdp-below__accordions {
        display: grid;
    }
}

/* Desktop gallery: thumbs | main images */
.pdp-gallery-desktop {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    align-items: start;
}

/* Show desktop gallery only ≥1181px; mobile gallery only ≤1180px */
.pdp-gallery-desktop-only {
    display: grid;
}

.pdp-gallery-mobile-only {
    display: none;
}

@media (max-width: 1180px) {
    .pdp-gallery-desktop-only {
        display: none !important;
    }

    .pdp-gallery-mobile-only {
        display: block !important;
        width: 100%;
    }
}

/* Thumbs ≈ 0.5/12 of page; rest is main image grid */
.pdp-gallery-desktop--single,
.pdp-gallery-desktop--multi {
    grid-template-columns: clamp(40px, 4.167vw, 56px) minmax(0, 1fr);
}

.pdp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: none;
    overflow: visible;
}

.pdp-thumbs__item {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f4f4f5;
    transition: border-color 0.15s ease;
}

.pdp-thumbs__item.is-active,
.pdp-thumbs__item:hover {
    border-color: #18181b;
}

.pdp-main {
    min-width: 0;
    width: 100%;
}

.pdp-main-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.pdp-main-grid--single {
    grid-template-columns: minmax(0, 1fr);
}

/* Single photo: wide gallery column, but image capped (~one multi cell) */
@media (min-width: 1181px) {
    .pdp-gallery-desktop--single .pdp-main {
        max-width: min(540px, 36vw);
        width: 100%;
    }

    .pdp-gallery-desktop--single .pdp-main-grid--single .pdp-main-grid__item {
        max-height: min(720px, calc(100vh - 8rem));
        aspect-ratio: 3 / 4;
    }

    .pdp-gallery-desktop--single .pdp-main-grid--single .pdp-main-grid__item img,
    .pdp-gallery-desktop--single .pdp-main-grid--single .pdp-main-grid__item video {
        object-fit: contain;
        background: #f4f4f5;
    }
}

.pdp-main-grid__item {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #f4f4f5;
    cursor: zoom-in;
    scroll-margin-top: 6rem;
}

.pdp-main-grid__item img,
.pdp-main-grid__item video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-main-grid__item.is-active {
    outline: 2px solid #18181b;
    outline-offset: -2px;
}

.pdp-mehr-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid #18181b;
    background: #fff;
    color: #18181b;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pdp-mehr-btn:hover {
    background: #18181b;
    color: #fff;
}

/* Mobile thumbs */
.pdp-mobile-thumbs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem 0;
}

.pdp-mobile-thumbs__viewport {
    flex: 1;
    overflow: hidden;
}

.pdp-mobile-thumbs__track {
    display: flex;
    transition: transform 0.25s ease;
}

.pdp-mobile-thumbs__item {
    flex: 0 0 25%;
    padding: 0 0.2rem;
    box-sizing: border-box;
    background: none;
    border: 0;
    cursor: pointer;
}

.pdp-mobile-thumbs__item img,
.pdp-mobile-thumbs__item video {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 2px solid transparent;
    background: #f4f4f5;
}

.pdp-mobile-thumbs__item.is-active img,
.pdp-mobile-thumbs__item.is-active video {
    border-color: #18181b;
}

.pdp-mobile-thumbs__nav {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 1px solid #d4d4d8;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
}

.pdp-mobile-thumbs__nav:disabled {
    opacity: 0.35;
    cursor: default;
}

/* Option grids */
.pdp-option-grid {
    display: grid;
    gap: 0.4rem;
    width: 100%;
}

.pdp-option-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pdp-option-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pdp-option-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pdp-option-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.35rem;
    border: 1px solid #d4d4d8;
    background: #fff;
    color: #18181b;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.pdp-option-cell:hover {
    border-color: #18181b;
    background: #f4f4f5;
}

.pdp-option-cell.is-selected {
    border-color: #18181b;
    background: #18181b;
    color: #fff;
}

.pdp-option-cell.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pdp-option-cell input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pdp-option-cell--swatch {
    padding: 0.35rem;
    min-height: 0;
}

.pdp-option-cell__swatch-img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.pdp-option-cell__label {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: inherit;
}

.pdp-option-cell--font {
    min-height: 3.25rem;
    font-size: 1rem;
}

.pdp-gravur-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 640px) {
    .pdp-option-grid--3,
    .pdp-option-grid--4,
    .pdp-option-grid--5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pdp-gravur-row {
        grid-template-columns: 1fr;
    }
}
