/* =========================================================
   BestGadget — design system on top of Bootstrap 5.3
   Black primary · clean white surfaces · function first
   ========================================================= */
:root {
  --bg-black: #0a0a0a;
  --bg-ink: #171717;
  --bg-gray: #f5f5f4;
  --bg-line: #e7e5e4;
  --bg-muted: #737373;
  --bg-green: #15803d;
  --bg-radius: 12px;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: #0a0a0a;
  --bs-primary: #0a0a0a;
  --bs-primary-rgb: 10, 10, 10;
  --bs-link-color: #0a0a0a;
  --bs-link-color-rgb: 10, 10, 10;
  --bs-link-hover-color: #404040;
  --bs-border-color: #e7e5e4;
  --bs-secondary-color: #737373;
}
body { font-size: .95rem; -webkit-font-smoothing: antialiased; background: #fff; }
a { text-decoration: none; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.text-muted { color: var(--bg-muted) !important; }
.small-xs { font-size: .75rem; }
.bg-gray { background: var(--bg-gray); }
.bg-black { background: var(--bg-black) !important; }
.border-line { border-color: var(--bg-line) !important; }
.rounded-xl { border-radius: var(--bg-radius) !important; }
.letter-tight { letter-spacing: -.02em; }
.text-green { color: var(--bg-green) !important; }

/* Buttons */
.btn { border-radius: 10px; font-weight: 600; padding: .55rem 1.1rem; }
.btn-sm { border-radius: 8px; padding: .35rem .75rem; }
.btn-lg { padding: .8rem 1.4rem; }
.btn-primary, .btn-dark { --bs-btn-bg: #0a0a0a; --bs-btn-border-color: #0a0a0a; --bs-btn-hover-bg: #262626; --bs-btn-hover-border-color: #262626; --bs-btn-active-bg: #000; --bs-btn-disabled-bg: #525252; --bs-btn-disabled-border-color: #525252; }
.btn-outline-dark, .btn-outline-primary { --bs-btn-color: #0a0a0a; --bs-btn-border-color: #d6d3d1; --bs-btn-hover-bg: #0a0a0a; --bs-btn-hover-border-color: #0a0a0a; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #0a0a0a; }
.btn-light { --bs-btn-bg: #f5f5f4; --bs-btn-border-color: #f5f5f4; --bs-btn-hover-bg: #e7e5e4; }
.btn-whatsapp { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-whatsapp:hover { background: #15803d; color: #fff; }

/* Forms */
.form-control, .form-select { border-radius: 10px; border-color: var(--bg-line); padding: .6rem .85rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #0a0a0a; box-shadow: 0 0 0 .2rem rgba(10,10,10,.08); }
.form-check-input:checked { background-color: #0a0a0a; border-color: #0a0a0a; }
.form-label { font-weight: 600; font-size: .85rem; margin-bottom: .35rem; }
.form-text { font-size: .78rem; }

/* Badges */
.badge { font-weight: 600; border-radius: 6px; padding: .35em .6em; }
.badge-soft-success { background: #dcfce7; color: #166534; }
.badge-soft-warning { background: #fef3c7; color: #92400e; }
.badge-soft-danger { background: #fee2e2; color: #991b1b; }
.badge-soft-info { background: #e0f2fe; color: #075985; }
.badge-soft-secondary { background: #f5f5f4; color: #525252; }
.badge-soft-light { background: #fafafa; color: #a3a3a3; }
.badge-featured { background: #0a0a0a; color: #fff; }
.verified { color: #0a0a0a; }
.verified .bi { color: #16a34a; }

/* ---------- Header ---------- */
.topbar { background: #0a0a0a; color: #d4d4d4; font-size: .78rem; }
.topbar a { color: #fff; }
.site-header { background: #fff; border-bottom: 1px solid var(--bg-line); position: sticky; top: 0; z-index: 1030; }
.brand-logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -.04em; color: #0a0a0a; display: inline-flex; align-items: center; gap: .45rem; }
.brand-logo .mark { width: 30px; height: 30px; background: #0a0a0a; color: #fff; border-radius: 8px; display: grid; place-items: center; font-size: .95rem; }
.brand-logo span.tld { color: var(--bg-muted); font-weight: 600; }
.header-search { position: relative; }
.header-search .form-control { padding-left: 2.6rem; background: var(--bg-gray); border-color: transparent; height: 46px; }
.header-search .form-control:focus { background: #fff; border-color: #0a0a0a; }
.header-search .bi-search { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--bg-muted); }
.header-icon { position: relative; width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 10px; color: #0a0a0a; font-size: 1.2rem; }
.header-icon:hover { background: var(--bg-gray); }
.header-icon .count { position: absolute; top: 3px; right: 2px; background: #0a0a0a; color: #fff; font-size: .62rem; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; padding: 0 4px; }
.cat-strip { border-top: 1px solid var(--bg-line); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip a { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem .9rem; color: #404040; font-weight: 500; font-size: .88rem; border-bottom: 2px solid transparent; }
.cat-strip a:hover, .cat-strip a.active { color: #0a0a0a; border-bottom-color: #0a0a0a; }

/* ---------- Hero / search (Motifiti-style) ---------- */
.hero { background: #0a0a0a; color: #fff; padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.08), transparent 45%); pointer-events: none; }
.hero h1 { font-weight: 800; letter-spacing: -.035em; font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.08; }
.hero .lead { color: #a3a3a3; font-size: 1.05rem; }
.search-panel { background: #fff; color: #0a0a0a; border-radius: 16px; padding: 1rem; box-shadow: 0 20px 50px rgba(0,0,0,.35); position: relative; z-index: 2; }
.search-panel .form-select, .search-panel .form-control { height: 50px; background-color: var(--bg-gray); border-color: transparent; }
.search-panel .btn { height: 50px; }
.hero-stats { color: #a3a3a3; font-size: .85rem; }
.hero-stats strong { color: #fff; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border: 1px solid var(--bg-line); border-radius: 999px; font-size: .82rem; color: #262626; background: #fff; transition: .15s; }
.chip:hover, .chip.active { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.hero .chip { background: transparent; color: #e5e5e5; border-color: #333; }
.hero .chip:hover { background: #fff; color: #0a0a0a; }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-title { font-weight: 800; letter-spacing: -.03em; font-size: 1.5rem; margin: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head a { font-weight: 600; font-size: .88rem; white-space: nowrap; }

.cat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1.1rem .5rem; border: 1px solid var(--bg-line); border-radius: var(--bg-radius); color: #0a0a0a; text-align: center; transition: .15s; height: 100%; }
.cat-tile i { font-size: 1.6rem; }
.cat-tile span { font-weight: 600; font-size: .85rem; }
.cat-tile:hover { border-color: #0a0a0a; transform: translateY(-2px); }

/* ---------- Product card ---------- */
.p-card { border: 1px solid var(--bg-line); border-radius: var(--bg-radius); overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; position: relative; }
.p-card:hover { border-color: #d6d3d1; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.p-card .p-img { aspect-ratio: 1/1; background: var(--bg-gray); display: block; overflow: hidden; }
.p-card .p-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .3s; }
.p-card:hover .p-img img { transform: scale(1.03); }
.p-card .p-body { padding: .8rem .9rem .9rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.p-card .p-title { font-weight: 600; font-size: .9rem; line-height: 1.3; color: #0a0a0a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.35em; }
.p-card .p-specs { font-size: .76rem; color: var(--bg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-card .p-price { font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.p-card .p-old { font-size: .78rem; color: #a3a3a3; text-decoration: line-through; }
.p-card .p-seller { font-size: .76rem; color: var(--bg-muted); border-top: 1px solid #f5f5f4; padding-top: .5rem; margin-top: auto; display: flex; justify-content: space-between; gap: .5rem; }
.p-card .p-seller .name { color: #262626; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-card .p-flags { position: absolute; top: .6rem; left: .6rem; display: flex; gap: .3rem; flex-wrap: wrap; z-index: 2; }
.p-card .cond { background: #fff; border: 1px solid var(--bg-line); color: #262626; }

/* ---------- Shop card ---------- */
.s-card { border: 1px solid var(--bg-line); border-radius: var(--bg-radius); padding: 1.1rem; display: flex; gap: .9rem; align-items: center; height: 100%; color: #0a0a0a; background: #fff; transition: .15s; }
.s-card:hover { border-color: #0a0a0a; }
.avatar { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: #0a0a0a; color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; overflow: hidden; }
.avatar-lg { width: 96px; height: 96px; border-radius: 20px; font-size: 2rem; border: 4px solid #fff; }
.avatar-sm { width: 34px; height: 34px; border-radius: 9px; font-size: .8rem; }
.rating { color: #0a0a0a; font-weight: 600; font-size: .82rem; }
.rating .bi-star-fill { color: #f59e0b; }

/* ---------- Listing / filters ---------- */
.filter-box { border: 1px solid var(--bg-line); border-radius: var(--bg-radius); padding: 1.1rem; position: sticky; top: 130px; }
.filter-box h6 { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #525252; margin: 1.1rem 0 .6rem; }
.filter-box h6:first-child { margin-top: 0; }
.filter-list { max-height: 220px; overflow-y: auto; }
.filter-list a { display: flex; justify-content: space-between; padding: .3rem 0; color: #404040; font-size: .88rem; }
.filter-list a.active, .filter-list a:hover { color: #0a0a0a; font-weight: 600; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.result-count { font-weight: 700; font-size: 1.05rem; }

/* ---------- Product page ---------- */
.gallery-main { background: var(--bg-gray); border-radius: 16px; aspect-ratio: 1/1; display: grid; place-items: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; }
.gallery-thumbs button { width: 72px; height: 72px; flex-shrink: 0; border: 2px solid transparent; border-radius: 10px; background: var(--bg-gray); padding: 0; overflow: hidden; }
.gallery-thumbs button.active { border-color: #0a0a0a; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.price-xl { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.spec-table { width: 100%; font-size: .9rem; }
.spec-table tr { border-bottom: 1px solid #f5f5f4; }
.spec-table th { color: var(--bg-muted); font-weight: 500; padding: .55rem 0; width: 40%; }
.spec-table td { font-weight: 600; padding: .55rem 0; }
.trust-box { background: var(--bg-gray); border-radius: var(--bg-radius); padding: 1rem; font-size: .85rem; }
.trust-box .bi { font-size: 1.15rem; }
.seller-box { border: 1px solid var(--bg-line); border-radius: var(--bg-radius); padding: 1.1rem; }
.breadcrumb { font-size: .82rem; --bs-breadcrumb-divider-color: #a3a3a3; }
.breadcrumb a { color: var(--bg-muted); }
.prose { line-height: 1.7; color: #262626; white-space: pre-line; }

/* ---------- Shop profile ---------- */
.shop-cover { height: 220px; background: #0a0a0a center/cover no-repeat; border-radius: 0 0 20px 20px; position: relative; }
.shop-head { margin-top: -48px; position: relative; }

/* ---------- Steps / info ---------- */
.step-num { width: 40px; height: 40px; border-radius: 12px; background: #0a0a0a; color: #fff; display: grid; place-items: center; font-weight: 800; }
.feature-card { border: 1px solid var(--bg-line); border-radius: var(--bg-radius); padding: 1.5rem; height: 100%; }
.feature-card .bi { font-size: 1.6rem; }
.cta-dark { background: #0a0a0a; color: #fff; border-radius: 20px; padding: 2.5rem; }
.cta-dark .text-muted { color: #a3a3a3 !important; }

/* ---------- Popular searches (Motifiti) ---------- */
.popular a { display: inline-block; color: #404040; font-size: .88rem; margin: 0 1rem .4rem 0; }
.popular a:hover { color: #0a0a0a; text-decoration: underline; }
.popular a span { color: #a3a3a3; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0a0a; color: #a3a3a3; padding: 3.5rem 0 1.5rem; font-size: .88rem; }
.site-footer h6 { color: #fff; font-weight: 700; font-size: .85rem; margin-bottom: 1rem; }
.site-footer a { color: #a3a3a3; display: block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-logo { color: #fff; }
.site-footer .brand-logo .mark { background: #fff; color: #0a0a0a; }
.site-footer hr { border-color: #262626; opacity: 1; }
.social a { display: inline-grid !important; place-items: center; width: 38px; height: 38px; border: 1px solid #333; border-radius: 10px; margin-right: .35rem; color: #fff !important; }

/* ---------- Cards / tables in dashboards ---------- */
.card { border-color: var(--bg-line); border-radius: var(--bg-radius); }
.card-header { background: #fff; border-bottom-color: var(--bg-line); font-weight: 700; padding: .9rem 1.1rem; }
.card-header:first-child { border-radius: var(--bg-radius) var(--bg-radius) 0 0; }
.table { --bs-table-hover-bg: #fafaf9; font-size: .88rem; margin: 0; }
.table > thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bg-muted); font-weight: 600; background: #fafaf9; border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: contain; background: var(--bg-gray); }
.stat-card { border: 1px solid var(--bg-line); border-radius: var(--bg-radius); padding: 1.1rem 1.2rem; background: #fff; height: 100%; }
.stat-card .label { color: var(--bg-muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; margin-top: .2rem; }
.stat-card.dark { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.stat-card.dark .label { color: #a3a3a3; }
.nav-pills-line { border-bottom: 1px solid var(--bg-line); gap: .25rem; flex-wrap: nowrap; overflow-x: auto; }
.nav-pills-line .nav-link { color: #525252; border-radius: 0; border-bottom: 2px solid transparent; padding: .6rem .9rem; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.nav-pills-line .nav-link.active { color: #0a0a0a; border-bottom-color: #0a0a0a; background: none; }
.nav-pills-line .nav-link .badge { background: #f5f5f4; color: #525252; }

/* ---------- Dashboard shell ---------- */
.dash { display: flex; min-height: 100vh; background: var(--bg-gray); }
.dash-side { width: 250px; background: #0a0a0a; color: #a3a3a3; flex-shrink: 0; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1040; transition: transform .2s; }
.dash-side .brand-logo { color: #fff; padding: 1.25rem 1.25rem 1rem; }
.dash-side .brand-logo .mark { background: #fff; color: #0a0a0a; }
.dash-side .nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #525252; padding: 1rem 1.25rem .4rem; font-weight: 700; }
.dash-side a.nav-item-link { display: flex; align-items: center; gap: .7rem; padding: .55rem 1.25rem; color: #a3a3a3; font-size: .88rem; font-weight: 500; border-left: 3px solid transparent; }
.dash-side a.nav-item-link:hover { color: #fff; background: #171717; }
.dash-side a.nav-item-link.active { color: #fff; background: #171717; border-left-color: #fff; }
.dash-side a.nav-item-link .badge { margin-left: auto; background: #fff; color: #0a0a0a; }
.dash-main { flex: 1; margin-left: 250px; min-width: 0; }
.dash-top { background: #fff; border-bottom: 1px solid var(--bg-line); padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.dash-content { padding: 1.5rem; }
.page-title { font-weight: 800; letter-spacing: -.03em; font-size: 1.45rem; margin: 0; }
@media (max-width: 991.98px) {
  .dash-side { transform: translateX(-100%); }
  .dash-side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .dash-main { margin-left: 0; }
  .dash-content { padding: 1rem; }
  .filter-box { position: static; }
}

/* Chat */
.chat { display: flex; flex-direction: column; gap: .75rem; }
.bubble { max-width: 78%; padding: .7rem .95rem; border-radius: 14px; font-size: .9rem; white-space: pre-line; }
.bubble.me { align-self: flex-end; background: #0a0a0a; color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: #fff; border: 1px solid var(--bg-line); border-bottom-left-radius: 4px; }
.bubble .meta { font-size: .7rem; opacity: .6; margin-top: .25rem; }

/* Timeline */
.timeline { display: flex; justify-content: space-between; position: relative; margin: 1rem 0; }
.timeline::before { content: ""; position: absolute; top: 15px; left: 5%; right: 5%; height: 2px; background: var(--bg-line); }
.timeline .t-step { position: relative; text-align: center; flex: 1; font-size: .75rem; color: var(--bg-muted); }
.timeline .t-dot { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--bg-line); margin: 0 auto .4rem; display: grid; place-items: center; }
.timeline .t-step.done { color: #0a0a0a; font-weight: 600; }
.timeline .t-step.done .t-dot { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }

/* Payment waiting */
.pulse { width: 84px; height: 84px; border-radius: 50%; background: #0a0a0a; color: #fff; display: grid; place-items: center; font-size: 2rem; margin: 0 auto; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(10,10,10,.35); } 70% { box-shadow: 0 0 0 22px rgba(10,10,10,0); } 100% { box-shadow: 0 0 0 0 rgba(10,10,10,0); } }

/* Auth */
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 2.5rem 1rem; background: var(--bg-gray); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--bg-line); border-radius: 18px; padding: 2rem; }
.role-pick input { display: none; }
.role-pick label { border: 1.5px solid var(--bg-line); border-radius: 12px; padding: .9rem; cursor: pointer; display: block; height: 100%; }
.role-pick input:checked + label { border-color: #0a0a0a; background: #fafaf9; box-shadow: inset 0 0 0 1px #0a0a0a; }

.alert { border-radius: 12px; border: 0; }
.alert-success { background: #f0fdf4; color: #166534; }
.alert-danger { background: #fef2f2; color: #991b1b; }
.alert-info { background: #f5f5f4; color: #262626; }
.alert-warning { background: #fffbeb; color: #92400e; }
.pagination { --bs-pagination-active-bg: #0a0a0a; --bs-pagination-active-border-color: #0a0a0a; --bs-pagination-color: #0a0a0a; --bs-pagination-border-radius: 8px; }
.dropdown-menu { border-color: var(--bg-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.08); padding: .4rem; }
.dropdown-item { border-radius: 8px; font-size: .9rem; padding: .45rem .75rem; }
.dropdown-item:active { background: #0a0a0a; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--bg-muted); }
.empty .bi { font-size: 2.5rem; display: block; margin-bottom: .75rem; color: #d6d3d1; }
.mobile-bar { display: none; }
@media (max-width: 767.98px) {
  .mobile-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--bg-line); padding: .6rem .75rem; gap: .5rem; z-index: 1030; }
  .has-mobile-bar { padding-bottom: 72px; }
  .section { padding: 2rem 0; }
  .hero { padding: 2rem 0; }
}

/* ---------- Robustness fixes ---------- */
body { overflow-x: clip; }
html:has(body.modal-open),
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: inherit; }
.btn-link { text-decoration: none; }
.p-card .p-price { white-space: nowrap; }
.p-card .p-seller .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-card .p-seller > span:last-child { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-card .meta { display: flex; flex-wrap: wrap; column-gap: .75rem; row-gap: .2rem; }
.s-card .meta > * { white-space: nowrap; }
.site-footer a.brand-logo { display: inline-flex; }
@media (max-width: 575.98px) {
  .brand-logo { font-size: 1.15rem; }
  .brand-logo .tld { display: none; }
  .p-card .p-body { padding: .65rem .7rem .75rem; }
  .p-card .p-price { font-size: .95rem; }
  .p-card .p-flags .cond { display: none; }
  .section-title { font-size: 1.25rem; }
}

/* =========================================================
   Minimal weight scale — lighter type, less shouting
   ========================================================= */
body { font-weight: 400; }
.fw-800 { font-weight: 600 !important; }
.fw-700 { font-weight: 500 !important; }
.fw-600 { font-weight: 500 !important; }
.letter-tight { letter-spacing: -.01em; }
.btn { font-weight: 500; }
.form-label { font-weight: 500; }
.badge { font-weight: 500; }
.brand-logo { font-weight: 600; letter-spacing: -.02em; }
.brand-logo .mark { font-weight: 600; }
.brand-logo .tld { font-weight: 400; margin-left: -.45rem; }
.topbar { font-weight: 400; }
.cat-strip a { font-weight: 400; color: #525252; }
.cat-strip a i { font-size: .9rem; opacity: .7; }
.hero h1 { font-weight: 600; letter-spacing: -.025em; font-size: clamp(1.8rem, 3.6vw, 2.75rem); line-height: 1.15; }
.hero .lead { font-weight: 300; }
.hero-stats strong { font-weight: 500; }
.section-title { font-weight: 600; letter-spacing: -.015em; font-size: 1.35rem; }
.section-head a { font-weight: 500; }
.cat-tile { gap: .6rem; padding: 1.25rem .5rem; }
.cat-tile i { font-size: 1.35rem; color: #404040; }
.cat-tile span { font-weight: 400; font-size: .88rem; }
.p-card .p-title { font-weight: 500; }
.p-card .p-price { font-weight: 600; letter-spacing: -.01em; }
.price-xl { font-weight: 600; letter-spacing: -.02em; }
.page-title { font-weight: 600; letter-spacing: -.015em; }
.stat-card .label { font-weight: 500; }
.stat-card .value { font-weight: 600; letter-spacing: -.02em; }
.card-header { font-weight: 500; }
.dash-side .nav-label { font-weight: 500; }
.filter-box h6 { font-weight: 500; }
.filter-list a.active, .filter-list a:hover { font-weight: 500; }
.result-count { font-weight: 500; }
.nav-pills-line .nav-link { font-weight: 500; }
.site-footer h6 { font-weight: 500; }
.rating { font-weight: 500; }
.step-num, .avatar { font-weight: 600; }
.table > thead th { font-weight: 500; }

/* =========================================================
   Motifiti-style minimal layer (overrides everything above)
   ========================================================= */
body { background: #fafafa; color: #171717; }
.container-narrow { max-width: 1132px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.brand-logo .tld { color: #737373; margin-left: 0; font-weight: 400; }
.page-h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: -.02em; margin-bottom: .6rem; }
.lead-sm { color: #525252; font-size: .98rem; margin: 0; }
.filters .f-group { margin-bottom: 1.1rem; }
.f-label { font-size: .85rem; color: #404040; margin-bottom: .45rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { font-size: .82rem; padding: .42rem .95rem; border-color: #e5e5e5; background: #fff; color: #262626; }
.chip:hover { background: #fff; color: #0a0a0a; border-color: #a3a3a3; }
.chip.active, .chip.active:hover { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.filters .form-select, .filters .form-control { background-color: #fff; border-color: #e5e5e5; border-radius: 8px; font-size: .92rem; }
.filters .btn { border-radius: 8px; }
.h-stock { font-size: 1.2rem; font-weight: 500; margin: 0; }

.row-card { display: flex; gap: 1rem; background: #fff; border: 1px solid #ececec; border-radius: 10px; padding: 1rem; transition: border-color .15s; }
.row-card:hover { border-color: #cfcfcf; }
.row-img { width: 150px; height: 112px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: #f5f5f4; display: block; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 500; font-size: 1rem; color: #0a0a0a; line-height: 1.3; }
.row-title:hover { text-decoration: underline; }
.row-specs { display: flex; flex-wrap: wrap; gap: .25rem .85rem; font-size: .8rem; color: #525252; margin-top: .3rem; }
.row-cond { font-size: .8rem; color: #525252; margin-top: .2rem; }
.row-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; padding-top: .5rem; }
.row-price { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 600; font-size: .95rem; color: #0a0a0a; }
.row-old { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; color: #a3a3a3; text-decoration: line-through; margin-left: .5rem; }
.row-seller { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: #737373; min-width: 0; }
.row-seller span:first-child { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid #e5e5e5; background: #0a0a0a; color: #fff; display: inline-grid; place-items: center; font-size: .8rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .row-card { padding: .75rem; gap: .75rem; }
  .row-img { width: 104px; height: 88px; }
  .row-title { font-size: .92rem; }
}
.popular a { color: #404040; }
.site-footer-min { border-top: 1px solid #e5e5e5; margin-top: 4rem; font-size: .85rem; color: #737373; }
.site-footer-min a { color: #525252; }
.site-footer-min a:hover { color: #0a0a0a; }
.card, .p-card, .s-card, .seller-box, .feature-card, .filter-box { background: #fff; }

/* ---------- Vertical review videos ---------- */
.video-strip { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.vid { position: relative; flex: 0 0 auto; width: 180px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #0a0a0a; }
.vid iframe { width: 100%; height: 100%; border: 0; display: block; }
.vid-cover { position: absolute; inset: 0; border: 0; padding: 0; background: #171717 center/cover no-repeat; color: #fff; cursor: pointer; }
.vid-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 45%); }
.vid-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.92); color: #0a0a0a; display: grid; place-items: center; font-size: 1.5rem; z-index: 1; }
.vid-src { position: absolute; left: .6rem; bottom: .55rem; font-size: .72rem; z-index: 1; }
.vid-open { position: absolute; top: .45rem; right: .45rem; z-index: 2; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; font-size: .75rem; }
.vid.playing .vid-cover { display: none; }
@media (max-width: 575.98px) { .vid { width: 150px; } }

/* ---------- Interactive hero (slides + floating search) ---------- */
.hero2 { position: relative; margin-bottom: 1rem; }
.hs { height: 400px; background: #0a0a0a center right / cover no-repeat; color: #fff; position: relative; overflow: hidden; }
.hs::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,10,.92) 0%, rgba(10,10,10,.65) 45%, rgba(10,10,10,0) 80%); }
.hs::after { content: ""; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 65%); pointer-events: none; }
.hs.hs-light { color: #0a0a0a; }
.hs.hs-light::before { background: linear-gradient(90deg, rgba(250,250,250,.95) 0%, rgba(250,250,250,.6) 45%, rgba(250,250,250,0) 80%); }
.hs-in { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-bottom: 70px; }
.hs-text { max-width: 540px; }
.hs-kicker { display: inline-block; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: .7rem; }
.hs-title { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.12; margin-bottom: .7rem; }
.hs-sub { font-size: .98rem; opacity: .75; margin-bottom: 1.2rem; font-weight: 300; }
.hs-price { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; opacity: 1; }
.hs-art { flex-shrink: 0; width: 270px; height: 270px; border-radius: 22px; background: #ffffff; padding: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 25px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.2); transform: rotate(-2deg); transition: transform .35s ease, box-shadow .35s ease; }
.hs-art:hover { transform: rotate(0deg) scale(1.04); box-shadow: 0 35px 65px rgba(0,0,0,.6); }
.hs-art img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.hs-collage { background: transparent; box-shadow: none; transform: none; position: relative; width: 320px; }
.hs-collage img { position: absolute; width: 170px; height: 170px; border-radius: 16px; background: #f5f5f4; box-shadow: 0 20px 40px rgba(0,0,0,.4); object-fit: cover; }
.hs-collage img:nth-child(1) { left: 0; top: 30px; transform: rotate(-6deg); }
.hs-collage img:nth-child(2) { left: 120px; top: 0; transform: rotate(4deg); z-index: 1; }
.hs-collage img:nth-child(3) { left: 80px; top: 120px; transform: rotate(-1deg); z-index: 2; }
.hs-icon { display: grid; place-items: center; font-size: 6rem; color: #0a0a0a; }
.carousel-item.active .hs-text > * { animation: hsIn .6s ease both; }
.carousel-item.active .hs-text > *:nth-child(2) { animation-delay: .08s; }
.carousel-item.active .hs-text > *:nth-child(3) { animation-delay: .16s; }
.carousel-item.active .hs-text > *:nth-child(4) { animation-delay: .24s; }
.carousel-item.active .hs-art { animation: hsArt .8s ease both; }
@keyframes hsIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hsArt { from { opacity: 0; transform: translateY(20px) rotate(-3deg) scale(.96); } to { opacity: 1; } }
.hero2 .carousel-indicators { bottom: 82px; margin-bottom: 0; }
.hero2 .carousel-indicators [data-bs-target] { width: 18px; height: 3px; border-radius: 2px; border: 0; opacity: .4; transition: width .3s, opacity .3s; }
.hero2 .carousel-indicators .active { width: 34px; opacity: 1; }
.hero2 .carousel-control-prev, .hero2 .carousel-control-next { width: 6%; opacity: 0; transition: opacity .2s; bottom: 70px; }
.hero2:hover .carousel-control-prev, .hero2:hover .carousel-control-next { opacity: 1; }
.hs-arrow { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; color: #fff; backdrop-filter: blur(6px); }
.hero-search { position: relative; z-index: 5; margin-top: -62px; background: #fff; border-radius: 14px; padding: 1.1rem; box-shadow: 0 18px 45px rgba(0,0,0,.12); border: 1px solid #ececec; }
.hero-search-h1 { font-size: .95rem; font-weight: 500; margin: 0 0 .75rem .15rem; color: #262626; }
.hsf { position: relative; height: 100%; }
.hsf i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #a3a3a3; z-index: 1; pointer-events: none; }
.hsf .form-control, .hsf .form-select { padding-left: 2.3rem; height: 48px; background-color: #f5f5f4; border-color: transparent; border-radius: 10px; }
.hero-search .btn { min-height: 48px; border-radius: 10px; }
.hero-pay { text-align: center; font-size: .8rem; color: #737373; margin-top: .85rem; }
.hero-pay strong { color: #15803d; font-weight: 600; }
@media (max-width: 767.98px) {
  .hs { height: 330px; }
  .hs-art, .hs-collage { display: none; }
  .hs-in { padding-bottom: 60px; }
  .hero-search { margin-top: -48px; padding: .85rem; }
  .hero2 .carousel-indicators { bottom: 62px; }
}

/* ---------- Grid cards (minimal) + view toggle ---------- */
.p-card { border-color: #ececec; border-radius: 12px; }
.p-card .p-img { aspect-ratio: 4 / 3.4; background: #f5f5f4; }
.p-card .p-img img { object-fit: cover; mix-blend-mode: normal; }
.p-card .p-flags .badge { font-size: .68rem; }
.p-card .p-body { gap: .2rem; }
.p-card .p-title { font-size: .9rem; }
.p-foot { margin-top: auto; padding-top: .55rem; display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; }
.p-foot .row-logo { width: 30px; height: 30px; font-size: .72rem; }
.view-toggle { display: inline-flex; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden; background: #fff; }
.view-toggle a { padding: .3rem .6rem; color: #737373; }
.view-toggle a.active { background: #0a0a0a; color: #fff; }

/* ---------- Photo hero ---------- */
.hs.hs-photo { background-size: cover; background-position: center; position: relative; }
.hs.hs-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 5, 5, 0.95) 0%, rgba(10, 10, 10, 0.85) 36%, rgba(15, 15, 15, 0.48) 64%, rgba(0, 0, 0, 0) 100%) !important;
    pointer-events: none;
    z-index: 1;
}
.hs.hs-photo.hs-light::before {
    background: linear-gradient(90deg, rgba(5, 5, 5, 0.95) 0%, rgba(10, 10, 10, 0.85) 36%, rgba(15, 15, 15, 0.48) 64%, rgba(0, 0, 0, 0) 100%) !important;
}
.hs.hs-photo::after { display: none; }
.hs-photo .hs-art { box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.hs.hs-photo .hs-in { position: relative; z-index: 2; }

/* ---------- One width everywhere: match the header's Bootstrap .container ---------- */
.container-narrow { width: 100%; max-width: none; padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5); padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5); margin-left: auto; margin-right: auto; }
@media (min-width: 576px) { .container-narrow { max-width: 540px; } }
@media (min-width: 768px) { .container-narrow { max-width: 720px; } }
@media (min-width: 992px) { .container-narrow { max-width: 960px; } }
@media (min-width: 1200px) { .container-narrow { max-width: 1140px; } }
@media (min-width: 1400px) { .container-narrow { max-width: 1320px; } }
.step-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #0a0a0a; color: #fff; font-size: .72rem; margin-right: .4rem; }

/* ---------- Modals Z-Index Hierarchy & Scroll Isolation ---------- */
.modal {
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}
.modal-dialog-scrollable {
  height: auto;
  max-height: calc(100vh - 3.5rem);
}
.modal-dialog-scrollable .modal-content {
  max-height: calc(100vh - 3.5rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-dialog-scrollable .modal-body {
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
@media (max-width: 767.98px) {
  .modal-dialog-scrollable,
  .modal-dialog-scrollable .modal-content {
    max-height: 100dvh;
  }
}
.modal-content.rounded-xl { border: 0; }
#productModal { z-index: 1055 !important; }
#productModal .gallery-main { aspect-ratio: 1 / 1; }
#productModal .p-card .p-title { font-size: .82rem; }

/* Higher priority: Cart Modal (z-index 1070) */
#cartModal { z-index: 1070 !important; }

/* Highest modal priority: Checkout Modal (z-index 1085) */
#checkoutModal { z-index: 1085 !important; }
#checkoutModal .modal-body { background: #fafafa; }
#checkoutModal .checkout-form .card { background: #fff; }

/* Cart notifications / toasts: Above ALL modals and backdrops (z-index 1100+) */
.toast-container { z-index: 1100 !important; pointer-events: none; }
.toast-container > * { pointer-events: auto; }
#bgToast { z-index: 1101 !important; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5); }
.p-card[data-quick] .p-img, .row-card[data-quick] .row-img { cursor: zoom-in; }

/* ---------- Rich description + social video feed ---------- */
.rich-img { margin: 0; }
.rich-img img { width: 100%; max-width: 720px; border-radius: 12px; background: #f5f5f4; display: block; }
.rich-img figcaption { font-size: .82rem; color: #737373; margin-top: .35rem; }
.feed-strip { gap: 1rem; }
.feed-item { flex: 0 0 auto; width: 180px; }
.feed-item .vid { width: 180px; }
.feed-meta { margin-top: .4rem; line-height: 1.3; }
.cb-icon { width: 32px; height: 32px; border-radius: 8px; background: #f5f5f4; display: grid; place-items: center; flex-shrink: 0; }
.vid-fill .vid { width: 100%; }

/* ---------- Shop profile header: only the logo overlaps the cover ---------- */
.shop-cover { height: 200px; border-radius: 0 0 16px 16px; background-size: cover; background-position: center; }
.shop-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 60%); }
.shop-head { margin-top: 0; padding-top: 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid #ececec; margin-bottom: .5rem; }
.shop-head .avatar-lg { margin-top: -64px; position: relative; z-index: 2; box-shadow: 0 8px 24px rgba(0,0,0,.15); flex-shrink: 0; }
.shop-head h1 { color: #0a0a0a; }
@media (min-width: 768px) {
  .shop-head > .d-md-flex { align-items: flex-start !important; }
  .shop-head .avatar-lg { margin-top: -60px; }
  .shop-head > .d-md-flex > .d-flex:last-child { align-self: center; }
}
@media (max-width: 767.98px) { .shop-cover { height: 140px; } .shop-head .avatar-lg { width: 80px; height: 80px; margin-top: -48px; } }

/* ---------- Logo mark ---------- */
.mark-svg { flex-shrink: 0; display: block; }
.site-footer .brand-logo, .dash-side .brand-logo { --mark-bg: #fff; --mark-fg: #0a0a0a; }

/* ---------- Bulk Action Bar for Tables ---------- */
.bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  z-index: 1060;
  background: #0a0a0a;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 14px 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
  max-width: 95vw;
}
.bulk-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.bulk-bar .bulk-count-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.bulk-bar .bulk-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.bulk-bar .btn {
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 5px 12px;
  font-weight: 500;
  white-space: nowrap;
}
.bulk-bar .btn-outline-danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}
.bulk-bar .btn-outline-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.bulk-bar .btn-success {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.bulk-bar .btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}
.table tr.row-selected,
.table tr.row-selected > td {
  background-color: #f5f5f4 !important;
}
.table th.bulk-col,
.table td.bulk-col {
  width: 38px;
  min-width: 38px;
  text-align: center;
  padding-left: 0.75rem;
  padding-right: 0.25rem;
}

/* Vendor Grid Card */
.vendor-grid-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  border-color: #e5e7eb !important;
}
.vendor-grid-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
  border-color: #cbd5e1 !important;
}
.vendor-grid-card [data-quick] img {
  transition: transform 0.25s ease;
}
.vendor-grid-card:hover [data-quick] img {
  transform: scale(1.04);
}

/* =========================================================
   Clean Layout, Spacing, Grouped Cards & Variant Selector
   ========================================================= */

/* --- Utility Spacing Helpers --- */
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.mb-1\.5 { margin-bottom: 0.375rem !important; }
.mb-2\.5 { margin-bottom: 0.625rem !important; }
.pt-2\.5 { padding-top: 0.625rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }

/* --- Refined Hero Section (Full-Width Clean Text, No Right-Hand Floating Image) --- */
.hero2 {
  margin-bottom: 2.25rem;
}
.hs {
  height: 410px;
}
.hs-in {
  padding-top: 2rem;
  padding-bottom: 82px;
  justify-content: flex-start;
}
.hs-text {
  max-width: 680px;
}
.hs-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.95;
  margin-bottom: 0.9rem;
}
.hs-title {
  font-size: clamp(1.75rem, 3.3vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.16;
  margin-bottom: 0.75rem;
}
.hs-sub {
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.86;
  margin-bottom: 1.35rem;
  max-width: 580px;
}
.hero-search {
  margin-top: -58px;
  padding: 1.35rem 1.5rem;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}
@media (max-width: 767.98px) {
  .hs {
    height: 350px;
  }
  .hs-in {
    padding-top: 1.25rem;
    padding-bottom: 64px;
  }
  .hero-search {
    margin-top: -44px;
    padding: 1rem;
  }
}

/* --- Clean Section Spacing & Headers --- */
.home-section {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}
.section-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid #ececec;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #dc2626;
}
.section-kicker-divider {
  color: #d4d4d4;
  font-size: 0.8rem;
}
.section-kicker-muted {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #525252;
}
.section-heading {
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0a0a0a;
}
.section-sub {
  font-size: 0.9rem;
  color: #6b7280;
}

/* --- Filter & Stock Toolbar --- */
.stock-filter-bar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.chip-sm {
  font-size: 0.78rem !important;
  padding: 0.32rem 0.75rem !important;
}

/* --- Refined Product Card --- */
.p-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  background: #fff;
}
.p-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.08), 0 4px 10px -4px rgba(0, 0, 0, 0.04);
  border-color: #d1d5db;
}
.p-card .p-img {
  aspect-ratio: 4 / 3.2;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.p-card .p-body {
  padding: 1rem 1.05rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}
.p-card .p-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}
.p-card .p-title {
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
  margin-bottom: 0.1rem;
}
.p-card .p-specs {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.4;
}
.p-card .p-specs-brand {
  color: #111827;
  font-weight: 500;
}
.p-card .p-flags {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 2;
}
.p-card .p-flags-right {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
}
.badge-moq {
  background: rgba(254, 243, 199, 0.95);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 600;
  font-size: 0.68rem;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.badge-variants {
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
  font-weight: 500;
  font-size: 0.68rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.p-card .p-foot {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.p-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  border: 1px solid #111827;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.p-select-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* --- Interactive Brand & Variant Re-selector (Product Page & Quick Modal) --- */
.variant-selector-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.variant-step-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
}
.variant-step-num {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.variant-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.var-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.var-brand-pill:hover {
  border-color: #64748b;
  color: #0f172a;
}
.var-brand-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}
.var-brand-count,
.var-brand-pill .count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.07);
  color: inherit;
}
.var-brand-pill.active .var-brand-count,
.var-brand-pill.active .count {
  background: rgba(255, 255, 255, 0.22);
}
.variant-dropdown {
  border-radius: 10px;
  border-color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  background-color: #ffffff;
}
.variant-dropdown:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}
.variant-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.45rem;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}
.var-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.14s ease;
  gap: 0.2rem;
}
.var-opt-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.var-opt-btn.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
}
.var-opt-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.var-opt-price {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: #16a34a;
}
.var-opt-btn.active .var-opt-price {
  color: #86efac;
}

/* --- Motifiti-Style Clean List View & List/Grid Switcher --- */
.view-toggle {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  padding: 2px;
  gap: 2px;
}
.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.32rem 0.68rem;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.view-toggle-btn:hover {
  color: #111827;
  background: #f3f4f6;
}
.view-toggle-btn.active,
.view-toggle-btn.active:hover {
  background: #0a0a0a;
  color: #ffffff;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.row-card {
  display: flex;
  align-items: stretch;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.row-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.06);
}
.row-img {
  width: 176px;
  height: 124px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  display: block;
}
.row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.row-card:hover .row-img img {
  transform: scale(1.03);
}
.row-img-badge {
  position: absolute;
  bottom: 0.45rem;
  left: 0.45rem;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.row-title {
  font-weight: 600;
  font-size: 1.02rem;
  color: #0a0a0a;
  line-height: 1.3;
  text-decoration: none;
}
.row-title:hover {
  color: #2563eb;
  text-decoration: none;
}
.badge-featured-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.row-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 1.05rem;
  font-size: 0.81rem;
  color: #525252;
  margin-top: 0.35rem;
}
.row-specs span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}
.row-specs i {
  color: #9ca3af;
  font-size: 0.82rem;
}
.row-cond {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.28rem;
}
.row-cond-loc {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.row-cond-loc i {
  color: #9ca3af;
}
.row-foot {
  margin-top: auto;
  padding-top: 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.75rem;
}
.row-price {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 0.98rem;
  color: #0a0a0a;
  letter-spacing: -0.01em;
}
.row-select-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #111827;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.row-select-pill:hover {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #ffffff;
}
.row-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #0a0a0a;
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
@media (max-width: 575.98px) {
  .row-card {
    padding: 0.85rem;
    gap: 0.85rem;
  }
  .row-img {
    width: 112px;
    height: 96px;
  }
  .row-title {
    font-size: 0.92rem;
  }
  .row-specs {
    font-size: 0.75rem;
    gap: 0.2rem 0.65rem;
  }
}




