/* ——— هدر و نوبار (جایگزین استایل‌های قدیمی nav-mobile در style.css) ——— */
.site-header .nav-mobile {
  display: flex;
}

.site-header .nav-mobile[hidden] {
  display: none !important;
}

.site-header .nav-mobile.active {
  display: flex;
}

.site-header {
  --header-h: 88px;
  position: sticky;
  top: 0;
  z-index: 200;
  overflow: visible;
  background: #fff;
  border-bottom: 1px solid var(--line, #dfe8e2);
  transition: box-shadow 0.35s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.page-home .site-header {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
}

.page-home .site-header.is-scrolled {
  background: #fff;
  border-bottom-color: var(--line, #dfe8e2);
}

.site-header.is-solid,
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(26, 31, 28, 0.08);
}

.site-header .header-inner {
  position: relative;
  z-index: 1;
}

.site-header .brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line, #dfe8e2);
  box-shadow: 0 2px 10px rgba(26, 31, 28, 0.05);
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.site-header .brand-logo-wrap--dual {
  position: relative;
  flex-shrink: 0;
}

.site-header .brand-logo-wrap--dual .logo {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 0.35s ease;
}

.site-header .brand-logo-wrap--dual .logo--default {
  opacity: 0;
}

.site-header .brand-logo-wrap--dual .logo--on-hero {
  opacity: 1;
}

.page-home .site-header.is-scrolled .brand-logo-wrap--dual .logo--default,
.page-home .site-header.is-solid .brand-logo-wrap--dual .logo--default {
  opacity: 1;
}

.page-home .site-header.is-scrolled .brand-logo-wrap--dual .logo--on-hero,
.page-home .site-header.is-solid .brand-logo-wrap--dual .logo--on-hero {
  opacity: 0;
}

.site-header .logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.site-header .brand-title {
  color: var(--primary, #1a3d2e);
  font-size: 1.15rem;
}

.site-header .brand-en {
  font-size: 0.72em;
  font-weight: 500;
  opacity: 0.75;
}

.site-header .brand-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.site-header .brand-quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--brand);
  border: 1px solid rgba(129, 176, 97, 0.35);
  box-shadow: 0 2px 8px rgba(129, 176, 97, 0.2);
}

.site-header .brand-slogan {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.2rem 0.35rem;
  margin: 0.15rem 0 0;
  min-height: 1.25em;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--text-muted, #5c6560);
  direction: rtl;
  text-align: right;
}

.site-header .brand-slogan-prefix {
  font-weight: 600;
  white-space: nowrap;
}

.site-header .brand-slogan-stage {
  min-width: 4.8rem;
}

.site-header .brand-slogan-trait {
  color: var(--brand, #81B061);
  font-weight: 700;
}

.site-header .brand-slogan-trait.is-struck {
  color: rgba(92, 101, 96, 0.32);
}

.site-header .brand-slogan-trait.is-struck::after {
  background: rgba(92, 101, 96, 0.48);
}

.site-header .brand-slogan-brand {
  color: #36b61b;
  font-weight: 900;
}

.site-header .header-search-field {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  min-height: 36px;
  padding: 0 0.55rem 0 0.45rem;
  border-radius: 14px;
  border: 1px solid var(--line, #dfe8e2);
  background: var(--surface-soft, #f6faf7);
  box-shadow: none;
  cursor: text;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
}

.site-header .header-search-field:focus-within {
  border-color: rgba(69, 168, 88, 0.85);
  background: #fff;
  box-shadow:
    0 6px 24px rgba(129, 176, 97, 0.18),
    0 0 0 3px rgba(69, 168, 88, 0.2);
}

.site-header .header-search-icon {
  flex-shrink: 0;
  color: var(--brand, #81B061);
  opacity: 0.9;
}

.site-header .header-search {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--text, #1a1f1c);
  outline: none;
}

.site-header .header-search::placeholder {
  color: #7a8680;
}

.site-header .header-search-kbd {
  flex-shrink: 0;
  display: none;
  min-width: 1.4rem;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  border: 1px solid #d5e0da;
  background: #f4f8f5;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6a756f;
  line-height: 1.2;
}

/* دِلی در هدر — باز کردن چت */
.header-deli-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line, #dfe8e2);
  border-radius: 999px;
  background: linear-gradient(135deg, #f7f3eb 0%, #eef5ef 100%);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary, #1a3d2e);
  box-shadow: 0 2px 12px rgba(129, 176, 97, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.header-deli-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand, #81B061);
  box-shadow: 0 6px 18px rgba(129, 176, 97, 0.18);
}

.header-deli-btn[aria-expanded="true"] {
  border-color: var(--brand, #81B061);
  box-shadow: 0 0 0 2px rgba(129, 176, 97, 0.2);
}

.header-deli-btn__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(90, 122, 82, 0.25);
  background: #fff;
}

.header-deli-btn__label {
  padding-inline-end: 4px;
  white-space: nowrap;
}

.site-header .header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 42px;
  min-height: 42px;
  padding: 0 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--line, #dfe8e2);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text, #1a1f1c);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.site-header .header-icon-btn:hover {
  border-color: var(--brand, #81B061);
  color: var(--brand, #81B061);
  box-shadow: 0 4px 14px rgba(129, 176, 97, 0.12);
}

.site-header .header-account.is-active {
  border-color: var(--brand, #81B061);
  color: var(--brand, #81B061);
  background: var(--brand-light, #e8f2ea);
}

.site-header .nav-toggle span {
  background: currentColor;
}

/* هوم قبل از اسکرول: نوبار شفاف و آیتم‌ها سفید */
.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-title,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-slogan,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-slogan-trait,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-slogan-brand,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-desktop-link,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-desktop-trigger,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-icon-btn,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-account,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-toggle,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-deli-btn {
  color: #fff;
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-deli-btn {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-deli-btn__avatar {
  border-color: rgba(255, 255, 255, 0.45);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-slogan-trait.is-struck {
  color: rgba(255, 255, 255, 0.26);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-slogan-trait.is-struck::after {
  background: rgba(255, 255, 255, 0.5);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-slogan-brand {
  color: var(--slogan-brand-color, #81b061);
  text-shadow:
    0 0 12px rgba(177, 215, 180, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.site-header .logo--dark-tint,
.site-footer__logo.logo--dark-tint {
  filter: brightness(0) saturate(100%) invert(28%) sepia(72%) saturate(1200%) hue-rotate(92deg) brightness(0.9);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-en {
  opacity: 0.9;
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-logo-wrap--dual {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .brand-logo-wrap:not(.brand-logo-wrap--dual),
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-icon-btn,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-account,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-toggle {
  background: rgba(9, 14, 12, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-search-field {
  background: rgba(9, 14, 12, 0.22);
  border-color: rgba(255, 255, 255, 0.34);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-search,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-search::placeholder,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-search-icon,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .header-search-kbd {
  color: rgba(255, 255, 255, 0.9);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-desktop-link:hover,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-desktop-trigger:hover,
.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-desktop-item.is-open .nav-desktop-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "brand search actions"
    "nav nav nav";
  align-items: center;
  gap: 0.65rem 1rem;
  min-height: var(--header-h);
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.brand-text {
  min-width: 0;
}

.header-inner .brand {
  grid-area: brand;
}

.header-inner .header-search-wrap {
  grid-area: search;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  justify-self: stretch;
}

.header-inner .header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-inner .nav-desktop {
  grid-area: nav;
  justify-self: center;
}

/* دسکتاپ */
.nav-desktop-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop-item {
  position: relative;
}

.nav-desktop-item.has-mega::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10%;
  right: -10%;
  height: 16px;
  z-index: 219;
}

.nav-desktop-link,
.nav-desktop-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 9px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text, #1a1f1c);
  font-family: inherit;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.nav-desktop-link:hover,
.nav-desktop-trigger:hover,
.nav-desktop-item.is-open .nav-desktop-trigger {
  color: var(--brand, #81B061);
  background: var(--brand-light, #e8f2ea);
}

.nav-desktop-link.is-active,
.nav-desktop-trigger.is-active {
  color: var(--brand, #81B061);
  background: var(--brand-light, #e8f2ea);
}

/* ابزارهای سلامتی — تنها آیتم فعال در صفحات BMI / رژیم / ابزار سلامت */
.nav-desktop-trigger.is-active--health,
.nav-mobile-trigger.is-active--health {
  color: #0a6b7a;
  background: linear-gradient(135deg, #e8f6fa 0%, #dff0f5 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #0a6b7a 22%, transparent);
  font-weight: 700;
}

.nav-desktop-item.is-open .nav-desktop-trigger.is-active--health {
  color: #0a6b7a;
  background: linear-gradient(135deg, #e8f6fa 0%, #dff0f5 100%);
}

.page-home .site-header:not(.is-scrolled):not(.is-solid) .nav-desktop-trigger.is-active--health {
  color: #fff;
  background: rgba(10, 107, 122, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.nav-chevron {
  transition: transform 0.2s;
  opacity: 0.7;
}

.nav-desktop-item.is-open .nav-chevron,
.nav-mobile-item.is-open .nav-chevron {
  transform: rotate(180deg);
}

/* مگامنو */
.nav-mega {
  position: absolute;
  top: 100%;
  right: 50%;
  transform: translateX(50%);
  min-width: min(640px, 94vw);
  padding: 0.5rem 0.35rem 0.35rem;
  margin-top: 4px;
  background: var(--surface-strong, #fff);
  border: 1px solid var(--line, #dfe8e2);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(24, 36, 28, 0.12);
  z-index: 220;
}

/* پل نامرئی — موس از دکمه به پنل بدون بسته شدن منو */
.nav-mega::before {
  content: '';
  position: absolute;
  top: -14px;
  left: -8px;
  right: -8px;
  height: 14px;
}

.nav-mega:not([hidden]) {
  animation: navMegaIn 0.2s ease;
}

@keyframes navMegaIn {
  from { opacity: 0; transform: translateX(50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(50%) translateY(0); }
}

.nav-mega-inner {
  display: grid;
  grid-template-columns: minmax(160px, 0.85fr) minmax(280px, 1.15fr);
  gap: 0.35rem;
}

/* مگامنو ابزارهای سلامتی — هم‌تراز با محصولات */
.nav-mega--tools {
  min-width: min(640px, 94vw);
}

.nav-mega-inner--tools {
  grid-template-columns: minmax(168px, 0.82fr) minmax(300px, 1.18fr);
}

.nav-mega-col--quick .nav-mega-hint {
  margin: 0.5rem 0 0;
  padding: 0 0.65rem;
  font-size: 0.72rem;
  color: var(--text-muted, #5c6560);
  line-height: 1.45;
}

.nav-quick-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-quick-icon-wrap .nav-quick-icon,
.nav-quick-icon-wrap .deliche-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.nav-mega-tools-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  max-height: min(68vh, 380px);
  overflow-y: auto;
  padding-inline-end: 0.15rem;
}

.nav-tool-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text, #1a1f1c);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.nav-tool-card:hover,
.nav-tool-card.is-active {
  background: var(--brand-light, #e8f2ea);
  border-color: color-mix(in srgb, var(--brand, #81B061) 25%, transparent);
  box-shadow: 0 4px 12px rgba(129, 176, 97, 0.08);
}

.nav-tool-card__media {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e8f2ea, #f5faf6);
  color: var(--brand, #81B061);
}

.nav-tool-card__icon {
  width: 22px;
  height: 22px;
}

.nav-tool-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

.nav-mega-quick--tools {
  margin-bottom: 0.5rem;
}

.nav-mobile-tools {
  padding: 0.25rem 0.5rem 0.5rem;
}

.nav-mega-col {
  padding: 0.65rem 0.75rem;
}

.nav-mega-label,
.nav-submenu-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #5c6560);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.nav-mega-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-mega-quick {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-quick-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  text-align: right;
  text-decoration: none;
  color: var(--text, #1a1f1c);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-quick-link:hover,
.nav-quick-link.is-active {
  background: var(--brand-light, #e8f2ea);
  color: var(--brand, #81B061);
  font-weight: 600;
}

.nav-quick-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-mega-col--cats > .nav-mega-label {
  margin-bottom: 0.45rem;
}

.nav-mega-cats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.nav-mega-cats-head .nav-mega-label {
  margin-bottom: 0;
}

.nav-mega-view-all,
.nav-mega-view-all:visited {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--brand, #81B061);
  background: var(--brand-light, #e8f2ea);
  border: 1px solid color-mix(in srgb, var(--brand, #81B061) 22%, transparent);
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.nav-mega-view-all:hover,
.nav-mega-view-all:focus-visible {
  color: #fff;
  background: var(--brand, #81B061);
  border-color: var(--brand, #81B061);
  box-shadow: 0 4px 12px rgba(129, 176, 97, 0.22);
}

.nav-mega-view-all--mobile {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0.5rem 0.15rem;
  padding: 0.55rem 1rem;
  font-size: 0.84rem;
}

.nav-mega-shop-cta,
.nav-mega-shop-cta:visited {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.2rem 0.55rem 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand, #81b061) 0%, #6d9a52 100%);
  box-shadow: 0 6px 18px rgba(129, 176, 97, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-mega-shop-cta:hover,
.nav-mega-shop-cta:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #8fbc6a 0%, #5f8548 100%);
  filter: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(129, 176, 97, 0.34);
}

.nav-mega-shop-cta:hover .nav-mega-shop-cta__text,
.nav-mega-shop-cta:hover .nav-mega-shop-cta__text strong,
.nav-mega-shop-cta:hover .nav-mega-shop-cta__text small,
.nav-mega-shop-cta:hover .nav-mega-shop-cta__arrow,
.nav-mega-shop-cta:focus-visible .nav-mega-shop-cta__text,
.nav-mega-shop-cta:focus-visible .nav-mega-shop-cta__text strong,
.nav-mega-shop-cta:focus-visible .nav-mega-shop-cta__text small,
.nav-mega-shop-cta:focus-visible .nav-mega-shop-cta__arrow {
  color: #fff;
}

.nav-mega-shop-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
}

.nav-mega-shop-cta__icon .nav-quick-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: #fff;
  opacity: 1;
}

.nav-mega-shop-cta__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: start;
  color: #fff;
}

.nav-mega-shop-cta__text strong {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
}

.nav-mega-shop-cta__text small {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.nav-mega-shop-cta__arrow {
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  opacity: 0.9;
}

.nav-mega-shop-cta--mobile {
  margin: 0.7rem 0.5rem 0.2rem;
}

.nav-mega-empty {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted, #5c6560);
  text-align: center;
}

.nav-mega-quick--mobile {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.nav-quick-link--sm {
  width: auto;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  border: 1px solid var(--line, #dfe8e2);
  border-radius: 999px;
}

.nav-quick-link--sm.is-active {
  border-color: var(--brand, #81B061);
}

.nav-mega-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.nav-mega-cats--mobile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nav-cat-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text, #1a1f1c);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.nav-cat-card:hover,
.nav-cat-card.is-active {
  background: var(--brand-light, #e8f2ea);
  border-color: color-mix(in srgb, var(--brand, #81B061) 25%, transparent);
  box-shadow: 0 4px 12px rgba(129, 176, 97, 0.08);
}

.nav-cat-card__media {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-soft, #f0f4f1);
}

.nav-cat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-cat-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand, #81B061);
  background: linear-gradient(145deg, #e8f2ea, #f5faf6);
}

.nav-cat-card__name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

.nav-submenu-link {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text, #1a1f1c);
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
}

.nav-submenu-link:hover,
.nav-submenu-link.is-active {
  background: var(--brand-light, #e8f2ea);
  color: var(--brand, #81B061);
}

/* سبد خرید هدر */
.header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line, #dfe8e2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text, #1a1f1c);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.header-cart:hover {
  border-color: var(--brand, #81B061);
  color: var(--brand, #81B061);
  box-shadow: 0 4px 14px rgba(129, 176, 97, 0.12);
}

.header-cart.bounce {
  animation: headerCartBounce 0.55s ease;
}

@keyframes headerCartBounce {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.12); }
  65% { transform: scale(0.96); }
}

.header-cart-count {
  position: absolute;
  top: -4px;
  inset-inline-start: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.header-cart-count:not([hidden]) {
  display: flex;
}

/* سبد خرید هدر */
.header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line, #dfe8e2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text, #1a1f1c);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.header-cart:hover {
  border-color: var(--brand, #81B061);
  color: var(--brand, #81B061);
  box-shadow: 0 4px 14px rgba(129, 176, 97, 0.12);
}

.header-cart.bounce {
  animation: headerCartBounce 0.55s ease;
}

@keyframes headerCartBounce {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.08); }
  65% { transform: scale(0.96); }
}

.header-cart-count {
  position: absolute;
  top: -4px;
  inset-inline-start: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.header-cart-count:not([hidden]) {
  display: flex;
}

/* دکمه حساب */
.header-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line, #dfe8e2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text, #1a1f1c);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.header-account:hover,
.header-account.is-active {
  border-color: var(--brand, #81B061);
  color: var(--brand, #81B061);
  box-shadow: 0 4px 14px rgba(129, 176, 97, 0.12);
}

.header-account-icon {
  flex-shrink: 0;
}

/* همبرگر */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line, #dfe8e2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* موبایل — منوی تمام‌صفحه */
.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 20, 0.5);
  z-index: 290;
  opacity: 0;
  transition: opacity 0.25s;
}

.nav-mobile-backdrop.is-visible {
  opacity: 1;
}

.nav-mobile {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  z-index: 300;
  background: var(--surface-strong, #fff);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 1;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.3s;
  overflow: hidden;
  border: none;
  box-shadow: none;
}

.nav-mobile.is-open {
  transform: translateX(0);
  visibility: visible;
}

.nav-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 1rem 0.9rem;
  border-bottom: 1px solid var(--line, #dfe8e2);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(232, 245, 235, 0.55) 0%, #fff 100%);
}

.nav-mobile-title {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text, #1a1f1c);
}

.nav-mobile-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  box-shadow: 0 2px 10px rgba(20, 40, 28, 0.08);
}

.nav-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.nav-mobile-item {
  border-bottom: 1px solid color-mix(in srgb, var(--line, #dfe8e2) 70%, transparent);
}

.nav-mobile-item:last-child {
  border-bottom: none;
}

.nav-mobile-link,
.nav-mobile-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 0.85rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: right;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-mobile-link:hover,
.nav-mobile-trigger:hover,
.nav-mobile-link.is-active,
.nav-mobile-trigger.is-active {
  background: var(--brand-light, #e8f2ea);
  color: var(--brand, #81B061);
}

.nav-mobile-submenu {
  padding: 0 0.35rem 0.65rem 0.65rem;
  background: color-mix(in srgb, var(--brand-light, #e8f2ea) 35%, transparent);
  border-radius: 0 0 12px 12px;
  margin-bottom: 0.15rem;
}

.nav-mobile-submenu .nav-submenu-link {
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
}

.nav-mobile-submenu .nav-submenu-title {
  padding: 0.35rem 0.75rem 0.15rem;
  margin-top: 0.25rem;
}

.nav-submenu-link--rich {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-submenu-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-soft, #f0f4f1);
}

.nav-submenu-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-submenu-thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand, #81B061);
}

.nav-submenu-thumb--icon .nav-quick-icon {
  width: 22px;
  height: 22px;
}

.nav-submenu-link--rich {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-submenu-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, #eef5f0, #dce8e0);
}

.nav-submenu-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-submenu-thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand, #81B061);
}

.nav-submenu-thumb--icon .nav-quick-icon {
  width: 20px;
  height: 20px;
}

/* ریسپانسیو */
@media (min-width: 1025px) {
  .header-inner {
    grid-template-areas: "brand nav search actions";
    grid-template-columns: auto minmax(0, 1fr) minmax(128px, 228px) auto;
    gap: 0.5rem 0.65rem;
  }

  .header-inner .nav-desktop {
    justify-self: start;
    min-width: 0;
  }

  .header-inner .header-search-wrap {
    max-width: 228px;
    justify-self: end;
  }

  .nav-desktop-list {
    flex-wrap: nowrap;
  }

  .site-header .header-search-kbd {
    display: inline-block;
  }
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 1280px) {
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) minmax(140px, 248px) auto;
  }

  .header-inner .header-search-wrap {
    max-width: 248px;
  }
}

@media (max-width: 1024px) {
  .nav-desktop {
    display: none !important;
  }

  .nav-toggle {
    display: flex;
  }

  .header-inner {
    grid-template-areas:
      "brand actions"
      "search search";
    grid-template-columns: 1fr auto;
  }

  .header-inner .header-search-wrap {
    max-width: none;
    grid-column: 1 / -1;
  }

  .header-account-label {
    display: none;
  }

  .header-account {
    padding: 0;
    width: 42px;
  }
}

@media (max-width: 640px) {
  .header-deli-btn__label {
    display: none;
  }

  .header-deli-btn {
    padding: 3px;
    min-width: 44px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .site-header {
    --header-h: 76px;
  }

  .site-header .brand-logo-wrap {
    width: 40px;
    height: 40px;
  }

  .site-header .logo {
    width: 32px;
    height: 32px;
  }

  .site-header .brand-title {
    font-size: 1rem;
  }

  .site-header .brand-quality-badge {
    font-size: 0.62rem;
    padding: 0.12rem 0.45rem;
  }

  .site-header .brand-slogan {
    font-size: 0.68rem;
  }

  .site-header .brand-slogan-stage {
    min-width: 6.5rem;
  }

  .site-header .header-search-field {
    min-height: 42px;
  }

  .site-header .header-search {
    font-size: 0.85rem;
  }
}

@media (min-width: 1025px) {
  .nav-mobile,
  .nav-mobile-backdrop {
    display: none !important;
  }

  .site-header .nav-toggle {
    display: none !important;
  }
}

.page-home main {
  padding-top: 0;
}

.page-home .home-hero-premium {
  margin-top: 0;
  padding-top: calc(var(--header-h) + 12px);
}
