/* ============================================================
   GHUMGHOR — Brand Design System
   ঘরের সবকিছু, এক ঠিকানায়
   Warm · Premium · Trustworthy · Conversion-focused
   ------------------------------------------------------------
   Loaded LAST in <head> so it is the single source of truth
   for the storefront look & feel.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ───────────────────────────────────────────────────────────── */
:root {
    /* Brand */
    --color-primary:        #0F5C5E;
    --color-primary-dark:   #08484A;
    --color-primary-light:  #E3F1F0;

    --color-accent:         #D97745;
    --color-accent-dark:    #B95D30;
    --color-accent-light:   #F6E4DA;

    /* Surfaces */
    --color-background:     #FAF8F3;
    --color-surface:        #FFFFFF;
    --color-surface-alt:    #F4F1EA;

    /* Text */
    --color-text:           #1F2933;
    --color-text-secondary: #6B7280;

    /* Lines */
    --color-border:         #E5E1D8;
    --color-border-strong:  #D7D2C4;

    /* Semantic */
    --color-success:        #2E7D5B;
    --color-success-light:  #E3F1EA;
    --color-danger:         #C94C4C;
    --color-danger-light:   #FBEAEA;
    --color-discount:       #C94C4C;
    --color-rating:         #E3A72F;

    /* Legacy aliases (used by existing partials) */
    --primary:        var(--color-primary);
    --primary-dark:   var(--color-primary-dark);
    --accent:         var(--color-accent);
    --accent-hover:   var(--color-accent-dark);
    --accent-light:   var(--color-accent-light);
    --bg:             var(--color-background);
    --surface:        var(--color-surface);
    --text:           var(--color-text);
    --text-muted:     var(--color-text-secondary);
    --border:         var(--color-border);
    --gold:           var(--color-rating);
    --green:          var(--color-success);
    --danger:         var(--color-danger);
    --red:            var(--color-danger);

    /* Spacing / radius / motion */
    --radius-sm:  8px;
    --radius:     12px;
    --radius-lg:  14px;
    --radius-xl:  18px;
    --radius-full: 9999px;

    --shadow-xs:  0 1px 2px rgba(31, 41, 51, 0.04);
    --shadow-sm:  0 1px 3px rgba(31, 41, 51, 0.06);
    --shadow:     0 4px 12px -4px rgba(31, 41, 51, 0.10);
    --shadow-md:  0 10px 24px -8px rgba(31, 41, 51, 0.14);
    --shadow-lg:  0 18px 40px -14px rgba(31, 41, 51, 0.18);

    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Neutral scale (kept so legacy partials that reference --gray-* keep working) */
    --gray-50:  #FAF8F3;
    --gray-100: #F4F1EA;
    --gray-200: #E5E1D8;
    --gray-300: #D7D2C4;
    --gray-400: #A8A296;
    --gray-500: #6B7280;
    --gray-600: #52585F;
    --gray-700: #3A4046;
    --gray-800: #262C31;

    /* Type */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-bn: 'Noto Sans Bengali', 'Inter', sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   2. BASE & TYPOGRAPHY
   ───────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font) !important;
    background-color: var(--color-background) !important;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Bangla text automatically uses the Bengali face */
:lang(bn),
.font-bn,
body.bn { font-family: var(--font-bn) !important; }

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 700; }

p { color: var(--color-text); }

a { color: var(--color-primary); transition: color var(--transition); }
a:hover { color: var(--color-accent); text-decoration: none; }

img { max-width: 100%; height: auto; }

::selection { background: var(--color-primary); color: #fff; }

/* ─────────────────────────────────────────────────────────────
   3. LAYOUT HELPERS
   ───────────────────────────────────────────────────────────── */
.gg-container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 16px;
}

.gg-section { padding: 40px 0; }
.gg-section-tight { padding: 28px 0; }

@media (max-width: 767px) {
    .gg-section { padding: 26px 0; }
}

/* Bootstrap 4 ships no `gap-*` utilities (they are 5.0+), but the markup uses
   them — e.g. the home review card's avatar/name row, which was rendering
   with no spacing at all. Define the Bootstrap 5 values so those rows behave
   as intended. */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

/* Section header --------------------------------------------------------- */
.gg-section-head,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 20px;
}

/* Children must be allowed to shrink, otherwise long headings push the
   "view all" link off-canvas at 360–414px. */
.gg-section-head > *,
.section-heading > * { min-width: 0; }

.gg-section-head h2,
.section-heading h2 {
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    letter-spacing: -0.01em;
    overflow-wrap: break-word;
}

.gg-section-head .gg-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 4px;
}

.gg-section-head .gg-view-all,
.section-heading .view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    transition: gap var(--transition), color var(--transition);
}
.gg-section-head .gg-view-all:hover,
.section-heading .view-all:hover { gap: 10px; color: var(--color-accent); }

/* Soft underline accent instead of the old hard bar */
.section-heading h2::after { display: none; }

/* ─────────────────────────────────────────────────────────────
   4. BUTTON SYSTEM  (one height / padding / radius / weight)
   ───────────────────────────────────────────────────────────── */
.btn,
.gg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    font-family: var(--font) !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius) !important;
    border: 1.5px solid transparent;
    line-height: 1.2;
    transition: background-color var(--transition), border-color var(--transition),
                color var(--transition), box-shadow var(--transition);
    cursor: pointer;
    text-decoration: none !important;
}

/* Primary — teal */
.btn-primary,
.gg-btn-primary {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
    box-shadow: var(--shadow-xs) !important;
}
.btn-primary:hover,
.gg-btn-primary:hover {
    background: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
    color: #fff !important;
    box-shadow: var(--shadow) !important;
}

/* Secondary — outline teal */
.btn-secondary,
.gg-btn-outline {
    background: #fff !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}
.btn-secondary:hover,
.gg-btn-outline:hover {
    background: var(--color-primary-light) !important;
    color: var(--color-primary-dark) !important;
}

/* Promotional — terracotta, used sparingly */
.gg-btn-promo,
.btn-promo,
.btn-accent {
    background: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
    color: #fff !important;
}
.gg-btn-promo:hover,
.btn-promo:hover,
.btn-accent:hover {
    background: var(--color-accent-dark) !important;
    border-color: var(--color-accent-dark) !important;
    color: #fff !important;
}

/* Legacy aliases used by existing views */
.btn-blue {
    background: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
    color: #fff !important;
}
.btn-blue:hover {
    background: var(--color-accent-dark) !important;
    border-color: var(--color-accent-dark) !important;
    color: #fff !important;
}
.btn-outline-blue {
    background: #fff !important;
    border: 1.5px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
}
.btn-outline-blue:hover {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

/* White button (on dark banners) */
.btn-white {
    background: #fff !important;
    border-color: #fff !important;
    color: var(--color-primary) !important;
}
.btn-white:hover {
    background: var(--color-accent-light) !important;
    border-color: var(--color-accent-light) !important;
    color: var(--color-accent-dark) !important;
}

/* Ghost on dark */
.gg-btn-on-dark {
    background: rgba(255, 255, 255, 0.10) !important;
    border-color: rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
}
.gg-btn-on-dark:hover {
    background: rgba(255, 255, 255, 0.20) !important;
    color: #fff !important;
}

.btn-sm, .gg-btn-sm { min-height: 38px; padding: 8px 16px; font-size: 13px; }
.btn-lg, .gg-btn-lg { min-height: 52px; padding: 14px 30px; font-size: 15.5px; }
.btn-block, .gg-btn-block { width: 100%; }

/* ─────────────────────────────────────────────────────────────
   5. CARD SYSTEM
   ───────────────────────────────────────────────────────────── */
.gg-card,
.card-premium {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.gg-card:hover,
.card-premium:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow);
}

.card-lift { transition: transform var(--transition), box-shadow var(--transition); }
.card-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.gg-card-pad { padding: 20px; }

/* ─────────────────────────────────────────────────────────────
   6. BADGES
   ───────────────────────────────────────────────────────────── */
.gg-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: var(--radius-full);
    line-height: 1.5;
    white-space: nowrap;
}
.gg-badge-sale     { background: var(--color-discount); color: #fff; }
.gg-badge-new      { background: var(--color-primary); color: #fff; }
.gg-badge-best     { background: var(--color-rating); color: #4A3200; }
.gg-badge-limited  { background: var(--color-accent); color: #fff; }
.gg-badge-soft     { background: var(--color-primary-light); color: var(--color-primary-dark); }
.gg-badge-danger   { background: #FBEAEA; color: var(--color-danger); }
.gg-badge-success  { background: #E4F1EA; color: var(--color-success); }

/* ─────────────────────────────────────────────────────────────
   7. RATING  &  PRICE
   ───────────────────────────────────────────────────────────── */
.gg-stars { display: inline-flex; gap: 1px; color: var(--color-rating); font-size: 13px; line-height: 1; }
.gg-stars .off { color: #D9D5CA; }
.gg-rating-count { font-size: 12px; color: var(--color-text-secondary); }

.gg-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.gg-price .now {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.gg-price .was {
    font-size: 13.5px;
    color: var(--color-text-secondary);
    text-decoration: line-through;
}
.gg-price .off {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--color-discount);
    background: #FBEAEA;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* ─────────────────────────────────────────────────────────────
   8. PRODUCT CARD  (single reusable component)
   ───────────────────────────────────────────────────────────── */
.gg-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.gg-product-card:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* Media --------------------------------------------------------------- */
.gg-product-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-surface-alt);
    overflow: hidden;
}
.gg-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}
.gg-product-card:hover .gg-product-media img { transform: scale(1.05); }

.gg-product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    max-width: calc(100% - 60px);
}

/* On a 2-column phone grid the reserved width above is only ~80px, while the
   "LIMITED STOCK" badge is ~105px. The shared .gg-badge rules are nowrap, so
   the text ran straight out of its pill and under the wishlist button. Let the
   product-card badges wrap inside the reserved width instead. */
.gg-product-badges .gg-badge {
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.25;
}

.gg-wish {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color var(--transition), background-color var(--transition);
}
.gg-wish svg { width: 17px; height: 17px; }
.gg-wish:hover { color: var(--color-danger); background: #fff; }

/* Body ----------------------------------------------------------------- */
.gg-product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
}

.gg-product-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    transition: color var(--transition);
}
.gg-product-title:hover { color: var(--color-primary); }

.gg-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.gg-product-price { margin-top: auto; padding-top: 8px; }

.gg-product-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.gg-add-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1.5px solid var(--color-primary);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.gg-add-cart:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff !important;
}
.gg-add-cart svg { width: 15px; height: 15px; }

.gg-quick-view {
    flex: 0 0 auto;
    width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}
.gg-quick-view:hover { border-color: var(--color-primary); color: var(--color-primary); }
.gg-quick-view svg { width: 16px; height: 16px; }

.gg-stock {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.gg-stock-in  { background: #E4F1EA; color: var(--color-success); }
.gg-stock-out { background: #FBEAEA; color: var(--color-danger); }

/* Grid --------------------------------------------------------------- */
.gg-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 1199px) { .gg-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 576–767 is tablet portrait: 3 columns read better than a stretched 2 */
@media (min-width: 576px) and (max-width: 767px) { .gg-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 575px)  { .gg-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* Compact mobile card */
@media (max-width: 575px) {
    .gg-product-body { padding: 10px 11px 12px; }
    .gg-product-title { font-size: 13px; }
    .gg-add-cart { min-height: 38px; font-size: 12.5px; }
    .gg-quick-view { display: none; }
    .gg-product-media { aspect-ratio: 1 / 1; }
}

/* ─────────────────────────────────────────────────────────────
   9. CATEGORY CARD
   ───────────────────────────────────────────────────────────── */
.gg-category-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}
@media (max-width: 1199px) { .gg-category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .gg-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 400px)  { .gg-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gg-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 14px 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none !important;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.gg-category-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}
.gg-category-card .thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 96px;
    border-radius: 50%;
    background: var(--color-primary-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gg-category-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gg-category-card .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gg-category-card .count { font-size: 11px; color: var(--color-text-secondary); }
.gg-category-card:hover .name { color: var(--color-primary); }

/* ─────────────────────────────────────────────────────────────
   10. HERO
   ───────────────────────────────────────────────────────────── */
.gg-hero {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    overflow: hidden;
    border-radius: var(--radius-lg);
}
.gg-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 32px;
    padding: 56px 48px;
    min-height: 420px;
}
.gg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #FFF3EC;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 18px;
}
.gg-hero-title {
    font-family: var(--font-bn);
    color: #fff;
    font-size: clamp(1.7rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 14px;
}
.gg-hero-text {
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    font-family: var(--font-bn);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 28px;
}
.gg-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.gg-hero-media {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 3;
    background: var(--color-primary-light);
}
.gg-hero-media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 991px) {
    .gg-hero-inner { grid-template-columns: 1fr; padding: 36px 26px; text-align: center; min-height: 0; }
    .gg-hero-text { margin-inline: auto; }
    .gg-hero-actions { justify-content: center; }
    .gg-hero-media { aspect-ratio: 16 / 10; }
}
@media (max-width: 575px) {
    .gg-hero { border-radius: var(--radius); }
    .gg-hero-inner { padding: 28px 18px; gap: 22px; }
}

/* ─────────────────────────────────────────────────────────────
   11. TRUST / FEATURE BLOCK
   ───────────────────────────────────────────────────────────── */
/* The home-page "Our promise" section is desktop/tablet only: the same COD,
   quality and delivery points already appear on phones (cart, checkout, PDP),
   so on small screens it is noise between the product grids. */
@media (max-width: 767px) {
    .gg-promise { display: none; }
}

.gg-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
@media (max-width: 991px) { .gg-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Below 576px two columns leave ~70px for the copy — stack instead */
@media (max-width: 575px) {
    .gg-trust { grid-template-columns: 1fr; gap: 10px; }
    .gg-trust-item { padding: 14px; }
}

.gg-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.gg-trust-item .ico {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 16px;
}
.gg-trust-item h6 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 3px;
}
.gg-trust-item p {
    font-size: 12.5px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.55;
}

/* Legacy trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 16px 0; }
.trust-badges .badge-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-secondary); }
.trust-badges .badge-item i { color: var(--color-success); font-size: 15px; }

/* ─────────────────────────────────────────────────────────────
   12. PROMO BANNER
   ───────────────────────────────────────────────────────────── */
.gg-promo {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-accent-light);
    border: 1px solid #EAD6C9;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 24px;
    padding: 36px 40px;
}
.gg-promo h3 { font-size: clamp(1.3rem, 2.6vw, 2rem); margin-bottom: 8px; }
.gg-promo p { color: #6B4A38; margin-bottom: 20px; max-width: 480px; }
.gg-promo-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.gg-promo-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
    .gg-promo { grid-template-columns: 1fr; padding: 24px 20px; text-align: center; }
    .gg-promo p { margin-inline: auto; }
    .gg-promo-media { order: -1; aspect-ratio: 16 / 10; }
}

/* ─────────────────────────────────────────────────────────────
   13. NEWSLETTER / CTA
   ───────────────────────────────────────────────────────────── */
.gg-newsletter {
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 46px 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.gg-newsletter h3 { color: #fff; margin-bottom: 8px; }
.gg-newsletter p { color: rgba(255, 255, 255, 0.82); margin-bottom: 22px; }
.gg-newsletter-form {
    display: flex;
    gap: 8px;
    max-width: 520px;
    flex-wrap: wrap;
}
.gg-newsletter-form input {
    flex: 1 1 240px;
    min-height: 48px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    background: #fff;
    color: var(--color-text);
    font-size: 14px;
    outline: none;
}
.gg-newsletter-form input:focus { box-shadow: 0 0 0 3px rgba(217, 119, 69, 0.35); }
.gg-newsletter-form button {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 10px 26px;
    border: none;
    border-radius: var(--radius);
    background: var(--color-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition);
}
.gg-newsletter-form button:hover { background: var(--color-accent-dark); }
@media (max-width: 575px) {
    .gg-newsletter { padding: 28px 20px; }
    /* Side by side, the input and the button leave the button stranded on its
       own line at a third of the width — stack them full-width instead. */
    .gg-newsletter-form input,
    .gg-newsletter-form button { flex: 1 1 100%; }
}

/* ─────────────────────────────────────────────────────────────
   14. FAQ (accordion)
   ───────────────────────────────────────────────────────────── */
.gg-faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}
.gg-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: color var(--transition);
}
.gg-faq-q:hover { color: var(--color-primary); }
.gg-faq-q i {
    flex: 0 0 auto;
    color: var(--color-text-secondary);
    font-size: 12px;
    transition: transform var(--transition);
}
/* Questions are admin-entered text and answers are raw HTML, so neither can be
   trusted to contain spaces. The question is a flex item, whose automatic
   min-width is min-content — without an explicit min-width:0 the row widens
   and the page scrolls sideways, so break-word alone is not enough. */
.gg-faq-q > span { min-width: 0; overflow-wrap: break-word; }
.gg-faq-a {
    display: none;
    padding: 0 18px 16px;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--color-text-secondary);
    overflow-wrap: break-word;
}
.gg-faq-a img,
.gg-faq-a table { max-width: 100%; }
.gg-faq-item.open .gg-faq-a { display: block; }
.gg-faq-item.open .gg-faq-q i { transform: rotate(180deg); }

/* ─────────────────────────────────────────────────────────────
   15. FORM CONTROLS
   ───────────────────────────────────────────────────────────── */
.form-control,
.gg-input {
    border: 1.5px solid var(--color-border) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
    font-size: 14px;
    min-height: 46px;
    padding: 10px 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--color-text-secondary); }
.form-control:focus,
.gg-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px var(--color-primary-light) !important;
}

/* ─────────────────────────────────────────────────────────────
   16. QUANTITY SELECTOR
   ───────────────────────────────────────────────────────────── */
.gg-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}
.gg-qty button {
    width: 42px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition);
}
.gg-qty button:hover { background: var(--color-primary-light); }
.gg-qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.gg-qty input {
    width: 54px;
    height: 44px;
    text-align: center;
    border: none;
    border-inline: 1.5px solid var(--color-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    outline: none;
}

/* ─────────────────────────────────────────────────────────────
   17. BREADCRUMB
   ───────────────────────────────────────────────────────────── */
.gg-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}
.gg-breadcrumb a { color: var(--color-text-secondary); }
.gg-breadcrumb a:hover { color: var(--color-primary); }
.gg-breadcrumb .sep { color: var(--color-border-strong); }
.gg-breadcrumb .current { color: var(--color-text); font-weight: 600; }

/* ─────────────────────────────────────────────────────────────
   18. UTILITIES (kept for legacy templates)
   ───────────────────────────────────────────────────────────── */
.fs-10{font-size:10px !important}.fs-12{font-size:12px !important}.fs-13{font-size:13px !important}
.fs-14{font-size:14px !important}.fs-15{font-size:15px !important}.fs-16{font-size:16px !important}
.fs-18{font-size:18px !important}.fs-20{font-size:20px !important}.fs-22{font-size:22px !important}
.fs-24{font-size:24px !important}.fs-28{font-size:28px !important}.fs-32{font-size:32px !important}

.fw-300{font-weight:300 !important}.fw-400{font-weight:400 !important}.fw-500{font-weight:500 !important}
.fw-600{font-weight:600 !important}.fw-700{font-weight:700 !important}.fw-800{font-weight:800 !important}

.text-primary-brand { color: var(--color-primary) !important; }
.text-accent-brand  { color: var(--color-accent) !important; }
.text-secondary-brand { color: var(--color-text-secondary) !important; }
.text-success-brand { color: var(--color-success) !important; }
.text-danger-brand  { color: var(--color-danger) !important; }
.text-rating-brand  { color: var(--color-rating) !important; }

.bg-surface   { background: var(--color-surface) !important; }
.bg-page      { background: var(--color-background) !important; }
.bg-primary-brand { background: var(--color-primary) !important; }
.bg-accent-brand  { background: var(--color-accent) !important; }
.bg-primary-soft  { background: var(--color-primary-light) !important; }
.bg-accent-soft   { background: var(--color-accent-light) !important; }

.rounded-brand    { border-radius: var(--radius) !important; }
.shadow-brand     { box-shadow: var(--shadow) !important; }
.shadow-brand-md  { box-shadow: var(--shadow-md) !important; }

/* Fade-in-on-view (subtle, opt-in) */
@keyframes ggFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.gg-animate > * { animation: ggFadeUp 240ms ease both; }
.gg-animate > *:nth-child(2) { animation-delay: 60ms; }
.gg-animate > *:nth-child(3) { animation-delay: 120ms; }
.gg-animate > *:nth-child(4) { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
    .gg-animate > *, .gg-product-card, .gg-product-media img { animation: none !important; transition: none !important; }
}

/* ─────────────────────────────────────────────────────────────
   19. RESPONSIVE SAFETY NET
   Guarantees no horizontal scroll / clipped text at
   360 · 390 · 414 · 768 · 1024 · 1280 · 1440
   ───────────────────────────────────────────────────────────── */
.gg-product-grid > *,
.gg-category-grid > * { min-width: 0; }

/* Grid/flex children default to min-width:auto and can force horizontal
   scroll when they hold long unbreakable strings (SKUs, URLs, prices). */
.row > [class*="col-"] { min-width: 0; }

h1, h2, h3, h4, h5, h6,
p, .gg-product-title, .gg-category-card .name {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Prices and labels must never wrap mid-number */
.gg-price .now,
.gg-price .was,
.gg-price .off,
.os-total .os-value,
.pd-current { white-space: nowrap; }

/* Tables are a classic overflow source on phones */
.gg-card table,
.pd-spec-table { max-width: 100%; }

@media (max-width: 575px) {
    .gg-section-head,
    .section-heading { margin-bottom: 14px; }
    .gg-section-head .gg-view-all,
    .section-heading .view-all { font-size: 12.5px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ─────────────────────────────────────────────────────────────
   20. LEGACY REMAP
   Neutralises the previous black/royal-blue theme components so
   no page can render off-brand. Safe to delete once every legacy
   class has been migrated to the gg-* system.
   ───────────────────────────────────────────────────────────── */
.badge-black,
.bg-black { background: var(--color-text) !important; }
.text-blue { color: var(--color-primary) !important; }
.bg-blue { background: var(--color-primary) !important; }
.bg-blue-soft { background: var(--color-primary-light) !important; }
.bg-gradient-blue,
.bg-gradient-black { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)) !important; }

.hero-premium { background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary)) !important; }
.hero-premium::before,
.hero-premium::after { background: radial-gradient(circle, rgba(217,119,69,0.14) 0%, transparent 70%) !important; }
.hero-premium .hero-badge { background: rgba(255,255,255,0.14) !important; color: #FFF3EC !important; }
.hero-premium .hero-title,
.hero-premium .hero-subtitle { color: #fff !important; }
.hero-premium .hero-title .highlight {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--color-accent-light) !important;
}

.footer-premium,
.nav-premium { background: var(--color-primary-dark) !important; }
.nav-premium .search_button,
.nav-premium .navbar-tool-label { background: var(--color-accent) !important; }
.footer-premium h5::after { background: var(--color-accent) !important; }
.footer-premium ul li a:hover,
.footer-premium .social-links a:hover { color: #fff !important; background: var(--color-accent) !important; }

.flash-sale-banner,
.newsletter-section { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)) !important; }
.flash-sale-banner .progress-bar-fill { background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark)) !important; }

.checkout-premium .card-header { background: var(--color-primary) !important; }
.checkout-premium .form-control:focus { border-color: var(--color-primary) !important; box-shadow: 0 0 0 3px var(--color-primary-light) !important; }

.category-card .category-overlay { background: linear-gradient(to top, rgba(8,72,74,0.82) 0%, transparent 55%) !important; }
.category-card:hover .category-overlay { opacity: 1; }

.feature-card .icon { background: var(--color-primary-light) !important; color: var(--color-primary) !important; }
.feature-card:hover .icon { background: var(--color-primary) !important; color: #fff !important; }
.feature-card:hover { background: var(--color-primary-light) !important; }

.product-card-premium .discount-badge .badge-premium,
.product-card-premium .product-wishlist:hover { background: var(--color-primary) !important; }
.product-card-premium .product-name a:hover { color: var(--color-primary) !important; }
.product-card-premium .quick-view-btn:hover { background: var(--color-primary) !important; }
.product-card-premium .product-pricing .save-amount { color: var(--color-success) !important; background: #E4F1EA !important; }
.product-card-premium:hover { border-color: var(--color-border-strong) !important; }

.sec-title,
.section-heading h2 { color: var(--color-text); }

/* Buttons that premium.css forced to black/blue */
.btn-white { color: var(--color-primary) !important; }
.btn-white:hover { background: var(--color-accent) !important; border-color: var(--color-accent) !important; }

/* Form focus rings */
.form-control:focus,
.os-coupon-input:focus-within,
.cart-qty:focus-within { border-color: var(--color-primary) !important; }

/* Mobile bottom nav */
.mobile-bottom-nav .mbn-item.active { color: var(--color-primary) !important; }
.mobile-bottom-nav .mbn-item.active svg { stroke: var(--color-primary) !important; }

/* ─────────────────────────────────────────────────────────────
   21. QUICK VIEW MODAL
   ───────────────────────────────────────────────────────────── */
.modal-quick-view .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.modal-quick-view .modal-body { padding: 20px; }

.gg-qv-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
}
.gg-qv-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gg-qv-title a { color: var(--color-text); text-decoration: none; }
.gg-qv-title a:hover { color: var(--color-primary); }
.gg-qv-title i { font-size: 12px; color: var(--color-text-secondary); }

.gg-qv-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition);
}
.gg-qv-close:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Gallery */
.gg-qv-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gg-qv-media img { width: 100%; height: 100%; object-fit: contain; }

.gg-qv-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.gg-qv-thumb {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    padding: 4px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-alt);
    cursor: pointer;
    transition: all var(--transition);
}
.gg-qv-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gg-qv-thumb.active { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-light); }

/* Info column */
.gg-qv-info { text-align: start; }
.gg-qv-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.gg-qv-price .now { font-size: 24px; font-weight: 800; color: var(--color-text); letter-spacing: -0.02em; }
.gg-qv-price .was { font-size: 14px; color: var(--color-text-secondary); text-decoration: line-through; }
.gg-qv-price .off { font-size: 11.5px; font-weight: 700; color: var(--color-discount); background: var(--color-danger-light); padding: 2px 8px; border-radius: var(--radius-full); }

.gg-qv-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--color-text-secondary); margin-bottom: 12px; }
.gg-qv-meta b { color: var(--color-text); }

.gg-qv-label { font-size: 13px; font-weight: 600; color: var(--color-text); margin: 14px 0 6px; }

.gg-qv-swatches { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.gg-qv-swatches li input { position: absolute; opacity: 0; width: 0; height: 0; }
.gg-qv-swatches li label {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition);
}
.gg-qv-swatches li input:checked + label { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }

.gg-qv-options { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.gg-qv-options li input {
    position: absolute; opacity: 0; width: 0; height: 0;
}
.gg-qv-options li label {
    display: inline-block;
    padding: 7px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition);
}
.gg-qv-options li label:hover { border-color: var(--color-primary); }
.gg-qv-options li input:checked + label {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.gg-qv-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 13.5px;
    color: var(--color-text-secondary);
}
.gg-qv-total b { font-size: 18px; color: var(--color-text); }
.gg-qv-total span { display: inline-block; margin-inline-end: 12px; }
.gg-qv-total span b { font-size: 13.5px; }

.gg-qv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.gg-qv-actions .gg-btn { flex: 1 1 auto; min-width: 130px; }
.gg-qv-actions .gg-qv-wish { flex: 0 0 auto; min-width: 50px; padding: 10px 14px; }

.gg-qv-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    font-size: 12.5px;
    color: var(--color-text-secondary);
}
.gg-qv-trust span { display: inline-flex; align-items: center; gap: 6px; }
.gg-qv-trust i { color: var(--color-success); }

@media (max-width: 767px) {
    .modal-quick-view .modal-body { padding: 16px; }
    .gg-qv-header { padding: 14px 16px; }
    .gg-qv-price .now { font-size: 21px; }
    .gg-qv-actions .gg-btn { min-width: 0; flex: 1 1 45%; }
}

/* ─────────────────────────────────────────────────────────────
   22. PRODUCT GALLERY + LIGHTBOX
   ───────────────────────────────────────────────────────────── */
.pd-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-surface-alt);
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}
.pd-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 300ms ease, opacity 180ms ease;
    transform-origin: center center;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    image-rendering: auto;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
}
/* In-frame hover zoom that follows the cursor — no off-canvas magnifier
   panel, so nothing can ever overflow the card. Pointer devices only. */
.pd-stage.is-zoomed img { transition: transform 60ms ease-out; }
.pd-stage img.zoomed {
    -webkit-transform: scale(2.2) translateZ(0);
    transform: scale(2.2) translateZ(0);
    cursor: zoom-out;
}
@media (hover: none) { .pd-stage img { cursor: pointer; } }

.pd-stage-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    z-index: 4;
    transition: all var(--transition);
}
.pd-stage-btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pd-stage-btn.prev { left: 12px; }
.pd-stage-btn.next { right: 12px; }
.pd-stage-btn i { font-size: 14px; }

/* Bottom-right keeps this clear of the badges (top-left), the wishlist
   button (top-right) and the swipe dots (bottom-centre). */
.pd-stage-tools { position: absolute; bottom: 12px; right: 12px; z-index: 4; display: flex; gap: 6px; }
.pd-stage-tools .pd-tool {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.pd-stage-tools .pd-tool:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* "3 / 8" position chip — pairs with the dots and gives phones an exact
   count without relying on a row of 3px dots. */
.pd-stage-tools .pd-count {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    pointer-events: none;
}

.pd-zoom-hint {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    pointer-events: none;
    transition: opacity var(--transition);
}
.pd-stage.is-zoomed .pd-zoom-hint { opacity: 0; }

.pd-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 6px;
}
.pd-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--color-border-strong);
    cursor: pointer;
    transition: all var(--transition);
}
.pd-dots button.active { background: var(--color-primary); width: 18px; border-radius: var(--radius-full); }

.pd-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}
.pd-thumb {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    padding: 5px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-alt);
    cursor: pointer;
    scroll-snap-align: start;
    transition: all var(--transition);
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumb:hover { border-color: var(--color-border-strong); }
.pd-thumb.active { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }

/* Fullscreen viewer — z-index sits above every fixed layer in the layout
   (float-whatsapp 9998, scroll-top / loader 9999, bottom nav), otherwise
   the WhatsApp bubble floats over the viewer on phones. */
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 30, 31, 0.94);
    padding: 16px;
    /* We own the gestures in here (swipe, pinch, pan) and the page behind is
       scroll-locked, so hand nothing to the browser. */
    touch-action: none;
    overscroll-behavior: contain;
}
.pd-lightbox.open { display: flex; }
.pd-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
    transform-origin: center center;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* While zoomed the transform is driven frame-by-frame (pan / pinch), so any
   transition on it would lag behind the finger. */
.pd-lightbox img.is-zoomed {
    transition: none;
    cursor: zoom-out;
}
.pd-lightbox.is-zoomed .pd-lightbox-hint,
.pd-lightbox.is-zoomed .pd-lightbox-count { opacity: 0; }
.pd-lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.pd-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }
.pd-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}
.pd-lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.pd-lightbox-nav.prev { left: 14px; }
.pd-lightbox-nav.next { right: 14px; }
.pd-lightbox-count {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: opacity var(--transition);
}
.pd-lightbox-hint {
    position: absolute;
    bottom: 20px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.68);
    pointer-events: none;
    transition: opacity var(--transition);
}

@media (max-width: 767px) {
    /* Keep the frame square on phones and give the tools room */
    .pd-stage { border-radius: 0; }
    .pd-thumbs { border-radius: 0; }
    .pd-stage-btn { width: 34px; height: 34px; }
    .pd-stage-btn.prev { left: 8px; }
    .pd-stage-btn.next { right: 8px; }
    .pd-zoom-hint { display: none; }
    .pd-dots { bottom: 10px; }
    .pd-lightbox-nav { width: 40px; height: 40px; }
    /* The counter sits under the thumb-reach area; the hint would collide
       with it, so only the counter survives on phones. */
    .pd-lightbox-hint { display: none; }
    .pd-lightbox-count { bottom: 14px; }
    .pd-stage-tools { bottom: 10px; right: 10px; gap: 8px; }
    .pd-stage-tools .pd-count,
    .pd-stage-tools .pd-tool { height: 32px; }
    .pd-stage-tools .pd-tool { width: 32px; }
    .pd-thumb { width: 54px; height: 54px; }
    .pd-thumbs { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-stage img, .pd-stage img.zoomed { transition: none !important; }
}
