/* ===== PhoneLand — فروشگاه موبایل ===== */
:root {
  --bg: #070910;
  --bg-2: #0a0e18;
  --panel: #101524;
  --panel-2: #151b2c;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #eef2ff;
  --muted: #94a1b9;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --ok: #34d399;
  --danger: #fb7185;
  --radius: 20px;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, .95);
  --header-h: 74px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 82% -8%, rgba(124, 92, 255, .22), transparent 62%),
    radial-gradient(760px 520px at 12% 4%, rgba(34, 211, 238, .13), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(124, 92, 255, .1), transparent 65%);
  pointer-events: none;
}

.container {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 9, 16, .72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 12px 26px -12px rgba(124, 92, 255, .9);
}

.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 11px; }

.brand-text {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.2px;
}

.brand-text small {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 2.5px;
  direction: ltr;
  text-align: right;
}

.nav {
  display: flex;
  gap: 6px;
  margin-inline-start: 22px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  color: #c3cde0;
  transition: .2s;
}

.nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: #dbe3f4;
  transition: .2s;
}

.icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: var(--line-strong); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.ghost { border: none; background: transparent; width: 36px; height: 36px; }

.cart-count {
  position: absolute;
  top: -5px;
  inset-inline-start: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--brand), #c026d3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(124, 92, 255, 1);
}

/* auth slot */
.auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #5b3ef0);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 14px 30px -16px rgba(124, 92, 255, 1);
  transition: .2s;
}

.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -16px rgba(124, 92, 255, 1); }
.auth-btn svg { width: 18px; height: 18px; }

.user-menu { position: relative; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 12px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: .2s;
}

.user-chip:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .09); }

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  color: #06121a;
  font-weight: 800;
  font-size: 13px;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 232px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: #101522;
  box-shadow: var(--shadow);
  display: none;
  z-index: 70;
}

.dropdown.open { display: block; animation: pop .16s ease-out; }

.dropdown-head {
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.dropdown-head b { display: block; font-size: 14px; }
.dropdown-head span { display: block; font-size: 12px; color: var(--muted); direction: ltr; text-align: right; word-break: break-all; }

.dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #d6deef;
  font-size: 13.5px;
  text-align: right;
}

.dropdown button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.dropdown button.danger { color: #fda4af; }
.dropdown button svg { width: 17px; height: 17px; opacity: .85; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 40px;
  padding-block: 62px 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, .35);
  background: rgba(124, 92, 255, .12);
  color: #c9bcff;
  font-size: 12.5px;
  font-weight: 600;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .18);
}

.hero h1 {
  margin-top: 20px;
  font-size: clamp(30px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -.6px;
}

.grad {
  background: linear-gradient(100deg, #a78bfa, #22d3ee 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.lead {
  margin-top: 16px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 15.5px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  transition: .2s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #5b3ef0);
  color: #fff;
  box-shadow: 0 18px 36px -20px rgba(124, 92, 255, 1);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -20px rgba(124, 92, 255, 1); }

.btn-ghost {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.hero-stats span { font-size: 12.5px; color: var(--muted); }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.stage-ring {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  border: 1px solid rgba(124, 92, 255, .22);
  box-shadow: inset 0 0 90px rgba(124, 92, 255, .14);
}

.stage-ring.ring-2 { width: 440px; height: 440px; border-color: rgba(34, 211, 238, .12); }

.hero-phone {
  position: relative;
  width: min(260px, 70%);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .6));
  animation: floaty 7s ease-in-out infinite;
}

.float-chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 21, 36, .82);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -26px #000;
  animation: floaty 6s ease-in-out infinite;
}

.float-chip span { font-size: 10.5px; color: var(--muted); }
.float-chip b { font-size: 12.5px; font-weight: 700; }
.chip-1 { top: 14%; inset-inline-start: 2%; animation-delay: .4s; }
.chip-2 { top: 44%; inset-inline-end: 0; animation-delay: 1.1s; }
.chip-3 { bottom: 14%; inset-inline-start: 8%; animation-delay: 1.7s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Sections ---------- */
.section-head { margin-bottom: 22px; }
section[id] { scroll-margin-top: calc(var(--header-h) + 18px); }
.section-head h2 { font-size: clamp(21px, 2.4vw, 27px); font-weight: 800; letter-spacing: -.4px; }
.section-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.brands { padding-block: 26px 10px; }

.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-chip {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: #cdd6e8;
  font-size: 13.5px;
  font-weight: 600;
  transition: .18s;
}

.brand-chip:hover { border-color: var(--line-strong); color: #fff; }

.brand-chip.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, .9), rgba(34, 211, 238, .75));
  border-color: transparent;
  color: #08101c;
  box-shadow: 0 12px 26px -16px rgba(124, 92, 255, 1);
}

.products { padding-block: 34px 20px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.search-wrap {
  position: relative;
  flex: 1 1 320px;
}

.search-wrap svg {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: .2s;
}

.search-wrap input::placeholder { color: #6f7c95; }
.search-wrap input:focus { border-color: rgba(124, 92, 255, .6); background: rgba(124, 92, 255, .06); box-shadow: 0 0 0 4px rgba(124, 92, 255, .1); }

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}

.sort-wrap label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.sort-wrap select {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.sort-wrap select option { background: #101522; color: #fff; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 27, 44, .9), rgba(13, 17, 29, .95));
  overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 255, .45);
  box-shadow: 0 30px 60px -40px rgba(124, 92, 255, .9);
}

.card-media {
  position: relative;
  height: 232px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 62%, rgba(255, 255, 255, .07), transparent 62%);
  overflow: hidden;
}

.card-media svg { width: 148px; height: auto; transition: transform .35s; }
.card:hover .card-media svg { transform: translateY(-6px) scale(1.04); }

.card-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(52, 211, 153, .16);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, .32);
  z-index: 2;
}

.card-badge.hot { background: rgba(251, 113, 133, .15); color: #fda4af; border-color: rgba(251, 113, 133, .3); }
.card-badge.new { background: rgba(34, 211, 238, .14); color: #67e8f9; border-color: rgba(34, 211, 238, .3); }

.discount-tag {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fb7185, #e11d48);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.card-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-brand {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .3px;
}

.card-title {
  font-size: 15.5px;
  font-weight: 700;
  margin-top: 2px;
  line-height: 1.5;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.spec-row span {
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  font-size: 10.5px;
  color: #a9b5cb;
}

.rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.rating svg { width: 14px; height: 14px; color: #fbbf24; }
.rating b { color: #e8eefb; font-size: 12.5px; }

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.price-box { display: flex; flex-direction: column; gap: 1px; }
.old-price { font-size: 11px; color: #74829c; text-decoration: line-through; }
.price { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.price small { font-size: 11px; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }

.add-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(124, 92, 255, .4);
  background: rgba(124, 92, 255, .16);
  color: #c4b5fd;
  transition: .2s;
}

.add-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.add-btn svg { width: 20px; height: 20px; }
.add-btn.added { background: rgba(52, 211, 153, .9); border-color: transparent; color: #04211a; }

.empty-state {
  padding: 60px 20px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, .02);
}

.empty-state svg { width: 42px; height: 42px; color: #4b5670; }
.empty-state h3 { margin-top: 12px; font-size: 17px; }
.empty-state p { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding-block: 46px 70px;
}

.feature-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(124, 92, 255, .15);
  border: 1px solid rgba(124, 92, 255, .3);
  color: #c4b5fd;
  margin-bottom: 14px;
}

.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 16px; margin-bottom: 4px; }
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.8; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  padding-block: 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand strong { font-size: 15px; }
.footer-brand p { font-size: 12.5px; color: var(--muted); max-width: 46ch; }
.footer-note { font-size: 12px; color: #6f7c95; }

/* ---------- Overlay & Drawer ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 5, 10, .66);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .25s;
}

.overlay.show { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  width: min(410px, 94vw);
  display: flex;
  flex-direction: column;
  background: #0b0f1a;
  border-right: 1px solid var(--line-strong);
  box-shadow: 40px 0 80px -30px #000;
  transform: translateX(-102%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}

.cart-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }

.pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(124, 92, 255, .2);
  border: 1px solid rgba(124, 92, 255, .35);
  color: #c4b5fd;
  font-size: 11.5px;
  font-weight: 700;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-body::-webkit-scrollbar { width: 6px; }
.drawer-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 99px; }

.cart-item {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

.cart-thumb {
  width: 66px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 22%, rgba(124, 92, 255, .26), rgba(255, 255, 255, .02) 72%);
  overflow: hidden;
}

.cart-thumb svg { width: 56px; height: auto; }
.cart-info { min-width: 0; }
.cart-info h4 { font-size: 13.5px; font-weight: 700; margin: 0 0 2px; }
.cart-info .cart-brand { font-size: 11px; color: var(--muted); }
.cart-info .cart-price { font-size: 13px; font-weight: 700; margin-top: 8px; }

.qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, .25);
}

.qty button {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #cfd8ea;
  font-size: 15px;
  line-height: 1;
}

.qty button:hover { background: rgba(255, 255, 255, .1); }
.qty span { min-width: 22px; text-align: center; font-size: 12.5px; font-weight: 700; }

.cart-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.remove-btn {
  border: none;
  background: transparent;
  color: #6f7c95;
  padding: 2px;
  display: grid;
  place-items: center;
}
.remove-btn:hover { color: var(--danger); }
.remove-btn svg { width: 16px; height: 16px; }

.cart-empty {
  flex: 1;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  padding: 40px 10px;
  color: var(--muted);
}

.cart-empty svg { width: 46px; height: 46px; margin: 0 auto 6px; color: #3d4860; }
.cart-empty h3 { font-size: 15px; color: #d6deef; }
.cart-empty p { font-size: 12.5px; margin-bottom: 14px; }

.drawer-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}

.drawer-foot .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #c2cde0;
  margin-bottom: 6px;
}

.drawer-foot .muted-row { color: var(--muted); font-size: 12.5px; }

.drawer-foot .row.total {
  margin: 12px 0 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  font-size: 14.5px;
  color: #fff;
}

.drawer-foot .row.total b { font-size: 17px; }

.drawer-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 11.5px;
  color: #6f7c95;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 10, .72);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s, visibility .22s;
  overflow-y: auto;
}

.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal-card {
  position: relative;
  width: min(430px, 100%);
  margin: auto;
  padding: 30px 28px 26px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #131a2b, #0c1019);
  box-shadow: 0 40px 100px -40px #000;
  transform: translateY(14px) scale(.98);
  transition: transform .24s;
}

.modal-backdrop.open .modal-card { transform: none; }

.modal-close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: #b9c4d8;
}

.modal-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.modal-close svg { width: 17px; height: 17px; }

.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head .brand-mark { margin: 0 auto 12px; }
.auth-head h2 { font-size: 20px; font-weight: 800; }
.auth-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.tab {
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: .18s;
}

.tab.active {
  background: linear-gradient(135deg, var(--brand), #5b3ef0);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(124, 92, 255, 1);
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form[hidden] { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: #c8d2e6; }

.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: .2s;
}

.field input::placeholder { color: #6a7690; }
.field input:focus { border-color: rgba(124, 92, 255, .7); background: rgba(124, 92, 255, .07); box-shadow: 0 0 0 3px rgba(124, 92, 255, .12); }
.field input[dir="ltr"] { text-align: left; font-size: 13.5px; }

.field.invalid input { border-color: rgba(251, 113, 133, .7); box-shadow: 0 0 0 3px rgba(251, 113, 133, .12); }

.error {
  min-height: 0;
  font-size: 11.5px;
  color: #fda4af;
  display: none;
}

.field.invalid .error { display: block; }

.input-wrap { position: relative; }

.input-wrap input { padding-right: 46px; padding-left: 14px; }

.eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #8b98b1;
}

.eye:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.eye svg { width: 18px; height: 18px; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #aab6cc;
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

.form-msg {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  background: rgba(251, 113, 133, .12);
  border: 1px solid rgba(251, 113, 133, .3);
  color: #fecdd3;
}

/* ---------- Google sign-in ---------- */
.google-slot {
  display: grid;
  justify-items: center;
  min-height: 44px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: #7d89a1;
  font-size: 11.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.google-setup {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .02);
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--muted);
}

.gs-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.gs-title svg { width: 16px; height: 16px; flex-shrink: 0; }

.google-setup code {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(124, 92, 255, .14);
  color: #c4b5fd;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  direction: ltr;
}

.gs-steps { margin-top: 6px; }
.gs-steps summary { cursor: pointer; font-size: 11px; color: #a5b1c8; }
.gs-steps summary:hover { color: #fff; }
.gs-steps ol { margin: 8px 0 0; padding-inline-start: 18px; font-size: 10.5px; line-height: 2; list-style-type: persian; }
.gs-steps li { margin-bottom: 2px; }

.prov {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 600;
  vertical-align: middle;
}

/* ---------- Orders ---------- */
.orders-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }

.order-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.order-top b { color: #e8eefb; font-size: 12.5px; }

.order-items { font-size: 12.5px; color: #c2cde0; line-height: 1.9; }
.order-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 24, 39, .96);
  backdrop-filter: blur(12px);
  color: #eef2ff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 24px 50px -24px #000;
  animation: toastIn .25s ease-out;
}

.toast.out { animation: toastOut .25s ease-in forwards; }
.toast .ico { width: 17px; height: 17px; flex-shrink: 0; }
.toast.ok .ico { color: var(--ok); }
.toast.err .ico { color: var(--danger); }

@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-block: 44px 30px; gap: 26px; text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-visual { min-height: 360px; order: -1; }
  .nav { display: none; }
}

@media (max-width: 620px) {
  .container { width: calc(100% - 28px); }
  .brand-text small { display: none; }
  .brand-text { font-size: 16px; }
  .auth-btn span { display: none; }
  .auth-btn { padding: 0 13px; }
  .user-chip .uname { display: none; }
  .hero-stats { gap: 22px; }
  .hero-stats strong { font-size: 20px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-media { height: 168px; }
  .card-media svg { width: 110px; }
  .card-body { padding: 0 12px 12px; }
  .card-title { font-size: 13.5px; }
  .price { font-size: 14px; }
  .add-btn { width: 38px; height: 38px; }
  .modal-card { padding: 26px 20px 22px; }
  .stage-ring { width: 260px; height: 260px; }
  .stage-ring.ring-2 { width: 330px; height: 330px; }
  .hero-visual { min-height: 320px; }
  .hero-phone { width: min(196px, 58%); }
  .float-chip { padding: 7px 11px; border-radius: 12px; }
  .float-chip b { font-size: 11.5px; }
  .float-chip span { font-size: 10px; }
  .card-badge, .discount-tag { font-size: 10px; padding: 3px 8px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
