/* ============================================================
   ویترین — Design tokens
   مفهوم: ویترین مغازه در شب. زمینه تیره (خاکستری زغالی)،
   نور طلایی روی محصول اصلی می‌افتد، مثل شب‌نمای جواهرفروشی.
   ============================================================ */
@font-face{
  font-family:"Vazirmatn";
  src:url("../fonts/Vazirmatn[wght].woff2") format("woff2-variations");
  font-weight:100 900;
  font-display:swap;
}

/* توکن‌های رنگ/تایپ/هندسه از اینجا حذف شدند — هرکدام حالا در یک فایل «تم» جدا هستند
   (assets/css/themes/*.css) تا افزودن تمپلیت جدید فقط یعنی یک فایل تم جدید،
   بدون دست‌زدن به این فایل. تم فعال از طریق theme.php بارگذاری می‌شود. */

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  font-family:var(--f-body);
  background:var(--ink);
  color:var(--paper);
  direction:rtl;
  min-height:100dvh;
  -webkit-font-smoothing:antialiased;
  padding-bottom:calc(var(--nav-h) + var(--safe-b) + 10px);
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
button{font-family:inherit; cursor:pointer;}
ul{list-style:none;}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important; transition-duration:.001ms !important;}
}

/* ---------- container ---------- */
.wrap{max-width:560px; margin:0 auto; padding:0 18px;}

/* ---------- top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background:linear-gradient(180deg, var(--ink) 70%, transparent);
  backdrop-filter:blur(6px);
}
.brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:17px; letter-spacing:.2px;}
.brand .mark{width:30px; height:30px; border-radius:8px; background:var(--surface-2); display:flex; align-items:center; justify-content:center;}
.brand .mark svg{width:16px; height:16px;}
.icon-btn{
  width:38px; height:38px; border-radius:50%;
  background:var(--surface-2); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; color:var(--paper);
  position:relative;
}
.icon-btn .badge{
  position:absolute; top:-4px; left:-4px; background:var(--gold); color:#191410;
  font-size:10px; font-weight:800; border-radius:50%; width:18px; height:18px;
  display:flex; align-items:center; justify-content:center;
}

/* ---------- hero / vitrine (signature element) ---------- */
.vitrine{
  position:relative; margin:6px 18px 28px; border-radius:var(--radius-l);
  overflow:hidden; background:radial-gradient(120% 100% at 50% 0%, #262019 0%, var(--surface) 46%, var(--ink) 100%);
  padding:34px 22px 26px; text-align:center;
  border:1px solid var(--line);
}
.vitrine::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(220px 160px at 50% 8%, rgba(198,161,91,.35), transparent 70%);
  pointer-events:none;
}
.vitrine .eyebrow{
  position:relative; font-size:12px; color:var(--gold-soft); letter-spacing:2px; font-weight:600; margin-bottom:10px;
}
.vitrine h1{
  position:relative; font-family:var(--f-display); font-weight:800; font-size:26px; line-height:1.5; margin-bottom:10px;
}
.vitrine p{position:relative; color:var(--paper-dim); font-size:14px; line-height:1.9; margin-bottom:20px;}
.vitrine .stage{
  position:relative; width:180px; height:180px; margin:0 auto 18px; border-radius:22px;
  background:var(--surface-2); display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow-glow);
}
.vitrine .stage img{width:100%; height:100%; object-fit:cover; border-radius:22px;}
.cta-row{display:flex; gap:10px; justify-content:center; position:relative;}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:13px 22px; border-radius:999px; border:none; font-weight:700; font-size:14px;
  transition:transform .15s ease;
}
.btn:active{transform:scale(.96);}
.btn-gold{background:linear-gradient(135deg, var(--gold-soft), var(--gold)); color:#20170B;}
.btn-ghost{background:transparent; color:var(--paper); border:1px solid var(--line);}
.btn-block{width:100%;}
.btn-lg{padding:16px 22px; font-size:15px;}
.btn:disabled{opacity:.5; pointer-events:none;}

/* ---------- section headers ---------- */
.section{margin:30px 0;}
.section-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:14px;}
.section-head h2{font-size:16px; font-weight:800;}
.section-head span{font-size:12px; color:var(--paper-dim);}

/* ---------- product shelf (horizontal scroll) ---------- */
.shelf{display:flex; gap:14px; overflow-x:auto; padding:4px 2px 14px; scroll-snap-type:x proximity; -ms-overflow-style:none; scrollbar-width:none;}
.shelf::-webkit-scrollbar{display:none;}
.card{
  scroll-snap-align:start; flex:0 0 150px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-m); overflow:hidden; position:relative;
}
.card .thumb{width:100%; height:150px; background:var(--surface-2); position:relative; overflow:hidden;}
.card .thumb img{width:100%; height:100%; object-fit:cover;}
.card .tag{
  position:absolute; top:8px; right:8px; background:rgba(20,24,27,.75); color:var(--gold-soft);
  font-size:10px; padding:3px 8px; border-radius:999px; font-weight:700; backdrop-filter:blur(4px);
}
.card .info{padding:10px 10px 12px;}
.card .name{font-size:13px; font-weight:700; margin-bottom:4px; line-height:1.4; min-height:36px;}
.card .price{font-size:13px; color:var(--gold-soft); font-weight:800;}
.card .price s{color:var(--paper-dim); font-weight:400; font-size:11px; margin-inline-start:6px;}
.card .add{
  margin-top:8px; width:100%; padding:8px; border-radius:999px; background:var(--surface-2);
  border:1px solid var(--line); color:var(--paper); font-size:12px; font-weight:700;
}
.card .add.in-cart{background:var(--gold); color:#20170B; border-color:var(--gold);}
.card .add:disabled{opacity:.5; cursor:not-allowed;}
.stock-line{font-size:11px; font-weight:700; margin-top:4px;}
.stock-line.low{color:var(--rose);}
.stock-line.out{color:var(--paper-dim);}
.stock-line.soon{color:var(--teal);}

/* full grid (catalog view) */
.grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.grid .card{flex:auto; width:auto;}
.grid .card .thumb{height:140px;}

/* ---------- process (numbered — real sequence) ---------- */
.steps{display:flex; flex-direction:column; gap:0;}
.step{display:flex; gap:14px; padding:16px 0; border-bottom:1px dashed var(--line);}
.step:last-child{border-bottom:none;}
.step .num{
  flex:0 0 34px; height:34px; border-radius:50%; background:var(--surface-2); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; color:var(--gold-soft);
}
.step .txt h3{font-size:14px; font-weight:700; margin-bottom:4px;}
.step .txt p{font-size:12.5px; color:var(--paper-dim); line-height:1.8;}

/* ---------- contact dock (messaging channels) ---------- */
.contact-panel{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-l);
  padding:18px; text-align:center;
}
.contact-panel h2{font-size:15px; font-weight:800; margin-bottom:4px;}
.contact-panel p{font-size:12.5px; color:var(--paper-dim); margin-bottom:16px;}
.channels{display:grid; grid-template-columns:repeat(3, 1fr); gap:10px;}
.channel{
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 6px;
  background:var(--surface-2); border-radius:var(--radius-s); border:1px solid var(--line); font-size:11px; font-weight:600;
}
.channel svg{width:20px; height:20px;}

/* ---------- bottom nav (app-style) ---------- */
.bottom-nav{
  position:fixed; bottom:0; inset-inline:0; z-index:30;
  height:calc(var(--nav-h) + var(--safe-b));
  padding-bottom:var(--safe-b);
  background:rgba(29,34,38,.9); backdrop-filter:blur(14px);
  border-top:1px solid var(--line);
  display:flex;
}
.bottom-nav a{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  color:var(--paper-dim); font-size:10.5px; font-weight:600; position:relative;
}
.bottom-nav a svg{width:22px; height:22px;}
.bottom-nav a.active{color:var(--gold-soft);}
.bottom-nav a.active::before{
  content:""; position:absolute; top:2px; width:18px; height:3px; border-radius:3px; background:var(--gold);
}
.bottom-nav a .cart-count{
  position:absolute; top:0; left:calc(50% + 4px); background:var(--gold); color:#20170B; font-size:9px; font-weight:800;
  width:15px; height:15px; border-radius:50%; display:flex; align-items:center; justify-content:center;
}

/* ---------- forms ---------- */
.field{margin-bottom:14px;}
.field label{display:block; font-size:12.5px; color:var(--paper-dim); margin-bottom:6px; font-weight:600;}
.field input, .field select, .field textarea{
  width:100%; padding:13px 14px; border-radius:var(--radius-s); background:var(--surface-2);
  border:1px solid var(--line); color:var(--paper); font-family:inherit; font-size:14px;
}
.field input:focus, .field select:focus, .field textarea:focus{outline:2px solid var(--gold); outline-offset:1px;}
.field-row{display:flex; gap:10px;}
.field-row .field{flex:1;}

/* ---------- sheet / modal ---------- */
.sheet-backdrop{
  position:fixed; inset:0; background:rgba(10,12,13,.6); z-index:50; opacity:0; pointer-events:none; transition:opacity .2s;
}
.sheet-backdrop.open{opacity:1; pointer-events:auto;}
.sheet{
  position:fixed; right:0; left:0; bottom:0; z-index:51; background:var(--surface);
  border-radius:24px 24px 0 0; padding:20px 20px calc(20px + var(--safe-b));
  transform:translateY(105%); transition:transform .28s cubic-bezier(.22,1,.36,1); max-height:86dvh; overflow-y:auto;
}
.sheet.open{transform:translateY(0);}
.sheet .handle{width:40px; height:4px; background:var(--line); border-radius:4px; margin:0 auto 16px;}

/* ---------- toast ---------- */
.toast{
  position:fixed; bottom:calc(var(--nav-h) + var(--safe-b) + 14px); right:18px; left:18px; z-index:60;
  background:var(--gold); color:#20170B; padding:13px 16px; border-radius:14px; font-size:13px; font-weight:700;
  transform:translateY(140%); transition:transform .25s ease; text-align:center;
}
.toast.show{transform:translateY(0);}

/* ---------- misc pages ---------- */
.page-title{font-family:var(--f-display); font-weight:800; font-size:20px; margin:20px 0 4px;}
.page-sub{color:var(--paper-dim); font-size:13px; margin-bottom:20px;}
.summary-row{display:flex; justify-content:space-between; font-size:13.5px; padding:8px 0; border-bottom:1px dashed var(--line);}
.summary-row.total{font-weight:800; font-size:15px; color:var(--gold-soft); border-bottom:none; padding-top:12px;}
.empty{text-align:center; padding:50px 20px; color:var(--paper-dim);}
.empty svg{width:44px; height:44px; margin:0 auto 12px; opacity:.5;}
.pay-methods{display:flex; flex-direction:column; gap:10px; margin:16px 0;}
.pay-method{
  display:flex; align-items:center; justify-content:space-between; padding:14px; border-radius:var(--radius-s);
  background:var(--surface-2); border:1px solid var(--line); font-size:13.5px; font-weight:600;
}
.pay-method input{width:18px; height:18px;}
.badge-status{padding:4px 10px; border-radius:999px; font-size:11px; font-weight:700;}
.badge-status.pending{background:#3a3220; color:var(--gold-soft);}
.badge-status.paid{background:#233a2e; color:#8fd4a8;}
.badge-status.shipped{background:#20303a; color:#8fbdd4;}
.badge-status.canceled{background:#3a2323; color:#d48f8f;}

.order-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-m); padding:14px; margin-bottom:12px;}
.order-card .row1{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;}

/* admin */
.admin-body{padding-bottom:30px;}
.admin-table{width:100%; border-collapse:collapse; font-size:12.5px;}
.admin-table th, .admin-table td{padding:10px 6px; border-bottom:1px solid var(--line); text-align:right;}
.tabs{display:flex; gap:8px; margin-bottom:18px; border-bottom:1px solid var(--line);}
.tabs button{flex:1; padding:12px 0; background:none; border:none; color:var(--paper-dim); font-weight:700; font-size:13px; border-bottom:2px solid transparent;}
.tabs button.active{color:var(--gold-soft); border-color:var(--gold);}
.login-screen{min-height:100dvh; display:flex; align-items:center; justify-content:center; padding:20px;}
.login-card{width:100%; max-width:380px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-l); padding:26px;}
