/* اسکریدیار — استایل اصلی (موبایل‌اول، راست‌چین) */

@font-face { font-family: 'B Nazanin'; src: url('../fonts/BNazaninPlus-Regular.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'B Nazanin'; src: url('../fonts/BNazaninPlus-Bold.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'B Nazanin'; src: url('../fonts/BNazaninPlus-Black.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }

:root {
  --charcoal: #1B1E21;
  --yellow: #F2A900;
  --cream: #F3F0EA;
  --sand: #E7E2D9;
  --line: #DDD7CC;
  --white: #FFFFFF;
  --green: #1F7A45;
  --laser: #2E9E5B;
  --honey: #7A4F00;
  --text: #1B1E21;
  --text-2: #3F3B35;
  --muted: #5E5A53;
  --muted-dark: #D6D1C7;
  --radius: 12px;
  --radius-lg: 18px;
  --wrap: 1280px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'B Nazanin', Tahoma, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  background: var(--cream);
  color: var(--text);
  padding-bottom: 72px; /* جای نوار ثابت پایین موبایل */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--honey); }
a:hover { color: var(--charcoal); }
h1, h2, h3 { line-height: 1.4; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; top: -60px; right: 16px; background: var(--yellow); color: var(--charcoal); padding: 8px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: var(--radius);
  font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--charcoal); color: var(--cream); }
.btn-dark:hover { background: #000; color: var(--cream); }
.btn-yellow { background: var(--yellow); color: var(--charcoal); }
.btn-yellow:hover { background: #ffb800; color: var(--charcoal); }
.btn-outline { background: var(--white); color: var(--charcoal); border-color: var(--charcoal); }
.btn-outline:hover { background: var(--cream); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #17633a; color: #fff; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* نوار بالا */
.topbar { background: var(--charcoal); color: var(--cream); font-size: 15px; display: none; }
.topbar .wrap { display: flex; justify-content: space-between; padding-block: 6px; }
.topbar a { color: var(--yellow); text-decoration: none; }

/* هدر */
.header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--charcoal); }
.logo svg { width: 40px; height: 40px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 24px; font-weight: 900; }
.logo-tag { font-size: 13px; color: var(--muted); display: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--white);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; color: var(--charcoal);
  text-decoration: none; flex-shrink: 0;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.dark { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.cart-count {
  position: absolute; top: -6px; left: -6px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 5px;
  background: var(--yellow); color: var(--charcoal); font-size: 13px; font-weight: 800; line-height: 22px; text-align: center;
}
.cart-count[hidden] { display: none; }
.search { display: flex; align-items: center; gap: 8px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; height: 48px; }
.search svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; height: 46px; font-size: 16px; outline: none; }
.header-search { padding-bottom: 12px; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-login { display: none; }

/* منوی دسته‌ها */
.catnav { background: var(--white); border-bottom: 1px solid var(--line); display: none; }
.catnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; font-size: 16px; font-weight: 700; overflow-x: auto; }
.catnav a { display: block; text-decoration: none; color: var(--charcoal); padding: 12px 0; border-bottom: 3px solid transparent; white-space: nowrap; }
.catnav a:hover, .catnav a[aria-current="page"] { border-bottom-color: var(--yellow); }

/* منوی کشویی موبایل */
.drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(27, 30, 33, .55); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); background: var(--white);
  padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer a.dlink { display: flex; align-items: center; gap: 10px; padding: 10px 8px; min-height: 44px; border-radius: 10px; text-decoration: none; color: var(--charcoal); font-weight: 700; }
.drawer a.dlink:hover { background: var(--cream); }
.drawer a.dlink svg { width: 22px; height: 22px; color: var(--honey); }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; width: 100%; }

/* هیرو */
.hero { padding-block: 28px; display: grid; gap: 24px; }
.hero-text { display: flex; flex-direction: column; gap: 16px; }
.pill { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 15px; font-weight: 700; }
.hero h1 { font-size: 34px; font-weight: 900; }
.mark { background: var(--yellow); padding: 0 8px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero p { margin: 0; font-size: 18px; color: var(--text-2); }
.hero-ctas { display: flex; flex-direction: column; gap: 10px; }
.hero-visual {
  min-height: 240px; border-radius: 20px; background: var(--charcoal); position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 18px;
}
.hero-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hero-visual .laser-line { position: absolute; top: 58%; left: 0; right: 0; height: 3px; background: var(--laser); box-shadow: 0 0 12px var(--laser); }
.hero-visual .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-badge { position: relative; background: var(--cream); border-radius: 14px; padding: 10px 16px; display: flex; flex-direction: column; line-height: 1.6; }
.hero-badge small { font-size: 14px; color: var(--muted); }
.hero-badge strong { font-size: 17px; }

/* بخش‌ها */
.section { padding-block: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 24px; font-weight: 800; }
.section-head a { font-weight: 700; font-size: 16px; white-space: nowrap; }

.machine-box { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.machine-box h2 { font-size: 21px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; color: var(--charcoal); background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; }
.chip:hover, .chip.active { background: var(--charcoal); color: var(--cream); border-color: var(--charcoal); }

.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-card {
  text-decoration: none; color: var(--charcoal); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 110px; transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--charcoal); transform: translateY(-2px); color: var(--charcoal); }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--cream); display: flex; align-items: center; justify-content: center; color: var(--honey); }
.cat-icon svg { width: 28px; height: 28px; }
.cat-name { font-size: 17px; font-weight: 800; line-height: 1.5; }
.cat-desc { font-size: 15px; color: var(--muted); line-height: 1.7; display: none; }

/* کارت محصول */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px; align-items: center;
}
.product-media {
  aspect-ratio: 1; background: var(--sand); border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--honey); overflow: hidden; text-decoration: none;
}
.product-media svg { width: 44%; height: 44%; opacity: .85; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.product-fit { font-size: 14px; color: var(--muted); }
.product-name { font-size: 17px; font-weight: 800; line-height: 1.6; }
.product-name a { color: var(--charcoal); text-decoration: none; }
.product-name a:hover { text-decoration: underline; }
.product-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.price { font-size: 17px; font-weight: 800; }
.price.ask { color: var(--honey); font-size: 16px; }
.add-btn {
  border: 0; border-radius: 10px; background: var(--yellow); color: var(--charcoal); font-weight: 800; cursor: pointer;
  min-width: 44px; min-height: 44px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 16px; text-decoration: none;
}
.add-btn:hover { background: #ffb800; color: var(--charcoal); }
.add-btn.inquiry { background: var(--charcoal); color: var(--cream); }
.add-btn.inquiry:hover { background: #000; color: var(--cream); }
.add-btn svg { width: 20px; height: 20px; }
.add-btn .lbl { display: none; }

/* بسته‌ها */
.bundles { display: grid; gap: 12px; }
.bundle { border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.bundle.dark { background: var(--charcoal); color: var(--cream); }
.bundle.light { background: var(--white); border: 1px solid var(--line); }
.bundle .kicker { font-size: 15px; font-weight: 700; color: var(--honey); }
.bundle.dark .kicker { color: var(--yellow); }
.bundle h2 { font-size: 24px; font-weight: 800; }
.bundle p { margin: 0; color: var(--text-2); }
.bundle.dark p { color: var(--muted-dark); }
.bundle .btn { align-self: stretch; }

/* دلایل اعتماد */
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trust div { border-top: 3px solid var(--charcoal); padding: 14px 4px; display: flex; flex-direction: column; gap: 4px; }
.trust strong { font-size: 18px; font-weight: 800; }
.trust span { font-size: 15px; color: var(--muted); line-height: 1.8; }

/* صفحات داخلی */
.page-head { padding-block: 22px 8px; }
.breadcrumb { font-size: 15px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.page-head h1 { font-size: 30px; font-weight: 900; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }

.shop { display: grid; gap: 16px; padding-bottom: 32px; }
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.filters h2 { font-size: 18px; font-weight: 800; }
.filters select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); padding: 0 12px; }
.filter-list { display: none; list-style: none; margin: 0; padding: 0; }
.filter-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--charcoal); font-weight: 700; }
.filter-list a:hover { background: var(--cream); }
.filter-list a.active { background: var(--charcoal); color: var(--cream); }
.filter-list small { color: inherit; opacity: .7; }
.result-info { font-size: 16px; color: var(--muted); margin-bottom: 10px; }
.empty { background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 28px; text-align: center; }

/* صفحه محصول */
.pdp { display: grid; gap: 20px; padding-bottom: 32px; }
.pdp-media { background: var(--sand); border-radius: 20px; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: var(--honey); overflow: hidden; }
.pdp-media svg { width: 30%; height: 30%; }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info { display: flex; flex-direction: column; gap: 14px; }
.pdp-info h1 { font-size: 28px; font-weight: 900; }
.pdp-info .desc { margin: 0; color: var(--text-2); }
.pdp-price { font-size: 26px; font-weight: 900; }
.pdp-price.ask { color: var(--honey); font-size: 22px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.qty button { width: 44px; height: 46px; border: 0; background: transparent; cursor: pointer; font-size: 22px; font-weight: 800; }
.qty input { width: 52px; height: 46px; border: 0; text-align: center; font-weight: 800; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pdp-actions .btn { flex: 1 1 180px; }
.specs { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.specs th, .specs td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); font-size: 16px; }
.specs th { width: 40%; background: var(--cream); font-weight: 700; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.note { background: #FFF6DC; border: 1px solid #F2D27A; border-radius: var(--radius); padding: 12px 14px; font-size: 16px; }

/* سبد خرید */
.cart-layout { display: grid; gap: 16px; padding-bottom: 32px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.cart-item .product-media { width: 64px; }
.cart-item-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cart-item h3 { font-size: 17px; font-weight: 800; }
.cart-item h3 a { color: var(--charcoal); text-decoration: none; }
.link-btn { background: none; border: 0; color: #A33; cursor: pointer; font-weight: 700; padding: 8px; min-height: 44px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.panel h2 { font-size: 20px; font-weight: 800; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 700; font-size: 16px; }
.field input, .field textarea, .field select { border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); padding: 10px 12px; min-height: 48px; font-size: 16px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--yellow); border-color: var(--yellow); }
.form-msg { font-size: 15px; color: var(--muted); }
.form-err { color: #A33; font-weight: 700; font-size: 15px; }

/* محتوای متنی */
.prose { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 28px; }
.prose h2 { font-size: 22px; font-weight: 800; margin: 18px 0 6px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); }
.service-grid { display: grid; gap: 12px; padding-bottom: 28px; }
.service { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.service h2 { font-size: 21px; font-weight: 800; }
.service p { margin: 0; color: var(--text-2); }
.service .btn { align-self: flex-start; margin-top: 6px; }

/* فوتر */
.footer { background: var(--charcoal); color: var(--muted-dark); margin-top: 24px; font-size: 16px; }
.footer .wrap { display: grid; gap: 24px; padding-block: 32px; }
.footer h2 { color: var(--cream); font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.footer a { color: var(--muted-dark); text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer-brand { font-size: 26px; font-weight: 900; color: var(--cream); }
.copyright { border-top: 1px solid #33373B; text-align: center; padding: 12px var(--gutter); font-size: 14px; color: #8C877E; }

/* نوار ثابت پایین موبایل */
.mobile-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: var(--white); border-top: 1px solid var(--line); padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.mobile-bar .btn { flex: 1; min-height: 48px; }

/* پیام کوتاه */
.toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--charcoal); color: var(--cream); padding: 10px 18px; border-radius: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s; z-index: 90; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast a { color: var(--yellow); margin-right: 8px; }

/* ===== تبلت ===== */
@media (min-width: 640px) {
  .hero-ctas { flex-direction: row; flex-wrap: wrap; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-desc { display: block; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .product-media { border-radius: 0; aspect-ratio: 4 / 3; }
  .product-body { padding: 14px 16px 16px; flex: 1; }
  .product-card { display: flex; flex-direction: column; }
  .product-foot { margin-top: auto; padding-top: 8px; }
  .add-btn .lbl { display: inline; }
  .bundles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bundle .btn { align-self: flex-start; }
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-tag { display: block; }
}

/* ===== دسکتاپ ===== */
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  body { padding-bottom: 0; }
  .mobile-bar, .menu-btn { display: none; }
  .topbar, .catnav { display: block; }
  .header-row { gap: 28px; padding-block: 16px; }
  .header-row .search { flex: 1; height: 52px; }
  .header-search { display: none; }
  .header-login { display: inline-flex; }
  .logo svg { width: 48px; height: 48px; }
  .logo-name { font-size: 26px; }
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; padding-block: 64px 48px; }
  .hero h1 { font-size: 56px; }
  .hero p { font-size: 20px; }
  .hero-visual { min-height: 420px; padding: 28px; border-radius: 24px; }
  .section { padding-block: 36px; }
  .section-head h2 { font-size: 32px; }
  .machine-box { flex-direction: row; align-items: center; gap: 24px; padding: 24px 28px; }
  .machine-box h2 { white-space: nowrap; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .cat-card { padding: 22px; min-height: 170px; }
  .cat-icon { width: 56px; height: 56px; }
  .cat-name { font-size: 19px; }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .shop .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bundle { padding: 36px; }
  .bundle h2 { font-size: 30px; }
  .shop { grid-template-columns: 280px 1fr; align-items: start; }
  .filters { position: sticky; top: 140px; }
  .filters select { display: none; }
  .filter-list { display: block; }
  .pdp { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
  .pdp-info h1 { font-size: 36px; }
  .cart-layout { grid-template-columns: 1fr 380px; align-items: start; }
  .footer .wrap { grid-template-columns: 2fr 1fr 1fr; }
  .page-head h1 { font-size: 40px; }
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toast { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.panel form { display: flex; flex-direction: column; gap: 12px; }
