/* =====================================================================
   یراقی — فروشگاه دوربین مداربسته
   Palette taken from the client's business card:
   deep blue · orange · grey · white
   RTL, Persian-first, dark UI throughout. Product image plates stay light so
   photographs (usually shot on white) read correctly against them.
   ===================================================================== */

:root{
  /* ---- brand, sampled from the visit card ---- */
  --blue:      #2b7fd4;   /* the card's blue, lifted so it reads on dark */
  --blue-deep: #0b52a0;   /* the card's exact blue, for solid fills      */
  --blue-dark: #083b75;
  --orange:    #f7901e;   /* the card's orange circle   */
  --orange-dk: #ffab4a;   /* lifted: the dark original vanished on dark  */
  --grey:      #808080;   /* the card's grey panel      */

  /* ---- surfaces (dark) ----
     Deep blue-black rather than neutral grey, so the panels feel related to
     the brand blue instead of sitting on plain charcoal. */
  --bg:        #070c15;
  --surface:   #101827;
  --surface-2: #18212f;
  --line:      #26314a;

  /* ---- ink ---- */
  --ink:       #f2f5fa;
  --ink-2:     #aab6cc;
  --ink-3:     #7d8aa3;

  /* lifted for legibility on dark; the light-mode versions were too deep */
  --ok:        #34d399;
  --danger:    #fb7185;

  /* tinted panels behind chips and icons */
  --blue-soft: #16273f;
  --orange-sf: #2e2010;

  --radius:    14px;
  --radius-lg: 20px;
  /* deeper than the light-mode shadows — a faint shadow is invisible on dark,
     so depth comes from a hard black drop plus a light top edge on surfaces */
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.32);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.45), 0 20px 48px rgba(0,0,0,.45);
  --maxw:      1240px;
  --nav-h:     66px;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}

body{
  font-family:'Vazirmatn',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.8;                  /* Persian needs generous leading */
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
.wrap{width:100%;max-width:var(--maxw);margin:0 auto;padding:0 20px}
.num{font-variant-numeric:tabular-nums}
.ltr{direction:ltr;unicode-bidi:embed;display:inline-block}
.muted{color:var(--ink-3)}
.center{text-align:center}

/* ================= TOP BAR ================= */
.topbar{
  background:var(--blue-dark);color:rgba(255,255,255,.9);
  font-size:13px;padding:7px 0;
}
.topbar .wrap{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}
.topbar a{color:#fff;font-weight:600}
.topbar a:hover{color:var(--orange)}
@media(max-width:700px){.topbar .hide-sm{display:none}}

/* ================= NAV ================= */
.nav{
  position:sticky;top:0;z-index:50;
  background:rgba(10,16,28,.92);
  -webkit-backdrop-filter:blur(16px) saturate(160%);
  backdrop-filter:blur(16px) saturate(160%);
  border-bottom:1px solid var(--line);
}
.nav-in{min-height:var(--nav-h);display:flex;align-items:center;gap:16px}

.logo{display:flex;align-items:center;gap:10px;font-weight:900;font-size:19px;flex:none}
.logo .mark{
  width:36px;height:36px;border-radius:10px;flex:none;
  background:linear-gradient(140deg,var(--blue),var(--blue-dark));
  display:grid;place-items:center;
  box-shadow:0 4px 12px rgba(11,82,160,.3);
}
.logo .mark svg{width:21px;height:21px;stroke:var(--orange);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.logo small{display:block;font-size:10.5px;font-weight:500;color:var(--ink-3);line-height:1.1}

/* search sits in the middle of the bar — the primary way to find a product */
.searchbox{flex:1;max-width:520px;position:relative}
.searchbox input{
  width:100%;font-family:inherit;font-size:14.5px;color:var(--ink);
  padding:11px 42px 11px 14px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface-2);
  outline:none;transition:border-color .2s,background .2s;
}
.searchbox input:focus{border-color:var(--blue);background:var(--surface)}
.searchbox button{
  position:absolute;inset-inline-start:6px;top:50%;transform:translateY(-50%);
  width:32px;height:32px;border-radius:50%;border:none;cursor:pointer;
  background:var(--blue);display:grid;place-items:center;
}
.searchbox button svg{width:17px;height:17px;stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round}

.nav-actions{display:flex;align-items:center;gap:8px;margin-inline-start:auto;flex:none}
.icon-btn{
  position:relative;display:grid;place-items:center;
  width:42px;height:42px;border-radius:11px;
  border:1px solid var(--line);background:var(--surface);cursor:pointer;
  transition:background .2s,border-color .2s;
}
.icon-btn:hover{background:var(--surface-2);border-color:#38455f}
.icon-btn svg{width:21px;height:21px;stroke:var(--ink);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.badge-count{
  position:absolute;top:-6px;inset-inline-end:-6px;
  min-width:20px;height:20px;padding:0 5px;border-radius:999px;
  background:var(--orange);color:#fff;
  font-size:11.5px;font-weight:800;display:grid;place-items:center;
  box-shadow:0 2px 6px rgba(247,144,30,.5);
}

/* category strip under the nav */
.catbar{background:var(--surface);border-bottom:1px solid var(--line)}
.catbar-in{display:flex;gap:2px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.catbar-in::-webkit-scrollbar{display:none}
.catbar a{
  padding:12px 15px;font-size:14.5px;font-weight:600;color:var(--ink-2);
  white-space:nowrap;border-bottom:2.5px solid transparent;transition:color .2s,border-color .2s;
}
.catbar a:hover{color:var(--blue)}
.catbar a.active{color:var(--blue);border-bottom-color:var(--orange)}

.burger{display:none;width:42px;height:42px;border-radius:11px;border:1px solid var(--line);background:var(--surface);cursor:pointer;place-items:center}
.burger svg{width:22px;height:22px;stroke:var(--ink);fill:none;stroke-width:2;stroke-linecap:round}
@media(max-width:860px){
  .burger{display:grid}
  /* Logo + actions share row one, search takes row two. Without the explicit
     order the actions wrap below the search and the header grows to 3 rows. */
  .nav-in{flex-wrap:wrap;padding:9px 0;gap:10px;min-height:0}
  .logo{order:1}
  .nav-actions{order:2}
  .searchbox{order:3;flex-basis:100%;max-width:100%}
  .logo .mark{width:32px;height:32px}
  .icon-btn{width:38px;height:38px}
  .nav-actions .btn{padding:9px 14px;font-size:13.5px}
  .searchbox input{padding:9px 38px 9px 12px;font-size:14px}
  .catbar a{padding:10px 13px;font-size:14px}
}
/* the topbar address is noise on a phone — keep only the phone number */
@media(max-width:520px){
  .topbar{font-size:12.5px;padding:5px 0}
}

/* ================= BUTTONS ================= */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 22px;border-radius:999px;border:none;cursor:pointer;
  font-size:15px;font-weight:700;white-space:nowrap;
  transition:transform .2s cubic-bezier(.2,.7,.2,1),box-shadow .25s,background .2s;
}
.btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.btn-primary{background:var(--blue);color:#fff;box-shadow:0 6px 18px rgba(11,82,160,.28)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(11,82,160,.36)}
.btn-accent{background:var(--orange);color:#fff;box-shadow:0 6px 18px rgba(247,144,30,.36)}
.btn-accent:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(247,144,30,.5)}
.btn-ghost{background:var(--surface-2);color:var(--ink);border:1px solid var(--line)}
.btn-ghost:hover{background:var(--surface-2);transform:translateY(-2px)}
.btn-white{background:#fff;color:var(--blue);box-shadow:0 8px 24px rgba(0,0,0,.2)}
.btn-white:hover{transform:translateY(-2px)}
.btn-lg{padding:15px 30px;font-size:16.5px}
.btn-sm{padding:9px 16px;font-size:13.5px}
.btn-block{width:100%}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important;box-shadow:none}

/* ============ FULL-PAGE SCRUBBED BACKGROUND (home only) ============
   The camera footage sits fixed behind the entire homepage and scrubs as you
   scroll, so every section floats over live video rather than a flat colour.
   `body.has-bg` turns the page surfaces transparent — without it the opaque
   --bg would paint straight over the canvas. */
#hero-canvas{
  position:fixed;inset:0;width:100vw;height:100vh;display:block;z-index:0;
  background:#0a1420 center/cover no-repeat;
  filter:brightness(1.12) saturate(1.12);
  pointer-events:none;
}
/* readability veil over the footage, fixed so it never scrolls out of step */
#bg-scrim{
  position:fixed;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(4,10,20,.18) 0%, rgba(4,10,20,.55) 65%, rgba(4,10,20,.78) 100%),
    linear-gradient(180deg, rgba(4,10,20,.5) 0%, rgba(4,10,20,.3) 22%, rgba(4,10,20,.42) 100%);
}
body.has-bg{background:transparent}
body.has-bg .footer{position:relative;z-index:2}
/* Everything above the fixed canvas (z0) and scrim (z1). The category bar
   needs this explicitly: its default `z-index:auto` left it painting behind
   the background layers, so it vanished on the homepage only. */
body.has-bg .topbar,
body.has-bg .catbar,
body.has-bg .hero,
body.has-bg .section{position:relative;z-index:2}

/* ================= HERO (home) ================= */
.hero{position:relative;min-height:min(74svh,620px);display:flex;align-items:center}
.hero-in{position:relative;z-index:2;width:100%;padding-block:60px}
.hero h1{
  font-size:clamp(29px,5vw,54px);font-weight:900;line-height:1.32;
  letter-spacing:-.02em;color:#fff;max-width:20ch;
  text-shadow:0 2px 20px rgba(0,0,0,.65);
}
.hero h1 .hl{color:var(--orange)}
.hero p{
  margin-top:16px;font-size:clamp(15px,1.9vw,18.5px);line-height:1.85;
  color:rgba(255,255,255,.9);max-width:48ch;text-shadow:0 2px 14px rgba(0,0,0,.7);
}
.hero-cta{margin-top:28px;display:flex;gap:12px;flex-wrap:wrap}

/* ================= LIQUID GLASS =================
   Used by every panel that floats over the moving footage on the homepage.
   Three layers make it read as glass rather than a flat translucent box:
   a blurred+saturated backdrop, a soft top-light gradient, and a hairline
   ring that catches light on the upper edge. */
.glass{
  position:relative;
  background:linear-gradient(150deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.07) 55%, rgba(255,255,255,.04) 100%);
  -webkit-backdrop-filter:blur(22px) saturate(180%);
  backdrop-filter:blur(22px) saturate(180%);
  border:1px solid rgba(255,255,255,.22);
  border-radius:var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    inset 0 -1px 0 rgba(255,255,255,.06),
    0 18px 50px rgba(3,8,18,.4);
  color:#fff;
}
/* the specular sheen across the top third */
.glass::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 42%);
}
.glass > *{position:relative;z-index:1}

/* text inside glass is on video — it needs its own contrast, not --ink */
.glass h2,.glass h3,.glass h1{color:#fff;text-shadow:0 2px 14px rgba(0,0,0,.5)}
.glass p,.glass span,.glass li{color:rgba(255,255,255,.86)}
.glass .muted{color:rgba(255,255,255,.6)}

/* section headings that sit directly on the footage */
body.has-bg .sec-head h2{color:#fff;text-shadow:0 3px 20px rgba(0,0,0,.6)}
body.has-bg .sec-head p{color:rgba(255,255,255,.8);text-shadow:0 2px 12px rgba(0,0,0,.6)}
body.has-bg .sec-head .more{color:#fff}
/* solid orange reads far better than a translucent tint over dark video */
body.has-bg .eyebrow{
  background:var(--orange);border-color:transparent;color:#fff;
  box-shadow:0 4px 14px rgba(247,144,30,.4);
}
/* the alternating white section bands would hide the video — drop them */
body.has-bg .section[style]{background:transparent!important;border-block:0!important}

/* nav + category strip go dark glass so the footage runs behind them too */
body.has-bg .nav{
  background:rgba(10,18,32,.62);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  backdrop-filter:blur(20px) saturate(180%);
  border-bottom-color:rgba(255,255,255,.14);
}
body.has-bg .logo{color:#fff}
body.has-bg .logo small{color:rgba(255,255,255,.6)}
body.has-bg .searchbox input{
  background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.2);color:#fff;
}
body.has-bg .searchbox input::placeholder{color:rgba(255,255,255,.55)}
body.has-bg .searchbox input:focus{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.45)}
body.has-bg .icon-btn{
  background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.2);
}
body.has-bg .icon-btn svg{stroke:#fff}
body.has-bg .icon-btn:hover{background:rgba(255,255,255,.22)}

body.has-bg .catbar{
  background:rgba(10,18,32,.5);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  backdrop-filter:blur(20px) saturate(180%);
  border-bottom-color:rgba(255,255,255,.12);
}
body.has-bg .catbar a{color:rgba(255,255,255,.78)}
body.has-bg .catbar a:hover{color:#fff}
body.has-bg .catbar a.active{color:#fff;border-bottom-color:var(--orange)}

body.has-bg .topbar{background:rgba(6,12,22,.8)}
@media(max-width:640px){
  .hero{min-height:auto}
  .hero-in{padding-block:46px 56px}
  .hero h1{font-size:clamp(26px,7.2vw,34px);max-width:100%}
  .hero p{font-size:15.5px;max-width:100%}
  .hero::after{background:linear-gradient(0deg,rgba(6,12,22,.9) 0%,rgba(6,12,22,.6) 55%,rgba(6,12,22,.5) 100%)}
  .hero-cta .btn{flex:1 1 100%}
}

/* ================= PAGE HEADER ================= */
.page-head{
  background:linear-gradient(140deg,var(--blue) 0%,var(--blue-dark) 100%);
  color:#fff;padding:34px 0 38px;position:relative;overflow:hidden;
}
.page-head::before{
  content:"";position:absolute;inset:0;
  background:radial-gradient(58% 120% at 88% 0%, rgba(247,144,30,.3), transparent 62%);
}
.page-head .wrap{position:relative}
.crumb{font-size:13.5px;color:rgba(255,255,255,.75);margin-bottom:10px}
.crumb a:hover{color:#fff;text-decoration:underline}
.page-head h1{font-size:clamp(24px,4vw,38px);font-weight:900;line-height:1.35}
.page-head p{margin-top:10px;font-size:clamp(14.5px,1.7vw,17px);color:rgba(255,255,255,.86);max-width:62ch}

/* ================= SECTIONS ================= */
.section{padding:56px 0}
.section-sm{padding:36px 0}
.sec-head{margin-bottom:28px;display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.sec-head h2{font-size:clamp(21px,3.2vw,32px);font-weight:900;line-height:1.4}
.sec-head p{margin-top:8px;font-size:15.5px;color:var(--ink-2);max-width:60ch}
.sec-head .more{font-size:14.5px;font-weight:700;color:var(--blue);display:flex;align-items:center;gap:6px}
.sec-head .more svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.eyebrow{
  display:inline-block;font-size:12.5px;font-weight:800;color:var(--orange-dk);
  background:var(--orange-sf);border:1px solid #5c421d;
  padding:5px 14px;border-radius:999px;margin-bottom:12px;
}

/* ================= CATEGORY TILES ================= */
/* 4 across so the 8 categories fill exactly two rows with no orphan tile */
.cat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media(max-width:900px){.cat-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:420px){.cat-grid{grid-template-columns:1fr}}
.cat-tile{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:22px 16px;text-align:center;box-shadow:var(--shadow);
  transition:transform .3s cubic-bezier(.2,.7,.2,1),box-shadow .3s,border-color .3s;
}
.cat-tile:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg);border-color:var(--blue)}

/* --- glass versions, homepage only --- */
body.has-bg .cat-tile{
  background:linear-gradient(150deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.07) 55%, rgba(255,255,255,.04) 100%);
  -webkit-backdrop-filter:blur(22px) saturate(180%);
  backdrop-filter:blur(22px) saturate(180%);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38), 0 18px 44px rgba(3,8,18,.36);
}
body.has-bg .cat-tile h3{color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.45)}
body.has-bg .cat-tile span{color:rgba(255,255,255,.68)}
body.has-bg .cat-tile:hover{border-color:rgba(255,255,255,.5)}
/* the icon plate keeps a solid tint so the drawn SVG stays legible */
body.has-bg .cat-tile .ic{
  background:linear-gradient(140deg, rgba(255,255,255,.9), rgba(226,238,252,.78));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.cat-tile .ic{
  width:56px;height:56px;margin:0 auto 12px;border-radius:16px;display:grid;place-items:center;
  background:linear-gradient(140deg,#1b3352,#132741);
  border:1px solid #2b4467;
}
.cat-tile .ic svg{width:28px;height:28px;stroke:var(--blue);fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.cat-tile:nth-child(even) .ic{background:linear-gradient(140deg,#3a280f,#2a1d0c);border-color:#553d1c}
.cat-tile:nth-child(even) .ic svg{stroke:var(--orange-dk)}
.cat-tile h3{font-size:15.5px;font-weight:800;line-height:1.5}
.cat-tile span{font-size:13px;color:var(--ink-3)}

/* ================= PRODUCT CARDS ================= */
.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px}
.pcard{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column;
  transition:transform .3s cubic-bezier(.2,.7,.2,1),box-shadow .3s,border-color .3s;
}
.pcard:hover{transform:translateY(-5px);box-shadow:var(--shadow-lg);border-color:#38455f}

/* --- glass product cards, homepage only --- */
body.has-bg .pcard{
  background:linear-gradient(150deg, rgba(255,255,255,.15) 0%, rgba(255,255,255,.07) 55%, rgba(255,255,255,.04) 100%);
  -webkit-backdrop-filter:blur(22px) saturate(180%);
  backdrop-filter:blur(22px) saturate(180%);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.36), 0 18px 44px rgba(3,8,18,.4);
}
body.has-bg .pcard:hover{border-color:rgba(255,255,255,.5)}
/* product imagery needs a bright plate — glass behind a photo muddies it */
body.has-bg .pcard-media{
  background:rgba(255,255,255,.9);
  border-bottom:1px solid rgba(255,255,255,.3);
}
body.has-bg .pcard-body h3{color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.45)}
body.has-bg .pcard-body .en{color:rgba(255,255,255,.62)}
body.has-bg .pcard-body .cat{color:#ffc98a}
body.has-bg .pcard-price b{color:#fff}
body.has-bg .pcard-price .from,
body.has-bg .pcard-price s{color:rgba(255,255,255,.68)}
body.has-bg .pcard-price .none{color:rgba(255,255,255,.75)}
.pcard-media{
  position:relative;aspect-ratio:1/1;
  /* deliberately light: product shots are on white, and a dark plate would
     leave them floating in a grey box */
  background:#e9edf4;
  display:grid;place-items:center;overflow:hidden;border-bottom:1px solid var(--line);
}
.pcard-media img{width:100%;height:100%;object-fit:cover}
.pcard-media svg{width:72%;max-width:180px;height:auto}
.pcard-badges{position:absolute;top:10px;inset-inline-start:10px;display:flex;flex-direction:column;gap:6px;z-index:2}
.pill{
  font-size:11.5px;font-weight:800;padding:4px 11px;border-radius:999px;
  background:rgba(255,255,255,.95);color:var(--blue);box-shadow:0 2px 8px rgba(0,0,0,.12);
}
/* --danger and --ok were lifted to read as *text* on a dark page, so they
   are light fills. White on top of them is near-invisible; the ink goes dark. */
.pill.off{background:var(--danger);color:#4c0519}
.pill.out{background:var(--grey);color:#fff}
.pill.new{background:var(--ok);color:#053626}

.pcard-body{padding:14px 15px 16px;display:flex;flex-direction:column;flex:1;gap:6px}
.pcard-body .cat{font-size:12px;color:var(--orange-dk);font-weight:700}
.pcard-body h3{font-size:15.5px;font-weight:800;line-height:1.6}
.pcard-body .en{font-size:12.5px;color:var(--ink-3);direction:ltr;text-align:right}
.pcard-price{margin-top:auto;padding-top:10px;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.pcard-price b{font-size:17px;font-weight:900;color:var(--blue)}
.pcard-price s{font-size:13px;color:var(--ink-3)}
.pcard-price .from{font-size:12px;color:var(--ink-3);font-weight:600}
.pcard-price .none{font-size:14px;color:var(--grey);font-weight:700}
.vcount{font-size:12.5px;color:var(--ink-3)}

/* ================= FILTER BAR ================= */
.toolbar{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:14px;box-shadow:var(--shadow);margin-bottom:22px;
}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{
  padding:8px 16px;border-radius:999px;cursor:pointer;
  font-size:13.5px;font-weight:700;background:var(--surface-2);color:var(--ink-2);
  border:1px solid transparent;transition:all .2s;
}
.chip:hover{background:#222e42;color:var(--ink)}
.chip.active{background:var(--blue);color:#fff;box-shadow:0 4px 12px rgba(11,82,160,.26)}
.toolbar-row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin-top:12px}
.field{display:flex;flex-direction:column;gap:5px;flex:1;min-width:140px}
.field label{font-size:12.5px;font-weight:700;color:var(--ink-3)}
.input,.field select,.field input,select,textarea{
  font-family:inherit;font-size:14.5px;color:var(--ink);
  padding:11px 13px;border-radius:11px;border:1px solid var(--line);
  background:var(--surface-2);outline:none;width:100%;
  transition:border-color .2s,background .2s;
}
.input:focus,.field select:focus,.field input:focus,textarea:focus{border-color:var(--blue);background:var(--surface)}
textarea{resize:vertical;min-height:96px}
.result-count{font-size:14.5px;color:var(--ink-2);font-weight:600;margin-bottom:14px}

/* ================= PRODUCT DETAIL ================= */
.pd{display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:start}
@media(max-width:860px){.pd{grid-template-columns:1fr;gap:22px}}
.pd-gallery{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  overflow:hidden;box-shadow:var(--shadow);position:sticky;top:calc(var(--nav-h) + 14px);
}
@media(max-width:860px){.pd-gallery{position:static}}
.pd-main{aspect-ratio:1/1;background:#e9edf4;display:grid;place-items:center;overflow:hidden}
.pd-main img{width:100%;height:100%;object-fit:cover}
.pd-main svg{width:70%;max-width:320px}
.pd-thumbs{display:flex;gap:8px;padding:10px;overflow-x:auto}
.pd-thumbs button{
  width:66px;height:66px;flex:none;border-radius:10px;overflow:hidden;cursor:pointer;
  border:2px solid transparent;background:#e9edf4;padding:0;
}
.pd-thumbs button.active{border-color:var(--blue)}
.pd-thumbs img{width:100%;height:100%;object-fit:cover}

.pd-info h1{font-size:clamp(21px,3.2vw,30px);font-weight:900;line-height:1.45}
.pd-info .en{font-size:15px;color:var(--ink-3);direction:ltr;text-align:right;margin-top:2px}
.pd-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.tagchip{
  font-size:12.5px;font-weight:700;padding:5px 13px;border-radius:999px;
  background:var(--blue-soft);color:var(--blue);
}
.tagchip.brand{background:var(--orange-sf);color:var(--orange-dk)}

.pd-price{
  margin-top:18px;padding:16px 18px;border-radius:var(--radius);
  background:var(--surface);border:1px solid var(--line);
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
}
.pd-price b{font-size:26px;font-weight:900;color:var(--blue)}
.pd-price s{font-size:15px;color:var(--ink-3)}
.pd-price .save{font-size:13px;font-weight:800;color:#4c0519;background:var(--danger);padding:3px 10px;border-radius:999px}

/* variant picker — the core of the multi-size requirement */
.variants{margin-top:18px}
.variants > label{display:block;font-size:14px;font-weight:800;margin-bottom:10px}
.vlist{display:flex;flex-direction:column;gap:9px}
.vopt{
  display:flex;align-items:center;gap:12px;cursor:pointer;
  padding:13px 15px;border-radius:12px;
  background:var(--surface);border:1.5px solid var(--line);
  transition:border-color .2s,background .2s,box-shadow .2s;
}
.vopt:hover{border-color:#3d4c69}
.vopt input{accent-color:var(--blue);width:18px;height:18px;flex:none;cursor:pointer}
.vopt.on{border-color:var(--blue);background:var(--blue-soft);box-shadow:0 3px 12px rgba(11,82,160,.14)}
.vopt.dim{opacity:.55;cursor:not-allowed}
.vopt .vlabel{font-weight:700;font-size:15px;flex:1}
.vopt .vprice{font-weight:900;color:var(--blue);white-space:nowrap}
.vopt .vstock{font-size:12px;color:var(--ink-3);white-space:nowrap}
.vopt .vstock.low{color:var(--orange-dk);font-weight:700}
.vopt .vstock.zero{color:var(--danger);font-weight:700}

.qty-row{display:flex;gap:10px;align-items:center;margin-top:18px;flex-wrap:wrap}
/* Quantity stepper — orange, matching the add-to-cart button beside it.
   The input needs an explicit color: with `background:none` on a dark surface
   it otherwise inherits the browser's default black and disappears. */
.qty{
  display:flex;align-items:center;overflow:hidden;
  border:1.5px solid rgba(247,144,30,.45);border-radius:999px;
  background:rgba(247,144,30,.1);
}
.qty button{
  width:42px;height:46px;border:none;background:none;cursor:pointer;
  font-size:22px;font-weight:700;color:var(--orange);
  transition:background .2s,color .2s;
}
.qty button:hover{background:rgba(247,144,30,.22);color:#ffbe63}
.qty button:active{background:rgba(247,144,30,.34)}
.qty input{
  width:52px;height:46px;border:none;text-align:center;
  font-family:inherit;font-size:17px;font-weight:800;
  color:#fff;background:none;outline:none;
}
/* strip the native number spinners — the +/- buttons replace them */
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.qty input{-moz-appearance:textfield;appearance:textfield}
.qty-row .btn{flex:1;min-width:180px}

.pd-features{margin-top:22px}
.pd-features h3{font-size:17px;font-weight:800;margin-bottom:12px}
.ticks{list-style:none;display:flex;flex-direction:column;gap:10px}
.ticks li{display:flex;gap:10px;align-items:flex-start;font-size:15px;color:var(--ink-2);line-height:1.75}
.ticks li::before{content:"✓";flex:none;font-weight:900;color:var(--ok);font-size:14px;line-height:1.8}

.pd-desc{
  margin-top:22px;padding:20px;border-radius:var(--radius-lg);
  background:var(--surface);border:1px solid var(--line);
}
.pd-desc h3{font-size:17px;font-weight:800;margin-bottom:10px}
.pd-desc p{font-size:15px;color:var(--ink-2);line-height:1.9;white-space:pre-line}

/* ================= CART ================= */
.cart-grid{display:grid;grid-template-columns:1fr 340px;gap:22px;align-items:start}
@media(max-width:900px){.cart-grid{grid-template-columns:1fr}}
.cart-line{
  display:flex;gap:14px;padding:14px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);margin-bottom:12px;
  align-items:center;flex-wrap:wrap;
}
.cart-line .thumb{
  width:82px;height:82px;flex:none;border-radius:11px;overflow:hidden;
  background:#e9edf4;display:grid;place-items:center;
}
.cart-line .thumb img{width:100%;height:100%;object-fit:cover}
.cart-line .thumb svg{width:80%}
.cart-line .info{flex:1;min-width:150px}
.cart-line .info h3{font-size:15.5px;font-weight:800;line-height:1.5}
/* the variant label is what tells two lines of the same product apart —
   give it the accent so it reads as a distinct choice, not a subtitle */
.cart-line .info .vl{font-size:13.5px;color:var(--ink-3)}
.cart-line .info .vl:first-of-type{
  color:var(--orange-dk);font-weight:700;
  background:rgba(247,144,30,.12);border:1px solid rgba(247,144,30,.3);
  border-radius:999px;padding:2px 11px;display:inline-block;margin:3px 0;
}
.cart-line .money{font-weight:900;color:var(--blue);white-space:nowrap}
.cart-line form{display:flex;align-items:center;gap:8px}
.mini-qty{
  display:flex;align-items:center;overflow:hidden;border-radius:999px;
  border:1.5px solid rgba(247,144,30,.45);background:rgba(247,144,30,.1);
}
.mini-qty button{
  width:34px;height:36px;border:none;background:none;cursor:pointer;
  font-size:18px;font-weight:700;color:var(--orange);transition:background .2s,color .2s;
}
.mini-qty button:hover{background:rgba(247,144,30,.22);color:#ffbe63}
.mini-qty input{
  width:44px;height:36px;border:none;text-align:center;
  font-family:inherit;font-weight:800;color:#fff;background:none;outline:none;
}
.mini-qty input::-webkit-outer-spin-button,
.mini-qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.mini-qty input{-moz-appearance:textfield;appearance:textfield}
.link-danger{background:none;border:none;cursor:pointer;color:var(--danger);font-size:13.5px;font-weight:700;font-family:inherit}
.link-danger:hover{text-decoration:underline}

.summary{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:20px;box-shadow:var(--shadow);position:sticky;top:calc(var(--nav-h) + 14px);
}
@media(max-width:900px){.summary{position:static}}
.summary h3{font-size:18px;font-weight:900;margin-bottom:16px}
.sum-row{display:flex;justify-content:space-between;gap:10px;padding:9px 0;font-size:15px;color:var(--ink-2)}
.sum-row b{color:var(--ink);font-weight:800}
.sum-total{border-top:1px dashed var(--line);margin-top:8px;padding-top:14px;font-size:17px}
.sum-total b{font-size:21px;font-weight:900;color:var(--blue)}
.ship-hint{
  /* #8a5200 here was a light-theme leftover — dark brown on a dark brown
     panel, 2.5:1. The lifted orange is the same hue at a readable weight. */
  background:var(--orange-sf);border:1px solid #5c421d;color:#ffc078;
  padding:10px 13px;border-radius:11px;font-size:13.5px;font-weight:600;margin-bottom:14px;line-height:1.7;
}
.ship-free{background:#0e2e22;border-color:#1e6047;color:#6ee7b7}

/* ================= FORMS / AUTH ================= */
.form-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:clamp(22px,3.4vw,34px);box-shadow:var(--shadow);
}
.form-narrow{max-width:480px;margin:0 auto}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:15px}
.form-row{margin-bottom:15px}
.form-row label{display:block;font-size:13.5px;font-weight:700;color:var(--ink-2);margin-bottom:6px}
.form-row .help{font-size:12.5px;color:var(--ink-3);margin-top:5px;line-height:1.65}
.errorlist{list-style:none;margin-top:6px}
.errorlist li{font-size:13px;color:var(--danger);font-weight:600}
.form-error-box{
  background:#331319;border:1px solid #6d2434;color:#fda4af;
  padding:12px 15px;border-radius:11px;font-size:14px;margin-bottom:16px;font-weight:600;
}

/* ================= MESSAGES ================= */
.messages{margin:16px 0}
.msg{
  display:flex;gap:10px;align-items:center;
  padding:13px 16px;border-radius:12px;font-size:14.5px;font-weight:600;margin-bottom:10px;
}
.msg svg{width:19px;height:19px;flex:none;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.msg.success{background:#0e2e22;border:1px solid #1e6047;color:#6ee7b7}
.msg.error{background:#331319;border:1px solid #6d2434;color:#fda4af}
.msg.warning{background:var(--orange-sf);border:1px solid #5c421d;color:#ffc078}
.msg.info{background:var(--blue-soft);border:1px solid #2f4f7a;color:#93c5fd}

/* ================= TABLES / ORDERS ================= */
.otable{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow);border-collapse:collapse}
.otable th,.otable td{padding:13px 16px;text-align:right;font-size:14.5px;border-bottom:1px solid var(--line)}
.otable thead th{background:var(--surface-2);font-weight:800;font-size:13.5px;color:var(--ink-2)}
.otable tbody tr:last-child td{border-bottom:none}
.otable tbody tr:hover{background:#16202f}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.status{font-size:12.5px;font-weight:800;padding:4px 12px;border-radius:999px;white-space:nowrap}
.status.paid{background:var(--orange-sf);color:#ffc078}
.status.shipped{background:var(--blue-soft);color:#93c5fd}
.status.delivered{background:#0e2e22;color:#6ee7b7}
.status.pending{background:#2b2410;color:#fcd34d}
.status.cancelled{background:#232c3d;color:#94a3b8}

/* ================= EMPTY STATE ================= */
.empty{text-align:center;padding:60px 20px}
.empty .ic{width:78px;height:78px;margin:0 auto 18px;border-radius:22px;background:var(--surface-2);border:1px solid var(--line);display:grid;place-items:center}
.empty .ic svg{width:38px;height:38px;stroke:var(--ink-3);fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.empty h3{font-size:19px;font-weight:800;margin-bottom:8px}
.empty p{color:var(--ink-2);margin-bottom:20px}

/* ================= PAGINATION ================= */
.pager{display:flex;gap:7px;justify-content:center;margin-top:34px;flex-wrap:wrap}
.pager a,.pager span{
  min-width:42px;height:42px;padding:0 13px;border-radius:11px;
  display:grid;place-items:center;font-size:14.5px;font-weight:700;
  background:var(--surface);border:1px solid var(--line);color:var(--ink-2);
}
.pager a:hover{border-color:var(--blue);color:var(--blue)}
.pager .on{background:var(--blue);color:#fff;border-color:var(--blue)}
.pager .off{opacity:.4}

/* ================= FOOTER ================= */
.footer{background:#0d1420;color:rgba(255,255,255,.72);padding:46px 0 22px;margin-top:60px}
.foot-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1.2fr;gap:32px}
@media(max-width:860px){.foot-grid{grid-template-columns:1fr 1fr;gap:26px}}
@media(max-width:520px){.foot-grid{grid-template-columns:1fr}}
.footer h4{color:#fff;font-size:15px;font-weight:800;margin-bottom:12px}
.footer a{display:block;padding:5px 0;font-size:14.5px;transition:color .2s}
.footer a:hover{color:var(--orange)}
.footer .logo{color:#fff;margin-bottom:10px}
.footer .about{font-size:14.5px;line-height:1.85;max-width:34ch}
.foot-bot{margin-top:30px;padding-top:20px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;font-size:13.5px;color:rgba(255,255,255,.55)}

/* sticky call/cart bar on phones */
.callbar{
  position:fixed;bottom:0;left:0;right:0;z-index:60;display:none;gap:10px;padding:10px 14px;
  /* was rgba(255,255,255,.97) — a white slab under a dark page, and the
     ghost button on it inherited dark-on-dark styling. */
  background:rgba(10,16,28,.94);
  -webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);
  border-top:1px solid var(--line);box-shadow:0 -4px 20px rgba(0,0,0,.45);
}
.callbar .btn{flex:1}
@media(max-width:760px){.callbar{display:flex}body{padding-bottom:72px}}

/* reveal on scroll */
.reveal{opacity:1}
.js .reveal{opacity:0;transform:translateY(24px);transition:opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1)}
.js .reveal.in{opacity:1;transform:none}

@media(prefers-reduced-motion:reduce){
  .js .reveal{opacity:1;transform:none;transition:none}
  html{scroll-behavior:auto}
  *{animation:none!important}
}

/* ================= DOWNLOADS (APK etc.) =================
   The نرم‌افزار category sells software, so the file is the product — the card
   is deliberately as prominent as the add-to-cart row above it. */
.pd-downloads{margin-top:22px}
.pd-downloads h3{font-size:17px;font-weight:800;margin-bottom:12px}
.dl-list{display:flex;flex-direction:column;gap:10px}
.dl-card{
  display:flex;align-items:center;gap:14px;padding:14px 16px;
  background:var(--surface);border:1.5px solid var(--line);border-radius:14px;
  transition:border-color .2s,transform .2s,box-shadow .2s;
}
.dl-card:hover{border-color:var(--orange);transform:translateY(-2px);box-shadow:0 10px 26px rgba(0,0,0,.34)}
.dl-ic{
  width:48px;height:48px;flex:none;border-radius:13px;display:grid;place-items:center;
  background:linear-gradient(140deg,#3a280f,#2a1d0c);border:1px solid #553d1c;
}
.dl-ic svg{width:24px;height:24px;stroke:var(--orange-dk);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.dl-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.dl-info b{font-size:15px;font-weight:800;line-height:1.5}
.dl-meta{font-size:12.5px;color:var(--ink-3)}
.dl-note{font-size:13px;color:var(--ink-2)}
.dl-btn{
  flex:none;display:inline-flex;align-items:center;gap:7px;
  padding:10px 18px;border-radius:999px;background:var(--orange);color:#fff;
  font-size:14px;font-weight:800;box-shadow:0 5px 14px rgba(247,144,30,.34);
}
.dl-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.dl-hint{margin-top:12px;font-size:13.5px;color:var(--ink-3);line-height:1.8}
@media(max-width:520px){
  .dl-card{flex-wrap:wrap}
  .dl-btn{width:100%;justify-content:center}
}

/* ================= VIDEOS (workshop) ================= */
.video-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px}
/* on a product page the column is already narrow — one per row reads better */
.video-grid.one-col{grid-template-columns:1fr}
.pd-videos{margin-top:22px}
.pd-videos h3{font-size:17px;font-weight:800;margin-bottom:12px}

.vcard{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);
  overflow:hidden;box-shadow:var(--shadow);
  transition:transform .3s cubic-bezier(.2,.7,.2,1),box-shadow .3s,border-color .3s;
}
.vcard:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:#38455f}
.vcard-media{
  position:relative;aspect-ratio:16/9;overflow:hidden;cursor:pointer;
  background:linear-gradient(140deg,#16233a,#0e1726);
  display:grid;place-items:center;
}
.vcard-media img{width:100%;height:100%;object-fit:cover}
.vcard-media > svg{width:46%;max-width:150px;height:auto}
.vplay{
  position:absolute;inset:0;margin:auto;width:62px;height:62px;
  border-radius:50%;border:none;cursor:pointer;
  background:rgba(247,144,30,.94);display:grid;place-items:center;
  box-shadow:0 8px 26px rgba(0,0,0,.45);
  transition:transform .25s cubic-bezier(.2,.7,.2,1);
}
.vcard-media:hover .vplay{transform:scale(1.08)}
.vplay svg{width:26px;height:26px;fill:#fff;stroke:none;margin-inline-start:3px}
.vdur{
  position:absolute;bottom:10px;inset-inline-end:10px;
  background:rgba(6,12,22,.85);color:#fff;
  font-size:12px;font-weight:700;padding:3px 9px;border-radius:7px;
}
.vcard-body{padding:14px 16px 16px}
.vcard-body h3{font-size:16px;font-weight:800;line-height:1.6}
.vcard-body p{margin-top:6px;font-size:14px;color:var(--ink-2);line-height:1.8}
.vlink{display:inline-block;margin-top:10px;font-size:13.5px;font-weight:700;color:var(--blue)}
.vlink:hover{text-decoration:underline}

/* ================= FOOTER CONTACT LIST ================= */
/* .footer a is display:block; these two need their own layout */
.foot-phone{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.foot-phone .pl{font-size:12.5px;color:rgba(255,255,255,.5)}
.foot-phone .num{font-size:15.5px;font-weight:800;color:#fff}
.foot-phone:hover .num{color:var(--orange)}
.foot-wa{font-size:13px;color:#6ee7b7}
.foot-social{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}
.foot-social a{
  display:inline-flex;align-items:center;padding:6px 14px;border-radius:999px;
  font-size:13px;font-weight:700;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);
}
.foot-social a:hover{background:var(--orange);color:#fff;border-color:transparent}

/* the software page lists many files at once — a grid reads better there than
   the single column used beside a product's buy box */
.dl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px}
@media(max-width:420px){.dl-grid{grid-template-columns:1fr}}
.dl-ic img{width:100%;height:100%;object-fit:cover;border-radius:12px}

/* ================= VIDEO LIGHTBOX =================
   The player opens here instead of inside the card, so the browser's own
   controls — play/pause, seek, volume, fullscreen — have room to render. */
.vmodal{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px}
.vmodal[hidden]{display:none}
.vmodal-backdrop{
  position:absolute;inset:0;background:rgba(3,8,18,.88);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
}
.vmodal-inner{position:relative;z-index:1;width:min(1100px,100%)}
.vmodal-box{
  position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;
  background:#000;border-radius:14px;box-shadow:0 30px 80px rgba(0,0,0,.65);
}
.vmodal-box video,.vmodal-box iframe{width:100%;height:100%;border:0;display:block}
.vmodal-close{
  position:absolute;top:-48px;inset-inline-end:0;
  width:40px;height:40px;border-radius:50%;border:none;cursor:pointer;
  background:rgba(255,255,255,.16);color:#fff;font-size:26px;line-height:1;
  display:grid;place-items:center;transition:background .2s;
}
.vmodal-close:hover{background:var(--orange)}
/* stop the page scrolling behind the overlay */
body.vmodal-open{overflow:hidden}
@media(max-width:760px){
  .vmodal{padding:12px}
  /* above 16:9 there is no room for an outside button — tuck it into the corner */
  .vmodal-close{top:8px;inset-inline-end:8px;background:rgba(3,8,18,.72)}
}
