/* ==========================================================================
   هانا پروتئین | استایل اصلی
   فونت و تمام منابع به صورت محلی لود می‌شوند، هیچ CDN یا منبع اینترنتی ندارد.
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --green:        #14503c;
  --green-dark:   #0d3a2a;
  --green-soft:   #e7efe9;
  --amber:        #bd6a2b;
  --amber-soft:   #f8ece1;
  --paper:        #faf8f3;
  --surface:      #ffffff;
  --ink:          #19201c;
  --muted:        #5e6a62;
  --line:         #e3ded2;
  --danger:       #a8321f;
  --radius:       14px;
  --radius-sm:    9px;
  --shadow:       0 1px 2px rgba(25,32,28,.05), 0 8px 24px -12px rgba(25,32,28,.18);
  --shadow-lg:    0 24px 60px -28px rgba(13,58,42,.45);
  --maxw:         1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--ink);
  background: var(--paper);
  direction: rtl;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--amber); }
h1, h2, h3, h4 { line-height: 1.5; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.2px; }
h1 { font-size: clamp(1.65rem, 1.1rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 1rem + 1.1vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1.1em; }
ul, ol { padding-right: 1.3em; margin: 0 0 1.1em; }
li { margin-bottom: .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }
small { font-size: .82rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }

/* ---------- نوار نسخه نمایشی ---------- */
.demobar {
  background: #2b2b28;
  color: #f1ede3;
  font-size: .8rem;
  text-align: center;
  padding: 7px 14px;
  line-height: 1.7;
}
.demobar b { color: #f0c178; font-weight: 600; }

/* ---------- هدر ---------- */
.topline {
  background: var(--green-dark);
  color: #cfe0d6;
  font-size: .8rem;
  padding: 6px 0;
}
.topline .container { display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.topline a { color: #cfe0d6; }
.topline a:hover { color: #fff; }
.topline-contact { display: flex; gap: 18px; flex-wrap: wrap; }

.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250,248,243,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; }
.brand-txt strong { display: block; font-size: 1.02rem; font-weight: 700; color: var(--green-dark); line-height: 1.4; }
.brand-txt span { display: block; font-size: .72rem; color: var(--muted); line-height: 1.4; }

.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
  padding: 8px 13px; border-radius: 8px; font-size: .92rem; font-weight: 500; color: var(--ink);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--green-soft); color: var(--green-dark); }
.nav a.is-active { background: var(--green); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.cartbtn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--green); color: #fff; border-radius: 10px;
  padding: 9px 14px; font-size: .9rem; font-weight: 600;
}
.cartbtn:hover { background: var(--green-dark); color: #fff; }
.cartbtn .badge {
  background: var(--amber); color: #fff; border-radius: 20px;
  min-width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; padding: 0 5px;
}
.navtoggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 9px;
  width: 42px; height: 42px; cursor: pointer; align-items: center; justify-content: center;
  color: var(--ink);
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 11px; border: 1px solid transparent;
  font-family: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: transform .12s, background .15s, color .15s, border-color .15s;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: #a3571f; color: #fff; }
.btn-ghost { background: transparent; color: var(--green-dark); border-color: var(--line); }
.btn-ghost:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .86rem; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- هیرو ---------- */
.hero { background: linear-gradient(180deg, #f1f5f0 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 60px 0 56px; }
.hero h1 { margin-bottom: .5em; }
.hero h1 span { color: var(--green); }
.hero-lead { font-size: 1.05rem; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.45rem; color: var(--green-dark); line-height: 1.4; }
.hero-stats div span { font-size: .82rem; color: var(--muted); }
.hero-art { position: relative; }
.hero-art img { width: 100%; filter: drop-shadow(0 30px 40px rgba(13,58,42,.18)); }

/* ---------- نوارهای اطمینان ---------- */
.feature-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px;
}
.feature svg { color: var(--amber); margin-bottom: 10px; }
.feature strong { display: block; margin-bottom: 4px; font-size: .97rem; }
.feature p { font-size: .86rem; color: var(--muted); margin: 0; line-height: 1.85; }

/* ---------- عنوان بخش ---------- */
.sechead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.sechead h2 { margin: 0; }
.sechead p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.eyebrow {
  display: inline-block; font-size: .76rem; font-weight: 600; letter-spacing: .4px;
  color: var(--amber); background: var(--amber-soft); border-radius: 20px; padding: 4px 12px; margin-bottom: 12px;
}

/* ---------- کارت محصول ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: #cfd8cf; box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { background: var(--green-soft); padding: 18px; position: relative; }
.card-media img { width: 100%; aspect-ratio: 4/3; object-fit: contain; }
.card-cat {
  position: absolute; top: 12px; inset-inline-start: 12px;
  background: rgba(255,255,255,.9); color: var(--green-dark);
  font-size: .72rem; font-weight: 600; border-radius: 20px; padding: 3px 10px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: .98rem; margin-bottom: 6px; line-height: 1.75; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--green); }
.card-short { font-size: .83rem; color: var(--muted); line-height: 1.85; margin-bottom: 14px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 13px; }
.price { font-weight: 700; color: var(--green-dark); font-size: 1rem; }
.price small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }

/* ---------- فیلتر دسته ---------- */
.chips { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 20px; padding: 7px 16px; font-size: .87rem; font-weight: 500;
}
.chip:hover { border-color: var(--green); color: var(--green-dark); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- صفحه داخلی ---------- */
.pagehead { background: var(--green-dark); color: #e8f0ea; padding: 34px 0 32px; }
.pagehead h1 { color: #fff; margin: 0 0 6px; }
.pagehead p { margin: 0; color: #b7cdc0; font-size: .93rem; max-width: 62ch; }
.crumb { font-size: .8rem; color: #9dbaab; margin-bottom: 12px; }
.crumb a { color: #9dbaab; }
.crumb a:hover { color: #fff; }
.crumb span { opacity: .5; margin: 0 6px; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.panel + .panel { margin-top: 20px; }

/* ---------- صفحه محصول ---------- */
.product-top { display: grid; grid-template-columns: 1fr 1.05fr; gap: 42px; align-items: start; }
.product-gallery { background: var(--green-soft); border-radius: var(--radius); padding: 30px; border: 1px solid var(--line); }
.product-gallery img { width: 100%; }
.product-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tag { font-size: .76rem; background: var(--green-soft); color: var(--green-dark); border-radius: 20px; padding: 4px 12px; font-weight: 500; }
.tag-amber { background: var(--amber-soft); color: #92501d; }
.price-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.price-box .big { font-size: 1.6rem; font-weight: 700; color: var(--green-dark); }
.price-box .per { color: var(--muted); font-size: .86rem; }

.qtyrow { display: flex; gap: 10px; align-items: stretch; margin-top: 16px; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.qty button {
  width: 42px; height: 46px; border: 0; background: none; font-size: 1.2rem; cursor: pointer;
  color: var(--green-dark); font-family: inherit;
}
.qty button:hover { background: var(--green-soft); }
.qty input {
  width: 62px; height: 46px; border: 0; text-align: center; font-family: inherit; font-size: 1rem;
  background: none; color: var(--ink); -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table th, .spec-table td { text-align: right; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 38%; font-weight: 500; color: var(--muted); background: var(--paper); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button {
  border: 0; background: none; font-family: inherit; font-size: .93rem; font-weight: 600; color: var(--muted);
  padding: 11px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.is-active { color: var(--green-dark); border-bottom-color: var(--green); }
.tabpane { display: none; }
.tabpane.is-active { display: block; }

/* ---------- سبد خرید و جدول‌ها ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: right; font-size: .9rem; vertical-align: middle; }
.table th { font-weight: 600; color: var(--muted); font-size: .84rem; background: var(--paper); }
.table img { width: 62px; border-radius: 9px; background: var(--green-soft); padding: 5px; }
.cartline { display: flex; gap: 13px; align-items: center; }
.cartline strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.7; }
.cartline span { font-size: .78rem; color: var(--muted); }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 92px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: .9rem; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.05rem; font-weight: 700; color: var(--green-dark); }

/* ---------- فرم ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 500; margin-bottom: 6px; }
.field label i { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px;
  font-family: inherit; font-size: .93rem; background: var(--surface); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,80,60,.1);
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.9; }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.radio-card { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--line); border-radius: 11px; padding: 14px; cursor: pointer; background: var(--surface); margin-bottom: 10px; }
.radio-card:hover { border-color: var(--green); }
.radio-card input { margin-top: 7px; accent-color: var(--green); }
.radio-card strong { display: block; font-size: .92rem; }
.radio-card span { font-size: .8rem; color: var(--muted); line-height: 1.8; }

/* ---------- پیام‌ها ---------- */
.alert { border-radius: 11px; padding: 13px 16px; font-size: .88rem; margin-bottom: 18px; border: 1px solid; line-height: 1.85; }
.alert-ok { background: #eaf3ec; border-color: #c3ddcb; color: #1d5134; }
.alert-warn { background: #fdf3e4; border-color: #f0d9b5; color: #845213; }
.alert-err { background: #fbeceb; border-color: #f0c9c4; color: #8e2a1b; }

/* ---------- پرسش و پاسخ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: .96rem; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--amber); font-size: 1.3rem; font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); font-size: .9rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------- نوار پایانی دعوت ---------- */
.cta {
  background: var(--green-dark); color: #e8f0ea; border-radius: var(--radius);
  padding: 34px 36px; display: flex; gap: 26px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { margin: 0; color: #b7cdc0; font-size: .92rem; }

/* ---------- فوتر ---------- */
.footer { background: #11201a; color: #a9bdb2; margin-top: 60px; padding: 46px 0 0; font-size: .88rem; }
.footer a { color: #a9bdb2; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 34px; padding-bottom: 36px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer-brand { display: flex; gap: 11px; align-items: center; margin-bottom: 14px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand strong { color: #fff; font-size: 1rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: .8rem;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ---------- مراحل سفارش ---------- */
.steps { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--muted); }
.step b { width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.step.is-active { color: var(--green-dark); font-weight: 600; }
.step.is-active b { background: var(--green); color: #fff; }
.step.is-done b { background: var(--green-soft); color: var(--green-dark); }
.step i { color: var(--line); font-style: normal; }

/* ---------- درگاه نمایشی ---------- */
.gateway { max-width: 520px; margin: 50px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gateway-head { background: #243b47; color: #fff; padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; }
.gateway-head strong { font-size: .95rem; }
.gateway-body { padding: 24px 22px; }
.gateway-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .89rem; }
.gateway-row:last-of-type { border-bottom: 0; }

/* ---------- جعبه موفقیت ---------- */
.success-box { text-align: center; max-width: 680px; margin-inline: auto; }
.success-mark { width: 74px; height: 74px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.ref-badge { display: inline-block; background: var(--paper); border: 1px dashed var(--green); border-radius: 11px; padding: 11px 22px; font-size: 1.15rem; font-weight: 700; color: var(--green-dark); letter-spacing: 1px; direction: ltr; }

/* ---------- واکنش‌گرایی: تبلت ---------- */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; gap: 30px; padding: 40px 0; }
  .hero-art { max-width: 420px; margin-inline: auto; }
  .feature-row { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .product-top { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .summary { position: static; }
}

/* ---------- واکنش‌گرایی: موبایل ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .section { padding: 40px 0; }
  .topline { display: none; }
  .header-in { height: 64px; gap: 10px; }
  .navtoggle { display: inline-flex; }
  .nav {
    position: fixed; inset-inline: 0; top: 64px; background: var(--surface);
    flex-direction: column; gap: 0; padding: 10px 16px 18px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none; max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; border-radius: 9px; font-size: .96rem; }
  .brand-txt span { display: none; }
  .cartbtn span.lbl { display: none; }
  .cartbtn { padding: 9px 12px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta { padding: 26px 22px; }
  .panel { padding: 20px 18px; }
  .pagehead { padding: 26px 0 24px; }
  /* جدول‌ها در موبایل به صورت کارت نمایش داده می‌شوند */
  .table-responsive thead { display: none; }
  .table-responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .table-responsive td { display: flex; justify-content: space-between; gap: 14px; border: 0; padding: 5px 0; }
  .table-responsive td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; }
  .table-responsive td.full { display: block; }
  .table-responsive td.full::before { content: none; }
}

/* ---------- چاپ ---------- */
@media print {
  .header, .footer, .topline, .demobar, .btn, .navtoggle, .cta { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .panel { border: 1px solid #ccc; box-shadow: none; }
}
