/* ماڵپەڕی کڕیار — 4chra.com (src/shop.js) */
@font-face { font-family: 'Sarkar'; src: url('/assets/fonts/Oxygen-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sarkar'; src: url('/assets/fonts/Oxygen-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --ind: #1F3C96; --ind-7: #1B347F; --ind-9: #111F4D; --ind-50: #F1F4FC; --ind-100: #E2E8F7;
  --honey: #D99A1E; --honey-bg: #FBF1DA;
  --ink: #18203A; --ink-2: #4B556E; --ink-3: #8790A6;
  --ground: #F5F6FA; --surface: #fff; --line: #E3E7F0;
  --bad: #C62828; --r: 16px;
  --sh: 0 1px 2px rgba(17,31,77,.06), 0 10px 24px -16px rgba(17,31,77,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body { margin: 0; font-family: 'Sarkar', Tahoma, sans-serif; background: var(--ground); color: var(--ink);
       font-size: 15px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--ind); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ───────── سەردێڕ ───────── */
.hd { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line);
      padding-top: env(safe-area-inset-top); }
.hd-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo img { width: 44px; height: 44px; border-radius: 50%; object-fit: contain; background: var(--ind-50); }
.logo span { font-weight: 700; font-size: 17px; line-height: 1.15; }
.logo small { display: block; font-weight: 400; font-size: 12px; color: var(--ind); }
.cartbtn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0;
           border-radius: 999px; background: var(--ind); color: #fff; font-weight: 700; cursor: pointer; }
.cartbtn svg { width: 20px; height: 20px; }
.cartbtn b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--honey); color: var(--ind-9);
             font-size: 12px; line-height: 22px; text-align: center; }
.cartbtn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.08); } }
.tabs { max-width: 1120px; margin: 0 auto; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 16px 10px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; padding: 6px 14px; border-radius: 999px; background: var(--ind-50); color: var(--ind-7);
          text-decoration: none; font-size: 14px; font-weight: 700; white-space: nowrap; }
.tabs a:hover { background: var(--ind-100); }

/* ───────── ناوەڕۆک ───────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 40px; }
.hero { margin: 22px 0 8px; padding: 26px 24px; border-radius: var(--r); background: var(--ind); color: #fff; }
.hero h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.35; }
.hero p { margin: 0; color: rgba(255,255,255,.82); }
.hero .notice { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: var(--honey-bg); color: #6B4A0B; font-weight: 700; }
.hero .closed { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: #FDE8E7; color: var(--bad); font-weight: 700; }
.cat { margin-top: 28px; }
.cat h2 { margin: 0 0 12px; font-size: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
        overflow: hidden; box-shadow: var(--sh); }
.ph { aspect-ratio: 4 / 3; background: var(--ind-50); display: grid; place-items: center; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ini { font-size: 46px; font-weight: 700; color: var(--ind); opacity: .55; }
.bd { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 14px; }
.bd h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.ds { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; }
.ft { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pr b { font-size: 16px; font-variant-numeric: tabular-nums; }
.pr small { color: var(--ink-3); font-size: 12px; }
.add { padding: 8px 14px; border: 1.5px solid var(--ind); border-radius: 999px; background: #fff; color: var(--ind);
       font-weight: 700; cursor: pointer; white-space: nowrap; }
.add:hover { background: var(--ind-50); }
.add.in { background: var(--ind); color: #fff; }
.empty { margin: 40px 0; padding: 40px 16px; text-align: center; color: var(--ink-3); background: var(--surface); border-radius: var(--r); }
.sf { max-width: 1120px; margin: 0 auto; padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between;
      gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; border-top: 1px solid var(--line); }

/* ───────── سەبەتە ───────── */
.drawer { position: fixed; inset: 0; z-index: 50; }
.dr-back { position: absolute; inset: 0; background: rgba(17,31,77,.45); }
.dr { position: absolute; top: 0; bottom: 0; left: 0; width: min(440px, 100%); background: var(--surface); display: flex; flex-direction: column;
      box-shadow: 0 0 40px rgba(0,0,0,.25); animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(-24px); opacity: .4; } }
.dr-hd { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
         border-bottom: 1px solid var(--line); }
.dr-hd h2 { margin: 0; font-size: 19px; }
.x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--ind-50); font-size: 24px; line-height: 1; cursor: pointer; }
.dr-bd { flex: 1; overflow-y: auto; padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); }
.clist:empty::before { content: 'سەبەتەکەت بەتاڵە — کاڵا لە لیستەکە زیاد بکە.'; display: block; padding: 24px 0; text-align: center; color: var(--ink-3); }
.ci { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci-top { display: flex; justify-content: space-between; gap: 10px; }
.ci-top b { font-size: 15px; }
.ci-top span { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ci-row { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: var(--ind-50); color: var(--ind); font-size: 18px; font-weight: 700; cursor: pointer; }
.qty input { width: 56px; height: 34px; border: 0; text-align: center; direction: ltr; font-variant-numeric: tabular-nums; }
.ci-row .u { color: var(--ink-3); font-size: 13px; }
.rm { margin-inline-start: auto; border: 0; background: none; color: var(--bad); cursor: pointer; font-size: 13px; }
.ci input.txt { width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); }
.ctotal { display: flex; justify-content: space-between; padding: 12px 0; font-weight: 700; font-size: 16px; }
.ctotal:empty { display: none; }
.of h3 { margin: 10px 0 8px; font-size: 16px; }
.of label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.of input, .of textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px;
                          background: var(--ground); font-weight: 400; color: var(--ink); }
.of input:focus, .of textarea:focus { outline: none; border-color: var(--ind); background: #fff; box-shadow: 0 0 0 3px rgba(31,60,150,.12); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; gap: 8px; margin-bottom: 10px; }
.seg label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 10px; border: 1.5px solid var(--line);
             border-radius: 12px; cursor: pointer; font-weight: 700; color: var(--ink); }
.seg label:has(input:checked) { border-color: var(--ind); background: var(--ind-50); color: var(--ind); }
.seg input { width: auto; margin: 0; accent-color: var(--ind); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.fine { color: var(--ink-3); font-size: 12.5px; margin: 6px 0 12px; }
.send { width: 100%; padding: 14px; border: 0; border-radius: 14px; background: var(--ind); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.send:hover { background: var(--ind-7); }
.send:disabled { opacity: .6; cursor: wait; }
.ferr { color: var(--bad); font-weight: 700; min-height: 1.2em; margin: 10px 0 0; }

/* ───────── سەرکەوتوو ───────── */
.done { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(17,31,77,.5); }
.done-in { width: min(420px, 100%); padding: 28px 22px; border-radius: 20px; background: #fff; text-align: center; }
.tick { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: var(--ind); color: #fff; font-size: 34px; line-height: 64px; }
.done-in h2 { margin: 0 0 8px; }
.done-in b { font-size: 20px; color: var(--ind); }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bd { padding: 10px; }
  .bd h3 { font-size: 14.5px; }
  .ft { flex-direction: column; align-items: stretch; }
  .add { width: 100%; }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 20px; }
  .cartbtn span { display: none; }
  .logo span { font-size: 15px; }
}
