/* ============================================================
   Bharat Hosiery — Shared Design System
   ============================================================ */
:root {
    --navy: #0f2942;
    --navy-700: #16395c;
    --navy-600: #1d4a76;
    --gold: #d4a017;
    --gold-600: #b8860b;
    --gold-soft: #f6e8c3;
    --ink: #1c2733;
    --muted: #6b7a8d;
    --line: #e6ebf1;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --success: #1e9e6a;
    --danger: #d64550;
    --warning: #e0a106;
    --info: #2f80ed;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 3px rgba(15, 41, 66, .06), 0 1px 2px rgba(15, 41, 66, .04);
    --shadow: 0 6px 24px rgba(15, 41, 66, .08);
    --shadow-lg: 0 18px 48px rgba(15, 41, 66, .14);
    --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    margin: 0;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--gold-600); }

.text-muted-soft { color: var(--muted); }
.fw-700 { font-weight: 700; }

/* ---------------------------------------------------- Brand */
.brand {
    display: inline-flex; align-items: center; gap: .55rem;
    font-weight: 800; letter-spacing: .2px; color: var(--navy);
}
.brand .brand-mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--navy), var(--navy-600));
    color: var(--gold); display: grid; place-items: center;
    font-weight: 900; box-shadow: var(--shadow-sm);
}
.brand .brand-sub { font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

/* ---------------------------------------------------- Buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-600));
    border: none; color: #fff; font-weight: 600;
    box-shadow: 0 4px 14px rgba(184, 134, 11, .3);
}
.btn-gold:hover { color: #fff; filter: brightness(1.04); }
.btn-navy { background: var(--navy); border: none; color: #fff; font-weight: 600; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }
.btn-outline-navy { border: 1.5px solid var(--navy-600); color: var(--navy-600); font-weight: 600; }
.btn-outline-navy:hover { background: var(--navy-600); color: #fff; }

/* ---------------------------------------------------- Cards */
.card-soft {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.section-title { font-weight: 800; color: var(--navy); letter-spacing: -.2px; }
.eyebrow { color: var(--gold-600); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; }

/* ---------------------------------------------------- Badges */
.badge-status { font-weight: 600; padding: .38em .7em; border-radius: 999px; font-size: .74rem; }
.badge-active   { background: #e4f6ee; color: var(--success); }
.badge-inactive { background: #f1f3f6; color: var(--muted); }
.badge-pending    { background: #fdf3d8; color: #9a7400; }
.badge-processing { background: #e3eefc; color: var(--info); }
.badge-completed  { background: #e4f6ee; color: var(--success); }
.badge-cancelled  { background: #fbe4e6; color: var(--danger); }
.badge-outofstock  { background: #fbe4e6; color: var(--gold); }

/* ---------------------------------------------------- Tables */
.table-modern { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-modern thead th {
    background: #fbfcfe; color: var(--muted); font-weight: 700; font-size: .74rem;
    text-transform: uppercase; letter-spacing: .06em; padding: .85rem 1rem;
    border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none;
}
.table-modern thead th.no-sort { cursor: default; }
.table-modern tbody td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-modern tbody tr:hover { background: #fafbfd; }
.table-modern .sort-ind { opacity: .45; font-size: .7rem; }
.table-wrap { overflow-x: auto; }

.thumb { width: 46px; height: 46px; border-radius: 9px; object-fit: cover; background: #eef1f5; border: 1px solid var(--line); }

/* ---------------------------------------------------- Loader */
.loader-overlay {
    position: fixed; inset: 0; background: rgba(255, 255, 255, .6);
    backdrop-filter: blur(2px); display: none; place-items: center; z-index: 1080;
}
.loader-overlay.show { display: grid; }
.spinner-ring {
    width: 46px; height: 46px; border-radius: 50%;
    border: 4px solid var(--gold-soft); border-top-color: var(--gold);
    animation: spin .8s linear infinite;
}
.btn-spinner {
    display: inline-block; width: 1rem; height: 1rem; vertical-align: -2px;
    border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite; margin-right: .4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------- Toast */
.toast-stack { position: fixed; top: 1rem; right: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .6rem; max-width: 360px; }
.toast-card {
    background: #fff; border-left: 4px solid var(--info); border-radius: 10px;
    box-shadow: var(--shadow); padding: .8rem 1rem; display: flex; gap: .6rem; align-items: flex-start;
    animation: toastIn .25s ease;
}
.toast-card.success { border-left-color: var(--success); }
.toast-card.error   { border-left-color: var(--danger); }
.toast-card.warning { border-left-color: var(--warning); }
.toast-card .t-title { font-weight: 700; font-size: .9rem; }
.toast-card .t-msg { font-size: .84rem; color: var(--muted); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

/* ---------------------------------------------------- Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state .es-icon { font-size: 2.4rem; opacity: .5; margin-bottom: .5rem; }

/* ---------------------------------------------------- Image upload */
.uploader {
    border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.5rem;
    text-align: center; background: #fbfcfe; cursor: pointer; transition: .15s;
}
.uploader.dragover { border-color: var(--gold); background: var(--gold-soft); }
.uploader .up-icon { font-size: 1.8rem; color: var(--gold-600); }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .7rem; margin-top: 1rem; }
.thumb-item { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; background: #eef1f5; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-item .thumb-x {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(214, 69, 80, .92); color: #fff; border: none; font-size: .8rem; line-height: 1;
    display: grid; place-items: center; cursor: pointer;
}
.thumb-item .thumb-tag { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(15,41,66,.7); color: #fff; font-size: .62rem; text-align: center; padding: 2px; }

/* ---------------------------------------------------- Image cards (admin uploader) */
.img-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: .5rem;
}
.img-card {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .75rem; background: #fff;
    box-shadow: var(--shadow-sm);
}
.img-card-photo { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #eef1f5; }
.img-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.img-card-photo .thumb-x {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(214, 69, 80, .92); color: #fff; border: none; font-size: .8rem; line-height: 1;
    display: grid; place-items: center; cursor: pointer;
}
.img-card-uuid { font-size: .68rem; color: var(--muted); margin-top: .4rem; word-break: break-all; }
.img-card-view { display: flex; gap: .75rem; align-items: flex-start; }
.img-empty-hint {
    text-align: center; padding: 2rem 1rem; color: var(--muted);
    border: 2px dashed var(--line); border-radius: var(--radius); background: #fafbfd;
}
.img-empty-icon { font-size: 2rem; opacity: .6; margin-bottom: .5rem; }
.product-images-section { background: #fafbfd; border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--line); }

/* ---------------------------------------------------- Admin stat cards */
.stat-card-link { text-decoration: none; display: block; height: 100%; }
.stat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem 1.5rem; height: 100%; transition: box-shadow .2s, border-color .2s, transform .15s;
}
.stat-card-link:hover .stat-card {
    box-shadow: var(--shadow); border-color: var(--gold-soft); transform: translateY(-2px);
}
.stat-card-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--navy); margin: .35rem 0; line-height: 1.1; }
.stat-card-value.stat-gold { color: var(--gold-600); }
.stat-card-hint { font-size: .78rem; color: var(--muted); }

/* ---------------------------------------------------- Storefront catalog (image-wise) */
body.storefront { background: #fafbfc; }
body.storefront main { min-height: 60vh; }

.catalog-hero {
    padding: 2.75rem 0 1.75rem; text-align: center;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.catalog-hero-sm { padding: 2rem 0 1.25rem; }
.catalog-hero-title {
    font-weight: 300; font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    color: #111; letter-spacing: -.03em; margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
}
.catalog-hero-sub { color: var(--muted); margin: .6rem auto 0; font-size: .95rem; max-width: 480px; }

.catalog-section { padding: 1.5rem 0 3.5rem; }
.catalog-toolbar {
    display: flex; justify-content: center; align-items: center;
    flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.25rem;
}
.catalog-search {
    flex: 1 1 220px;  width: 100%;
    border-radius: 999px; padding: .7rem 1.35rem;
    border: 1px solid #e8ecf0; background: #fff;
    box-shadow: 0 2px 12px rgba(15, 41, 66, .05);
}
.catalog-cat-filter {
    flex: 0 1 180px; min-width: 150px;
    border-radius: 999px; padding: .7rem 1.1rem;
    border: 1px solid #e8ecf0; background: #fff;
    box-shadow: 0 2px 12px rgba(15, 41, 66, .05);
}
.catalog-btn-viewall {
    flex: 0 0 auto;
    border-radius: 999px; padding: .7rem 1.35rem;
    border: 1px solid var(--navy, #0f2942);
    background: var(--navy, #0f2942); color: #fff;
    font-size: .9rem; font-weight: 500;
    text-decoration: none; white-space: nowrap;
    transition: background .2s ease, opacity .2s ease;
}
.catalog-btn-viewall:hover { opacity: .9; color: #fff; }

/* --- Product card */
.catalog-card {
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef1f5;
    box-shadow: 0 4px 20px rgba(15, 41, 66, .06);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
}
.catalog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(15, 41, 66, .12);
}

.catalog-card-media {
    position: relative; overflow: hidden;
    background: linear-gradient(145deg, #f3f5f8, #e9edf2);
    aspect-ratio: 3 / 4;
}
.catalog-card-media img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .5s cubic-bezier(.25, .46, .45, .94);
}
.catalog-card:hover .catalog-card-media img { transform: scale(1.06); }
.catalog-card-shine {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.04) 100%);
    pointer-events: none;
}

.catalog-card-body {
    padding: 1rem 1rem 1.1rem;
    flex: 1; display: flex; flex-direction: column; gap: .2rem;
}
.catalog-card-cat {
    display: inline-block; align-self: flex-start;
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--gold-600);
    background: var(--gold-soft); padding: .2rem .55rem;
    border-radius: 999px; margin-bottom: .35rem;
}
.catalog-card-title {
    font-size: .95rem; font-weight: 700; color: #111;
    margin: 0; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.catalog-card-sub {
    font-size: .78rem; color: var(--muted); margin: 0;
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.catalog-card-desc {
    font-size: .78rem; color: #5a6578; margin: .15rem 0 0;
    line-height: 1.5; font-style: italic;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.catalog-card-set {
    font-size: .78rem; font-weight: 600; color: var(--navy);
    margin: .2rem 0 0; line-height: 1.4;
}
.catalog-order-hint {
    font-size: .72rem; color: var(--muted); margin-top: .25rem;
}

.catalog-card-footer {
    margin-top: auto; padding-top: .85rem;
    display: flex; flex-direction: column; gap: .65rem;
}
.catalog-card-price {
    font-size: 1rem; font-weight: 700; color: var(--navy);
    letter-spacing: -.01em;
}

/* Product card rendered as a clickable link (one card per product) */
.catalog-card-link { text-decoration: none; color: inherit; cursor: pointer; }
.catalog-card-link:hover { color: inherit; }
.catalog-card-link .catalog-card-footer {
    flex-direction: row; align-items: center; justify-content: space-between;
}
.catalog-card-view {
    font-size: .82rem; font-weight: 700; color: var(--gold-600);
    white-space: nowrap;
}
.catalog-card-noimg {
    width: 100%; height: 100%; display: grid; place-items: center;
    font-size: 2.4rem; color: var(--muted);
}
.catalog-card-imgcount {
    position: absolute; top: 8px; right: 8px;
    background: rgba(15,41,66,.8); color: #fff; font-size: .68rem;
    border-radius: 999px; padding: .12rem .55rem; z-index: 2;
}

/* Card actions: View + Order buttons */
.catalog-card-actions {
    display: flex; gap: .5rem; margin-top: .65rem;
}
.catalog-card-actions .btn {
    flex: 1;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* When cards carry a toggleable order form, align each card to the top of its
   grid line so expanding one card's form does not stretch its neighbours
   (Bootstrap rows stretch all columns in a line to the tallest by default). */
.catalog-grid-order { align-items: flex-start; }

/* Inline order form (toggled below the Order button) */
.order-inline {
    margin-top: .75rem; padding-top: .75rem;
    border-top: 1px dashed var(--line, #e6e9ee);
    display: flex; flex-direction: column; gap: .6rem;
    animation: oiFade .18s ease;
}
@keyframes oiFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.order-inline .oi-field { display: flex; flex-direction: column; gap: .35rem; }
.order-inline .oi-field.oi-inline { flex-direction: row; align-items: center; justify-content: space-between; gap: .75rem; }
.order-inline .oi-field.oi-inline > label { margin: 0; }
.order-inline .oi-field.oi-inline .oi-text { white-space: nowrap; }
.order-inline .oi-field > label {
    font-size: .74rem; font-weight: 700; color: var(--navy);
    text-transform: uppercase; letter-spacing: .03em;
}
.order-inline .oi-opts, .order-inline .oi-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.order-inline .oi-opt {
    border: 1.5px solid var(--line, #e6e9ee); background: #fff; border-radius: 8px;
    padding: .28rem .6rem; cursor: pointer; font-size: .8rem; font-weight: 600;
    color: var(--navy); display: inline-flex; align-items: center; gap: .35rem;
    transition: all .12s;
}
.order-inline .oi-opt:hover { border-color: var(--gold); }
.order-inline .oi-opt.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.order-inline .oi-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    border: 1px solid var(--line, #e6e9ee); background: #f6f8fb; border-radius: 8px;
    padding: .24rem .55rem; font-size: .78rem; font-weight: 600; color: var(--navy);
}
.order-inline .oi-swatch-dot {
    width: 13px; height: 13px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,.15); display: inline-block;
}
.order-inline .oi-set-note { font-size: 1.2rem; }
.order-inline .oi-qty-row { display: flex; align-items: center; gap: .6rem; }
.order-inline .oi-qty-row label { margin: 0; }
.order-inline .oi-qty-row input { width: 90px; }
.order-inline .oi-size-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .5rem .75rem;
}
.order-inline .oi-size-cell {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}
.order-inline .oi-size-name {
    flex: 0 0 auto;
    min-width: 1.5rem;
    font-size: .78rem;
    font-weight: 700;
    color: var(--navy);
}
.order-inline .oi-size-qty {
    width: 70px;
    flex: 0 0 70px;
    text-align: center;
    padding-left: .3rem;
    padding-right: .3rem;
}
.order-inline .oi-var-matrix-wrap {
    overflow-x: auto; max-width: 100%; margin: 0 -.15rem;
}
.order-inline .oi-var-matrix {
    width: 100%; border-collapse: collapse; font-size: .72rem; min-width: 220px;
}
.order-inline .oi-var-matrix th,
.order-inline .oi-var-matrix td {
    border: 1px solid var(--line, #e6e9ee); padding: .3rem .35rem;
    text-align: center; vertical-align: middle;
}
.order-inline .oi-var-matrix thead th {
    background: #f5f7fa; font-weight: 700; color: var(--navy); white-space: nowrap;
}
.order-inline .oi-var-row-label {
    text-align: left; font-weight: 600; white-space: nowrap; background: #fafbfc;
}
.order-inline .oi-var-qty {
    width: 52px; min-width: 52px; padding: .2rem .25rem; text-align: center;
    font-size: .78rem;
}
.order-inline .oi-var-na {
    color: var(--muted); background: #f9fafb; font-size: .7rem;
}
.order-inline .oi-var-hint { margin-top: .35rem; line-height: 1.35; }
.order-inline .oi-color-qty-list { display: flex; flex-direction: column; gap: .45rem; }
.order-inline .oi-color-qty-row {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.order-inline .oi-color-qty-label {
    font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem;
}
.order-inline .oi-color-qty { width: 72px; text-align: center; }

.catalog-btn-order,
.catalog-btn-login {
    display: block; width: 100%; text-align: center;
    padding: .58rem 1rem; border-radius: 8px;
    font-weight: 600; font-size: .82rem;
    cursor: pointer; text-decoration: none;
    transition: all .2s ease;
}
.catalog-btn-order {
    border: 1.5px solid var(--navy); background: #fff; color: var(--navy);
}
.catalog-btn-order:hover, .catalog-btn-order.is-active {
    background: var(--navy); color: #fff; border-color: var(--navy);
}
.catalog-btn-login {
    border: none;
    background: linear-gradient(135deg, var(--gold), var(--gold-600));
    color: #fff; box-shadow: 0 4px 14px rgba(184, 134, 11, .25);
}
.catalog-btn-login:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }

.catalog-order-panel {
    display: none; padding: .85rem;
    background: #f8fafc; border-radius: 10px;
    border: 1px solid #eef1f5;
}
.catalog-order-panel.is-open { display: block; }
.catalog-order-field { margin-bottom: .65rem; }
.catalog-order-field:last-of-type { margin-bottom: .75rem; }
.catalog-order-field label {
    font-size: .68rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin-bottom: .25rem; display: block;
}
.catalog-order-field .form-control {
    font-size: .88rem; border-radius: 8px; border-color: #dde3ea;
}
.catalog-btn-save {
    width: 100%; padding: .55rem; border: none; border-radius: 8px;
    background: var(--navy); color: #fff;
    font-weight: 600; font-size: .82rem; cursor: pointer;
    transition: background .15s;
}
.catalog-btn-save:hover { background: var(--navy-700); }

.catalog-empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.catalog-empty-icon { font-size: 3rem; opacity: .35; margin-bottom: .75rem; }

.catalog-about { background: #fff; border-top: 1px solid #eef1f5; }
.about-pill {
    background: #fafbfc; border: 1px solid var(--line); border-radius: 12px;
    padding: 1.35rem; text-align: center; height: 100%;
    transition: box-shadow .2s;
}
.about-pill:hover { box-shadow: var(--shadow-sm); }
.about-pill strong { display: block; font-size: 1.6rem; color: var(--gold-600); font-weight: 800; }
.about-pill span { font-size: .8rem; color: var(--muted); }

/* .catalog-contact { background: linear-gradient(135deg, var(--navy), var(--navy-600)); } */

/* --- Cart (image-wise items) */
.cart-item-row {
    display: flex; gap: 1rem; padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.cart-item-row:last-child { border-bottom: none; }
.cart-item-media { flex-shrink: 0; }
.cart-item-img {
    width: 100px; height: 120px; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--line);
    background: #f3f5f8;
}
.cart-item-placeholder {
    display: grid; place-items: center; font-size: 1.8rem;
}
.cart-item-cat {
    font-size: .62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--gold-600);
}
.cart-item-name { font-weight: 700; font-size: .95rem; margin-top: .15rem; }
.cart-item-sub { font-size: .82rem; color: var(--muted); margin-top: .15rem; }
.cart-item-desc {
    font-size: .8rem; color: #5a6578; font-style: italic;
    margin-top: .25rem; line-height: 1.4;
}
.cart-item-set {
    font-size: .8rem; font-weight: 600; color: var(--navy);
    margin-top: .25rem; line-height: 1.4;
}
.cart-item-price { font-weight: 600; color: var(--navy); margin-top: .35rem; font-size: .9rem; }
.cart-item-actions { width: 90px; flex-shrink: 0; text-align: right; }
.cart-mobile-badge {
    background: #f8fafc; border: 1px solid #eef1f5;
    border-radius: 8px; padding: .65rem .85rem;
}
.cart-summary { border-radius: var(--radius); }

.catalog-btn-goto-cart {
    margin-top: 0;
}

/* --- My orders */
.my-order-card { border-radius: var(--radius); }
.my-order-items { display: flex; flex-direction: column; gap: .75rem; }
.my-order-item {
    display: flex; gap: .75rem; align-items: flex-start;
    padding: .65rem; background: #fafbfc; border-radius: 10px;
    border: 1px solid #eef1f5;
}
.my-order-thumb {
    width: 64px; height: 76px; object-fit: cover;
    border-radius: 8px; flex-shrink: 0; border: 1px solid var(--line);
}
.my-order-thumb-ph {
    display: grid; place-items: center; background: #eef1f5; font-size: 1.2rem;
}
.my-order-item-desc { font-size: .78rem; color: #5a6578; font-style: italic; margin-top: .15rem; }

@media (max-width: 575.98px) {
    .cart-item-row { flex-wrap: wrap; }
    .cart-item-img { width: 80px; height: 96px; }
    .cart-item-actions { width: 100%; display: flex; align-items: center; gap: .5rem; }
    .cart-item-actions .qty-inp { width: 80px; }
    .catalog-card-body { padding: .75rem .7rem .85rem; }
    .catalog-card-title { font-size: .88rem; }
    .catalog-card-price { font-size: .92rem; }
    .catalog-card-media { aspect-ratio: 4 / 5; }
}

@media (min-width: 992px) {
    .catalog-grid { --bs-gutter-x: 1.75rem; --bs-gutter-y: 1.75rem; }
}

/* ---------------------------------------------------- Pagination */
.pager { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.pager button {
    min-width: 36px; height: 36px; border: 1px solid var(--line); background: #fff;
    border-radius: 8px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-600); }
.pager button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------- Forms */
.form-label { font-weight: 600; font-size: .85rem; color: var(--navy-700); margin-bottom: .3rem; }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--line); padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(212,160,23,.15); }
.field-error { color: var(--danger); font-size: .78rem; margin-top: .25rem; }

.modal-content { border: none; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line); }
.modal-title { font-weight: 800; color: var(--navy); }

/* Utility */
.cursor-pointer { cursor: pointer; }
.divider { height: 1px; background: var(--line); margin: 1rem 0; }

.navbar{
    padding: 0px !important;
}
/* Navbar Logo */
.logo-img {
    width: 250px;
    max-width: 100%;
    height: auto;
    transition: 0.3s;
}

/* Tablet */
@media (max-width: 992px) {
    .logo-img {
        width: 200px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .logo-img {
        width: 150px;
    }
}

@media (max-width: 360px) {
    .logo-img {
        width: 110px;
    }
}

@media (max-width: 320px) {
    .logo-img {
        width: 95px;
    }
}

@media (max-width: 991.98px) {
    .navbar .nav-link.d-lg-none {
        /* font-weight: 500; */
        /* padding: .5rem .75rem; */
        white-space: nowrap;
        font-size: 12px;
    }

    .navbar-toggler {
        margin-left: 6px;
    }
}

/* Reduce navbar height */
.navbar{
    min-height:70px;
    padding:.5rem 0;
}

/* Reduce logo size */
.logo-img {
    width: 180px;
    height: auto;
}

/* Reduce navbar link padding */
.navbar .nav-link {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

/* Reduce toggler padding */
.navbar-toggler {
    padding: 0.25rem 0.45rem;
}

@media (max-width: 576px) {

    .navbar {
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
        min-height: 48px;
    }

    .logo-img {
        width: 120px;
    }

    .navbar-toggler {
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width:576px){

    .navbar{
        min-height:60px;
        padding:.4rem 0;
    }

}

.catalog-section{
    padding-top:20px;
}

@media (max-width:991px){

    .navbar-collapse{
        margin-top:12px;
        background:#fff;
        padding:15px;
        border-radius:12px;
        box-shadow:0 10px 25px rgba(0,0,0,.08);
    }

    .navbar-nav{
        gap:8px;
    }

    .navbar-nav .btn{
        width:100%;
    }

}

.catalog-toolbar{
    margin-top:10px;
}

/* ================= WHATSAPP FLOAT ================= */

.whatsapp-float{
    position: fixed;
    right: 20px;
    bottom: 75px;
    z-index: 99999;
}

.whatsapp-bar{
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg,#25D366,#128C7E);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(37,211,102,.35);
    transition: .3s;
}

.whatsapp-bar:hover{
    color:#fff;
    transform: translateY(-3px);
}

.whatsapp-bar i{
    font-size:32px;
}

.whatsapp-content{
    display:flex;
    flex-direction:column;
    line-height:1.2;
}

.contact-text{
    font-size:12px;
    font-weight:600;
}

.phone-number{
    font-size:12px;
}

/* Pulse */
.whatsapp-bar::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:50px;
    border:2px solid rgba(255,255,255,.35);
    animation:pulse 2s infinite;
}

@keyframes pulse{
    0%{
        transform:scale(1);
        opacity:1;
    }
    70%{
        transform:scale(1.08);
        opacity:0;
    }
    100%{
        transform:scale(1.08);
        opacity:0;
    }
}

@media (max-width:991px){

    .whatsapp-float{
        right:15px;
        bottom:15px;
    }

    .whatsapp-content{
        display:none;
    }

    .whatsapp-bar{
        width:58px;
        height:58px;
        padding:0;
        justify-content:center;
        border-radius:50%;
    }

    .whatsapp-bar i{
        font-size:30px;
    }
}

@media (max-width:576px){

    .whatsapp-float{
        right:15px;
        bottom:75px;   /* above back-to-top button if any */
    }

    .whatsapp-content{
        display:none;
    }

    .whatsapp-bar{
        width:56px;
        height:56px;
        padding:0;
        justify-content:center;
        border-radius:50%;
    }

    .whatsapp-bar i{
        font-size:28px;
    }
}

@media (max-width:360px){

    .whatsapp-float{
        right:10px;
        bottom:70px;
    }

    .whatsapp-bar{
        width:50px;
        height:50px;
    }

    .whatsapp-bar i{
        font-size:26px;
    }
}

/* ================= HELP FLOAT ================= */

.help-float{
    position:fixed;
    right:20px;
    bottom:140px;     /* Above existing WhatsApp button */
    z-index:99999;
}

.help-btn{
    width:58px;
    height:58px;
    border:none;
    border-radius:50%;
    background:#0f2942;
    color:#fff;
    cursor:pointer;
    font-size:24px;
    box-shadow:0 8px 25px rgba(0,0,0,.25);
    transition:.3s;
}

.help-btn:hover{
    transform:translateY(-3px);
    background:#16395c;
}

.help-menu{
    position:absolute;
    right:0;
    bottom:70px;
    display:none;
    flex-direction:column;
    gap:10px;
}

.help-menu.show{
    display:flex;
}

.help-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 16px;
    border-radius:30px;
    background:#0f2942;
    color:#fff;
    text-decoration:none;
    white-space:nowrap;
    box-shadow:0 8px 20px rgba(0,0,0,.18);
    transition:.25s;
}

.help-item:hover{
    color:#fff;
    background:#16395c;
}

.help-item i{
    font-size:22px;
}

/* Mobile */

@media(max-width:576px){

    .help-float{
        right:15px;
        bottom:140px;      /* Above WhatsApp button */
    }

    .help-btn{
        width:52px;
        height:52px;
        font-size:20px;
    }

    .help-item{
        padding:8px 12px;
        font-size:13px;
    }
}

/* =========================================================
   CATEGORY NAVIGATION
========================================================= */


.category-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;

    overflow-x: auto;
    scrollbar-width: none;

    padding: 0 4px;
}

.category-nav-wrapper::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   CATEGORY ITEM
========================================================= */

.category-nav-item {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 8px;

    border: 1px solid #e5e7eb;
    background: #fff;

    color: #333;

    border-radius: 30px;

    padding: 9px 18px;

    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition: all 0.2s ease;
}


.category-nav-item:hover {
    border-color: #111;
    color: #111;
}


.category-nav-item.active {
    background: #111;
    color: #fff;

    border-color: #111;
}


.category-icon {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f5f5f5;

    color: #333;
}


.category-nav-item.active .category-icon {
    background: rgba(255,255,255,0.15);
    color: #fff;
}


/* =========================================================
   SUB CATEGORY
========================================================= */

.subcategory-section {
    padding: 16px 0;

    background: #fafafa;

    border-bottom: 1px solid #eee;
}


.subcategory-header {
    margin-bottom: 10px;
}


.subcategory-header h6 {
    margin: 0;

    font-size: 14px;
    font-weight: 600;

    color: #222;
}


.subcategory-nav {
    display: flex;
    gap: 8px;

    overflow-x: auto;

    scrollbar-width: none;
}


.subcategory-nav::-webkit-scrollbar {
    display: none;
}


.subcategory-item {
    flex: 0 0 auto;

    border: 1px solid #ddd;

    background: #fff;

    border-radius: 8px;

    padding: 8px 15px;

    font-size: 13px;

    color: #555;

    cursor: pointer;

    transition: all 0.2s ease;
}


.subcategory-item:hover {
    border-color: #111;
    color: #111;
}


.subcategory-item.active {
    border-color: #111;

    background: #111;

    color: #fff;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .catalog-category-section {
        padding: 10px 0;
    }

    .category-nav-item {
        padding: 8px 14px;

        font-size: 13px;
    }

    .category-icon {
        width: 24px;
        height: 24px;
    }

    .subcategory-section {
        padding: 12px 0;
    }

}

/* ============================================================
   BHARAT HOSIERY - ECOMMERCE CATEGORY NAVIGATION
   ============================================================ */

.catalog-section {
    padding-top: 40px;
    padding-bottom: 60px;
}


/* ============================================================
   SEARCH
   ============================================================ */

.catalog-search-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.catalog-search-box {
    position: relative;
    width: 100%;
}

.catalog-search-box > i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    z-index: 2;
}

.catalog-search {
    height: 48px;
    padding-left: 48px;
    border-radius: 25px;
    border: 1px solid #e2e6ea;
    background: #fff;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.catalog-search:focus {
    border-color: #007bff;
    box-shadow: 0 3px 18px rgba(0, 123, 255, 0.12);
}


/* ============================================================
   CATEGORY SECTION
   ============================================================ */

.catalog-category-section {
    width: 100%;
    margin-bottom: 22px;
}

.category-nav-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 8px 4px 14px;

    scrollbar-width: thin;
}

.category-nav-container::-webkit-scrollbar {
    height: 5px;
}

.category-nav-container::-webkit-scrollbar-thumb {
    /* Theme token rather than a hardcoded grey. */
    background: var(--scroll-thumb);
    border-radius: 10px;
}


/* Category button */

.category-nav-item {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    gap: 9px;

    height: 46px;

    padding: 0 20px;

    border: 1px solid #e1e5ea;

    border-radius: 24px;

    background: #fff;

    color: #333;

    font-size: 14px;
    font-weight: 600;

    white-space: nowrap;

    cursor: pointer;

    transition:
        all 0.2s ease;
}


/* Icon */

.category-icon {
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f5f6f8;

    color: #555;

    font-size: 14px;
}


/* Hover */

.category-nav-item:hover {
    border-color: #111;
    transform: translateY(-1px);
}


/* Active */

.category-nav-item.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.category-nav-item.active .category-icon {
    background: #333;
    color: #fff;
}


/* ============================================================
   SUB CATEGORY
   ============================================================ */

.subcategory-section {
    width: 100%;

    margin-bottom: 30px;

    padding: 18px 20px;

    background: #fafafa;

    border: 1px solid #eee;

    border-radius: 14px;
}


.subcategory-header {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-bottom: 14px;
}


.subcategory-title {
    font-size: 13px;
    color: #777;
}


.selected-category-name {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}


.subcategory-nav {
    display: flex;
    align-items: center;
    gap: 9px;

    overflow-x: auto;

    scrollbar-width: none;
}

.subcategory-nav::-webkit-scrollbar {
    display: none;
}


.subcategory-nav-item {
    flex: 0 0 auto;

    padding: 8px 17px;

    border: 1px solid #ddd;

    border-radius: 20px;

    background: #fff;

    color: #444;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;

    transition: all 0.2s ease;
}


.subcategory-nav-item:hover {
    border-color: #111;
}


.subcategory-nav-item.active {
    background: #111;
    color: #fff;
    border-color: #111;
}


/* ============================================================
   PRODUCT GRID
   ============================================================ */

.catalog-grid {
    margin-top: 10px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    .catalog-section {
        padding-top: 20px;
    }

    .catalog-search-wrapper {
        margin-bottom: 18px;
    }

    .catalog-search-box {
        max-width: 100%;
    }

    .category-nav-item {
        height: 42px;
        padding: 0 15px;
        font-size: 13px;
    }

    .category-icon {
        width: 26px;
        height: 26px;
    }

    .subcategory-section {
        padding: 14px;
        border-radius: 12px;
    }

}
/* ============================================================
   STOREFRONT — SHOP LAYOUT (sidebar filters + results)
   ============================================================ */

.shop-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
    margin-top: 1.25rem;
}

.shop-main { min-width: 0; }


/* ---------------------------------------------------- Sidebar */
.shop-sidebar { position: sticky; top: 90px; }

.filter-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.filter-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

.filter-panel-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.filter-clear {
    border: 0;
    background: none;
    padding: 0;
    font-size: .82rem;
    font-weight: 600;
    color: var(--danger);
    cursor: pointer;
}
.filter-clear:hover { text-decoration: underline; }


/* ---------------------------------------------------- Filter groups */
.filter-group { border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }

.filter-group-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .85rem 1.1rem;
    border: 0;
    background: none;
    font-size: .9rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
}
.filter-group-head:hover { color: var(--navy-600); }

.filter-caret { font-size: .75rem; color: var(--muted); transition: transform .2s ease; }
.filter-group.collapsed .filter-caret { transform: rotate(180deg); }

.filter-group-body { padding: 0 1.1rem 1rem; }
.filter-group.collapsed .filter-group-body { display: none; }

.filter-options {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    max-height: 260px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .3rem 0;
    font-size: .87rem;
    color: var(--ink);
    cursor: pointer;
    margin: 0;
}
.filter-option:hover { color: var(--navy-600); }

.filter-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--navy);
    cursor: pointer;
    flex: 0 0 auto;
}

.filter-option-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex: 1 1 auto;
    min-width: 0;
}

.filter-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--line);
    flex: 0 0 auto;
}

.filter-option-clear {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1;
    flex: 0 0 auto;
}
.filter-option-clear:hover { color: var(--danger); }

.filter-empty { margin: .25rem 0 0; font-size: .82rem; color: var(--muted); }

.filter-search,
.filter-price {
    height: 34px;
    font-size: .85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    margin-bottom: .6rem;
}
.filter-search:focus,
.filter-price:focus {
    border-color: var(--navy-600);
    box-shadow: none;
}

.filter-more {
    margin-top: .5rem;
    border: 0;
    background: none;
    padding: 0;
    font-size: .82rem;
    font-weight: 600;
    color: var(--navy-600);
    cursor: pointer;
}
.filter-more:hover { text-decoration: underline; }

.filter-price-row { display: flex; align-items: center; gap: .5rem; }
.filter-price-row .filter-price { margin-bottom: 0; }
.filter-price-sep { font-size: .8rem; color: var(--muted); }


/* ---------------------------------------------------- Toolbar */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: .75rem 1.1rem;
    margin-bottom: 1rem;
}

.shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
}
.shop-breadcrumb i { font-size: .7rem; color: var(--muted); }

.shop-sort { display: flex; align-items: center; gap: .5rem; }
.shop-sort label { font-size: .85rem; color: var(--muted); margin: 0; white-space: nowrap; }
.shop-sort .form-select {
    height: 36px;
    width: auto;
    font-size: .85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}
.shop-sort .form-select:focus { border-color: var(--navy-600); box-shadow: none; }


/* ---------------------------------------------------- Active chips */
.active-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.active-chips:empty { display: none; }

.active-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 30px;
    padding: .25rem .7rem;
    font-size: .8rem;
    color: var(--ink);
    cursor: pointer;
    transition: all .18s ease;
}
.active-chip:hover { border-color: var(--danger); color: var(--danger); }
.active-chip span { font-size: 1rem; line-height: 1; color: var(--muted); }
.active-chip:hover span { color: var(--danger); }


/* ---------------------------------------------------- Chip bar dropdown */
.category-nav-cell { position: relative; flex: 0 0 auto; }

.cat-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    min-width: 190px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: .35rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.category-nav-cell:hover .cat-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Suppress the dropdown briefly after a pick so results are not covered. */
.category-nav-cell.cat-dropdown-dismissed:hover .cat-dropdown {
    opacity: 0;
    visibility: hidden;
}

.cat-dropdown-row { position: relative; }

.cat-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 0;
    background: none;
    border-radius: 6px;
    padding: .5rem .7rem;
    font-size: .87rem;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.cat-dropdown-item:hover { background: var(--bg); color: var(--navy-600); }
.cat-dropdown-item i { font-size: .7rem; color: var(--muted); }

.cat-flyout {
    position: absolute;
    top: -.35rem;
    left: 100%;
    z-index: 41;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: .35rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .16s ease, visibility .16s;
}
.cat-dropdown-row:hover .cat-flyout { opacity: 1; visibility: visible; }

.cat-flyout-item {
    width: 100%;
    border: 0;
    background: none;
    border-radius: 6px;
    padding: .45rem .7rem;
    font-size: .85rem;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.cat-flyout-item:hover { background: var(--bg); color: var(--navy-600); }


/* ---------------------------------------------------- Responsive */
@media (max-width: 991px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
    .filter-options { max-height: none; }
    .cat-flyout {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: 0;
        padding: 0 0 0 .75rem;
    }
}

/* .shop-toolbar has no small-screen rules: it is hidden below 992px, where
   the Sort sheet takes over. See the mobile block further down. */

/* ============================================================
   STOREFRONT — MOBILE (sort/filter bar, drawer, sheets, bottom nav)
   ============================================================ */

body.no-scroll { overflow: hidden; }


/* ---------------------------------------------------- Sort / Filter bar */
.shop-mobile-bar {
    display: flex;
    gap: .6rem;
    margin-top: .9rem;
}

.shop-mobile-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    height: 46px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-weight: 600;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.shop-mobile-btn:active { background: var(--bg); }
.shop-mobile-btn i { font-size: 1rem; }

.shop-mobile-count {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    display: inline-grid;
    place-items: center;
}

.shop-resultbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.shop-result-count { font-size: .88rem; color: var(--muted); font-weight: 600; }

.view-toggle {
    display: flex;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}

.view-toggle-btn {
    width: 40px;
    height: 34px;
    border: 0;
    background: none;
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.view-toggle-btn + .view-toggle-btn { border-left: 1px solid var(--line); }
.view-toggle-btn.active { background: var(--navy); color: #fff; }

.catalog-grid-list > [class*="col-"] { width: 100%; flex: 0 0 100%; max-width: 100%; }

.catalog-grid-list .catalog-card { flex-direction: row; }
.catalog-grid-list .catalog-card-media { width: 130px; flex: 0 0 130px; aspect-ratio: 1 / 1; }
.catalog-grid-list .catalog-card-body { flex: 1 1 auto; }

.active-chips-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: .6rem .8rem;
    margin-bottom: .9rem;
}
.active-chips-row.is-empty { display: none; }
.active-chips-row .active-chips { margin-bottom: 0; flex: 1 1 auto; }
.active-chips-row .filter-clear { white-space: nowrap; }

.drawer-backdrop,
.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1045;
    background: rgba(15, 41, 66, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s;
}
.drawer-backdrop.show,
.sheet-backdrop.show { opacity: 1; visibility: visible; }

.filter-drawer-close {
    display: none;
    border: 0;
    background: none;
    padding: 0 0 0 .5rem;
    font-size: 1rem;
    color: var(--ink);
    cursor: pointer;
}

.filter-drawer-foot { display: none; }

.bh-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: var(--surface);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 41, 66, .18);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(102%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
}
.bh-sheet.show { transform: translateY(0); }

.bh-sheet-grip {
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: var(--line);
    margin: .6rem auto .2rem;
    flex: 0 0 auto;
}

.bh-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1.1rem .8rem;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}
.bh-sheet-head h5 { margin: 0; font-size: 1.15rem; font-weight: 700; }

.bh-sheet-close {
    border: 0;
    background: none;
    padding: 0;
    font-size: 1rem;
    color: var(--muted);
    cursor: pointer;
}

.bh-sheet-body { overflow-y: auto; flex: 1 1 auto; }

.bh-sheet-foot {
    padding: .9rem 1.1rem calc(.9rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    flex: 0 0 auto;
}

.bh-sheet .btn-primary,
.filter-drawer-foot .btn-primary {
    height: 50px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    background: #1a6ae5;
    border-color: #1a6ae5;
}

.sort-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1.1rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    text-align: left;
    cursor: pointer;
}
.sort-option:last-child { border-bottom: 0; }
.sort-option:active { background: var(--bg); }

.sort-option-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--bg);
    color: var(--navy);
}

.sort-option-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.sort-option-label { font-size: .95rem; font-weight: 700; color: var(--ink); }
.sort-option-hint { font-size: .78rem; color: var(--muted); }

.sort-radio {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 2px solid var(--line);
    position: relative;
}
.sort-option.active .sort-radio { border-color: #1a6ae5; }
.sort-option.active .sort-radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #1a6ae5;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 14px rgba(15, 41, 66, .07);
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: .5rem .2rem .45rem;
    border: 0;
    background: none;
    font-size: .68rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
}
.bottom-nav-item i { font-size: 1.15rem; }
.bottom-nav-item.active { color: #1a6ae5; }
.bottom-nav-item:hover { color: #1a6ae5; }

.bottom-nav-icon { position: relative; display: inline-flex; }

.bottom-nav-badge {
    position: absolute;
    top: -5px;
    right: -9px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--danger);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.sheet-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--line);
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
}
.sheet-link:last-child { border-bottom: 0; }
.sheet-link i { font-size: 1.05rem; color: var(--muted); width: 20px; }
.sheet-link.text-danger i { color: var(--danger); }

@media (max-width: 991.98px) {

    .shop-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 380px);
        z-index: 1046;
        background: var(--surface);
        display: flex;
        flex-direction: column;
        transform: translateX(102%);
        transition: transform .26s cubic-bezier(.32, .72, 0, 1);
        box-shadow: -12px 0 40px rgba(15, 41, 66, .18);
    }
    .shop-sidebar.open { transform: translateX(0); }

    .shop-toolbar { display: none; }

    .shop-sidebar .filter-panel {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        flex: 1 1 auto;
        overflow-y: auto;
        min-height: 0;
    }
    .filter-panel-head {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--surface);
        flex-wrap: wrap;
        gap: .35rem .75rem;
        padding-bottom: .5rem;
    }
    .filter-panel-head .filter-panel-title { order: 1; flex: 1 1 auto; font-size: 1.25rem; }
    .filter-panel-head .filter-drawer-close { order: 2; }
    .filter-panel-head .filter-clear {
        order: 3;
        flex: 1 0 100%;
        justify-content: flex-start;
        padding: .35rem 0 .1rem;
        font-size: .92rem;
    }

    .filter-drawer-close { display: inline-block; }

    .filter-drawer-foot {
        display: block;
        padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line);
        background: var(--surface);
        flex: 0 0 auto;
    }

    .filter-clear { display: inline-flex; align-items: center; gap: .3rem; }

    body.storefront { padding-bottom: 62px; }
    .whatsapp-float { bottom: 74px; }
    .help-float { bottom: 135px; right:9px;}
}

@media (min-width: 992px) {
    .drawer-backdrop,
    .sheet-backdrop,
    .bh-sheet,
    .bottom-nav { display: none !important; }
}

@media (max-width: 575.98px) {
    .shop-resultbar { margin-bottom: .75rem; }
    .catalog-grid-list .catalog-card-media { width: 108px; flex: 0 0 108px; }
}

@media (max-width: 575.98px) {

    .catalog-card {
        border-radius: 9px;
        border: 1px solid #eef1f5;
        box-shadow: 0 2px 8px rgba(15, 41, 66, 0.06);
    }

    .catalog-card-media {
        aspect-ratio: 4 / 4.6;
    }

    .catalog-card-body {
        padding: 7px !important;
        gap: 1px;
    }

    .catalog-card-cat {
        font-size: 9px !important;
        font-weight: 700;
        letter-spacing: .05em;
        padding: 3px 7px;
        margin-bottom: 2px;
        line-height: 1.15;
    }

    .catalog-card-title {
        font-size: 13px !important;
        font-weight: 700;
        line-height: 1.25 !important;
        margin: 0 !important;

        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .catalog-card-sub {
        font-size: 10px !important;
        line-height: 1.25 !important;
        margin: 2px 0 0 !important;

        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .catalog-card-set {
        font-size: 10px !important;
        font-weight: 600;
        line-height: 1.25 !important;
        margin: 3px 0 0 !important;

        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .catalog-card-body .small {
        font-size: 9px !important;
        line-height: 1.2;
        margin: 2px 0 !important;
    }

    .catalog-card-footer {
        margin-top: 4px;
        padding-top: 5px;
        gap: 2px;
    }

    .catalog-card-footer > span:first-child {
        font-size: 10px !important;
        line-height: 1.2;
    }

    .catalog-card-price {
        font-size: 12px !important;
        font-weight: 700;
        line-height: 1.2 !important;
        letter-spacing: 0;
    }

    .catalog-card-view {
        font-size: 10px !important;
        font-weight: 700;
    }

    .catalog-card-actions {
        display: flex;
        gap: 4px;
        margin-top: 5px;
    }

    .catalog-card-actions .btn {
        min-height: 33px !important;
        height: 33px;
        padding: 4px 5px !important;

        font-size: 10px !important;
        line-height: 1.15 !important;
        font-weight: 700;

        border-radius: 6px;
    }

    .catalog-card-actions .btn-outline-navy,
    .catalog-card-actions .btn-gold {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .catalog-card-imgcount {
        top: 5px;
        right: 5px;

        font-size: 8px !important;
        padding: 2px 5px;
        line-height: 1.2;
    }

    .catalog-card-noimg {
        font-size: 1.5rem;
    }
}

@media (max-width: 380px) {

    .catalog-card-body {
        padding: 6px !important;
    }

    .catalog-card-cat {
        font-size: 8px !important;
        padding: 2px 6px;
    }

    .catalog-card-title {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .catalog-card-sub {
        font-size: 9px !important;
    }

    .catalog-card-set {
        font-size: 9px !important;
    }

    .catalog-card-footer {
        margin-top: 3px;
        padding-top: 4px;
    }

    .catalog-card-footer > span:first-child {
        font-size: 9px !important;
    }

    .catalog-card-price {
        font-size: 11px !important;
    }

    .catalog-card-actions {
        gap: 3px;
        margin-top: 4px;
    }

    .catalog-card-actions .btn {
        height: 31px;
        min-height: 31px !important;
        font-size: 9px !important;
        padding: 3px !important;
    }
}

@media (max-width: 575.98px) {
    .order-inline {
        margin-top: 5px !important;
        padding-top: 5px !important;
        gap: 5px !important;
    }

    .order-inline .oi-field {
        gap: 2px !important;
    }

    .order-inline .oi-field.oi-inline {
        gap: 5px !important;
        min-height: 20px;
    }

    .order-inline .oi-field > label {
        font-size: 9px !important;
        line-height: 1.1 !important;
        letter-spacing: .01em !important;
        margin: 0 !important;
    }

    .order-inline .oi-field.oi-inline .oi-text {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }

    .order-inline .oi-badges {
        gap: 3px !important;
    }

    .order-inline .oi-badge {
        font-size: 9px !important;
        padding: 4px 7px !important;
        border-radius: 6px !important;
    }

    .order-inline .oi-swatch-dot {
        width: 8px !important;
        height: 8px !important;
    }

    .order-inline .oi-set-note {
        font-size: 12px !important;
        line-height: 1.15 !important;
        margin: 0 !important;
    }

    .order-inline .oi-qty-row {
        gap: 4px !important;
        justify-content: center;
        margin: 0 !important;
    }

    .order-inline .oi-qty-row label {
        font-size: 9px !important;
        line-height: 1.1 !important;
        margin: 0 0 2px !important;
    }

    .order-inline .oi-qty-row input {
        width: 60px !important;
        height: 34px !important;
        padding: 3px 5px !important;
        font-size: 10px !important;
        border-radius: 8px !important;
    }

    .order-inline .oi-size-grid {
        display: grid !important;

        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        gap: 5px 8px !important;

        width: 100%;
    }

    .order-inline .oi-size-cell {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        gap: 4px !important;

        min-width: 0;
        height: 34px;
    }

    .order-inline .oi-size-name {
        min-width: 15px !important;

        font-size: 9px !important;
        line-height: 1 !important;
        font-weight: 700 !important;
    }

    .order-inline .oi-size-qty {
        width: 58px !important;
        flex: 0 0 58px !important;

        height: 34px !important;

        padding: 3px !important;

        font-size: 10px !important;
        text-align: center;

        border-radius: 8px !important;
    }

    .order-inline .catalog-btn-login,
    .order-inline .catalog-btn-order {
        height: 34px !important;
        min-height: 34px !important;

        padding: 5px 8px !important;

        font-size: 10px !important;
        line-height: 1.1 !important;

        border-radius: 7px !important;

        margin-top: 2px !important;
    }
}

@media (max-width: 380px) {

    .order-inline {
        gap: 4px !important;
    }

    .order-inline .oi-field > label {
        font-size: 8px !important;
    }

    .order-inline .oi-field.oi-inline .oi-text {
        font-size: 9px !important;
    }

    .order-inline .oi-set-note {
        font-size: 11px !important;
    }

    .order-inline .oi-size-grid {
        gap: 4px 6px !important;
    }

    .order-inline .oi-size-cell {
        height: 32px;
    }

    .order-inline .oi-size-name {
        font-size: 8px !important;
        min-width: 13px !important;
    }

    .order-inline .oi-size-qty {
        width: 52px !important;
        flex-basis: 52px !important;
        height: 32px !important;
        font-size: 9px !important;
    }

    .order-inline .oi-qty-row input {
        width: 55px !important;
        height: 32px !important;
    }

    .order-inline .catalog-btn-login,
    .order-inline .catalog-btn-order {
        height: 32px !important;
        min-height: 32px !important;
        font-size: 9px !important;
    }
}

@media (max-width: 575.98px) {

    .order-inline .oi-qty-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .order-inline .oi-qty-row label {
        font-size: 9px !important;
        font-weight: 700 !important;
        margin: 0 !important;
        line-height: 1 !important;
    }
    .order-inline .oi-qty-row input {
        width: 48px !important;
        height: 30px !important;

        padding: 2px 4px !important;

        font-size: 10px !important;
        text-align: center !important;

        border-radius: 7px !important;
    }

    .order-inline .oi-size-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px 7px !important;
    }

    .order-inline .oi-size-cell {
        height: 30px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        gap: 4px !important;
    }

    .order-inline .oi-size-name {
        font-size: 9px !important;
        min-width: 12px !important;
    }
    .order-inline .oi-size-qty {
        width: 48px !important;
        flex: 0 0 48px !important;

        height: 30px !important;

        padding: 2px 4px !important;

        font-size: 10px !important;
        text-align: center !important;

        border-radius: 7px !important;
    }
    .order-inline .catalog-btn-order,
    .order-inline .catalog-btn-login {
        height: 32px !important;
        min-height: 32px !important;

        font-size: 10px !important;

        padding: 4px 8px !important;

        margin-top: 2px !important;
        border-radius: 7px !important;
    }
}

@media (max-width: 575.98px) {

    .order-inline .catalog-btn-order,
    .order-inline .catalog-btn-login {
        margin-top: 8px !important;

        height: 32px !important;
        min-height: 32px !important;

        padding: 4px 8px !important;

        font-size: 11px !important;
        line-height: 1.1 !important;
        font-weight: 600 !important;

        border-radius: 7px !important;
    }

    .order-inline .oi-size-name {
        font-size: 9px !important;
        line-height: 1 !important;
        font-weight: 600 !important;
    }

    .order-inline .oi-size-qty {
        width: 48px !important;
        flex: 0 0 48px !important;

        height: 30px !important;

        font-size: 9px !important;
        padding: 2px 4px !important;

        border-radius: 7px !important;
    }

    .order-inline .oi-size-grid {
        gap: 4px 7px !important;
        margin-bottom: 0 !important;
    }

    .order-inline .oi-size-cell {
        height: 30px !important;
    }

    .order-inline .oi-size-title {
        font-size: 9px !important;
        line-height: 1.1 !important;
        margin-bottom: 3px !important;
    }
}

.order-inline.order-focus {
    animation: orderFocus 0.7s ease;
}

@keyframes orderFocus {
    0% {
        transform: translateY(10px);
        opacity: 0.6;
    }

    50% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.order-inline {
    scroll-margin-top: 20px;
    scroll-margin-bottom: 20px;
}

.order-form-focused {
    animation: orderFormFocus 0.9s ease;
}

@keyframes orderFormFocus {

    0% {
        transform: scale(0.96);
        opacity: 0.65;
    }

    45% {
        transform: scale(1.02);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }

}

.catalog-card.product-card-focused {
    animation: productCardFocus 0.7s ease;
}

@keyframes productCardFocus {

    0% {
        transform: scale(0.98);
    }

    50% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================================
   CATALOG + CATEGORY TOP NAV
   ============================================================ */

/* One horizontal row: chips scroll, the catalog picker stays put.
   Scrolling lives on .category-nav-container only. */
.category-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Size to content so .category-nav-container does the scrolling. */
    flex: 0 0 auto;
    overflow: visible;
}

.category-nav-items {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

/* ---------------------------------------------------- Catalog picker
   Rendered as a pill the same height as .category-nav-item so the whole
   row shares one baseline. select2 replaces the <select> with its own
   markup, so the pill border lives on this wrapper and select2's chrome
   is flattened into it. */
.catalog-nav-cell {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;                 /* matches .category-nav-item */
    padding: 0 8px 0 9px;
    border: 1px solid #e1e5ea;
    border-radius: 30px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.catalog-nav-cell:hover { border-color: #111; }

.catalog-nav-cell:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
}

.catalog-select-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    font-size: .85rem;
}

/* Before select2 upgrades it, keep the bare <select> from looking broken. */
.catalog-select {
    height: 30px;
    min-width: 130px;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #333;
    outline: none;
}

/* -------- select2 flattened into the pill -------- */
.catalog-nav-cell .select2-container {
    width: 148px !important;   /* overrides select2's inline width */
    flex: 0 0 auto;
}

.catalog-nav-cell .select2-container--default .select2-selection--single {
    height: 30px;
    border: 0;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
}

.catalog-nav-cell .select2-container--default
.select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.catalog-nav-cell .select2-container--default
.select2-selection--single .select2-selection__placeholder { color: var(--muted); }

.catalog-nav-cell .select2-container--default
.select2-selection--single .select2-selection__arrow {
    height: 30px;
    right: 2px;
}

.catalog-nav-cell .select2-container--default
.select2-selection--single .select2-selection__clear {
    margin-right: 16px;
    color: var(--muted);
    font-weight: 700;
}

/* Dropdown panel (select2 appends this to <body>, so it is never clipped) */
.select2-container--default .select2-dropdown {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: .87rem;
}

.select2-container--default .select2-results__option {
    font-size: .88rem;
    padding: .5rem .7rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--navy);
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background: var(--bg);
    color: var(--ink);
    font-weight: 600;
}

.catalog-latest {
    margin-left: auto;
    color: var(--gold);
    font-size: 12px;
}

/* Mobile: match the smaller chip metrics and give the row breathing room. */
@media (max-width: 767px) {

    .category-nav-container { gap: 8px; padding: 6px 2px 12px; }

    .category-nav-wrapper,
    .category-nav-items { gap: 8px; }

    .catalog-nav-cell {
        height: 42px;
        padding: 0 6px 0 7px;
        gap: 6px;
    }

    .catalog-select-icon { width: 26px; height: 26px; font-size: .8rem; }

    .catalog-nav-cell .select2-container { width: 118px !important; }

    .catalog-nav-cell .select2-container--default
    .select2-selection--single .select2-selection__rendered { font-size: 13px; }

    /* Keep the panel on-screen on narrow devices. */
    .select2-container--default .select2-dropdown { max-width: calc(100vw - 24px); }
}

/* ============================================================
   CATALOG DROPDOWN
   (.catalog-nav-cell is fully defined in the nav block above.)
============================================================ */

.catalog-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 1000;

    min-width: 280px;
    max-width: 380px;

    background: #fff;
    border: 1px solid #e1e6eb;
    border-radius: 14px;

    box-shadow: 0 12px 30px rgba(15, 41, 66, 0.15);

    padding: 8px;
}

/* Open on click */
.catalog-nav-cell.dropdown-open .catalog-dropdown {
    display: block;
}
/* ============================================================
   SETTINGS — landing display controls (Category / SubCategory / Brand)
   ============================================================ */

.landing-fields {
    margin-top: 1rem;
    padding: .85rem .9rem 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.landing-fields-head {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold-600);
    margin-bottom: .6rem;
}

.landing-fields .form-label { margin-bottom: .2rem; font-size: .82rem; }

.landing-preview {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.landing-preview img {
    width: 54px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
}
.landing-remove {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: var(--danger);
    margin: 0;
    cursor: pointer;
}

/* Compact "Landing" column in the settings tables */
.landing-cell { display: inline-flex; align-items: center; gap: .45rem; }

.landing-thumb {
    width: 30px;
    height: 38px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid var(--line);
    background: var(--bg);
    flex: 0 0 auto;
}
.landing-thumb-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: .8rem;
}

.badge-soft-ok,
.badge-soft-off {
    font-size: .68rem;
    font-weight: 700;
    padding: .1rem .42rem;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.badge-soft-ok  { background: rgba(30,158,106,.13); color: var(--success); }
.badge-soft-off { background: var(--line); color: var(--muted); }

/* ============================================================
   ADMIN — Banners page
   ============================================================ */

.banner-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.banner-toolbar-text { min-width: 0; }
.banner-toolbar-text small { display: block; margin-top: .1rem; }

.banner-toolbar-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

/* Search with a leading icon, sized so the row never wraps awkwardly. */
.banner-search { position: relative; }
.banner-search i {
    position: absolute;
    left: .6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .8rem;
    color: var(--muted);
    pointer-events: none;
}
.banner-search .form-control {
    width: 200px;
    padding-left: 1.9rem;
    border-radius: var(--radius-sm);
}
.banner-toolbar-controls .form-select { width: auto; border-radius: var(--radius-sm); }

/* Wide 16:9 thumbnail — a banner is not a square tile. */
.banner-preview-cell {
    width: 116px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(115deg, #eef3ff, #f7eeff);
}
.banner-preview-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

.banner-preview-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 1rem;
}

.banner-eyebrow {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-600);
    margin-bottom: .1rem;
}

.banner-cta-chip {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink);
}

@media (max-width: 575px) {
    .banner-toolbar-controls { width: 100%; flex-wrap: wrap; }
    .banner-search { flex: 1 1 100%; }
    .banner-search .form-control { width: 100%; }
    .banner-preview-cell { width: 84px; }
}

/* DataTable footer: summary left, pager centred, page-size right. */
.dt-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid var(--line);
}
.dt-footer .pager { margin: 0 auto; }
.dt-footer .dt-page-size { width: auto; border-radius: var(--radius-sm); }

/* ============================================================
   ADMIN - Banners page (reference layout, project palette)
   ============================================================ */

.bn-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.bn-title { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.bn-subtitle { margin: .2rem 0 0; font-size: .86rem; color: var(--muted); }
.bn-add { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }

/* ---------------------------------------------------- Tabs (underline) */
.bn-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.2rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.bn-tabs::-webkit-scrollbar { display: none; }

.bn-tab {
    position: relative;
    flex: 0 0 auto;
    border: 0;
    background: none;
    padding: .7rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    white-space: nowrap;
}
.bn-tab:hover { color: var(--navy); }
.bn-tab.is-active { color: var(--navy); }
.bn-tab.is-active::after {
    content: "";
    position: absolute;
    left: .6rem;
    right: .6rem;
    bottom: -1px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px 2px 0 0;
}

.bn-card { padding: 0; overflow: hidden; }

/* ---------------------------------------------------- Filter bar */
.bn-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

.bn-search { position: relative; flex: 1 1 260px; min-width: 0; }
.bn-search i {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .85rem;
    pointer-events: none;
}
.bn-search .form-control {
    padding-left: 2.1rem;
    height: 40px;
    border-radius: var(--radius-sm);
    border-color: var(--line);
}
.bn-status {
    width: auto;
    min-width: 150px;
    height: 40px;
    border-radius: var(--radius-sm);
    border-color: var(--line);
}

.bn-filter-btn {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--navy-600);
    cursor: pointer;
}
.bn-filter-btn:hover { border-color: var(--navy-600); background: var(--bg); }

/* Table sits flush inside the card. */
.bn-card .table-wrap { border: 0; border-radius: 0; }
.bn-card .dt-footer { margin: 0; padding: .9rem 1.1rem; }

/* ---------------------------------------------------- Cells */
.bn-preview {
    width: 168px;
    aspect-ratio: 16 / 7;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(115deg, #eef3ff, #f7eeff);
}
.bn-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bn-preview-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }

.bn-content { min-width: 170px; }
.bn-eyebrow {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-600);
    margin-bottom: .15rem;
}
.bn-content-title { font-weight: 700; color: var(--ink); font-size: .92rem; line-height: 1.35; }

.bn-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .25rem;
    font-size: .76rem;
    color: var(--muted);
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bn-meta i { flex: 0 0 auto; opacity: .7; }

.bn-button-cell { min-width: 150px; }
.bn-cta {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    padding: .25rem .7rem;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}
.bn-variant {
    display: inline-block;
    margin-top: .4rem;
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 5px;
}
.bn-variant-primary { background: rgba(15, 41, 66, .1); color: var(--navy); }
.bn-variant-secondary { background: rgba(212, 160, 23, .16); color: var(--gold-600); }

/* ---------------------------------------------------- Order */
.bn-order { display: flex; align-items: center; gap: .4rem; }
.bn-grip { color: #c3ccda; cursor: grab; font-size: 1rem; line-height: 1; }
.bn-grip:active { cursor: grabbing; }
.bn-order-input {
    width: 58px;
    height: 34px;
    text-align: center;
    padding: 0 .3rem;
    border-radius: 6px;
    border-color: var(--line);
    font-variant-numeric: tabular-nums;
}
tr.is-dragging { opacity: .45; }

/* ---------------------------------------------------- Status */
.bn-status-cell { display: flex; flex-direction: column; gap: .3rem; min-width: 92px; }
.bn-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    align-self: flex-start;
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 999px;
}
.bn-badge.is-on { background: rgba(30, 158, 106, .13); color: var(--success); }
.bn-badge.is-off { background: var(--line); color: var(--muted); }
.bn-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bn-status-cell small { font-size: .68rem; line-height: 1.3; }

/* ---------------------------------------------------- Actions */
.bn-actions { display: flex; gap: .35rem; }
.bn-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bn-icon-edit { color: var(--navy-600); }
.bn-icon-edit:hover { background: rgba(29, 74, 118, .08); border-color: var(--navy-600); }
.bn-icon-view { color: var(--gold-600); }
.bn-icon-view:hover { background: rgba(212, 160, 23, .12); border-color: var(--gold); }
.bn-icon-delete { color: var(--danger); }
.bn-icon-delete:hover { background: rgba(214, 69, 80, .1); border-color: var(--danger); }

/* ---------------------------------------------------- Preview modal */
.bnp-banner {
    display: flex;
    align-items: stretch;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(115deg, #eef3ff 0%, #f4ecff 55%, #ffeef6 100%);
    min-height: 170px;
}
.bnp-copy {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.3rem 1.4rem;
    min-width: 0;
}
.bnp-eyebrow {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--gold-600);
}
.bnp-title { margin: 0; font-size: 1.4rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.bnp-sub { margin: 0; font-size: .85rem; color: var(--muted); }
.bnp-cta {
    align-self: flex-start;
    margin-top: .6rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 999px;
    padding: .5rem 1rem;
    font-size: .8rem;
    font-weight: 700;
}
.bnp-cta-primary { background: var(--navy); color: #fff; }
.bnp-cta-secondary { background: transparent; color: var(--navy); border: 1px solid var(--navy); }

.bnp-art { flex: 0 0 42%; }
.bnp-art img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 767px) {
    .bn-preview { width: 118px; }
    .bn-meta { max-width: 150px; }
    .bn-filters { padding: .8rem; }
    .bn-status { flex: 1 1 auto; }
    .bnp-banner { flex-direction: column; }
    .bnp-art { flex: 0 0 auto; height: 140px; }
}

/* ============================================================
   SCROLLBARS — themed, project-wide
   main.css is included on every page, so this covers the
   storefront, the landing page and the admin.

   Elements that deliberately hide their scrollbar (carousels,
   chip rails) set scrollbar-width:none on a class selector, which
   outranks the universal rule below and keeps working.
   ============================================================ */

:root {
    --scroll-track: rgba(15, 41, 66, .05);
    --scroll-thumb: rgba(15, 41, 66, .26);
    --scroll-thumb-hover: rgba(15, 41, 66, .45);
    --scroll-size: 10px;
}

/* Firefox + the modern standard property. */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* WebKit / Blink */
::-webkit-scrollbar {
    width: var(--scroll-size);
    height: var(--scroll-size);
}

::-webkit-scrollbar-track {
    background: var(--scroll-track);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 10px;
    /* Transparent border + padding-box clip leaves breathing room around
       the thumb, so it reads as a slim pill rather than a full-width bar. */
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background-color .18s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
    background: var(--navy);
    background-clip: padding-box;
}

/* Drop the stepper arrows that make the default bar look dated. */
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

::-webkit-scrollbar-corner { background: transparent; }

/* The page scrollbar sits on a white gutter rather than the app background. */
html {
    scrollbar-color: var(--scroll-thumb) transparent;
}
html::-webkit-scrollbar-track { background: transparent; }

/* Dark surfaces need a light thumb to stay visible. */
.sidebar,
.bh-sheet,
.lp-menu {
    --scroll-track: rgba(255, 255, 255, .06);
    --scroll-thumb: rgba(255, 255, 255, .28);
    --scroll-thumb-hover: rgba(255, 255, 255, .45);
}
