﻿/* مسترچیت — تم زرد/مشکی | موبایل‌اول
   sm ≥ 36rem (576px)  lg ≥ 64rem (1024px) */

:root {
  --y-hot: #ffd60a;
  --y-core: #ffc107;
  --y-deep: #c98a00;

  --bg-base: #0f0d08;
  --bg-soft: #14110b;
  --bg-card: #1a1710;
  --border: rgba(255, 204, 64, 0.14);
  --border-strong: rgba(255, 204, 64, 0.28);

  --text: #f3ecda;
  --text-muted: rgba(243, 236, 218, 0.55);

  --content-max: 72rem;
  --promo-slider-max: 100%;
  --pad-inline: max(1rem, env(safe-area-inset-left), env(safe-area-inset-right));
  --header-top: calc(0.65rem + env(safe-area-inset-top));

  --hero-gap: 0.75rem;
  --store-block-gap: 0.55rem;
  --char-h: min(34svh, 16.5rem);
  --radius: 0.65rem;
  --btn-cut: 0.62rem;
  --btn-clip: polygon(
    var(--btn-cut) 0,
    100% 0,
    100% calc(100% - var(--btn-cut)),
    calc(100% - var(--btn-cut)) 100%,
    0 100%,
    0 var(--btn-cut)
  );

  --app-nav-float: 0.55rem;
  --app-nav-h: 3.65rem;
  --app-nav-rail-icon: 3rem;
  --app-nav-rail-w: 4.85rem;
  --app-nav-rail-expanded: 13.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* بدون هایلایت آبی لمس موبایل */
a,
button,
.btn,
.store-header__auth,
.app-nav__link,
.app-nav__toggle,
.app-nav__brand,
.promo-slide,
.cat-card__img,
.cat-card,
.deal-card__buy,
.deal-card__media,
.deal-card__title a,
.product-card,
.section-head__link,
.store-logo,
.store-header__cart,
.product-pack,
.product-hero__thumb,
.product-info__tab,
.product-qty__btn,
.product-qty__input,
.product-faq summary,
.product-sticky__btn {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  touch-action: manipulation;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  /* Firefox — نوار اسکرول صفحه */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 193, 7, 0.55) var(--bg-soft);
}

/* Chrome / Edge / Safari — نوار اسکرول صفحه */
html::-webkit-scrollbar {
  width: 0.55rem;
  height: 0.55rem;
}

html::-webkit-scrollbar-track {
  background: var(--bg-soft);
  border-inline-start: 1px solid rgba(255, 204, 64, 0.08);
}

html::-webkit-scrollbar-thumb {
  border-radius: 100px;
  border: 2px solid var(--bg-soft);
  background: linear-gradient(180deg, var(--y-hot) 0%, var(--y-core) 45%, var(--y-deep) 100%);
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.25);
}

html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffe566 0%, var(--y-hot) 50%, var(--y-core) 100%);
}

html::-webkit-scrollbar-corner {
  background: var(--bg-base);
}

body.brand-page {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100svh;
  font-family: "Peyda", system-ui, sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--bg-base);
  overflow-x: hidden;
}

.app-shell {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.app-shell__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 100%;
}

/* پس‌زمینه — یکدست، بدون گرید و شیشه */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 50% -20%, rgba(255, 193, 7, 0.06) 0%, transparent 55%),
    var(--bg-base);
}

/* ——— هدر: تخت و یکسان در همه سایزها (بدون شیشه) ——— */
.store-header {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--header-top) var(--pad-inline) 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
}

.store-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
  color: var(--text);
}

.store-logo__img {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  transform: scaleX(-1);
}

.store-logo__text {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-header__menu {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 214, 10, 0.18);
  border-radius: 0.5rem;
  background: rgba(255, 214, 10, 0.06);
  color: var(--y-core);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.store-header__menu:hover {
  background: rgba(255, 214, 10, 0.14);
  color: var(--y-hot);
}

.store-header__menu:focus-visible {
  outline: 2px solid var(--y-hot);
  outline-offset: 2px;
}

.store-header__menu-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.store-header__end {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.store-header__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.store-header__cart:hover {
  border-color: var(--border-strong);
  color: var(--y-hot);
}

.store-header__cart.is-active {
  border-color: rgba(110, 231, 183, 0.45);
  color: #6ee7b7;
  background: rgba(110, 231, 183, 0.08);
}

.store-header__cart-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.store-header__cart-badge {
  position: absolute;
  top: -0.25rem;
  inset-inline-end: -0.25rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.22rem;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.05rem;
  text-align: center;
  color: #042f1e;
  background: #6ee7b7;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--bg-base);
}

body.basket-page .store-header__cart-badge {
  background: #5eead4;
  box-shadow: 0 0 0 2px #0e1014;
}

.store-header__auth {
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
  max-width: 50%;
  min-height: 2.4rem;
  padding: 0.5rem 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  color: #1a1000;
  border: none;
  border-radius: 0;
  clip-path: var(--btn-clip);
  background: linear-gradient(165deg, var(--y-hot) 0%, var(--y-core) 48%, var(--y-deep) 100%);
  box-shadow:
    0 3px 14px rgba(255, 193, 7, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.store-header__auth::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  clip-path: var(--btn-clip);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0%, transparent 28%);
  pointer-events: none;
}

.pixel-burst__fx {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pack-pixel-wave__fx {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.product-pack > span {
  position: relative;
  z-index: 1;
}

.product-pack.is-pack-wave {
  transform: translateZ(0);
  transition: border-color 0.15s ease, background 0.15s ease;
}

[data-pixel-burst] {
  overflow: hidden;
}

[data-pixel-burst].is-pixel-hit {
  animation: pixel-btn-shake 0.42s steps(7, end);
}

@keyframes pixel-btn-shake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
    filter: brightness(1) saturate(1);
  }

  14% {
    transform: translate3d(-3px, 2px, 0);
    filter: brightness(1.35) saturate(1.2);
  }

  28% {
    transform: translate3d(3px, -2px, 0);
  }

  42% {
    transform: translate3d(-2px, -3px, 0);
    filter: brightness(1.2);
  }

  57% {
    transform: translate3d(2px, 1px, 0);
  }

  71% {
    transform: translate3d(-1px, 2px, 0);
  }

  85% {
    transform: translate3d(1px, -1px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-pixel-burst].is-pixel-hit {
    animation: none;
  }
}

/* ——— پرواز پیکسل به سبد (صفحه محصول) ——— */
.cart-fly-pixels {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  overflow: hidden;
}

.cart-fly-pixels canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.store-header__cart.is-cart-receiving .store-header__cart-icon {
  transform-origin: center;
  animation: cart-receive-pop 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.store-header__cart.is-cart-receiving {
  filter: drop-shadow(0 0 8px rgba(255, 214, 10, 0.28));
  transition: filter 0.35s ease;
}

@keyframes cart-receive-pop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.12);
  }

  70% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.store-header__cart-badge.is-cart-badge-pop {
  transform-origin: center;
  animation: cart-badge-pop 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cart-badge-pop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-header__cart.is-cart-receiving .store-header__cart-icon,
  .store-header__cart-badge.is-cart-badge-pop {
    animation: none;
  }

  .store-header__cart.is-cart-receiving {
    filter: none;
  }
}

/* ——— بدنه ——— */
.page-main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  padding: 0.75rem var(--pad-inline) 1.5rem;
}

.page-main > :not(.hack-cascade) {
  position: relative;
  z-index: 1;
}

/* باران کد هکری — زیر هدر، دائمی */
.hack-cascade {
  --hack-green: #2dff9a;
  --hack-green-bright: #7dffb8;
  --hack-green-dim: #0a5c32;

  position: absolute;
  z-index: 0;
  inset: 0;
  max-height: min(72svh, 36rem);
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    transparent 92%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    transparent 92%
  );
}

.hack-cascade::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(45, 255, 154, 0.55) 35%,
    rgba(125, 255, 184, 0.85) 50%,
    rgba(45, 255, 154, 0.55) 65%,
    transparent 100%
  );
  box-shadow: 0 0 22px rgba(45, 255, 154, 0.35);
  pointer-events: none;
}

.hack-cascade::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(45, 255, 154, 0.025) 2px,
    rgba(45, 255, 154, 0.025) 3px
  );
  pointer-events: none;
}

.hack-cascade__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .hack-cascade {
    display: none;
  }
}

.brand-hero {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}

.brand-hero__layout {
  display: grid;
  width: 100%;
  gap: var(--hero-gap);
  align-items: start;
  grid-template-columns: 1fr;
  grid-template-areas:
    "visual"
    "content";
}

.brand-hero__visual {
  grid-area: visual;
  min-width: 0;
}

.brand-hero__content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.hero-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

.character-img {
  display: block;
  width: auto;
  max-width: min(100%, 18rem);
  height: auto;
  max-height: var(--char-h);
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: screen;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
  animation: hero-float-mobile 5s ease-in-out infinite;
}

.text-particles-wrap {
  position: relative;
  width: min(100%, 30rem);
  max-width: 30rem;
  height: clamp(5.75rem, 18vw, 8rem);
  margin-inline: auto;
  overflow: visible;
}

#text-particles {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.brand-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
}

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.72rem 1.15rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
  border-radius: 0;
  clip-path: var(--btn-clip);
  cursor: pointer;
  border: none;
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease;
}

a.btn:hover,
a.btn:focus,
a.btn:visited {
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--y-hot);
  outline-offset: 3px;
}

.btn--primary {
  color: #1a1000;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  background: linear-gradient(165deg, var(--y-hot) 0%, var(--y-core) 42%, var(--y-deep) 100%);
  box-shadow:
    0 4px 22px rgba(255, 193, 7, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.btn--primary::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  clip-path: var(--btn-clip);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.28) 0%, transparent 38%);
  pointer-events: none;
}

.btn--primary::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 214, 10, 0.35) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.btn--ghost {
  color: var(--text);
  background: linear-gradient(180deg, #1e1b12 0%, var(--bg-card) 55%, #12100a 100%);
  box-shadow:
    inset 0 0 0 1px var(--border-strong),
    inset 0 1px 0 rgba(255, 214, 10, 0.1),
    0 2px 12px rgba(0, 0, 0, 0.25);
}

.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: var(--btn-clip);
  background: linear-gradient(180deg, rgba(255, 214, 10, 0.06) 0%, transparent 45%);
  pointer-events: none;
}

.btn--ghost::after {
  content: "";
  position: absolute;
  inset-inline-end: 0.45rem;
  top: 50%;
  width: 0.35rem;
  height: 0.35rem;
  border-top: 2px solid rgba(255, 214, 10, 0.55);
  border-inline-end: 2px solid rgba(255, 214, 10, 0.55);
  transform: translateY(-50%) rotate(0deg);
  pointer-events: none;
}

/* ——— فوتر ——— */
.store-footer {
  position: relative;
  flex-shrink: 0;
  z-index: 5;
  margin-top: 1.25rem;
  padding: 0 var(--pad-inline) calc(1.25rem + env(safe-area-inset-bottom));
  color: var(--text-muted);
  background: linear-gradient(180deg, transparent 0%, rgba(8, 7, 5, 0.65) 12%, var(--bg-base) 28%);
  border-top: 1px solid var(--border);
}

.store-footer__glow {
  position: absolute;
  top: 0;
  inset-inline: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 214, 10, 0.55) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.store-footer__inner {
  display: grid;
  gap: 1.75rem;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-top: 1.75rem;
}

.store-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.store-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
}

.store-footer__logo-img {
  width: 2.65rem;
  height: 2.65rem;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(255, 193, 7, 0.25));
}

.store-footer__logo-text {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--y-hot) 0%, var(--y-core) 55%, #fff8e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.store-footer__tagline {
  margin: 0;
  max-width: 22rem;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.store-footer__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.store-footer__social-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 214, 10, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.store-footer__social-link:hover {
  color: var(--y-hot);
  border-color: var(--border-strong);
  background: rgba(255, 214, 10, 0.14);
}

.store-footer__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 0.75rem;
}

.store-footer__heading {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--y-hot);
  letter-spacing: 0.02em;
}

.store-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.store-footer__list a {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.store-footer__list a:hover {
  color: var(--text);
}

.store-footer__trust {
  max-width: var(--content-max);
  margin: 1.25rem auto 0;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 204, 64, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.store-footer__enamad {
  display: flex;
  justify-content: center;
  line-height: 0;
}

.store-footer__enamad-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0;
  background: transparent;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.store-footer__enamad-link:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.store-footer__enamad-img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

.store-footer__enamad-img--center {
  max-width: 4.25rem;
  max-height: 4.25rem;
}

.store-footer__enamad-img--seal {
  max-width: 5.5rem;
  max-height: 5.5rem;
}

.store-footer__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-footer__badge {
  padding: 0.35rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(243, 236, 218, 0.85);
  background: rgba(26, 23, 16, 0.85);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  clip-path: polygon(0.35rem 0, 100% 0, 100% calc(100% - 0.35rem), calc(100% - 0.35rem) 100%, 0 100%, 0 0.35rem);
}

.store-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  max-width: var(--content-max);
  margin: 1rem auto 0;
  padding-top: 1rem;
  text-align: center;
  border-top: 1px solid rgba(255, 204, 64, 0.08);
}

.store-footer__copy {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.store-footer__made {
  margin: 0;
  font-size: 0.65rem;
  color: rgba(243, 236, 218, 0.35);
}

@media (min-width: 36rem) {
  .store-footer__links {
    gap: 1.25rem 1.5rem;
  }
}

@media (min-width: 48rem) {
  .store-footer__inner {
    grid-template-columns: minmax(11rem, 1fr) minmax(0, 1.65fr);
    align-items: start;
    gap: 2rem;
    padding-top: 2rem;
  }

  .store-footer__brand {
    align-items: flex-start;
    text-align: start;
  }

  .store-footer__tagline {
    max-width: none;
  }

  .store-footer__social {
    justify-content: flex-start;
  }

  .store-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: start;
  }

  .store-footer__made {
    text-align: end;
  }
}

/* ——— ناوبری: موبایل پایین | دسکتاپ ریل راست ——— */
.app-nav {
  position: fixed;
  z-index: 40;
  pointer-events: none;
}

.app-nav__panel {
  position: relative;
  pointer-events: auto;
}

.app-nav__backdrop {
  display: none;
}

.app-nav__drawer {
  display: none;
}

.app-nav__drawer-only {
  display: none;
}

.app-nav__indicator {
  display: none;
}

.app-nav__link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.2;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease;
}

.app-nav__link:hover {
  color: var(--text);
}

.app-nav__link--active {
  color: var(--y-hot);
  background: rgba(255, 214, 10, 0.12);
}

.app-nav__link:active {
  transform: scale(0.96);
}

.app-nav__link:focus-visible {
  outline: 2px solid var(--y-hot);
  outline-offset: 2px;
}

.app-nav__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-nav__icon {
  width: 1.3rem;
  height: 1.3rem;
  flex-shrink: 0;
}

.app-nav__text {
  min-width: 0;
}

.app-nav__label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.app-nav__label--short {
  display: none;
}

.app-nav__rail-only {
  display: none;
}

.app-nav__head {
  display: none;
}

.app-nav__group {
  display: none;
}

/* موبایل — هدر شناور fixed + کشوی منو */
@media (max-width: 47.99rem) {
  :root {
    --store-header-float-gap: 0.5rem;
    --store-header-bar-h: 3.15rem;
    --store-header-space: calc(
      var(--store-header-float-gap) + env(safe-area-inset-top) + var(--store-header-bar-h) + 0.35rem
    );
  }

  .app-shell__main {
    padding-top: var(--store-header-space);
  }

  .store-header {
    position: fixed;
    top: calc(var(--store-header-float-gap) + env(safe-area-inset-top));
    inset-inline: max(0.65rem, env(safe-area-inset-left), env(safe-area-inset-right));
    z-index: 35;
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    max-width: none;
    margin-inline: 0;
    padding: 0.42rem 0.55rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 214, 10, 0.16);
    background: rgba(12, 10, 6, 0.58);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow:
      0 10px 36px rgba(0, 0, 0, 0.5),
      0 1px 0 rgba(255, 255, 255, 0.05) inset;
    --header-slide-out: calc(
      -100% - var(--store-header-float-gap) - env(safe-area-inset-top) - 0.35rem
    );
    transform: translate3d(0, 0, 0);
    transition: transform 0.48s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
  }

  .store-header.is-header-hidden {
    transform: translate3d(0, var(--header-slide-out), 0);
    pointer-events: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .store-header {
      transition-duration: 0.01ms;
    }
  }

  .store-header__menu {
    display: flex;
    grid-column: 1;
    justify-self: start;
  }

  .store-logo {
    grid-column: 2;
    justify-self: center;
    flex: none;
    gap: 0;
  }

  .store-logo__text {
    display: none;
  }

  .store-header__end {
    grid-column: 3;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
  }

  .store-header__auth {
    grid-column: auto;
    justify-self: auto;
    max-width: none;
    font-size: 0.68rem;
    padding: 0.4rem 0.55rem;
    min-height: 2.25rem;
    white-space: nowrap;
  }

  .app-nav {
    position: fixed;
    inset: 0;
    width: 0;
    height: 0;
    max-width: none;
    margin: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 45;
  }

  .app-nav__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 45;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.28s ease;
  }

  .app-nav.is-menu-open .app-nav__backdrop {
    pointer-events: auto;
    opacity: 1;
  }

  .app-nav__drawer {
    position: fixed;
    z-index: 50;
    inset-inline-start: 0;
    inset-inline-end: auto;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(17.5rem, 88vw);
    max-height: 100dvh;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.55rem max(0.75rem, env(safe-area-inset-bottom));
    background: var(--bg-soft);
    border-inline-end: 1px solid var(--border);
    box-shadow: 8px 0 36px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    visibility: hidden;
    translate: 100% 0;
    transition:
      translate 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.32s;
  }

  .app-nav.is-menu-open .app-nav__drawer {
    pointer-events: auto;
    visibility: visible;
    translate: 0 0;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .app-nav__drawer-only {
    display: flex;
  }

  /* فقط آیتم‌های منو — نه دکمه جمع‌کردن سایدبار دسکتاپ */
  .app-nav__head .app-nav__toggle.app-nav__rail-only {
    display: none;
  }

  .app-nav__scroll .app-nav__rail-only {
    display: block;
  }

  .app-nav__head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 214, 10, 0.12);
  }

  .app-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none;
    color: var(--text);
  }

  .app-nav__brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    transform: scaleX(-1);
  }

  .app-nav__brand-text {
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
  }

  .app-nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid rgba(255, 214, 10, 0.18);
    border-radius: 0.5rem;
    background: rgba(255, 214, 10, 0.06);
    color: var(--y-core);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .app-nav__close:hover {
    background: rgba(255, 214, 10, 0.14);
    color: var(--y-hot);
  }

  .app-nav__close-icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  .app-nav__drawer-foot {
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  .app-nav__scroll {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    padding: 0.25rem 0 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 193, 7, 0.3) transparent;
  }

  .app-nav__scroll > .app-nav__account,
  .app-nav__scroll > .app-nav__store {
    overflow: visible;
  }

  .app-nav__drawer .app-nav__scroll .app-nav__link,
  .app-nav__drawer .app-nav__scroll button {
    touch-action: auto;
  }

  .app-nav__group {
    display: block;
    margin: 0.55rem 0 0.2rem;
    padding-inline: 0.65rem;
    font-size: 0.62rem;
    font-weight: 800;
    color: rgba(255, 193, 7, 0.42);
    letter-spacing: 0.04em;
  }

  .app-nav__drawer .app-nav__link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.55rem;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
  }

  .app-nav__drawer .app-nav__icon-wrap {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
  }

  .app-nav__drawer .app-nav__label--full {
    display: block;
  }

  .app-nav__drawer .app-nav__label--short {
    display: none;
  }

  body.is-nav-menu-open {
    overflow: hidden;
  }

  .store-footer__links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 0.4rem;
  }

  .store-footer__col {
    padding-bottom: 0;
    border-bottom: none;
    min-width: 0;
  }

  .store-footer__heading {
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
  }

  .store-footer__list {
    gap: 0.3rem;
  }

  .store-footer__list a {
    font-size: 0.66rem;
  }

  #cats-heading,
  #offers-heading {
    scroll-margin-bottom: 1.25rem;
  }
}

/* ——— بخش فروشگاه: فقط در pages/home/home.css ——— */

/* تبلت بزرگ و دسکتاپ (از iPad Mini): سایدبار fixed + محتوا */
@media (min-width: 48rem) {
  body.brand-page,
  body.basket-page,
  body.account-page,
  body.product-page,
  body.products-page,
  body.categories-page,
  body.legal-page {
    padding-bottom: 0;
  }

  .app-shell {
    --shell-sidebar: var(--app-nav-rail-expanded);
    display: grid;
    /* RTL: ستون ۱ راست (منو)، ستون ۲ چپ (محتوا) */
    grid-template-columns: var(--shell-sidebar) minmax(0, 1fr);
    align-items: start;
    min-height: 100dvh;
    width: 100%;
    transition: grid-template-columns 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .app-shell.is-shell-collapsed {
    --shell-sidebar: var(--app-nav-rail-w);
  }

  .app-shell__main {
    grid-column: 2;
    grid-row: 1;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: clip;
  }

  /* سایدبار fixed روی ستون راست — محتوا در ستون ۲ زیر منو نمی‌رود */
  .app-nav,
  .app-nav.app-nav--rail {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: auto;
    bottom: 0;
    width: var(--shell-sidebar);
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    translate: none;
    pointer-events: auto;
    z-index: 30;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .app-nav__rail-only {
    display: block;
  }

  .app-nav__label--short {
    display: none;
  }

  .app-nav__label--full {
    display: block;
  }

  .app-nav__head {
    display: flex;
    flex: 0 0 auto;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding-bottom: 0.65rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 214, 10, 0.12);
    background: var(--bg-soft);
    isolation: isolate;
  }

  .app-nav__scroll {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.5rem 0 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 193, 7, 0.3) transparent;
  }

  .store-header__menu {
    display: none;
  }

  .app-nav__backdrop {
    display: none !important;
  }

  .app-nav__drawer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100dvh;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.55rem max(0.75rem, env(safe-area-inset-bottom));
    gap: 0;
    overflow: hidden;
    isolation: isolate;
    border-radius: 0;
    border: none;
    border-inline-end: 1px solid var(--border);
    background: var(--bg-soft);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: static;
    translate: none;
    visibility: visible;
    pointer-events: auto;
  }

  .app-nav.is-rail-collapsed .app-nav__head {
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding-bottom: 0.55rem;
  }

  .app-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
    text-decoration: none;
    color: var(--text);
  }

  .app-nav.is-rail-collapsed .app-nav__brand {
    justify-content: center;
    flex: 0 0 auto;
    width: 100%;
  }

  .app-nav__brand-logo {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    transform: scaleX(-1);
  }

  .app-nav__brand-text {
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.25s ease, max-width 0.35s ease;
    max-width: min(8.5rem, 100%);
  }

  .app-nav.is-rail-collapsed .app-nav__brand-text {
    display: none;
  }

  .app-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid rgba(255, 214, 10, 0.18);
    border-radius: 0.5rem;
    background: rgba(255, 214, 10, 0.06);
    color: var(--y-core);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .app-nav__toggle:hover {
    background: rgba(255, 214, 10, 0.14);
    color: var(--y-hot);
  }

  .app-nav__toggle-icon {
    width: 1.2rem;
    height: 1.2rem;
    transition: transform 0.35s ease;
  }

  .app-nav.is-rail-collapsed .app-nav__toggle-icon {
    transform: rotate(180deg);
  }

  .app-nav__group {
    display: block;
    flex: 0 0 auto;
    margin: 0.55rem 0 0.2rem;
    padding-inline: 0.65rem;
    font-size: 0.62rem;
    font-weight: 800;
    color: rgba(255, 193, 7, 0.42);
    letter-spacing: 0.04em;
    line-height: 1.3;
    transition: opacity 0.2s ease, margin 0.2s ease, height 0.2s ease;
  }

  .app-nav.is-rail-collapsed .app-nav__group {
    display: none;
  }

  .app-nav__indicator {
    display: block;
    position: absolute;
    z-index: 0;
    inset-inline-start: 0;
    top: 0;
    width: 3px;
    height: 2.35rem;
    border-radius: 0 3px 3px 0;
    background: var(--y-core);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.45);
    transform: translateY(var(--nav-indicator-y, 0));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }

  .app-nav__link {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.55rem;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
    color: var(--text-muted);
  }

  .app-nav__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
  }

  .app-nav__link--active {
    color: var(--y-hot);
    background: rgba(255, 214, 10, 0.12);
  }

  .app-nav__icon-wrap {
    grid-column: 1;
    grid-row: 1;
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
  }

  .app-nav__link--active .app-nav__icon-wrap {
    background: rgba(255, 214, 10, 0.14);
  }

  .app-nav__icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .app-nav__text {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    opacity: 1;
    transition: opacity 0.25s ease;
  }

  .app-nav__text .app-nav__label {
    font-size: 0.8rem;
    line-height: 1.25;
  }

  .app-nav__label--short {
    display: none;
  }

  .app-nav__label--full {
    display: block;
  }

  .app-nav__text > .app-nav__label:only-child {
    display: block;
  }

  .app-nav.is-rail-collapsed .app-nav__text {
    display: none;
  }

  .app-nav.is-rail-collapsed .app-nav__account-head-text,
  .app-nav.is-rail-collapsed .app-nav__account-title,
  .app-nav.is-rail-collapsed .app-nav__account-user,
  .app-nav.is-rail-collapsed .app-nav__account-label,
  .app-nav.is-rail-collapsed .app-nav__account-chevron,
  .app-nav.is-rail-collapsed .app-nav__store-head-text,
  .app-nav.is-rail-collapsed .app-nav__store-title,
  .app-nav.is-rail-collapsed .app-nav__store-sub,
  .app-nav.is-rail-collapsed .app-nav__store-chevron,
  .app-nav.is-rail-collapsed .app-nav__logout-btn-text {
    display: none;
  }

  .app-nav.is-rail-collapsed .app-nav__link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 0.45rem;
    column-gap: 0;
  }

  .app-nav.is-rail-collapsed .app-nav__icon-wrap {
    grid-column: 1;
  }

  #cats-heading,
  #offers-heading,
  #best-heading {
    scroll-margin-inline-start: 1rem;
  }
}

