/* =========================================================
   Rozen Shop - Design System
========================================================= */
:root {
  --bg: #080B18;
  --bg-2: #070B18;
  --surface: #111727;
  --surface-2: #161C2D;
  --purple: #8B5CF6;
  --purple-light: #A78BFA;
  --purple-glow: rgba(139, 92, 246, 0.35);
  --text-primary: #F5F5F7;
  --text-secondary: #A7A9B5;
  --border: rgba(255,255,255,0.10);
  --glass-bg: rgba(255,255,255,0.04);
  --glass-bg-strong: rgba(255,255,255,0.06);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 30px rgba(0,0,0,0.35);
  --shadow-purple: 0 8px 24px rgba(139, 92, 246, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* فونت وزیرمتن */
@font-face {
  font-family: 'Vazirmatn';
  src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Vazirmatn', sans-serif;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at 20% -10%, rgba(139,92,246,0.12), transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(139,92,246,0.08), transparent 40%),
    linear-gradient(180deg, var(--bg-2) 0%, #06070f 100%);
}
button, input, textarea, select { font-family: 'Vazirmatn', sans-serif; border: none; outline: none; background: none; color: inherit; }
a { text-decoration: none; color: inherit; }
ul, li { list-style: none; }
img { display: block; max-width: 100%; }

/* =========================================================
   Animations
========================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeInUp { animation: fadeInUp 0.3s var(--ease) both; }
.animate-fadeIn { animation: fadeIn 0.3s var(--ease) both; }
.animate-scaleIn { animation: scaleIn 0.3s var(--ease) both; }

/* =========================================================
   App Container
========================================================= */
.app {
  width: 100%;
  max-width: 430px;
  min-width: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 0 16px;
}

@media (min-width: 431px) and (max-width: 768px) {
  .app { max-width: 100%; padding: 0 24px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .app { max-width: 700px; padding: 0 32px; }
}
@media (min-width: 1025px) {
  .app { max-width: 900px; padding: 0 40px; }
}

/* =========================================================
   Header
========================================================= */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2px 18px;
  background: rgba(8, 11, 24, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 20px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-right, .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-size: 17px;
  color: var(--text-primary);
  position: relative;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.icon-btn:hover {
  transform: scale(1.08);
  background: var(--glass-bg-strong);
  box-shadow: 0 4px 15px var(--purple-glow);
}
.icon-btn:active { transform: scale(0.92); }
.hamburger-btn { background: transparent; border: none; box-shadow: none; width: auto; height: auto; font-size: 22px; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  box-shadow: 0 0 20px var(--purple-glow);
  overflow: hidden;
}
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-name {
  font-weight: 900;
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(139,92,246,0.5);
}
.notif-dot {
  position: absolute;
  top: 9px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
  animation: pulse 2s infinite;
}
.login-header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.3s;
}
.login-header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--purple-glow);
}

/* =========================================================
   Search Bar
========================================================= */
.search-wrap { margin-bottom: 18px; margin-top: 16px; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid rgba(139,92,246,0.25);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.search-icon { color: var(--purple-light); font-size: 17px; }
.search-bar input {
  flex: 1;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}
.search-bar input::placeholder { color: var(--text-secondary); }

/* =========================================================
   Stock Status Bar
========================================================= */
.stock-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(139,92,246,0.05));
  border: 1px solid rgba(139,92,246,0.3);
  box-shadow: var(--shadow-soft);
}
.stock-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  box-shadow: 0 0 15px var(--purple-glow);
  font-size: 20px;
  color: #fff;
}
.stock-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stock-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}
.stock-value {
  font-size: 18px;
  font-weight: 900;
  color: var(--purple-light);
}

/* =========================================================
   Hero Banner
========================================================= */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  margin-bottom: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #171025 0%, #120C1E 55%, #0D0B18 100%);
  border: 1px solid rgba(139,92,246,0.25);
  box-shadow: var(--shadow-soft), 0 0 40px rgba(139,92,246,0.1);
}
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(139,92,246,0.4), transparent 55%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 58%;
}
.badge {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--purple);
  color: #fff;
  margin-bottom: 4px;
  box-shadow: 0 0 15px var(--purple-glow);
  animation: pulse 2s infinite;
}
.hero-sub { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.hero-title {
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(90deg, #fff, var(--purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
  text-shadow: 0 0 30px rgba(139,92,246,0.3);
}
.hero-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; }
.hero-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 4px 20px var(--purple-glow);
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--purple-glow);
}
.hero-btn:active { transform: scale(0.95); }
.hero-btn i { font-size: 12px; }
.hero-image {
  flex-shrink: 0;
  width: 40%;
  display: flex;
  justify-content: center;
}
.hero-image img {
  max-width: 140px;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
  animation: float 4s ease-in-out infinite;
}
.hero-dots {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s var(--ease);
}
.dot.active {
  width: 20px;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
}

/* =========================================================
   Features
========================================================= */
.features-card {
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
  padding: 16px 10px;
  margin-bottom: 22px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
  gap: 4px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.features-card::-webkit-scrollbar { display: none; }
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 78px;
  text-align: center;
}
.feature-item i { color: var(--purple-light); font-size: 19px; }
.feature-text { display: flex; flex-direction: column; gap: 2px; }
.feature-title { font-size: 11px; font-weight: 800; color: var(--text-primary); }
.feature-sub { font-size: 9px; color: var(--text-secondary); font-weight: 500; }
.feature-divider { width: 1px; height: 34px; background: var(--border); flex-shrink: 0; }

/* =========================================================
   Products
========================================================= */
.products-section { margin-bottom: 22px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h2 { font-size: 17px; font-weight: 900; color: var(--text-primary); }
.see-more { font-size: 12px; color: var(--purple-light); font-weight: 700; cursor: pointer; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.product-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 16px 12px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 12px 30px var(--purple-glow);
}
.product-card:active { transform: scale(0.97); }

.fav-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-strong);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  z-index: 2;
  transition: all 0.2s var(--ease);
}
.fav-btn:hover { transform: scale(1.15); }
.fav-btn.active { color: #F472B6; border-color: rgba(244,114,182,0.5); }
.fav-btn.active i { font-weight: 900; }

.product-img {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 4px;
}
.product-img img { max-height: 100%; object-fit: contain; }

.product-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.4;
}
.product-price {
  font-size: 12px;
  color: var(--purple-light);
  font-weight: 800;
  text-align: center;
}

.cart-btn {
  margin-top: 8px;
  width: 100%;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  border: 1px solid rgba(139,92,246,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-light);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.25s var(--ease);
}
.cart-btn:hover {
  background: rgba(139,92,246,0.15);
  box-shadow: 0 4px 15px var(--purple-glow);
}
.cart-btn:active { transform: scale(0.92); }
.cart-btn.added {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  box-shadow: 0 4px 15px var(--purple-glow);
}

/* =========================================================
   Promo Banner
========================================================= */
.promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 22px;
  background: linear-gradient(120deg, rgba(139,92,246,0.18), rgba(255,255,255,0.03));
  border: 1px solid rgba(139,92,246,0.3);
  box-shadow: var(--shadow-soft);
}
.promo-title { font-size: 14px; font-weight: 800; color: var(--text-primary); line-height: 1.6; margin-bottom: 6px; }
.promo-sub { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.promo-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(139,92,246,0.4), rgba(139,92,246,0.1));
  box-shadow: 0 0 25px var(--purple-glow);
  color: #fff;
  font-size: 20px;
}

/* =========================================================
   Bottom Navigation
========================================================= */
.bottom-spacer { height: 96px; }
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px 8px 10px;
  background: rgba(10,12,24,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  border-radius: 26px 26px 0 0;
  z-index: 50;
}
.bottom-nav::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.8);
}
.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  transition: all 0.25s var(--ease);
}
.nav-item i { font-size: 18px; }
.nav-item:active { transform: scale(0.9); }
.nav-item.active { color: var(--purple-light); }
.nav-item.active i { text-shadow: 0 0 10px var(--purple-glow); }
.cart-nav-item { position: relative; }
.cart-count {
  position: absolute;
  top: -6px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--purple);
}

/* =========================================================
   Side Panel
========================================================= */
.side-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.side-panel.open { display: block; }
.side-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}
.side-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  padding: 20px;
}
.side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s var(--ease);
}
.side-link:hover,
.side-link.active {
  background: var(--glass-bg);
  color: var(--text-primary);
}
.side-link i { width: 20px; text-align: center; }
.side-sep { height: 1px; background: var(--border); margin: 8px 0; }

/* =========================================================
   Modals
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
}

/* =========================================================
   Toast
========================================================= */
.toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  animation: toastIn 0.3s var(--ease);
}
.toast.success { border-color: rgba(34,197,94,0.5); color: #4ade80; }
.toast.error { border-color: rgba(239,68,68,0.5); color: #f87171; }
.toast.info { border-color: rgba(139,92,246,0.5); color: var(--purple-light); }

/* =========================================================
   Footer
========================================================= */
.footer {
  padding: 24px 16px 32px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.footer-text { font-size: 13px; color: var(--text-secondary); font-weight: 700; }
.footer-credit { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.dev-name {
  font-weight: 900;
  color: var(--purple-light);
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 15px;
}
.enamad-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.enamad-container img {
  width: 85px;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* =========================================================
   Login Page
========================================================= */
.login-body {
  background:
    radial-gradient(circle at 20% -10%, rgba(139,92,246,0.2), transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(139,92,246,0.12), transparent 40%),
    linear-gradient(180deg, #0a0a18 0%, #06070f 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-container {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(160deg, rgba(17,23,39,0.98), rgba(10,12,24,0.98));
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 28px;
  padding: 40px 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(139,92,246,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.login-logo {
  text-align: center;
  margin-bottom: 30px;
}
.login-logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--purple-glow);
  overflow: hidden;
}
.login-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.login-logo h1 {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -1px;
}
.login-logo p {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}
.login-header {
  margin-bottom: 24px;
}
.login-header h2 {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}
.login-header p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}
.phone-input-wrap {
  position: relative;
}
.phone-prefix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple-light);
  font-size: 14px;
  font-weight: 700;
}
.phone-input-wrap input {
  width: 100%;
  padding: 16px 90px 16px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  direction: ltr;
  outline: none;
  transition: all 0.3s;
}
.phone-input-wrap input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 20px rgba(139,92,246,0.2);
  background: rgba(139,92,246,0.03);
}
.login-btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--purple), #6D28D9);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 25px var(--purple-glow);
}
.login-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px var(--purple-glow);
}
.login-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}
.login-btn-secondary {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

/* =========================================================
   Login Tabs
========================================================= */
.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 6px;
}
.login-tab {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}
.login-tab.active {
    background: linear-gradient(135deg, var(--purple), #6D28D9);
    color: #fff;
    box-shadow: 0 4px 15px var(--purple-glow);
}

/* =========================================================
   Password Input
========================================================= */
.password-input-wrap {
    position: relative;
}
.password-input-wrap input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    direction: rtl;
    outline: none;
    transition: all 0.3s;
}
.password-input-wrap input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 20px rgba(139,92,246,0.2);
}
.password-toggle {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

/* =========================================================
   Input Icon
========================================================= */
.input-wrap {
    position: relative;
}
.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--purple-light);
    font-size: 16px;
}
.input-wrap input {
    width: 100%;
    padding: 16px 45px 16px 16px;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    direction: rtl;
    outline: none;
    transition: all 0.3s;
}
.input-wrap input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 20px rgba(139,92,246,0.2);
}

/* =========================================================
   Login Divider
========================================================= */
.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}
.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.login-divider span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* =========================================================
   Terms Checkbox
========================================================= */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
}
.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--purple);
    cursor: pointer;
}
.terms-checkbox label {
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.8;
}
.terms-checkbox label a {
    color: var(--purple-light);
    font-weight: 700;
    text-decoration: underline;
}

/* =========================================================
   OTP Inputs
========================================================= */
.otp-inputs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
}

.otp-digit {
    flex: 1;
    min-width: 0;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s;
    max-width: 52px;
}

.otp-digit:focus {
    border-color: var(--purple);
    box-shadow: 0 0 20px rgba(139,92,246,0.2);
    background: rgba(139,92,246,0.05);
}

.otp-digit.filled {
    border-color: var(--purple);
    background: rgba(139,92,246,0.1);
}

.otp-digit.verified {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

/* =========================================================
   Responsive OTP (موبایل)
========================================================= */
@media (max-width: 380px) {
    .otp-inputs {
        gap: 4px;
    }
    
    .otp-digit {
        height: 48px;
        font-size: 18px;
        border-radius: 10px;
    }
}

@media (max-width: 340px) {
    .otp-inputs {
        gap: 3px;
    }
    
    .otp-digit {
        height: 44px;
        font-size: 16px;
        border-radius: 8px;
    }
}
/* =========================================================
   OTP Timer
========================================================= */
.otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(139,92,246,0.05);
    border: 1px solid rgba(139,92,246,0.15);
}
.otp-timer-icon {
    color: var(--purple-light);
    font-size: 14px;
}
.otp-timer span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   Responsive
========================================================= */
@media (min-width: 769px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1025px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}
/* =========================================================
   Rules Page
========================================================= */
.rules-page {
    padding: 20px 0;
}

.rules-container {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
}

.rules-header {
    text-align: center;
    margin-bottom: 30px;
}

.rules-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--purple), #6D28D9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 0 25px var(--purple-glow);
}

.rules-header h1 {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
}

.rules-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rule-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
}

.rule-section h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--purple-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-section h2::before {
    content: "";
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--purple), var(--purple-light));
}

.rule-section p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 2;
}

.rule-section ul {
    list-style: disc;
    padding-right: 20px;
    margin-top: 8px;
}

.rule-section ul li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 2.2;
    margin-bottom: 4px;
}

.rule-section a {
    color: var(--purple-light);
    font-weight: 700;
    text-decoration: underline;
}

.rules-notice {
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(34,197,94,.22);
    background: rgba(34,197,94,.06);
}

.rules-notice > i {
    flex: 0 0 auto;
    font-size: 20px;
    color: #86efac;
    margin-top: 2px;
}

.rules-notice strong,
.rules-notice span {
    display: block;
}

.rules-notice strong {
    color: #fff;
    font-size: 12px;
    margin-bottom: 4px;
}

.rules-notice span {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.9;
}

.kyc-rules-box {
    margin-top: 16px;
}

.rule-method p strong,
.rule-section p strong,
.rule-section li strong {
    color: #fff;
}

/* =========================================================
   Rule Methods
========================================================= */
.rule-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

@media (min-width: 600px) {
    .rule-methods {
        grid-template-columns: repeat(3, 1fr);
    }
}

.rule-method {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.rule-method-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.rule-method-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.rule-method p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* =========================================================
   Rules Footer
========================================================= */
.rules-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.rules-footer p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 2;
}
/* =========================================================
   Checkout Page
========================================================= */
.checkout-page {
    padding: 20px 0;
}

.checkout-container {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.checkout-header {
    text-align: center;
    margin-bottom: 24px;
}

.checkout-header h1 {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 4px;
}

.checkout-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-info p:first-child {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.checkout-item-total {
    font-size: 14px;
    font-weight: 800;
    color: var(--purple-light);
}

.checkout-summary {
    background: rgba(139,92,246,0.05);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.summary-row strong {
    color: var(--text-primary);
}

.summary-row.total {
    border-top: 1px solid rgba(139,92,246,0.2);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 16px;
    font-weight: 900;
}

.summary-row.total strong {
    color: var(--purple-light);
    font-size: 18px;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--purple), #6D28D9);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 25px var(--purple-glow);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px var(--purple-glow);
}

.checkout-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
/* Product media */
.product-card .product-img {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 0;
}
.product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}
.product-card.is-unavailable {
    opacity: .72;
}
.product-stock {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--text-secondary);
}
.cart-item-method {
    font-size: 11px;
    color: var(--purple-light);
    margin-top: 3px;
}


/* Performance layer */
html { scroll-behavior: auto; }
.header, .search-bar, .features-card, .product-card, .bottom-nav, .modal-overlay, .side-overlay, .login-container {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.header { background: rgba(8,11,24,.96); }
.search-bar, .features-card, .product-card { background: #111727; }
.bottom-nav { background: rgba(10,12,24,.98); }
.modal-overlay { background: rgba(0,0,0,.82); }
.side-overlay { background: rgba(0,0,0,.78); }
img { image-rendering: auto; }
@media (hover:none) {
  .product-card:hover, .login-btn-primary:hover { transform: none; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Login / register visual refresh */
.login-body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(700px 420px at 15% 15%, rgba(139,92,246,.20), transparent 65%),
    radial-gradient(600px 420px at 88% 82%, rgba(109,40,217,.16), transparent 65%),
    #070a15;
}
.login-body::before, .login-body::after {
  content: ""; position: fixed; pointer-events: none; border-radius: 50%;
  border: 1px solid rgba(167,139,250,.10);
}
.login-body::before { width: 520px; height: 520px; top: -250px; right: -170px; }
.login-body::after { width: 380px; height: 380px; bottom: -210px; left: -130px; }
.login-page { position: relative; z-index: 1; width: 100%; }
.login-container {
  position: relative; overflow: hidden; max-width: 470px; padding: 34px 32px 30px;
  background: linear-gradient(155deg, rgba(18,23,41,.99), rgba(9,12,24,.99));
  border: 1px solid rgba(167,139,250,.20);
  box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 70px rgba(109,40,217,.12);
}
.login-container::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, transparent, var(--purple), var(--purple-light), transparent);
}
.login-logo { margin-bottom: 22px; }
.login-logo-icon { width: 74px; height: 74px; border-radius: 22px; box-shadow: 0 14px 40px rgba(139,92,246,.24); }
.login-logo h1 { font-size: 27px; }
.login-tabs { margin-bottom: 22px; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.025); }
.login-tab { min-height: 48px; }
.login-header { padding: 2px 2px 0; margin-bottom: 20px; }
.login-header h2 { font-size: 22px; letter-spacing: -.4px; }
.login-form { gap: 11px; }
.login-label { margin-top: 4px; }
.phone-input-wrap input, .password-input-wrap input, .input-wrap input {
  min-height: 54px; border-radius: 15px; background: #0d1323; border-color: rgba(255,255,255,.08);
}
.phone-prefix { display:flex; align-items:center; gap:7px; }
.phone-prefix i { font-size: 12px; }
.login-btn-primary { min-height: 54px; margin-top: 6px; border-radius: 15px; }
.login-btn-secondary { min-height: 50px; border-radius: 15px; }
.otp-inputs { gap: 9px !important; margin: 20px 0 16px; }
.otp-digit {
  width: 48px !important; height: 56px !important; border-radius: 14px !important;
  background: #0d1323 !important; border: 1px solid rgba(255,255,255,.08) !important;
  font-size: 21px !important;
}
.otp-digit:focus { border-color: var(--purple) !important; box-shadow: 0 0 0 4px rgba(139,92,246,.12); }
@media(max-width:520px){
  .login-page { padding: 12px; align-items: flex-start; padding-top: 24px; }
  .login-container { padding: 28px 19px 22px; border-radius: 23px; }
  .login-logo-icon { width: 66px; height: 66px; border-radius: 19px; }
  .login-logo h1 { font-size: 24px; }
}

.login-security-line {
  display:flex; align-items:center; justify-content:center; gap:7px; flex-wrap:wrap;
  margin:-7px 0 22px; color:#858ba1; font-size:10px;
}
.login-security-line span {
  display:inline-flex; align-items:center; gap:5px; padding:6px 9px;
  border:1px solid rgba(255,255,255,.055); border-radius:999px; background:rgba(255,255,255,.018);
}
.login-security-line i { color:var(--purple-light); font-size:10px; }


/* Premium slide-out navigation */
.side-panel{display:block;visibility:hidden;pointer-events:none;opacity:0;transition:opacity .22s ease;z-index:1000}
.side-panel.open{visibility:visible;pointer-events:auto;opacity:1}
.side-overlay{opacity:0;transition:opacity .25s ease;background:rgba(3,5,12,.72);backdrop-filter:blur(9px)}
.side-panel.open .side-overlay{opacity:1}
.side-content{transform:translateX(105%);transition:transform .28s cubic-bezier(.2,.8,.2,1);width:min(330px,88vw);padding:18px 15px;background:linear-gradient(180deg,#10172a,#0b1020);border-left:1px solid rgba(167,139,250,.15);box-shadow:-25px 0 80px rgba(0,0,0,.45);overflow-y:auto}
.side-panel.open .side-content{transform:translateX(0)}
.side-header{padding:4px 5px 16px;border-bottom:1px solid rgba(255,255,255,.06);margin-bottom:10px}
.side-nav{gap:3px}.side-link{position:relative;padding:13px 12px;border:1px solid transparent}.side-link i{color:#8e9ab1}.side-link:hover,.side-link.active{background:rgba(139,92,246,.1);border-color:rgba(139,92,246,.12);color:#fff}.side-link.active:after{content:"";position:absolute;right:0;top:10px;bottom:10px;width:3px;border-radius:99px;background:#a78bfa}.side-link.active i{color:#c4b5fd}.side-nav .side-link:nth-last-child(1){margin-bottom:8px}
@media(max-width:560px){.side-content{width:min(330px,91vw);padding:14px}.side-link{padding:14px 12px}}

/* Robust mobile bottom navigation */
.bottom-nav{box-sizing:border-box;padding-bottom:max(10px,env(safe-area-inset-bottom));}
.bottom-nav .nav-item{min-width:56px;border:0;background:transparent;padding:7px 8px;border-radius:14px;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.bottom-nav .nav-item.active,.bottom-nav .nav-item.nav-loading{background:rgba(139,92,246,.14);color:#c4b5fd;transform:none;}
.bottom-nav .nav-item.nav-loading{animation:navPulse .7s ease-in-out infinite alternate;}
@keyframes navPulse{from{box-shadow:0 0 0 rgba(139,92,246,0)}to{box-shadow:0 0 20px rgba(139,92,246,.16)}}
@media(max-width:359px){.bottom-nav{padding-left:2px;padding-right:2px}.bottom-nav .nav-item{min-width:48px;padding-left:4px;padding-right:4px;font-size:9px}.bottom-nav .nav-item i{font-size:16px}}
.tab-transitioning .bottom-nav{pointer-events:none;}
