:root {
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --surface-soft: #f5f8f6;
  --line: #dfe8e2;
  --ok: #81B061;
  --danger: #c63535;
}

html, body {
  background: #f4f9f5;
}

body {
  color: var(--text, #1a1f1c);
}

a {
  color: inherit;
}

.container {
  max-width: 1240px;
}

.site-header.is-solid,
.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(26, 31, 28, 0.06);
}

.header-flex {
  min-height: 78px;
}

.header-search {
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.bottom-nav-link.is-active {
  color: var(--brand);
}

main {
  padding-top: 28px;
}

.btn-primary,
.btn-outline,
.btn,
.call-btn {
  border-radius: 14px;
  font-weight: 700;
}

.btn-primary,
.btn.btn-primary {
  box-shadow: 0 10px 24px rgba(129, 176, 97, 0.24);
}

.btn-primary:hover,
.btn.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline,
.btn.btn-outline {
  border-color: color-mix(in srgb, var(--brand) 45%, #bdd6c2 55%);
  background: transparent;
}

.btn-add {
  border-radius: 12px;
}

.page-header {
  margin-bottom: 1rem;
}

.page-header h1 {
  font-size: clamp(1.35rem, 2.3vw, 2rem);
}

.prose,
.info-box,
.account-card,
.card,
.contact-item,
.plan-card,
.kpi-card,
.dashboard-section,
.checkout-summary,
.checkout-form,
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(32, 40, 34, 0.06);
}

.prose,
.checkout-form,
.dashboard-section {
  padding: 1.15rem;
}

.products-page,
.product-detail-page,
.blog-detail,
.checkout-page,
.dashboard-page {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

/* فاصله از لبه — فروشگاه، رژیم، ابزارها */
.page-products .products-page,
.page-products #main > .container,
.page-diet main > .container,
.page-diet-bmi main > .container,
.page-tools main > .container {
  padding-inline: clamp(1.125rem, 5vw, 1.5rem);
}

.products-header,
.blog-detail-header {
  margin-bottom: 1.4rem;
}

.products-grid {
  gap: 18px;
}

.product-card {
  border-radius: 18px;
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(32, 40, 34, 0.05);
}

.product-card:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line) 65%);
  box-shadow: 0 12px 28px rgba(32, 40, 34, 0.1);
}

.product-card-img,
.product-detail-media img {
  border-radius: 16px 16px 10px 10px;
}

.product-card-body {
  padding: 12px 12px 10px;
}

.product-card-price {
  font-size: 0.9rem;
}

.badge-sale {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  inset-inline-end: auto;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.4rem;
  background: linear-gradient(160deg, #ef6354 0%, #dc2626 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  white-space: nowrap;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.32);
  pointer-events: none;
}

.badge-deli-pick {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--brand);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(45, 74, 50, 0.25);
  white-space: nowrap;
}

.product-detail-layout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.2rem;
}

.product-detail-price {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.blog-card {
  border-radius: 18px;
}

.blog-card .card-body {
  padding: 14px;
}

.auth-box {
  width: 100%;
  margin: 0;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(32, 40, 34, 0.08);
  padding: 1.25rem;
}

.auth-box h1 {
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-form label {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.32rem;
}

.auth-form input:not(.auth-otp-digit) {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
}

.auth-errors,
.checkout-error,
.account-msg--err {
  background: #fff3f2;
  border: 1px solid #f2d1cd;
  color: var(--danger);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
}

.account-auth-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.contact-ltr {
  direction: ltr;
  unicode-bidi: plaintext;
}

.checkout-section-title {
  font-size: 1rem;
  margin: 0 0 0.8rem;
}

.checkout-page {
  max-width: 820px;
}

.checkout-form .form-grid {
  gap: 0.9rem;
}

.checkout-form input,
.checkout-form textarea,
.account-form input,
.account-form textarea {
  min-height: 44px;
  border-radius: 12px;
  border-color: var(--line);
}

.result-page {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.dashboard-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.kpi-card,
.dashboard-section {
  padding: 1rem;
}

.kpi-card span {
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.2rem;
}

.kpi-card strong {
  font-size: 1.35rem;
}

.faq-list {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  padding: 0.8rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
}

.page-banner {
  border-radius: 0 0 28px 28px;
}

.page-prose {
  margin: 0 auto 2.5rem;
}

@media (max-width: 768px) {
  body {
    background:
      radial-gradient(circle at 50% -20%, #edf8f0 0%, #f9fbfa 40%, #ffffff 100%);
  }

  .container {
    padding-inline: 14px;
  }

  main {
    padding-top: 18px;
    padding-bottom: calc(var(--bottom-nav-h, 64px) + 20px);
  }

  .header {
    position: sticky;
    top: 0;
  }

  .header-flex {
    min-height: 66px;
    gap: 0.45rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .auth-box,
  .products-page,
  .product-detail-page,
  .checkout-page,
  .dashboard-page,
  .blog-detail {
    width: calc(100% - 1rem);
  }

  .product-card,
  .card,
  .result-page {
    border-radius: 16px;
  }

  .bottom-nav {
    backdrop-filter: blur(12px);
    background: color-mix(in srgb, #fff 90%, #edf4ef 10%);
    border-top: 1px solid var(--line);
  }
}

/* هیروهای صفحه — متن روشن روی پس‌زمینه برند */
.page-contact .contact-hero-inner,
.page-faq .faq-hero-inner,
.page-affiliate .affiliate-hero-inner,
.page-about .story-hero-inner,
.page-blog .blog-hero-inner,
.page-diet .diet-hero-inner,
.page-diet-bmi .bmi-hero-inner,
.page-tools .tools-hero-inner,
.page-deli-who .deli-who-hero-inner,
.page-terms .terms-hero-inner,
.page-story .story-hero-inner,
.page-wholesale .wholesale-hero-inner,
.page-subscription .subscription-hero-inner,
.page-subscription .page-landing-hero-inner {
  color: #fff;
}

.page-contact .contact-hero h1,
.page-faq .faq-hero h1,
.page-affiliate .affiliate-hero h1,
.page-about .story-hero h1,
.page-blog .blog-hero h1,
.page-diet .diet-hero h1,
.page-diet-bmi .bmi-hero h1,
.page-tools .tools-hero h1,
.page-deli-who .deli-who-hero h1,
.page-terms .terms-hero h1,
.page-story .story-hero h1,
.page-wholesale .wholesale-hero h1,
.page-subscription .subscription-hero h1,
.page-subscription .page-landing-hero h1 {
  color: #fff;
}

.page-contact .contact-hero-lead,
.page-faq .faq-hero-lead,
.page-affiliate .affiliate-hero-lead,
.page-about .story-hero-lead,
.page-blog .blog-hero-lead,
.page-diet .diet-hero-lead,
.page-diet-bmi .bmi-hero-lead,
.page-tools .tools-hero-lead,
.page-deli-who .deli-who-hero-lead,
.page-terms .terms-hero-lead,
.page-story .story-hero-lead,
.page-wholesale .wholesale-hero-lead,
.page-subscription .subscription-hero-lead,
.page-subscription .page-landing-hero-lead,
.page-diet .diet-hero p {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 500;
  opacity: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.14);
}

.page-contact .contact-hero-badge,
.page-faq .faq-hero-badge,
.page-affiliate .affiliate-hero-badge,
.page-about .story-hero-badge,
.page-blog .blog-hero-badge,
.page-diet .diet-hero-badge,
.page-diet-bmi .bmi-hero-badge,
.page-tools .tools-hero-badge,
.page-terms .terms-hero-badge,
.page-story .story-hero-badge,
.page-wholesale .wholesale-hero-badge,
.page-subscription .subscription-hero-badge,
.page-landing-hero-badge {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.72);
  border-color: color-mix(in srgb, var(--brand-bright) 65%, #fff 35%);
}

