/* ==========================================================================
   Zarinkala storefront (layout.php) — v1.5 redesign.

   Loaded after tokens.css + app.css on public pages only. Re-tones the
   brand for a modern shop: a cool neutral canvas with white cards instead
   of the old cream, deep navy for ink and the hero, the antique gold kept
   as THE accent (buttons, prices, focus), and green reserved for one
   meaning only — "cheaper / you save".
   ========================================================================== */

:root {
  --ink:        #101828;
  --ink-soft:   #475467;
  --ink-faint:  #8A94A6;
  --paper:      #F5F6F8;
  --surface:    #FFFFFF;
  --surface-2:  #F1F3F6;
  --border:     #E4E7EC;
  --gold:       #C28B2C;
  --gold-ink:   #9A6A17;
  --gold-soft:  #FBF2E1;
  --navy:       #0C1F2E;
  --navy-2:     #15324A;
  --navy-soft:  #E8EEF3;
  --save:       #0E9F6E;
  --save-soft:  #E3F6EE;
  --hot:        #E5484D;
  --hot-soft:   #FDECEC;

  --sf-radius:    18px;
  --sf-radius-sm: 12px;
  --sf-shadow:    0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px -10px rgba(16, 24, 40, .12);
  --sf-shadow-lg: 0 24px 48px -20px rgba(16, 24, 40, .28);
  --sf-header-h:  76px;

  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-border-color: var(--border);
  --bs-link-color: var(--gold-ink);
  --bs-link-hover-color: var(--ink);
}
body { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
main { min-height: 50vh; }
.container { max-width: 1320px; }
@media (max-width: 991.98px) { body { padding-bottom: 68px; } } /* room for the bottom nav */

.icon { width: 20px; height: 20px; flex: none; }
.sf-section { padding: 2.25rem 0; }
.sf-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.1rem;
}
.sf-section-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.sf-section-head p { margin: .25rem 0 0; color: var(--ink-faint); font-size: .9rem; }
.sf-section-head .sf-more { display: inline-flex; align-items: center; gap: .25rem; font-size: .88rem; font-weight: 700; color: var(--gold-ink); text-decoration: none; white-space: nowrap; }
.sf-section-head .sf-more .icon { width: 16px; height: 16px; }
.sf-eyebrow-icon {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-inline-end: .55rem;
  border-radius: 10px; vertical-align: -9px;
  background: var(--gold-soft); color: var(--gold-ink);
}
.sf-eyebrow-icon .icon { width: 18px; height: 18px; }
.sf-eyebrow-icon.is-save { background: var(--save-soft); color: var(--save); }
.sf-eyebrow-icon.is-hot  { background: var(--hot-soft); color: var(--hot); }
.sf-eyebrow-icon.is-navy { background: var(--navy-soft); color: var(--navy-2); }

/* ---- Header -------------------------------------------------------------- */
.sf-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.sf-header-main {
  display: flex; align-items: center; gap: 1.25rem;
  height: var(--sf-header-h);
}
.sf-logo img { height: 38px; width: auto; display: block; }
.sf-search { position: relative; flex: 1; max-width: 640px; }
.sf-search-box {
  display: flex; align-items: center;
  height: 48px;
  padding-inline-start: 1rem;
  padding-inline-end: .3rem;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: 14px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sf-search-box:focus-within { background: #fff; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(194, 139, 44, .14); }
.sf-search-box .icon { color: var(--ink-faint); width: 20px; height: 20px; }
.sf-search-input {
  flex: 1; min-width: 0;
  height: 100%;
  padding: 0 .7rem;
  border: 0; outline: 0; background: transparent;
  font-size: .95rem; color: var(--ink);
}
.sf-search-input::placeholder { color: var(--ink-faint); }
.sf-search-input::-webkit-search-cancel-button { display: none; }
.sf-search-submit {
  height: 38px; padding: 0 1.1rem;
  border: 0; border-radius: 10px;
  background: var(--gold); color: #fff;
  font-weight: 700; font-size: .88rem;
  transition: background .15s;
}
.sf-search-submit:hover { background: var(--gold-ink); }
.sf-search .nav-suggest { top: calc(100% + .45rem); border-radius: 14px; box-shadow: var(--sf-shadow-lg); }

.sf-actions { display: flex; align-items: center; gap: .4rem; margin-inline-start: auto; }
.sf-action-link {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 44px; padding: 0 .8rem;
  border-radius: 12px;
  color: var(--ink-soft); font-weight: 600; font-size: .88rem;
  text-decoration: none; white-space: nowrap;
  background: transparent; border: 0;
}
.sf-action-link:hover, .sf-action-link[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.sf-action-link .icon { width: 20px; height: 20px; }
.sf-login-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  height: 44px; padding: 0 1.1rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff; color: var(--ink);
  font-weight: 700; font-size: .88rem;
  text-decoration: none; white-space: nowrap;
  transition: border-color .15s;
}
.sf-login-btn:hover { border-color: var(--gold); color: var(--ink); }
.sf-admin-btn { background: var(--navy); color: #fff; }
.sf-admin-btn:hover { background: var(--navy-2); color: #fff; }
.sf-avatar {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #E0AE52, #A7741F); color: #1a1206;
  font-weight: 800; font-size: .85rem;
}
.sf-menu {
  --bs-dropdown-min-width: 15rem;
  --bs-dropdown-link-active-bg: var(--gold);
  padding: .4rem; border-radius: 14px; border-color: var(--border);
  box-shadow: var(--sf-shadow-lg);
}
.sf-menu .dropdown-item { display: flex; align-items: center; gap: .55rem; border-radius: 9px; padding: .5rem .65rem; font-size: .9rem; }
.sf-menu .dropdown-item .icon { width: 17px; height: 17px; color: var(--ink-faint); }
.sf-menu .dropdown-header { font-size: .8rem; }

/* Category bar + mega menu (desktop) */
.sf-catbar { border-top: 1px solid var(--border); }
.sf-catbar-inner { display: flex; align-items: center; gap: .25rem; height: 46px; }
.sf-catbar-links { display: flex; align-items: center; gap: .1rem; overflow: hidden; flex: 1; }
.sf-catbar-link {
  display: inline-flex; align-items: center; height: 34px; padding: 0 .75rem;
  border-radius: 9px; color: var(--ink-soft); font-size: .86rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.sf-catbar-link:hover, .sf-catbar-link.is-active { background: var(--surface-2); color: var(--ink); }
.sf-catbar-end { margin-inline-start: auto; display: flex; gap: .25rem; }
.sf-catbar-end .sf-catbar-link { color: var(--gold-ink); }
.sf-mega-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  height: 34px; padding: 0 .85rem;
  border: 0; border-radius: 9px;
  background: var(--navy); color: #fff;
  font-size: .86rem; font-weight: 700;
}
.sf-mega-btn .icon { width: 18px; height: 18px; }
.sf-mega {
  width: min(960px, 92vw);
  padding: 1.25rem;
  border-radius: 18px;
  border-color: var(--border);
  box-shadow: var(--sf-shadow-lg);
}
.sf-mega-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
.sf-mega-col h3 { margin: 0 0 .45rem; font-size: .9rem; font-weight: 800; }
.sf-mega-col h3 a { color: var(--ink); text-decoration: none; }
.sf-mega-col h3 a:hover { color: var(--gold-ink); }
.sf-mega-col ul { list-style: none; margin: 0; padding: 0; }
.sf-mega-col li a { display: flex; justify-content: space-between; gap: .5rem; padding: .22rem 0; font-size: .84rem; color: var(--ink-soft); text-decoration: none; }
.sf-mega-col li a:hover { color: var(--gold-ink); }
.sf-mega-col li a span { color: var(--ink-faint); font-size: .76rem; }

/* Mobile: bottom navigation, app-style */
.sf-bottomnav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 1035;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.sf-bottomnav a, .sf-bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  border: 0; background: transparent;
  color: var(--ink-faint); font-size: .7rem; font-weight: 700; text-decoration: none;
}
.sf-bottomnav .icon { width: 22px; height: 22px; }
.sf-bottomnav .is-active { color: var(--gold-ink); }
.sf-offcanvas { --bs-offcanvas-width: 86vw; border-inline-start: 0; }
.sf-offcanvas .offcanvas-header { border-bottom: 1px solid var(--border); }
.sf-cat-tree details { border-bottom: 1px solid var(--border); }
.sf-cat-tree summary { display: flex; justify-content: space-between; align-items: center; padding: .85rem 0; font-weight: 700; cursor: pointer; list-style: none; }
.sf-cat-tree summary::-webkit-details-marker { display: none; }
.sf-cat-tree summary .icon { width: 16px; height: 16px; color: var(--ink-faint); transform: rotate(-90deg); transition: transform .15s; }
.sf-cat-tree details[open] summary .icon { transform: rotate(90deg); }
.sf-cat-tree ul { list-style: none; padding: 0 0 .75rem; margin: 0; }
.sf-cat-tree li a { display: flex; justify-content: space-between; padding: .45rem .5rem; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: .9rem; }
.sf-cat-tree li a:hover { background: var(--surface-2); }

@media (max-width: 991.98px) {
  .sf-header-main { flex-wrap: wrap; height: auto; padding-block: .65rem; gap: .6rem; }
  .sf-search { order: 3; flex-basis: 100%; max-width: none; }
  .sf-logo img { height: 32px; }
}

/* ---- Hero ---------------------------------------------------------------- */
.sf-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(194, 139, 44, .38), transparent 60%),
    radial-gradient(50% 70% at 0% 100%, rgba(14, 159, 110, .22), transparent 60%),
    linear-gradient(160deg, #0A1A27, #0C1F2E 45%, #132E44);
}
.sf-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%);
}
.sf-hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; align-items: center; padding-block: 4rem 4.25rem; }
@media (max-width: 991.98px) { .sf-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 2rem 2.5rem; } }
.sf-hero-inner > * { min-width: 0; }
.sf-hero-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .38rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #F3CF8C; font-size: .82rem; font-weight: 700;
}
.sf-hero-badge .icon { width: 16px; height: 16px; }
.sf-hero h1 {
  margin: 1.1rem 0 .9rem;
  text-wrap: balance;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 900; line-height: 1.35; letter-spacing: -.02em;
  color: #fff;
}
.sf-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #F6D58E, #E0AE52 60%, #F6D58E);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sf-hero-lede { max-width: 52ch; color: rgba(255, 255, 255, .72); font-size: 1.02rem; line-height: 1.9; margin-bottom: 1.6rem; }

.sf-hero-search { position: relative; max-width: 620px; }
.sf-hero-search .sf-search-box { height: 60px; background: #fff; border-radius: 16px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6); padding-inline-end: .4rem; }
.sf-hero-search .sf-search-input { font-size: 1.02rem; }
.sf-hero-search .sf-search-submit { height: 46px; padding: 0 1.5rem; border-radius: 12px; font-size: .95rem; }
.sf-hero-search .nav-suggest { color: var(--ink); }

.sf-trending { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: 1.1rem; }
.sf-trending-label { color: rgba(255, 255, 255, .55); font-size: .82rem; margin-inline-end: .2rem; }
.sf-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .34rem .8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff; font-size: .82rem; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.sf-chip:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }

.sf-hero-stats { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 2rem; }
.sf-hero-stat strong { display: block; font-size: 1.5rem; font-weight: 900; color: #fff; line-height: 1.2; }
.sf-hero-stat span { font-size: .8rem; color: rgba(255, 255, 255, .55); }

/* The live comparison card */
.sf-spot {
  position: relative;
  padding: 1.2rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
  color: #fff; text-decoration: none; display: block;
  transition: transform .25s ease, border-color .2s;
}
.sf-spot:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .28); color: #fff; }
.sf-spot-label { display: flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 700; color: #8EE3C8; margin-bottom: .9rem; }
.sf-spot-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); animation: sf-pulse 2s infinite; }
@keyframes sf-pulse { 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, .05); } }
@media (prefers-reduced-motion: reduce) { .sf-spot-label::before { animation: none; } }
.sf-spot-product { display: flex; align-items: center; gap: .9rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sf-spot-img { width: 72px; height: 72px; flex: none; border-radius: 16px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.sf-spot-img img { width: 100%; height: 100%; object-fit: contain; }
.sf-spot-title { font-weight: 700; font-size: .92rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-spot-rows { display: grid; gap: .35rem; margin-top: .8rem; }
.sf-spot-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.sf-spot-row.is-best { background: rgba(52, 211, 153, .12); outline: 1px solid rgba(52, 211, 153, .35); }
.sf-store-dot { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; font-weight: 800; font-size: .8rem; color: #fff; }
.sf-spot-store { flex: 1; font-size: .86rem; font-weight: 600; }
.sf-spot-price { font-weight: 800; font-size: .9rem; white-space: nowrap; }
.sf-spot-row.is-best .sf-spot-price { color: #8EE3C8; }
.sf-spot-tag { font-size: .66rem; font-weight: 800; padding: .12rem .45rem; border-radius: 6px; background: #34D399; color: #052E1F; }
.sf-spot-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .9rem; font-size: .8rem; color: rgba(255, 255, 255, .6); }
.sf-spot-foot strong { color: #F3CF8C; }

/* ---- Categories rail ------------------------------------------------------ */
.sf-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: .75rem; }
@media (max-width: 575.98px) {
  .sf-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .sf-cat { padding: .85rem .3rem .75rem; gap: .4rem; }
  .sf-cat-icon { width: 46px; height: 46px; border-radius: 14px; }
  .sf-cat-icon svg { width: 23px; height: 23px; }
  .sf-cat-name { font-size: .78rem; }
}
.sf-cat {
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  padding: 1.1rem .5rem 1rem;
  border-radius: var(--sf-radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none; color: var(--ink); text-align: center;
  transition: transform .18s ease, box-shadow .18s, border-color .18s;
}
.sf-cat:hover { transform: translateY(-3px); border-color: transparent; box-shadow: var(--sf-shadow-lg); color: var(--ink); }
.sf-cat-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--c-soft, var(--gold-soft)); color: var(--c, var(--gold-ink)); transition: transform .25s; }
.sf-cat:hover .sf-cat-icon { transform: scale(1.07) rotate(-4deg); }
.sf-cat-icon svg { width: 28px; height: 28px; }
.sf-cat-name { font-weight: 800; font-size: .9rem; }
.sf-cat-count { font-size: .75rem; color: var(--ink-faint); }

/* ---- Product rail (horizontal carousel) --------------------------------- */
.sf-rail { position: relative; }
.sf-rail-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4 * 1rem) / 5);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: .25rem .1rem 1rem;
  scrollbar-width: none;
}
.sf-rail-track::-webkit-scrollbar { display: none; }
.sf-rail-track > * { scroll-snap-align: start; }
@media (max-width: 1199.98px) { .sf-rail-track { grid-auto-columns: calc((100% - 3 * 1rem) / 4); } }
@media (max-width: 991.98px)  { .sf-rail-track { grid-auto-columns: calc((100% - 2 * .75rem) / 2.6); gap: .75rem; } }
@media (max-width: 575.98px)  { .sf-rail-track { grid-auto-columns: 46%; } }
.sf-rail-btn {
  position: absolute; top: 38%; z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  box-shadow: var(--sf-shadow);
  transition: opacity .15s, transform .15s;
}
.sf-rail-btn:hover { transform: scale(1.06); }
.sf-rail-btn[disabled] { opacity: 0; pointer-events: none; }
.sf-rail-btn.is-prev { inset-inline-start: -18px; }
.sf-rail-btn.is-next { inset-inline-end: -18px; }
.sf-rail-btn.is-next .icon { transform: none; }
.sf-rail-btn.is-prev .icon { transform: scaleX(-1); }
@media (max-width: 991.98px) { .sf-rail-btn { display: none; } }

/* ---- Product card ---------------------------------------------------------- */
.sf-pcard {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  border-radius: var(--sf-radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink); text-decoration: none;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s, border-color .2s;
}
.sf-pcard:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--sf-shadow-lg); color: var(--ink); }
.sf-pcard-media { position: relative; aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; padding: 1rem; }
.sf-pcard-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.sf-pcard:hover .sf-pcard-media img { transform: scale(1.05); }
.sf-pcard-media .icon { width: 42px; height: 42px; color: var(--border); }
.sf-pcard-badges { position: absolute; top: .65rem; inset-inline-start: .65rem; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.sf-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .5rem;
  border-radius: 7px;
  font-size: .72rem; font-weight: 800;
  background: var(--surface-2); color: var(--ink-soft);
}
.sf-badge.is-save { background: var(--save); color: #fff; }
.sf-badge.is-stores { background: var(--navy); color: #fff; }
.sf-badge.is-hot { background: var(--hot-soft); color: var(--hot); }
.sf-badge.is-gold { background: var(--gold-soft); color: var(--gold-ink); }
.sf-badge .icon { width: 13px; height: 13px; }
.sf-pcard-body { display: flex; flex-direction: column; flex: 1; padding: .85rem .95rem 1rem; border-top: 1px solid var(--surface-2); }
.sf-pcard-title {
  margin: 0 0 .6rem;
  font-size: .88rem; font-weight: 600; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 3.1em;
}
.sf-pcard-price { margin-top: auto; display: flex; align-items: baseline; gap: .3rem; flex-wrap: wrap; }
.sf-pcard-from { font-size: .74rem; color: var(--ink-faint); }
.sf-pcard-amount { font-size: 1.08rem; font-weight: 900; letter-spacing: -.01em; }
.sf-pcard-currency { font-size: .72rem; color: var(--ink-faint); }
.sf-pcard-old { font-size: .76rem; color: var(--ink-faint); text-decoration: line-through; }
.sf-pcard-meta { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .45rem; font-size: .75rem; color: var(--ink-faint); }
.sf-pcard-meta .icon { width: 14px; height: 14px; }
.sf-pcard-store { display: inline-flex; align-items: center; gap: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
@media (max-width: 575.98px) { .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; } .sf-pcard-body { padding: .7rem; } .sf-pcard-amount { font-size: .98rem; } }

/* ---- How it works / values / seller band --------------------------------- */
.sf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; counter-reset: step; }
@media (max-width: 767.98px) { .sf-steps { grid-template-columns: 1fr; } }
.sf-step {
  position: relative;
  padding: 1.5rem 1.4rem;
  border-radius: var(--sf-radius);
  background: var(--surface); border: 1px solid var(--border);
}
.sf-step::before {
  counter-increment: step; content: counter(step, persian);
  position: absolute; top: 1.2rem; inset-inline-end: 1.3rem;
  font-size: 3rem; font-weight: 900; line-height: 1; color: var(--surface-2);
}
.sf-step-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-ink); margin-bottom: 1rem; }
.sf-step h3 { font-size: 1rem; font-weight: 800; margin-bottom: .35rem; }
.sf-step p { margin: 0; color: var(--ink-soft); font-size: .88rem; line-height: 1.85; }

.sf-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 991.98px) { .sf-values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .sf-values { grid-template-columns: 1fr; } }
.sf-value { display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem; border-radius: var(--sf-radius); background: var(--surface); border: 1px solid var(--border); }
.sf-value-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--navy-soft); color: var(--navy-2); }
.sf-value h3 { font-size: .92rem; font-weight: 800; margin: .1rem 0 .25rem; }
.sf-value p { margin: 0; font-size: .82rem; line-height: 1.8; color: var(--ink-soft); }

.sf-band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center;
  padding: 2.5rem 2.75rem;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(70% 140% at 0% 0%, rgba(194, 139, 44, .5), transparent 60%),
    linear-gradient(135deg, #0C1F2E, #15324A);
}
@media (max-width: 767.98px) { .sf-band { grid-template-columns: 1fr; padding: 2rem 1.5rem; } }
.sf-band h2 { color: #fff; font-size: 1.6rem; font-weight: 900; margin: .5rem 0; }
.sf-band p { margin: 0; color: rgba(255, 255, 255, .72); max-width: 60ch; line-height: 1.9; }
.sf-band .btn { height: 52px; padding: 0 1.75rem; border-radius: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: .5rem; }
.sf-band .btn-light { --bs-btn-bg: #fff; --bs-btn-color: var(--navy); --bs-btn-hover-bg: #FBF2E1; --bs-btn-hover-color: var(--navy); }
.sf-band-badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: #34D399; color: #052E1F; font-size: .78rem; font-weight: 800; }

/* ---- Empty state -------------------------------------------------------- */
.sf-empty {
  padding: 3rem 1.5rem; text-align: center;
  border-radius: var(--sf-radius); background: var(--surface); border: 1px dashed var(--border);
}
.sf-empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--gold-soft); color: var(--gold-ink); margin-bottom: 1rem; }
.sf-empty-icon .icon { width: 30px; height: 30px; }
.sf-empty h2 { font-size: 1.1rem; font-weight: 800; }
.sf-empty p { color: var(--ink-soft); max-width: 46ch; margin: .4rem auto 1.2rem; }

/* ---- Breadcrumbs ---------------------------------------------------------- */
.sf-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 1rem; padding: 0; list-style: none; font-size: .82rem; color: var(--ink-faint); }
.sf-crumbs a { color: var(--ink-faint); text-decoration: none; }
.sf-crumbs a:hover { color: var(--gold-ink); }
.sf-crumbs .icon { width: 13px; height: 13px; opacity: .6; }
.sf-crumbs [aria-current] { color: var(--ink-soft); }

/* ---- Search / category page --------------------------------------------- */
.sf-listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 1.5rem; align-items: start; padding-block: 1.75rem 3rem; }
@media (max-width: 991.98px) { .sf-listing { grid-template-columns: 1fr; padding-top: 1.1rem; } }
.sf-filters {
  position: sticky; top: calc(var(--sf-header-h) + 62px);
  padding: 1.1rem;
  border-radius: var(--sf-radius); background: var(--surface); border: 1px solid var(--border);
}
.sf-filter-group + form { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--surface-2); }
.sf-filter-group + .sf-filter-group { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--surface-2); }
.sf-filter-title { font-size: .82rem; font-weight: 800; color: var(--ink); margin-bottom: .55rem; }
.sf-filter-cats { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.sf-filter-cats a { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .38rem .55rem; border-radius: 9px; font-size: .86rem; color: var(--ink-soft); text-decoration: none; }
.sf-filter-cats a:hover { background: var(--surface-2); color: var(--ink); }
.sf-filter-cats a.is-active { background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; }
.sf-filter-cats a span { font-size: .74rem; color: var(--ink-faint); }
.sf-filter-cats .is-sub a { padding-inline-start: 1.4rem; font-size: .83rem; }
.sf-filters .form-select { border-radius: 10px; font-size: .88rem; }
.sf-switch { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .86rem; color: var(--ink-soft); cursor: pointer; }
.sf-switch .form-check-input { width: 2.4em; height: 1.3em; margin: 0; float: none; cursor: pointer; }
.sf-filters .btn { border-radius: 11px; font-weight: 700; }

.sf-listing-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.sf-listing-head h1 { margin: 0; font-size: 1.45rem; font-weight: 900; letter-spacing: -.01em; }
.sf-listing-head p { margin: .2rem 0 0; color: var(--ink-faint); font-size: .86rem; }
.sf-sort { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.sf-sort-label { font-size: .8rem; color: var(--ink-faint); margin-inline-end: .2rem; display: inline-flex; align-items: center; gap: .25rem; }
.sf-sort-label .icon { width: 16px; height: 16px; }
.sf-sort a {
  padding: .4rem .8rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
}
.sf-sort a:hover { border-color: var(--ink-faint); color: var(--ink); }
.sf-sort a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.sf-subcats { display: flex; gap: .45rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: .2rem; scrollbar-width: none; }
.sf-subcats::-webkit-scrollbar { display: none; }
.sf-subcats a {
  flex: none; padding: .45rem .95rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-soft); font-size: .84rem; font-weight: 600; text-decoration: none;
}
.sf-subcats a:hover { border-color: var(--gold); color: var(--ink); }
.sf-subcats a.is-active { background: var(--gold); border-color: var(--gold); color: #fff; }
.sf-filter-toggle { display: inline-flex; align-items: center; gap: .4rem; border-radius: 12px; font-weight: 700; }
.sf-filter-toggle .icon { width: 18px; height: 18px; }

/* ---- Product page ---------------------------------------------------------- */
.sf-product { padding-block: 1.5rem 3rem; }
.sf-product-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 1199.98px) { .sf-product-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sf-buybox { grid-column: 1 / -1; } }
@media (max-width: 767.98px)  { .sf-product-top { grid-template-columns: 1fr; } }
.sf-gallery { position: sticky; top: calc(var(--sf-header-h) + 62px); }
.sf-gallery-main { aspect-ratio: 1 / 1; border-radius: 22px; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; padding: 1.5rem; overflow: hidden; }
.sf-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.sf-gallery-main .icon { width: 60px; height: 60px; color: var(--border); }
.sf-gallery-thumbs { display: flex; gap: .5rem; margin-top: .65rem; overflow-x: auto; }
.sf-gallery-thumbs button { flex: none; width: 68px; height: 68px; padding: .3rem; border-radius: 14px; border: 2px solid var(--border); background: #fff; }
.sf-gallery-thumbs button.is-active { border-color: var(--gold); }
.sf-gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 767.98px) { .sf-gallery { position: static; } }

.sf-pinfo-brand { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; color: var(--gold-ink); text-decoration: none; margin-bottom: .5rem; }
.sf-pinfo h1 { font-size: 1.45rem; font-weight: 900; line-height: 1.75; letter-spacing: -.01em; margin-bottom: .9rem; }
.sf-pinfo-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.sf-pinfo-facts { display: grid; gap: .6rem; padding: 1rem 1.1rem; border-radius: var(--sf-radius); background: var(--surface); border: 1px solid var(--border); }
.sf-fact { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: var(--ink-soft); line-height: 1.8; }
.sf-fact .icon { width: 19px; height: 19px; color: var(--save); margin-top: .15rem; }
.sf-fact strong { color: var(--ink); }

.sf-buybox {
  position: sticky; top: calc(var(--sf-header-h) + 62px);
  padding: 1.25rem;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sf-shadow);
}
.sf-buybox-label { font-size: .8rem; color: var(--ink-faint); font-weight: 600; }
.sf-buybox-price { font-size: 1.9rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.3; margin: .15rem 0 .2rem; }
.sf-buybox-price small { font-size: .85rem; font-weight: 600; color: var(--ink-faint); }
.sf-buybox-store { display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: var(--ink-soft); margin-bottom: 1rem; }
.sf-buybox .btn-primary {
  width: 100%; height: 54px; border-radius: 14px;
  font-weight: 800; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  box-shadow: 0 14px 26px -14px rgba(194, 139, 44, .9);
}
.sf-buybox .btn-primary .icon { width: 19px; height: 19px; }
.sf-buybox-compare { display: flex; align-items: center; justify-content: center; gap: .35rem; margin-top: .6rem; font-size: .86rem; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.sf-buybox-compare:hover { color: var(--gold-ink); }
.sf-range { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--surface-2); }
.sf-range-bar { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(270deg, var(--save), #FACC15, var(--hot)); margin: .55rem 0 .4rem; }
.sf-range-labels { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-faint); }
.sf-range-labels strong { color: var(--ink); font-weight: 800; }
.sf-saving-note { margin-top: .8rem; padding: .6rem .75rem; border-radius: 12px; background: var(--save-soft); color: var(--save); font-size: .84rem; font-weight: 700; display: flex; gap: .45rem; align-items: center; }
.sf-saving-note .icon { width: 17px; height: 17px; }

.sf-block { margin-top: 2rem; }
.sf-block-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.sf-block-title h2 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.sf-block-title span { font-size: .84rem; color: var(--ink-faint); }
.sf-offers { display: grid; gap: .6rem; }
.sf-offer {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 1rem; align-items: center;
  padding: .95rem 1.1rem;
  border-radius: var(--sf-radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.sf-offer:hover { border-color: var(--ink-faint); box-shadow: var(--sf-shadow); }
.sf-offer.is-best { border-color: var(--save); box-shadow: 0 0 0 3px var(--save-soft); }
.sf-offer.is-out { opacity: .55; }
.sf-offer-store { font-weight: 800; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.sf-offer-sub { font-size: .78rem; color: var(--ink-faint); margin-top: .15rem; display: flex; flex-wrap: wrap; gap: .25rem .7rem; }
.sf-offer-sub .icon { width: 13px; height: 13px; vertical-align: -2px; }
.sf-offer-price { text-align: end; }
.sf-offer-price strong { display: block; font-size: 1.1rem; font-weight: 900; white-space: nowrap; }
.sf-offer-diff { font-size: .74rem; color: var(--hot); font-weight: 700; white-space: nowrap; }
.sf-offer-diff.is-best { color: var(--save); }
.sf-offer .btn { border-radius: 11px; font-weight: 700; white-space: nowrap; padding: .5rem 1rem; }
.sf-store-avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; font-weight: 900; color: #fff; font-size: 1rem; }
.sf-stars { color: #F5A524; font-size: .8rem; letter-spacing: 1px; }
@media (max-width: 575.98px) {
  .sf-offer { grid-template-columns: auto minmax(0, 1fr); }
  .sf-offer-price { grid-column: 2; text-align: start; }
  .sf-offer .btn, .sf-offer .sf-offer-current { grid-column: 1 / -1; width: 100%; }
}

.sf-desc { padding: 1.3rem 1.4rem; border-radius: var(--sf-radius); background: var(--surface); border: 1px solid var(--border); line-height: 2.1; color: var(--ink-soft); font-size: .93rem; }
.sf-desc-clamp { max-height: 14em; overflow: hidden; position: relative; }
.sf-desc-clamp::after { content: ''; position: absolute; inset: auto 0 0; height: 4em; background: linear-gradient(transparent, var(--surface)); }
.sf-desc.is-open .sf-desc-clamp { max-height: none; }
.sf-desc.is-open .sf-desc-clamp::after { display: none; }
.sf-desc-toggle { margin-top: .5rem; border: 0; background: none; padding: 0; color: var(--gold-ink); font-weight: 700; font-size: .88rem; }
.sf-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.sf-info-card { padding: 1.1rem 1.2rem; border-radius: var(--sf-radius); background: var(--surface); border: 1px solid var(--border); font-size: .88rem; color: var(--ink-soft); line-height: 1.9; }
.sf-info-card h3 { display: flex; align-items: center; gap: .45rem; font-size: .92rem; font-weight: 800; color: var(--ink); margin-bottom: .4rem; }
.sf-info-card h3 .icon { width: 18px; height: 18px; color: var(--gold-ink); }
.sf-chart svg { display: block; max-height: 240px; margin: 0 auto; }
.sf-chart { padding: 1.1rem 1.2rem; border-radius: var(--sf-radius); background: var(--surface); border: 1px solid var(--border); }
.sf-chart svg text { fill: var(--ink-faint); }

/* Mobile sticky buy bar */
.sf-buybar {
  position: fixed; inset-inline: 0; bottom: 64px; z-index: 1034;
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1rem;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 30px -18px rgba(16, 24, 40, .4);
  transform: translateY(120%);
  transition: transform .25s ease;
}
.sf-buybar.is-visible { transform: none; }
.sf-buybar-price { flex: 1; min-width: 0; }
.sf-buybar-price small { display: block; font-size: .72rem; color: var(--ink-faint); }
.sf-buybar-price strong { font-size: 1.05rem; font-weight: 900; }
.sf-buybar .btn { border-radius: 12px; font-weight: 800; padding: .6rem 1.2rem; }
@media (min-width: 992px) { .sf-buybar { display: none; } }

/* ---- Footer ---------------------------------------------------------------- */
.sf-footer { margin-top: 3rem; background: #0A1824; color: rgba(255, 255, 255, .68); }
.sf-footer-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: 2rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
@media (max-width: 991.98px) { .sf-footer-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sf-trust { display: flex; align-items: center; gap: .75rem; }
.sf-trust-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; background: rgba(255, 255, 255, .06); color: #F3CF8C; }
.sf-trust strong { display: block; color: #fff; font-size: .9rem; }
.sf-trust span { font-size: .78rem; }
.sf-footer-main { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: 2rem; padding: 2.5rem 0; }
@media (max-width: 991.98px) { .sf-footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sf-footer-about { grid-column: 1 / -1; } }
.sf-footer-about img { height: 36px; background: #fff; padding: 4px 10px; border-radius: 10px; margin-bottom: 1rem; }
.sf-footer-about p { font-size: .86rem; line-height: 2; max-width: 40ch; }
.sf-footer h2 { color: #fff; font-size: .9rem; font-weight: 800; margin-bottom: .9rem; }
.sf-footer ul { list-style: none; margin: 0; padding: 0; }
.sf-footer li + li { margin-top: .55rem; }
.sf-footer a { color: rgba(255, 255, 255, .68); text-decoration: none; font-size: .86rem; }
.sf-footer a:hover { color: #F3CF8C; }
.sf-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1.2rem 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; }

/* ---- 404 -------------------------------------------------------------------- */
.sf-404 { padding-block: 4rem; text-align: center; }
.sf-404-code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--gold), var(--navy-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sf-404 h1 { font-size: 1.4rem; font-weight: 900; margin: 1rem 0 .4rem; }
.sf-404 p { color: var(--ink-soft); }
.sf-404 .sf-search { margin: 1.5rem auto 0; }

/* Older storefront pages (sell, faq, legal) on the new canvas */
.category-card, .product-card, .stat-card { border-radius: var(--sf-radius); }
.hero { background: linear-gradient(160deg, #0A1A27, #132E44); color: #fff; }
.hero h1, .hero .hero-lede { color: #fff; }
.hero .hero-lede { opacity: .75; }
@media (max-width: 991.98px) {
  .sf-offcanvas .sf-filters { position: static; border: 0; border-radius: 0; padding: 1rem 1.1rem; }
}

/* Older pages: sell landing hero buttons on the dark hero, FAQ accordion in brand colors. */
.hero .btn-outline-secondary, .hero .btn-outline-primary, .hero .btn-light {
  --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .35);
  --bs-btn-hover-color: var(--navy); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff;
  --bs-btn-bg: transparent;
}
.accordion {
  --bs-accordion-border-color: var(--border);
  --bs-accordion-border-radius: var(--sf-radius);
  --bs-accordion-inner-border-radius: calc(var(--sf-radius) - 1px);
  --bs-accordion-active-bg: var(--gold-soft);
  --bs-accordion-active-color: var(--ink);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(194, 139, 44, .2);
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239A6A17' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e");
}
.accordion-button { font-weight: 700; }
