/* ==========================================================
   خانی شۆپ — Main Stylesheet
   Font: Rabar_021 (assets/fonts/)
   ========================================================== */
@font-face {
  font-family: "Rabar";
  src: url("../fonts/Rabar_021.woff2") format("woff2"),
       url("../fonts/Rabar_021.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Rabar", Tahoma, "Segoe UI", sans-serif;
  --bg: #faf5ec;
  --bg-2: #efe7d8;
  --surface: #ffffff;
  --surface-2: #fbf8f2;
  --ink: #1b2424;
  --ink-2: #3b4746;
  --muted: #727a74;
  --line: #e7ddcb;
  --brand: #145a42;
  --brand-2: #1d7454;
  --brand-ink: #ffffff;
  --accent: #17694c;
  --gold: #c9973f;
  --gold-2: #e8c27a;
  --gold-soft: #f8edd6;
  --danger: #d14848;
  --ok: #24936a;
  --warn: #d38b12;
  --info: #3a73c9;
  --shadow-sm: 0 1px 2px rgba(30, 25, 15, .06), 0 2px 8px rgba(30, 25, 15, .05);
  --shadow: 0 10px 30px -12px rgba(40, 30, 10, .25);
  --shadow-lg: 0 30px 60px -20px rgba(15, 40, 40, .35);
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c8a56a' stroke-opacity='.18' stroke-width='1.2'%3E%3Cpath d='M28 4 52 28 28 52 4 28z'/%3E%3Cpath d='M28 16 40 28 28 40 16 28z'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a1310;
  --bg-2: #0e1a16;
  --surface: #111d19;
  --surface-2: #16251f;
  --ink: #eee7da;
  --ink-2: #cfc8bb;
  --muted: #94a09b;
  --line: #22352d;
  --brand: #12503b;
  --brand-2: #1d7454;
  --accent: #5cc79a;
  --gold: #d9a84e;
  --gold-2: #ecc884;
  --gold-soft: #2a2414;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 12px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23e9a93a' stroke-opacity='.07' stroke-width='1.2'%3E%3Cpath d='M28 4 52 28 28 52 4 28z'/%3E%3Cpath d='M28 16 40 28 28 40 16 28z'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  transition: background .35s var(--ease), color .35s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 700; }
.ic { flex-shrink: 0; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
.main { min-height: 50vh; }
.only-sm { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15.5px; line-height: 1.2;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px var(--brand); }
.btn-primary:hover { background: var(--brand-2); box-shadow: 0 12px 26px -10px var(--brand-2); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2a1d05; box-shadow: 0 10px 24px -12px var(--gold); }
.btn-gold:hover { filter: brightness(1.05); box-shadow: 0 14px 30px -12px var(--gold); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-lg { padding: 15px 30px; font-size: 17px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: .2s var(--ease); position: relative;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.icon-btn.with-label { padding: 0 14px; font-size: 14.5px; font-weight: 600; }

/* ---------- Topbar & Header ---------- */
.topbar { background: var(--brand); color: #f4e9cf; font-size: 13.5px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.header.scrolled { box-shadow: var(--shadow); }
.header-in { display: flex; align-items: center; gap: 22px; height: 78px; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { width: 46px; height: 46px; border-radius: 14px; box-shadow: 0 8px 18px -8px rgba(20,90,66,.45); transition: transform .5s var(--ease); }
.logo:hover img { transform: rotate(-8deg) scale(1.05); }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text b { font-size: 22px; letter-spacing: -.2px; }
.logo-text small { font-size: 12px; color: var(--muted); }
.logo-light .logo-text small { color: #c9d6d2; }

.search {
  flex: 1; display: flex; align-items: center;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 5px; transition: border-color .2s, box-shadow .2s; max-width: 640px; margin-inline: auto;
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 18%, transparent); }
.search select {
  border: 0; background: var(--surface-2); border-radius: 999px; padding: 9px 14px; max-width: 170px;
  font-size: 14px; color: var(--ink-2); outline: none; cursor: pointer;
}
.search input { flex: 1; border: 0; background: transparent; padding: 8px 14px; outline: none; min-width: 0; font-size: 15.5px; }
.search button {
  width: 44px; height: 40px; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; display: grid; place-items: center; transition: .2s;
}
.search button:hover { background: var(--gold); color: #2a1d05; }

.header-actions { display: flex; gap: 10px; align-items: center; }
.cart-count {
  position: absolute; top: -7px; left: -7px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--gold); color: #2a1d05; font-size: 12px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg); line-height: 1;
}
.cart-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.45); } 100% { transform: scale(1); } }

#themeBtn .i-sun { display: none; }
[data-theme="dark"] #themeBtn .i-sun { display: inline-flex; }
[data-theme="dark"] #themeBtn .i-moon { display: none; }
#themeBtn span { display: inline-flex; transition: transform .5s var(--ease); }
#themeBtn:hover span { transform: rotate(25deg); }

.catnav { border-top: 1px solid var(--line); }
.catnav-in { display: flex; gap: 6px; overflow-x: auto; padding-block: 9px; scrollbar-width: none; }
.catnav-in::-webkit-scrollbar { display: none; }
.catnav a {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2);
  transition: .2s var(--ease); border: 1px solid transparent;
}
.catnav a .ic { color: var(--c, var(--gold)); }
.catnav a:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.catnav a.active { background: var(--brand); color: #fff; }
.catnav a.active .ic { color: var(--gold-2); }

.overlay { position: fixed; inset: 0; background: rgba(5, 15, 15, .55); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(3px); }
.overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; top: 96px; left: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--ok); border-radius: 14px; padding: 12px 18px;
  box-shadow: var(--shadow-lg); animation: toastIn .45s var(--ease) both; max-width: 360px; font-size: 15px;
}
.toast .ic { color: var(--ok); }
.toast-error { border-inline-start-color: var(--danger); } .toast-error .ic { color: var(--danger); }
.toast-warning { border-inline-start-color: var(--warn); } .toast-warning .ic { color: var(--warn); }
.toast.hide { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-30px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-30px); } }

/* ---------- Hero carousel ---------- */
.hero { padding: 26px 0 10px; }
.carousel {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 1240 / 480;
  background: var(--brand); box-shadow: var(--shadow-lg); isolation: isolate;
}
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility .9s; }
.slide.active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s linear; }
.slide.active img { transform: scale(1); }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to left, rgba(8, 30, 30, .82) 0%, rgba(8, 30, 30, .45) 45%, rgba(8, 30, 30, 0) 75%);
}
.slide-content {
  position: absolute; inset-block: 0; right: 0; z-index: 2; width: min(560px, 62%);
  display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(24px, 5vw, 64px); color: #fff;
}
.slide-content .eyebrow {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  background: rgba(242, 193, 78, .18); color: var(--gold-2); border: 1px solid rgba(242, 193, 78, .35);
  padding: 4px 14px; border-radius: 999px; font-size: 13.5px; margin-bottom: 14px;
}
.slide-content h2 { font-size: clamp(26px, 4.2vw, 52px); margin-bottom: 10px; text-shadow: 0 4px 30px rgba(0,0,0,.3); }
.slide-content p { font-size: clamp(15px, 1.6vw, 19px); color: #e7efe9; margin: 0 0 22px; max-width: 440px; }
.slide.active .slide-content > * { animation: slideUp .9s var(--ease) both; }
.slide.active .slide-content > *:nth-child(2) { animation-delay: .12s; }
.slide.active .slide-content > *:nth-child(3) { animation-delay: .24s; }
.slide.active .slide-content > *:nth-child(4) { animation-delay: .36s; }
@keyframes slideUp { from { opacity: 0; transform: translateY(26px); } }
.slide-content .btn { align-self: flex-start; }

.car-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(8px);
  display: grid; place-items: center; transition: .25s var(--ease);
}
.car-nav:hover { background: var(--gold); color: #2a1d05; border-color: var(--gold); }
.car-prev { right: 18px; } .car-next { left: 18px; }
.car-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.car-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.45); padding: 0; transition: .35s var(--ease); }
.car-dots button.active { width: 34px; background: var(--gold-2); }
.car-progress { position: absolute; bottom: 0; right: 0; height: 3px; background: var(--gold-2); z-index: 3; width: 0; }
.car-progress.run { animation: prog var(--dur, 6s) linear forwards; }
@keyframes prog { to { width: 100%; } }

/* ---------- Sections ---------- */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0; display: flex; align-items: center; gap: 12px; }
.section-head h2::before {
  content: ""; width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 0 0 4px var(--gold-soft);
}
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 700; font-size: 15px; white-space: nowrap; }
.link-more:hover { gap: 8px; }

/* Category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.cat-tile {
  --c: var(--gold);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 22px 12px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  transition: .35s var(--ease); overflow: hidden;
}
.cat-tile::before {
  content: ""; position: absolute; inset: auto -30% -60% -30%; height: 90%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent);
  transition: .45s var(--ease); opacity: .7;
}
.cat-tile:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 50%, var(--line)); box-shadow: var(--shadow); }
.cat-tile:hover::before { inset: auto -30% -30% -30%; opacity: 1; }
.cat-ic {
  position: relative; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c);
  transition: .45s var(--ease);
}
.cat-tile:hover .cat-ic { transform: rotate(-8deg) scale(1.08); background: var(--c); color: #fff; }
.cat-tile b { position: relative; font-size: 15px; line-height: 1.5; }
.cat-tile small { position: relative; color: var(--muted); font-size: 12.5px; margin-top: -8px; }

/* Product grid & card */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column; transition: .35s var(--ease); position: relative;
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.pcard-img { position: relative; aspect-ratio: 1 / 1; background: var(--bg-2); overflow: hidden; display: block; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.07); }
.badge-disc, .badge-out {
  position: absolute; top: 12px; right: 12px; padding: 3px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 800; background: var(--danger); color: #fff; box-shadow: 0 6px 14px -6px var(--danger);
}
.badge-out { right: auto; left: 12px; background: #2b2b2b; box-shadow: none; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-cat { font-size: 12.5px; color: var(--gold); font-weight: 700; }
.pcard-title { font-size: 16px; margin: 0; line-height: 1.6; flex: 1; }
.pcard-title a:hover { color: var(--accent); }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.price { display: flex; flex-direction: column; line-height: 1.35; }
.price strong { font-size: 17.5px; color: var(--ink); }
.price del { font-size: 13px; color: var(--muted); }
.btn-add {
  width: 44px; height: 44px; border-radius: 14px; border: 0; display: grid; place-items: center;
  background: var(--brand); color: #fff; transition: .3s var(--ease);
}
.btn-add:hover { background: var(--gold); color: #2a1d05; transform: rotate(90deg); }
.btn-add.done { background: var(--ok); transform: none; }

/* Promo banner */
.promo {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(28px, 5vw, 56px);
  background: radial-gradient(120% 140% at 0% 100%, #1f7a57 0%, transparent 55%), linear-gradient(135deg, #145a42, #0c3326);
  color: #fff; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center;
}
.promo::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: .9; filter: brightness(1.8); mix-blend-mode: screen; }
.promo > * { position: relative; }
.promo h2 { font-size: clamp(24px, 3.2vw, 40px); }
.promo h2 span { color: var(--gold-2); }
.promo p { color: #cfe0dc; margin: 0 0 22px; max-width: 480px; }
.promo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.promo-stats div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 18px 10px; text-align: center; backdrop-filter: blur(6px); }
.promo-stats b { display: block; font-size: clamp(22px, 3vw, 34px); color: var(--gold-2); line-height: 1.2; }
.promo-stats small { color: #cfe0dc; font-size: 13px; }

/* Features */
.features { padding: 34px 0; border-top: 1px solid var(--line); background: var(--surface-2); }
.features-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { display: flex; align-items: center; gap: 14px; }
.feature-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex-shrink: 0; }
.feature b { display: block; font-size: 15.5px; }
.feature small { color: var(--muted); font-size: 13px; }

/* Footer */
.footer { position: relative; background: #0b2a20; color: #d8e4e0; padding-top: 56px; overflow: hidden; }
[data-theme="dark"] .footer { background: #06100c; }
.footer-pattern { position: absolute; inset: 0; background: var(--pattern); opacity: .6; pointer-events: none; }
.footer-in { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px; }
.footer h4 { color: #fff; font-size: 17px; margin-bottom: 14px; }
.footer p { color: #a9bdb8; font-size: 14.5px; max-width: 360px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.footer ul a { color: #a9bdb8; transition: .2s; }
.footer ul a:hover { color: var(--gold-2); padding-inline-start: 4px; }
.footer .contact li { display: flex; align-items: center; gap: 8px; color: #a9bdb8; }
.footer .contact .ic { color: var(--gold-2); }
.footer-bottom { position: relative; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13.5px; color: #8aa19c; }
.pay-icons { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Page header / breadcrumbs ---------- */
.page-hero {
  position: relative; padding: 34px 0 30px; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow: hidden;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--pattern); }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(24px, 3vw, 34px); margin: 0; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }

/* ---------- Shop ---------- */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; padding: 32px 0 56px; }
.sidebar { position: sticky; top: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.sidebar h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.side-cats { display: grid; gap: 4px; }
.side-cats a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: 14.5px; transition: .2s;
}
.side-cats a .ic { color: var(--c, var(--gold)); }
.side-cats a span.cnt { margin-inline-start: auto; font-size: 12px; background: var(--bg-2); padding: 1px 9px; border-radius: 999px; color: var(--muted); }
.side-cats a:hover { background: var(--surface-2); }
.side-cats a.active { background: var(--brand); color: #fff; }
.side-cats a.active .ic { color: var(--gold-2); }
.side-cats a.active span.cnt { background: rgba(255,255,255,.15); color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); font-size: 15px; }
.toolbar select { padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); outline: none; }
.shop-layout .grid { grid-template-columns: repeat(3, 1fr); }

.empty { text-align: center; padding: 60px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); }
.empty .ic { color: var(--gold); margin: 0 auto 10px; }
.empty h3 { font-size: 20px; }
.empty p { color: var(--muted); margin: 0 0 18px; }

/* ---------- Product page ---------- */
.product-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 36px 0 20px; align-items: start; }
.product-gallery { position: sticky; top: 150px; border-radius: 28px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); aspect-ratio: 1 / 1; }
.product-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; cursor: zoom-in; }
.product-info .pcard-cat { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.product-info h1 { font-size: clamp(24px, 3vw, 36px); margin: 6px 0 12px; }
.p-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.p-price strong { font-size: 32px; color: var(--accent); }
.p-price del { color: var(--muted); font-size: 18px; }
.p-price .save { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); padding: 2px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.p-desc { color: var(--ink-2); font-size: 16.5px; margin-bottom: 22px; white-space: pre-line; }
.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; margin-bottom: 22px; }
.stock i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.stock.out i { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 20%, transparent); }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); overflow: hidden;
}
.qty button { width: 42px; height: 46px; border: 0; background: transparent; display: grid; place-items: center; transition: .2s; }
.qty button:hover { background: var(--surface-2); color: var(--gold); }
.qty input { width: 48px; border: 0; text-align: center; background: transparent; outline: none; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm button { width: 34px; height: 38px; } .qty.sm input { width: 38px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.trust div { display: flex; gap: 8px; align-items: center; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.trust .ic { color: var(--gold); }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 370px; gap: 26px; padding: 32px 0 56px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.panel + .panel { margin-top: 18px; }
.panel h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.panel h3 .ic { color: var(--gold); }
.cart-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-item img { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: var(--bg-2); }
.cart-item h4 { font-size: 16px; margin: 0 0 4px; }
.cart-item .unit { color: var(--muted); font-size: 14px; }
.cart-item .ci-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-item .line { font-weight: 800; font-size: 16.5px; }
.ci-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.link-del { display: inline-flex; align-items: center; gap: 4px; color: var(--danger); font-size: 14px; background: none; border: 0; padding: 4px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink-2); }
.summary-row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 16px; font-size: 19px; font-weight: 800; color: var(--ink); }
.ship-bar { margin: 6px 0 14px; font-size: 13.5px; color: var(--muted); }
.ship-bar .bar { height: 7px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.ship-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius: 999px; }
.sticky-panel { position: sticky; top: 150px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface-2); outline: none; transition: .2s; font-size: 15.5px;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: var(--gold); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 15%, transparent);
}
.field .hint { font-size: 12.5px; color: var(--muted); }
.field.err input { border-color: var(--danger); }
.field .err-msg { font-size: 13px; color: var(--danger); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.ltr { direction: ltr; text-align: left; }
.alert { padding: 12px 16px; border-radius: 14px; font-size: 14.5px; margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.alert-info { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); }
.alert-warn { background: var(--gold-soft); color: #9a6408; }
[data-theme="dark"] .alert-warn { color: var(--gold-2); }

/* Auth */
.auth-wrap { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 40px 20px; position: relative; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; background: var(--pattern); mask: radial-gradient(closest-side, #000, transparent); }
.auth-card {
  position: relative; width: 100%; max-width: 940px; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.auth-side {
  position: relative; padding: 44px 36px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(100% 80% at 100% 0%, #1f7a57, transparent 60%), linear-gradient(160deg, #145a42, #0a2a1f);
  overflow: hidden; min-height: 420px;
}
.auth-side::before { content: ""; position: absolute; inset: 0; background: var(--pattern); filter: brightness(2); opacity: .7; }
.auth-side > * { position: relative; }
.auth-side .big-mark { position: absolute; top: 34px; right: 34px; width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 20px 40px -14px #000; }
.auth-side h2 { font-size: 28px; }
.auth-side p { color: #cfe0dc; margin: 0; }
.auth-form { padding: 40px 36px; }
.auth-form h1 { font-size: 26px; margin-bottom: 4px; }
.auth-form .sub { color: var(--muted); margin: 0 0 24px; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 18px; font-size: 15px; }
.auth-switch a { color: var(--accent); font-weight: 700; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 46px; }
.pw-wrap button { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 6px; }

/* Account */
.account-layout { display: grid; grid-template-columns: 280px 1fr; gap: 26px; padding: 32px 0 56px; align-items: start; }
.profile-card { text-align: center; }
.avatar {
  width: 86px; height: 86px; border-radius: 28px; margin: 0 auto 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2a1d05; font-size: 36px; font-weight: 800;
  box-shadow: 0 14px 30px -14px var(--gold);
}
.profile-card h3 { justify-content: center; margin-bottom: 2px; }
.profile-card .muted { color: var(--muted); font-size: 14px; word-break: break-all; }
.acc-tabs { display: grid; gap: 4px; margin-top: 18px; text-align: right; }
.acc-tabs a, .acc-tabs button {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 0; background: none; width: 100%; font-size: 15px; transition: .2s;
}
.acc-tabs a:hover, .acc-tabs button:hover { background: var(--surface-2); }
.acc-tabs a.active { background: var(--brand); color: #fff; }
.acc-tabs .danger { color: var(--danger); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: right; font-size: 13.5px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .2s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .thumb { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; background: var(--bg-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill-info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.pill-bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }

/* ---------- Checkout ---------- */
.steps { display: flex; justify-content: center; gap: 0; margin: 0 auto; max-width: 520px; padding: 6px 0 0; }
.steps .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); position: relative; }
.steps .st::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.steps .st:first-child::before { display: none; }
.steps .st i { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); font-style: normal; font-weight: 800; }
.steps .st.done i, .steps .st.on i { background: var(--brand); border-color: var(--brand); color: #fff; }
.steps .st.done::before, .steps .st.on::before { background: var(--brand); }
.steps .st.on { color: var(--ink); font-weight: 700; }

.cc {
  position: relative; aspect-ratio: 1.586; max-width: 380px; border-radius: 22px; padding: 22px 24px; color: #fff; margin: 0 auto 22px;
  background: radial-gradient(120% 120% at 100% 0%, #2b8b64 0%, transparent 50%), linear-gradient(135deg, #145a42 0%, #0a2a1f 100%);
  box-shadow: 0 30px 50px -25px rgba(0,0,0,.6); overflow: hidden; direction: ltr; display: flex; flex-direction: column; justify-content: space-between;
  font-family: "Courier New", monospace;
}
.cc::before { content: ""; position: absolute; inset: 0; background: var(--pattern); filter: brightness(2.2); opacity: .6; }
.cc::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,193,78,.35), transparent); left: -60px; bottom: -110px; }
.cc > * { position: relative; z-index: 1; }
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-chip { width: 46px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #f6d27a, #c99528); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.cc-brand { font-family: var(--font); font-weight: 800; font-size: 20px; letter-spacing: 1px; font-style: italic; }
.cc-num { font-size: clamp(17px, 4.3vw, 23px); letter-spacing: 3px; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.cc-bottom { display: flex; justify-content: space-between; font-size: 13px; text-transform: uppercase; gap: 12px; }
.cc-bottom small { display: block; opacity: .6; font-size: 10px; letter-spacing: 1px; }
.test-note { display: flex; gap: 10px; align-items: flex-start; }

.mini-items { display: grid; gap: 12px; margin-bottom: 14px; max-height: 300px; overflow: auto; }
.mini-item { display: flex; gap: 12px; align-items: center; }
.mini-item .mi-img { position: relative; }
.mini-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--bg-2); }
.mini-item .mi-qty { position: absolute; top: -6px; left: -6px; background: var(--brand); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; font-size: 12px; display: grid; place-items: center; border: 2px solid var(--surface); }
.mini-item .mi-name { flex: 1; font-size: 14.5px; line-height: 1.5; }
.mini-item .mi-price { font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* ---------- Invoice ---------- */
.success-hero { text-align: center; padding: 40px 0 10px; }
.success-ic {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  background: var(--ok); color: #fff; box-shadow: 0 0 0 12px color-mix(in srgb, var(--ok) 15%, transparent), 0 0 0 26px color-mix(in srgb, var(--ok) 7%, transparent);
  animation: pop .7s var(--ease) both;
}
.success-ic .ic { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .35s var(--ease) forwards; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.12); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-hero h1 { font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 4px; }
.success-hero p { color: var(--muted); margin: 0; }
.invoice { max-width: 860px; margin: 26px auto 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.inv-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 26px 30px; background: var(--brand); color: #fff; position: relative; overflow: hidden; flex-wrap: wrap; }
.inv-head::before { content: ""; position: absolute; inset: 0; background: var(--pattern); filter: brightness(2.2); opacity: .5; }
.inv-head > * { position: relative; }
.inv-head .logo-text small { color: #c9d6d2; }
.inv-meta { text-align: left; font-size: 14px; color: #d9e7e3; }
.inv-meta b { display: block; font-size: 22px; color: var(--gold-2); direction: ltr; }
.inv-body { padding: 26px 30px; }
.inv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.inv-grid > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-size: 14.5px; }
.inv-grid h5 { margin: 0 0 6px; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.inv-grid h5 .ic { color: var(--gold); }
.inv-totals { max-width: 340px; margin-inline-start: auto; margin-top: 14px; }
.inv-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 30px 28px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .shop-layout .grid { grid-template-columns: repeat(2, 1fr); }
  .hide-md { display: none; }
  .icon-btn.with-label { padding: 0 10px; }
}
@media (max-width: 900px) {
  .search select { display: none; }
  .product-wrap, .cart-layout, .account-layout, .promo { grid-template-columns: 1fr; }
  .product-gallery, .sticky-panel, .sidebar { position: static; }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar .side-cats { display: flex; overflow-x: auto; gap: 6px; }
  .sidebar .side-cats a { white-space: nowrap; border: 1px solid var(--line); }
  .features-in { grid-template-columns: repeat(2, 1fr); }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-side { min-height: 200px; padding: 30px; }
  .auth-side .big-mark { width: 60px; height: 60px; top: 24px; right: 24px; }
  .inv-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .only-sm { display: flex !important; }
  .hide-sm { display: none !important; }
  .header-in { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
  .logo { order: 1; margin-inline-end: auto; }
  .logo-text small { display: none; }
  .logo-text b { font-size: 19px; }
  .logo img { width: 40px; height: 40px; }
  #menuBtn { order: 0; }
  .header-actions { order: 2; gap: 6px; }
  .icon-btn { min-width: 40px; height: 40px; }
  .icon-btn.with-label span { display: none; }
  .search { order: 3; flex-basis: 100%; }
  .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  body.nav-open .header { z-index: 80; }
  .catnav {
    position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 86vw; background: var(--surface); z-index: 70;
    transform: translateX(105%); transition: transform .4s var(--ease); border: 0; box-shadow: var(--shadow-lg); overflow-y: auto;
  }
  .catnav.open { transform: none; }
  .catnav-in { flex-direction: column; overflow: visible; padding: 16px; gap: 4px; }
  .catnav a { padding: 12px 14px; font-size: 15.5px; }
  .drawer-head { justify-content: space-between; align-items: center; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 18px; }
  .drawer-foot { flex-direction: column; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  .carousel { aspect-ratio: 4 / 3.4; border-radius: 22px; }
  .slide::after { background: linear-gradient(to top, rgba(8,30,30,.9) 0%, rgba(8,30,30,.4) 55%, rgba(8,30,30,.05) 100%); }
  .slide-content { width: 100%; justify-content: flex-end; padding: 24px 22px 48px; }
  .car-nav { display: none; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-tile { padding: 16px 6px 14px; }
  .cat-ic { width: 52px; height: 52px; border-radius: 16px; }
  .cat-tile b { font-size: 13px; }
  .grid, .shop-layout .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard-body { padding: 10px 12px 12px; }
  .pcard-title { font-size: 14.5px; }
  .price strong { font-size: 15.5px; }
  .btn-add { width: 38px; height: 38px; border-radius: 12px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .promo-stats { grid-template-columns: repeat(3, 1fr); }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item img { width: 72px; height: 72px; }
  .cart-item .ci-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .footer-in { grid-template-columns: 1fr; }
  .auth-form { padding: 28px 22px; }
  .inv-grid { grid-template-columns: 1fr; }
  .inv-head, .inv-body { padding: 20px; }
  .toasts { left: 12px; right: 12px; top: 80px; }
  .toast { max-width: none; }
  .section { padding: 34px 0; }
  .container { padding-inline: 16px; }
}

/* ---------- Print (invoice) ---------- */
@media print {
  .topbar, .header, .footer, .features, .inv-actions, .success-hero, .toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .invoice { box-shadow: none; border: 0; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
.tbl td { white-space: nowrap; }

/* ---------- Overflow fixes (mobile) ---------- */
html, body { max-width: 100%; overflow-x: clip; }
.shop-layout > *, .cart-layout > *, .account-layout > *, .product-wrap > *, .grid > *, .adm-grid-2 > *, .adm-grid-form > *, .adm-main { min-width: 0; }
.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shop-layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sidebar { min-width: 0; }
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-layout .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 20px; }
  .sidebar { padding: 14px; }
  .sidebar h3 { margin-bottom: 8px; }
  .sidebar .side-cats { scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
  .sidebar .side-cats::-webkit-scrollbar { display: none; }
}
@media (max-width: 760px) {
  .grid, .shop-layout .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .page-hero { padding: 22px 0 20px; }
}


/* ======================= v2 ======================= */
.logo img { border-radius: 14px; background: #fcf5eb; object-fit: cover; box-shadow: 0 6px 16px -8px rgba(20,90,66,.5); }
.logo:hover img { transform: rotate(-4deg) scale(1.04); }
.logo-text b { color: var(--brand); }
[data-theme="dark"] .logo-text b { color: var(--ink); }
.logo-light .logo-text b { color: #fff; }
.footer-logo img { width: 104px; height: auto; border-radius: 18px; background: #fcf5eb; padding: 8px; margin-bottom: 14px; }
.money { unicode-bidi: isolate; white-space: nowrap; }
.toasts { top: 90px; }

/* currency picker */
.cur-pick { position: relative; }
.cur-pick summary { list-style: none; cursor: pointer; gap: 6px; padding: 0 12px; font-size: 13.5px; }
.cur-pick summary::-webkit-details-marker { display: none; }
.cur-pick summary b { letter-spacing: .5px; }
.cur-pick[open] summary { border-color: var(--gold); color: var(--gold); }
.cur-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; z-index: 90;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow-lg);
  animation: toastIn .25s var(--ease) both;
}
.cur-menu small { display: block; color: var(--muted); font-size: 12.5px; padding: 4px 10px 6px; }
.cur-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 14.5px; }
.cur-menu a:hover { background: var(--surface-2); }
.cur-menu a.on { background: var(--gold-soft); }
.cur-menu a .ic { margin-inline-start: auto; color: var(--brand-2); }
.cur-menu em { font-style: normal; color: var(--muted); font-size: 12px; margin-inline-start: 6px; }
.cur-sign { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: var(--gold-2); font-weight: 800; font-size: 14px; }
.drawer-cur { display: flex; gap: 6px; padding: 4px 0 10px; }
.drawer-cur a { flex: 1; justify-content: center; border: 1px solid var(--line) !important; font-weight: 700; }
.drawer-cur a.on { background: var(--brand); color: #fff; }
.cur-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; display: flex; gap: 6px; align-items: center; }
.cur-hint { font-size: 13px; color: var(--muted); }

/* nav */
.catnav a.nav-special { color: var(--gold); font-weight: 700; }
.catnav a.nav-special .ic { color: var(--gold); }
.catnav a.nav-special.active { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2a1d05; }
.catnav a.nav-special.active .ic { color: #2a1d05; }
@media (max-width: 760px) {
  .catnav a.sub { padding: 8px 14px; padding-inline-start: 40px; font-size: 14.5px; color: var(--muted); }
  .cur-pick summary b { display: none; }
  .cur-pick summary { padding: 0; }
  .cur-menu { left: -90px; }
  .toasts { top: 70px; }
}

/* ===== Kurdistan cities banner ===== */
.cities { padding: 22px 0 0; }
.cities-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cities-head h2 { font-size: clamp(17px, 2vw, 22px); margin: 0; color: var(--ink-2); }
.eyebrow-sm { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gold); font-weight: 700; }
.cities-art { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); line-height: 0; }
.cities-art svg { width: 100%; height: auto; display: block; }
.cs-sky1 { stop-color: #fbefd5; } .cs-sky2 { stop-color: #f6dfb6; }
.cs-sun { fill: #e9b44c; } .cs-rays { transform-origin: 600px 70px; animation: spin 60s linear infinite; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.cs-birds { stroke: #6b5a3a; }
.cs-far { fill: #e3c9a0; } .cs-mid { fill: #d7b483; }
.cs-hill { fill: #8fb59a; }
.cs-bld { fill: #145a42; stroke: #145a42; }
.cs-win { fill: #f2cf86; }
.cs-line { stroke: #c9973f; }
.cs-pole { stroke: #145a42; }
.cs-dia { fill: #c9973f; }
.cs-ground { fill: #0f4734; }
.cs-label { fill: #f5e3bd; font-family: var(--font); font-size: 17px; font-weight: 700; }
.cs-trunk { stroke: #6b4a2a; } .cs-leaf { fill: #2f8b57; }
.cs-flag { transform-origin: 363px 70px; animation: wave 3s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-4deg) scaleX(.94); } }
.cs-fire path { fill: #f28c28; transform-box: fill-box; transform-origin: 50% 100%; animation: flick 1.1s ease-in-out infinite alternate; }
.cs-fire .f2 { fill: #f6c445; animation-delay: .3s; } .cs-fire .f3 { fill: #e85d2a; animation-delay: .6s; }
@keyframes flick { 0% { transform: scale(1, 1); } 50% { transform: scale(.9, 1.15); } 100% { transform: scale(1.05, .9); } }
[data-theme="dark"] .cs-sky1 { stop-color: #0d2a22; } [data-theme="dark"] .cs-sky2 { stop-color: #173d31; }
[data-theme="dark"] .cs-far { fill: #1d4a3b; } [data-theme="dark"] .cs-mid { fill: #225745; }
[data-theme="dark"] .cs-hill { fill: #2a6a50; }
[data-theme="dark"] .cs-bld { fill: #071a14; stroke: #071a14; } [data-theme="dark"] .cs-pole { stroke: #071a14; }
[data-theme="dark"] .cs-ground { fill: #04110c; }
[data-theme="dark"] .cs-birds { stroke: #9fc4b4; }
.cities-chips { display: none; }
@media (max-width: 760px) {
  .cities { padding-top: 14px; }
  .cities-head h2 { font-size: 15.5px; }
  .cities-art { border-radius: 18px; }
  .cs-label, .cs-dia { display: none; }
  .cities-chips { display: flex; gap: 6px; justify-content: space-between; margin-top: 8px; }
  .cities-chips span { flex: 1; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 2px; white-space: nowrap; }
  .cities-chips i { display: inline-block; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); margin-inline-end: 4px; vertical-align: middle; }
}

/* categories: 9 tiles → centered rows */
.cat-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cat-tile { flex: 0 0 calc((100% - 4 * 14px) / 5); }
@media (max-width: 1100px) { .cat-tile { flex-basis: calc((100% - 3 * 14px) / 4); } }
@media (max-width: 760px) { .cat-grid { gap: 10px; } .cat-tile { flex-basis: calc((100% - 2 * 10px) / 3); } }

/* product badges & options */
.badge-opt { position: absolute; bottom: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.92); color: #145a42; }
.pcard-foot a.btn-add { display: grid; place-items: center; }
.opt-group { margin-bottom: 18px; }
.opt-group.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.opt-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.opt-label span { color: var(--danger); }
.opt-label em { font-style: normal; color: var(--accent); font-weight: 700; margin-inline-start: 6px; }
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; transition: .2s var(--ease); }
.opt span:hover { border-color: var(--gold); }
.opt input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px var(--brand); }
.opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.buy-form .buy-row { margin-top: 6px; }
.mini-item small, .muted-sm { display: block; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.ci-opts { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 1px 10px; border-radius: 999px; margin-bottom: 4px; }

/* shop sub-categories */
.side-cats a.side-sub { padding-inline-start: 34px; font-size: 13.5px; color: var(--muted); }
.side-cats a.side-sub.active { color: #fff; }
.sub-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sub-chips a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px; transition: .2s; }
.sub-chips a .ic { color: var(--c, var(--gold)); }
.sub-chips a em { font-style: normal; font-size: 12px; background: var(--bg-2); border-radius: 999px; padding: 0 8px; color: var(--muted); }
.sub-chips a:hover { border-color: var(--c, var(--gold)); }
.sub-chips a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.sub-chips a.on .ic { color: var(--gold-2); }
@media (max-width: 900px) { .sidebar .side-cats a.side-sub { display: none; } }
@media (max-width: 760px) { .sub-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .sub-chips a { white-space: nowrap; } }

/* glass button on dark promo */
.btn-glass { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.18); }
.hero-sub { color: var(--muted); margin: 6px 0 0; max-width: 680px; }

/* payment */
.pay-steps { display: grid; gap: 18px; }
.pay-step { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; }
.pay-num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--gold-2); font-weight: 800; }
.pay-body p { margin: 4px 0 10px; }
.pay-amount { color: var(--accent); font-size: 18px; }
.pay-card {
  border-radius: 18px; padding: 6px 18px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #2b8b64 0%, transparent 50%), linear-gradient(135deg, #145a42, #0a2a1f);
}
.pay-card::before { content: ""; position: absolute; inset: 0; background: var(--pattern); filter: brightness(2.2); opacity: .45; }
.pay-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.12); flex-wrap: wrap; }
.pay-row:last-child { border-bottom: 0; }
.pay-row small { color: #b9d6ca; min-width: 110px; font-size: 13.5px; }
.pay-row b { font-size: 16.5px; }
.pay-row b.ltr { letter-spacing: 1px; color: var(--gold-2); font-size: 18px; }
.btn-copy { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.btn-copy:hover { background: var(--gold); color: #2a1d05; border-color: var(--gold); }
.upload-box { position: relative; display: block; border: 2px dashed var(--line); border-radius: 16px; padding: 20px; text-align: center; background: var(--surface-2); transition: .2s; cursor: pointer; }
.upload-box:hover { border-color: var(--gold); }
.upload-box.err { border-color: var(--danger); }
.upload-box.has-file { border-style: solid; border-color: var(--ok); }
.upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-box .ic { color: var(--gold); margin: 0 auto 6px; }
.upload-box b { display: block; word-break: break-all; }
.upload-box small { color: var(--muted); display: block; }
.preview { width: 100%; border-radius: 14px; margin-top: 12px; object-fit: contain; max-height: 280px; background: var(--bg-2); }
.review-badge { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; padding: 6px 16px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); font-weight: 700; font-size: 14.5px; }

/* special order */
.how { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: h; }
.how li { counter-increment: h; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; }
.how li::before { content: counter(h); grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 800; }
.how span { color: var(--muted); font-size: 14px; }
@media (min-width: 761px) { .catnav-in { gap: 2px; } .catnav a { padding: 7px 11px; font-size: 14px; } }
@media (max-width: 760px) {
  .header-in { column-gap: 6px; }
  .header-actions { gap: 4px; }
  .header-actions .icon-btn, #menuBtn { min-width: 36px; height: 36px; padding: 0 6px; border-radius: 12px; }
  .logo { gap: 8px; }
  .logo img { width: 38px; height: 38px; border-radius: 11px; }
  .logo-text b { font-size: 17px; }
}
@media (max-width: 370px) { .logo-text { display: none; } }

/* ===== v3: Kurdistan photo banner + logo sizing ===== */
.cities-photo { position: relative; margin: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--bg-2); }
.cities-photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 520px; object-fit: cover; object-position: center 45%; display: block; }
.cities-photo figcaption {
  position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 40px 16px 16px;
  background: linear-gradient(to top, rgba(6, 26, 18, .75), transparent);
}
.cities-photo figcaption span { color: #fff; font-weight: 700; font-size: 14.5px; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); }
@media (max-width: 760px) {
  .cities-photo { border-radius: 18px; }
  .cities-photo img { max-height: none; }
  .cities-photo figcaption { gap: 4px; padding: 26px 8px 8px; }
  .cities-photo figcaption span { font-size: 12px; padding: 3px 9px; }
}
/* logo keeps its own proportions everywhere */
.logo img, .footer-logo img, .adm-login-logo img, .auth-side .big-mark, .inv-head .logo img { object-fit: contain; }
.logo img { width: auto; height: 50px; aspect-ratio: 1 / 1; padding: 2px; }
.footer-logo img { width: 110px; height: auto; aspect-ratio: auto; }
.adm-login-logo img { width: 140px; height: auto; }
@media (max-width: 760px) { .logo img { height: 40px; width: 40px; } }

/* switch (admin) */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; top: 3px; right: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--brand-2); }
.switch input:checked + span::before { transform: translateX(-20px); }
.zone-tbl td { padding: 8px; }
.zone-tbl .input { width: 100%; min-width: 80px; padding: 9px 12px; }
.zone-tbl td:nth-child(2) .input { min-width: 170px; }
.zone-tbl .z-num { color: var(--muted); width: 30px; }
.zone-tbl .z-conv { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ======================= v4 ======================= */
/* header full logo */
.logo img.logo-full { height: 64px; width: auto; aspect-ratio: auto; padding: 0; background: transparent; box-shadow: none; border-radius: 10px; object-fit: contain; }
[data-theme="dark"] .logo img.logo-full { background: #fcf5eb; padding: 3px 6px; }
.logo:hover img.logo-full { transform: none; }
@media (max-width: 760px) { .logo img.logo-full { height: 46px; width: auto; } }
/* currency button shows the chosen currency symbol */
.cur-btn .cur-sym { min-width: 22px; height: 22px; padding: 0 4px; border-radius: 7px; display: inline-grid; place-items: center; background: var(--brand); color: var(--gold-2); font-weight: 800; font-size: 13px; line-height: 1; }
@media (max-width: 760px) { .cur-btn .cur-sym { background: transparent; color: inherit; font-size: 15px; } }
.lang-pick .cur-sign { font-size: 12px; letter-spacing: .5px; }
.drawer-cur + .drawer-cur { padding-top: 0; }

/* weight */
.pcard-weight, .ci-weight { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.ci-weight { display: flex; margin-bottom: 2px; }
.p-weight { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 5px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; }
.p-weight .ic { color: var(--gold); }
.weight-box { margin: -4px 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.wb-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14.5px; }
.wb-row .ic { color: var(--gold); }
.wb-calc { margin-inline-start: auto; color: var(--accent); font-weight: 700; font-size: 13.5px; }
.minkg-alert { margin-top: 12px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); }
.mk-msg { display: flex; gap: 8px; align-items: flex-start; font-weight: 700; color: #8a5300; line-height: 1.7; }
[data-theme="dark"] .mk-msg { color: var(--gold-2); }
.mk-msg .ic { flex-shrink: 0; margin-top: 4px; }
.mk-math { margin: 8px 0 10px; font-size: 14px; color: var(--ink-2); text-align: center; background: var(--surface); border-radius: 10px; padding: 6px; }
.mk-check { margin: 0; font-weight: 700; align-items: flex-start; }
.mk-check input { margin-top: 4px; flex-shrink: 0; width: 20px; height: 20px; accent-color: var(--brand-2); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
button[disabled] { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }

/* ===== English (left-to-right) ===== */
html[lang="en"] body { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Rabar", sans-serif; }
[dir="ltr"] .cart-count { left: auto; right: -7px; }
[dir="ltr"] .slide-content { right: auto; left: 0; }
[dir="ltr"] .slide::after { background: linear-gradient(to right, rgba(8, 30, 30, .82) 0%, rgba(8, 30, 30, .45) 45%, rgba(8, 30, 30, 0) 75%); }
[dir="ltr"] .car-prev { right: auto; left: 18px; }
[dir="ltr"] .car-next { left: auto; right: 18px; }
[dir="ltr"] .car-progress { right: auto; left: 0; }
[dir="ltr"] .cur-menu { left: auto; right: 0; }
[dir="ltr"] .pw-wrap button { left: auto; right: 8px; }
[dir="ltr"] .pw-wrap input { padding-left: 16px; padding-right: 46px; }
[dir="ltr"] .tbl th { text-align: left; }
[dir="ltr"] .inv-meta { text-align: right; }
[dir="ltr"] .steps .st::before { right: auto; left: 50%; }
[dir="ltr"] .auth-side .big-mark { right: auto; left: 34px; }
[dir="ltr"] .mini-item .mi-qty { left: auto; right: -6px; }
[dir="ltr"] .badge-out { left: auto; right: 12px; }
[dir="ltr"] .badge-disc, [dir="ltr"] .badge-opt { right: auto; left: 10px; }
[dir="ltr"] .toasts { left: auto; right: 20px; }
[dir="ltr"] .ltr, [dir="ltr"] [dir="ltr"] { text-align: left; }
[dir="ltr"] .rtl-only { display: none; }
@media (max-width: 760px) {
  [dir="ltr"] .catnav { right: auto; left: 0; transform: translateX(-105%); }
  [dir="ltr"] .catnav.open { transform: none; }
  [dir="ltr"] .slide::after { background: linear-gradient(to top, rgba(8,30,30,.9) 0%, rgba(8,30,30,.4) 55%, rgba(8,30,30,.05) 100%); }
  [dir="ltr"] .toasts { left: 12px; right: 12px; }
  [dir="ltr"] .cur-menu { right: -60px; }
}
@media (max-width: 760px) { .cur-menu { left: -60px; } }
/* v5: sold by weight */
.per-kg { font-size: .7em; font-weight: 700; color: var(--muted); }
.p-weight.bw { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); font-weight: 700; }
.amount-pick { display: flex; flex-direction: column; gap: 4px; min-width: 230px; }
.amount-pick label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.amount-pick select, .amount-sel { padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--gold); background: var(--surface); font-weight: 700; outline: none; }
.amount-sel { padding: 7px 10px; border-radius: 12px; font-size: 14px; max-width: 140px; }
.buy-row:has(.amount-pick) { align-items: flex-end; }
