/* PAGE WRAPPER */
.pd-page {
    background: var(--color-bg);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* BREADCRUMB */
.pd-breadcrumb {
    background: #0c0e17;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 0;
}

.pd-breadcrumb .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.pd-breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.pd-breadcrumb a:hover {
    color: var(--color-accent);
}

.pd-breadcrumb .sep {
    opacity: 0.4;
}

.pd-breadcrumb .current {
    color: var(--color-accent);
    font-weight: 500;
}

/* ===== MAIN CONTAINER ===== */
.pd-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.pd-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding-top: 48px;
}

/* LEFT: IMAGE GALLERY  */
.pd-gallery {
    position: relative;
    /* needed for zoom-result absolute panel */
    /* sticky on desktop so info scrolls past */
    position: sticky;
    top: 90px;
    align-self: start;
}

/* Main image */
.pd-main-img-wrap {
    position: relative;
    background: #f5f5f5;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(201, 168, 108, 0.12);
    cursor: crosshair;
}

#pd-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.28s ease, transform 0.4s ease;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
    user-select: none;
    pointer-events: none;
}

#pd-main-img.pd-img-fade {
    opacity: 0;
    transform: scale(0.97);
}

/* ────────────────────────────────
           MAGNIFIER LENS (desktop)
        ──────────────────────────────── */
.pd-zoom-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 5px 11px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 3;
}

.pd-zoom-hint.hidden {
    opacity: 0;
}

.pd-magnifier-lens {
    position: absolute;
    border-radius: 50%;
    width: 110px;
    height: 110px;
    border: 2px solid rgba(201, 168, 108, 0.7);
    box-shadow: 0 0 0 1px rgba(201, 168, 108, 0.25), 0 8px 32px rgba(0, 0, 0, 0.45);
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
    display: none;
    will-change: transform;
}

/* Result panel – shows up to the RIGHT of the gallery column */
.pd-zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 380px;
    height: 380px;
    border-radius: 16px;
    border: 1px solid rgba(201, 168, 108, 0.25);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    background: #f5f5f5;
    background-repeat: no-repeat;
    display: none;
    z-index: 100;
    overflow: hidden;
}

/* ────────────────────────────────
           MOBILE LIGHTBOX / TAP-TO-ZOOM
        ──────────────────────────────── */
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.pd-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.pd-lightbox-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.pd-lightbox-inner.grabbing {
    cursor: grabbing;
}

.pd-lightbox-img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transform-origin: center center;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.2s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.pd-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.2s;
}

.pd-lightbox-close:hover {
    background: rgba(201, 168, 108, 0.3);
}

.pd-lightbox-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.72rem;
    padding: 6px 16px;
    border-radius: 20px;
    pointer-events: none;
    letter-spacing: 0.4px;
}

.pd-lightbox-zoom-bar {
    position: absolute;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 18px;
    border-radius: 30px;
    z-index: 10001;
}

.pd-lightbox-zoom-bar button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s;
}

.pd-lightbox-zoom-bar button:hover {
    color: var(--color-accent);
}

.pd-lightbox-zoom-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    min-width: 38px;
    text-align: center;
}

/* Mobile: show tap hint on the main img wrap */
@media (hover: none) {
    .pd-main-img-wrap {
        cursor: zoom-in;
    }
}

/* Hide zoom result panel when gallery is stacked (≤1024px) */
@media (max-width: 1024px) {
    .pd-zoom-result {
        display: none !important;
    }
}

/* Offer badge on main image */
.pd-offer-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #c9a86c, #e0c080);
    color: #1a1208;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(201, 168, 108, 0.35);
    z-index: 2;
}

/* Thumbnails */
.pd-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pd-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
    flex-shrink: 0;
}

.pd-thumb img {
    max-width: 99%;
    max-height: 99%;
    object-fit: contain;
}

.pd-thumb:hover {
    border-color: rgba(201, 168, 108, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.pd-thumb.active {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent), 0 6px 16px rgba(201, 168, 108, 0.25);
}

/* ──────────────────────────────
       RIGHT: PRODUCT INFO
    ────────────────────────────── */
.pd-info {
    padding-top: 8px;
}

.pd-brand {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    border: 1px solid rgba(201, 168, 108, 0.3);
    padding: 4px 14px;
    border-radius: 4px;
    margin-bottom: 14px;
    background: rgba(201, 168, 108, 0.06);
}

.pd-product-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary) !important;
    line-height: 1.2;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Price Block */
.pd-price-block {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px 20px;
    background: #12151f;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pd-price-now {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--color-accent);
    letter-spacing: -0.5px;
}

.pd-price-was {
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--color-text-subtle);
}

.pd-price-save {
    font-size: 0.75rem;
    font-weight: 700;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    margin-left: auto;
}

/* Description */
.pd-desc-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.pd-description {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--color-divider);
}

/* Quick Specs Pills */
.pd-quick-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.pd-spec-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #12151f;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    transition: border-color 0.2s;
}

.pd-spec-pill:hover {
    border-color: rgba(201, 168, 108, 0.3);
}

.pd-spec-pill i {
    color: var(--color-accent);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.pd-spec-pill strong {
    color: var(--color-text-primary);
}

/* ─── CTA Buttons ─── */
.pd-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.pd-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-light) 100%);
    color: #1a1208 !important;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 168, 108, 0.25);
}

.pd-btn-primary:hover {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201, 168, 108, 0.4);
    color: #1a1208 !important;
}

.pd-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
    color: var(--color-accent) !important;
    border: 1.5px solid rgba(201, 168, 108, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pd-btn-secondary:hover {
    background: rgba(201, 168, 108, 0.08);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 108, 0.15);
}

/* Trust Badges */
.pd-trust {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.pd-trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.pd-trust-item i {
    color: var(--color-accent);
    font-size: 0.9rem;
}

/* ──────────────────────────────
       BOTTOM: SPECS SECTIONS
    ────────────────────────────── */
.pd-specs-section {
    margin-top: 64px;
    border-top: 1px solid var(--color-divider);
    padding-top: 48px;
}

.pd-specs-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pd-specs-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(201, 168, 108, 0.35), transparent);
}

.pd-specs-icon {
    width: 38px;
    height: 38px;
    background: rgba(201, 168, 108, 0.1);
    border: 1px solid rgba(201, 168, 108, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* Specs Grid */
.pd-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.pd-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #12151f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 14px 18px;
    transition: border-color 0.2s, transform 0.2s;
}

.pd-spec-row:hover {
    border-color: rgba(201, 168, 108, 0.2);
    transform: translateX(3px);
}

.pd-spec-key {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-spec-key i {
    color: rgba(201, 168, 108, 0.5);
    font-size: 0.8rem;
}

.pd-spec-val {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: right;
}

.pd-spec-val .unit {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-left: 2px;
}

/* Type Badge */
.pd-type-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.pd-type-badge.full-rim {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.pd-type-badge.half-rim {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.pd-type-badge.rimless {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.pd-type-badge.normal {
    background: rgba(201, 168, 108, 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(201, 168, 108, 0.25);
}

.pd-type-badge.blue-cut {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.pd-type-badge.power {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.pd-type-badge.uv-protection {
    background: rgba(234, 179, 8, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

/* No specs placeholder */
.pd-no-specs {
    text-align: center;
    padding: 36px;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    background: #12151f;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.07);
}

.pd-no-specs i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 10px;
    opacity: 0.4;
}

/* Two-column specs layout */
.pd-specs-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.pd-specs-sub-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-specs-sub-title i {
    color: var(--color-accent);
}

/* ─── 1024px: layout stacks ─── */
@media (max-width: 1024px) {
    .pd-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* gallery: de-sticky so it doesn't float over info */
    .pd-gallery {
        position: relative;
        /* keep relative so any overlays still work */
        top: auto;
    }

    /* ensure the info section is always fully below the gallery */
    .pd-info {
        margin-top: 0;
        padding-top: 4px;
    }

    .pd-specs-cols {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ─── 768px: tablets ─── */
@media (max-width: 768px) {
    .pd-container {
        padding: 0 16px;
    }

    .pd-layout {
        padding-top: 28px;
        gap: 28px;
    }

    /* Info section */
    .pd-info {
        padding-top: 0;
    }

    .pd-product-name {
        font-size: 1.55rem;
        letter-spacing: 0.2px;
    }

    /* Price block */
    .pd-price-block {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px;
    }

    .pd-price-now {
        font-size: 1.6rem;
    }

    .pd-price-was {
        font-size: 0.92rem;
    }

    .pd-price-save {
        margin-left: 0;
    }

    /* Description */
    .pd-description {
        font-size: 0.88rem;
        line-height: 1.7;
        margin-bottom: 22px;
        padding-bottom: 22px;
    }

    /* Quick spec pills */
    .pd-quick-specs {
        gap: 8px;
        margin-bottom: 22px;
    }

    .pd-spec-pill {
        padding: 7px 12px;
        font-size: 0.76rem;
    }

    /* CTA buttons */
    .pd-btn-primary,
    .pd-btn-secondary {
        padding: 13px 20px;
        font-size: 0.85rem;
    }

    /* Trust badges */
    .pd-trust {
        gap: 10px 16px;
    }

    .pd-trust-item {
        font-size: 0.74rem;
    }

    /* Specs grid */
    .pd-specs-grid {
        grid-template-columns: 1fr;
    }

    .pd-specs-section {
        margin-top: 44px;
        padding-top: 36px;
    }

    .pd-specs-section-title {
        font-size: 1.2rem;
    }
}

/* ─── 576px: large phones ─── */
@media (max-width: 576px) {
    .pd-product-name {
        font-size: 1.35rem;
    }

    .pd-brand {
        font-size: 0.68rem;
        padding: 3px 12px;
    }

    /* Price block: stack vertically */
    .pd-price-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 16px;
    }

    .pd-price-now {
        font-size: 1.5rem;
    }

    .pd-price-save {
        align-self: flex-start;
    }

    /* Description trimmed */
    .pd-description {
        font-size: 0.85rem;
        margin-bottom: 18px;
        padding-bottom: 18px;
    }

    /* Spec pills wrap tightly */
    .pd-quick-specs {
        gap: 6px;
        margin-bottom: 18px;
    }

    .pd-spec-pill {
        padding: 6px 10px;
        font-size: 0.73rem;
        border-radius: 6px;
    }

    /* CTA */
    .pd-actions {
        gap: 10px;
        margin-bottom: 24px;
    }

    .pd-btn-primary,
    .pd-btn-secondary {
        padding: 13px 16px;
        font-size: 0.82rem;
        letter-spacing: 0.5px;
    }

    /* Trust badges: 2×2 grid */
    .pd-trust {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px 8px;
    }

    .pd-trust-item {
        font-size: 0.72rem;
        gap: 6px;
    }

    .pd-trust-item i {
        font-size: 0.82rem;
    }

    /* Specs section */
    .pd-specs-section {
        margin-top: 36px;
        padding-top: 28px;
    }

    .pd-specs-section-title {
        font-size: 1.1rem;
        gap: 10px;
    }

    .pd-spec-row {
        padding: 12px 14px;
    }

    .pd-spec-key {
        font-size: 0.72rem;
    }

    .pd-spec-val {
        font-size: 0.82rem;
    }
}

/* ─── 480px: small phones ─── */
@media (max-width: 480px) {
    .pd-product-name {
        font-size: 1.2rem;
    }

    .pd-price-now {
        font-size: 1.35rem;
    }

    .pd-price-was {
        font-size: 0.85rem;
    }

    .pd-desc-label {
        font-size: 0.66rem;
    }

    .pd-description {
        font-size: 0.82rem;
    }

    .pd-btn-primary,
    .pd-btn-secondary {
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    /* Thumbs smaller */
    .pd-thumb {
        width: 58px;
        height: 58px;
        border-radius: 8px;
    }

    .pd-thumbs {
        gap: 8px;
    }
}

/* ─── 380px: very small phones ─── */
@media (max-width: 380px) {
    .pd-product-name {
        font-size: 1.1rem;
    }

    .pd-price-now {
        font-size: 1.25rem;
    }

    .pd-btn-primary,
    .pd-btn-secondary {
        font-size: 0.76rem;
        padding: 11px 12px;
    }

    /* Trust badges: single column on very small */
    .pd-trust {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pd-spec-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .pd-spec-val {
        text-align: left;
    }
}

/* ─── Related Products Responsive ─── */

/* Wrap so we can show scroll hint on small screens */
.pd-related-wrap {
    position: relative;
}

/* Default: 4 columns (overrides global .products-grid if needed) */
.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ≤ 1200px: 3 columns */
@media (max-width: 1200px) {
    .pd-related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

/* ≤ 900px: 2 columns */
@media (max-width: 900px) {
    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* ≤ 576px: 2 columns, tighter gap */
@media (max-width: 576px) {
    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Slightly smaller card text to fit 2 cols on phones */
    .pd-related-grid .product-title {
        font-size: 0.82rem;
        min-height: unset;
    }

    .pd-related-grid .current-price {
        font-size: 0.95rem;
    }

    .pd-related-grid .product-media {
        height: 160px;
    }

    .pd-related-grid .product-media img {
        max-height: 110px;
    }
}

/* ≤ 420px: horizontal scroll carousel */
@media (max-width: 420px) {
    .pd-related-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 12px;
        /* Hide scrollbar visual but keep functional */
        scrollbar-width: none;
    }

    .pd-related-grid::-webkit-scrollbar {
        display: none;
    }

    .pd-related-grid .product-card {
        flex: 0 0 72vw;
        max-width: 260px;
        scroll-snap-align: start;
    }

    /* Fade-out "scroll hint" on the right edge */
    .pd-related-wrap::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 60px;
        height: 100%;
        background: linear-gradient(to right, transparent, var(--color-bg) 90%);
        pointer-events: none;
        border-radius: 0 16px 16px 0;
    }

    .pd-related-grid .product-title {
        font-size: 0.82rem;
        min-height: unset;
    }

    .pd-related-grid .product-media {
        height: 150px;
    }

    .pd-related-grid .product-media img {
        max-height: 105px;
    }
}

/* ≤ 375px: slightly wider cards in scroll */
@media (max-width: 375px) {
    .pd-related-grid .product-card {
        flex: 0 0 80vw;
    }
}