/* ==========================================================================
   ZHENOM V52-B — Storefront Design System (SINGLE LIGHT THEME)
   Warm Sand canvas (#f3f4f6) + Pure White surfaces + Deep Bronze accent
   Typography: Estedad (Persian) + Inter/System (English)
   This file intentionally contains NO [data-theme="dark"] rules.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --bg-elevated: #f9fafb;
  --bg-topbar: rgba(255, 255, 255, 0.94);
  --header-bg: rgba(255, 255, 255, 0.94);
  --surface: #ffffff;
  --surface2: #f9fafb;
  --surface3: #f9fafb;
  --line: #e5e7eb;
  --line-strong: #a7f3d0;
  --line-light: #f1f5f9;
  --text: #0f2922;
  --text-secondary: #335c50;
  --muted: #5c7d73;
  --gold: #059669;
    --bronze: #10b981;
  --gold-light: #34d399;
  --gold-dim: rgba(16, 185, 129, 0.14);
  --gold-border: rgba(16, 185, 129, 0.42);
  --btn-text: #FFFFFF;
  --success: #047857;
  --success-dim: #ECFDF5;
  --success-border: rgba(5, 150, 105, 0.30);
  --warning: #047857;
  --warning-dim: #ecfdf5;
  --warning-border: rgba(16, 185, 129, 0.30);
  --danger: #B91C1C;
  --danger-dim: #FEF2F2;
  --danger-border: rgba(185, 28, 28, 0.30);
  --info: #059669;
  --info-dim: #ecfdf5;
  --purple: #059669;
  --rose: #b91c1c;
  --chart-track: rgba(15, 23, 42, 0.10);
  --input-surface: #FFFFFF;
  --card-subtle-bg: #e6f7ef;
  --media-frame-bg: #e6f7ef;
  --banner-danger-bg: #FEF2F2;
  --banner-danger-border: rgba(185, 28, 28, 0.30);
  --banner-danger-text: #B91C1C;
  --banner-warning-bg: #ecfdf5;
  --banner-warning-border: rgba(16, 185, 129, 0.30);
  --banner-warning-text: #047857;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --z-header: 30;
  --z-bottom-nav: 35;
  --z-drawer: 50;
  --z-modal: 60;
  --z-toast: 70;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 4px 12px -4px rgba(6, 78, 59, 0.08);
  --shadow-md: 0 12px 30px -14px rgba(6, 78, 59, 0.14);
  --shadow-lg: 0 18px 42px -12px rgba(6, 78, 59, 0.18);
  --card-shadow: 0 12px 30px -14px rgba(6, 78, 59, 0.12);
}

/* Base Surfaces — Reduced borders, subtle depth */
.zh-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s var(--ease-standard), box-shadow 0.24s var(--ease-standard), border-color 0.24s var(--ease-standard);
}

.zh-card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-border);
}

.zh-surface-muted {
  background: var(--surface3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

/* Display Typography */
.zh-h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}

.zh-h2 {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

/* Buttons */
.zh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease-standard), background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}

.zh-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.zh-btn-primary {
  background: #0f2922;
  color: var(--btn-text) !important;
  border: 1px solid transparent;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.18);
}

.zh-btn-primary:hover:not(:disabled) {
  background: #374151;
  transform: translateY(-1px);
}

.zh-btn-secondary {
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 600;
}

.zh-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
  border-color: var(--gold-border);
  color: var(--gold);
}

.zh-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.zh-btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  color: var(--text);
}

.zh-btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

/* Micro-interactions: Skeleton shimmer, live pulse, fade-up */
@keyframes zhShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.zh-skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: zhShimmer 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

@keyframes zhPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.92); }
}

.live-dot {
  animation: zhPulse 2s infinite ease-in-out;
}

@keyframes zhSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.zh-animate-in {
  animation: zhSlideUp 0.28s var(--ease-standard) both;
}

/* Scrollbar utilities */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Horizontal Snap Carousel on Mobile */
@media (max-width: 1023px) {
  .zh-snap-row {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .zh-snap-row > * {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* Mobile-First Bottom Navigation — V45: strictly ONE horizontal, evenly-aligned row */
.zh-mobile-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-bottom-nav);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  width: 100%;
  box-sizing: border-box;
  gap: 0;
}

/* Every bottom-nav item is a single equal-width column cell on one baseline */
.zh-mobile-nav > button {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  height: 52px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 0 2px;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Uniform label typography so all 5 items align perfectly */
.zh-mobile-nav > button > span {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10.5px;
  line-height: 1.1;
}

/* Icon wrapper (first span) must not clip the cart badge */
.zh-mobile-nav > button > span:first-child {
  display: inline-flex;
  overflow: visible;
  flex: 0 0 auto;
}

/* Uniform icon size 18px */
.zh-mobile-nav > button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

@media (min-width: 1024px) {
  .zh-mobile-nav {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  body {
    padding-bottom: 84px;
  }
}

/* Sticky Mobile Buy Bar for Product Detail */
.zh-mobile-buybar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-bottom-nav);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .zh-mobile-buybar {
    display: none !important;
  }
}

/* Responsive Product Detail Split Grid */
.zh-pdp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .zh-pdp-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 2rem;
  }
}

.zh-sticky-panel {
  position: sticky;
  top: 88px;
}

/* Customer Dashboard Layout */
.zh-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .zh-dashboard-grid {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.5rem;
  }
}


/* === ZHENOM V35.3 Complete Self-Hosted Utility Layer (Storefront & Central Admin) === */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-3\.5 { gap: 0.875rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-2\.5 { row-gap: 0.625rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
.w-full { width: 100%; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.h-2 { height: 0.5rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-7xl { max-width: 80rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-xl { max-width: 36rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-14 { margin-top: 3.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pt-10 { padding-top: 2.5rem; }
.pb-8 { padding-bottom: 2rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-\[11px\] { font-size: 11px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }
.text-start { text-align: start; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--line); }
.border-0 { border: 0; }
.border-t { border-top: 1px solid var(--line); }
.border-b { border-bottom: 1px solid var(--line); }
.border-cyber-border { border-color: var(--line); }
.border-slate-700 { border-color: var(--line-strong, var(--line)); }
.border-slate-800 { border-color: var(--line); }
.border-amber-500\/30, .border-amber-500\/40 { border-color: var(--gold-border); }
.border-emerald-700\/40 { border-color: var(--success-border); }
.border-rose-500\/40 { border-color: var(--danger-border); }
.bg-transparent { background-color: transparent; }
/* Warm neutral scrims — never steely black on the sand canvas. */
.bg-black\/20 { background-color: rgba(15, 23, 42, 0.08); }
.bg-black\/25 { background-color: rgba(15, 23, 42, 0.10); }
.bg-black\/30 { background-color: rgba(15, 23, 42, 0.08); }
.bg-black\/40 { background-color: rgba(15, 23, 42, 0.16); }
.bg-black\/75 { background-color: rgba(15, 23, 42, 0.50); }
.bg-amber-500\/10 { background-color: var(--gold-dim); }
.bg-emerald-400 { background-color: var(--success); }
.bg-emerald-950\/50 { background-color: var(--success-dim); }
.bg-rose-950\/60 { background-color: var(--danger-dim); }
.bg-slate-900\/70, .bg-slate-900\/90 { background-color: var(--surface2); }
.bg-slate-950 { background-color: var(--surface); }
.text-slate-100, .text-slate-200 { color: var(--text); }
.text-slate-300, .text-slate-400 { color: var(--text-secondary); }
.text-slate-500 { color: var(--muted); }
.text-emerald-300, .text-emerald-400 { color: var(--success); }
.text-amber-200, .text-amber-300, .text-amber-400 { color: var(--warning); }
.text-rose-300, .text-rose-400 { color: var(--danger); }
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.backdrop-blur-xl { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.cursor-pointer { cursor: pointer; }
.accent-amber-500 { accent-color: var(--gold); }
.transition { transition: all 0.2s ease; }

/* === V52-B Responsive Mobile, Tablet & Surface Rules (Tailwind v3 handles utility breakpoints) === */
.zh-cat-card {
  width: 240px;
  max-width: 82vw;
}
@media (min-width: 768px) {
  .zh-cat-card {
    width: 100%;
    max-width: 100%;
  }
}

/* === V90.8 Bulletproof Responsive Header & Unified Radius System === */
.zh-card { border-radius: 20px !important; }
.zh-btn, .zh-input, .zh-select, .zh-chip, .zh-pill { border-radius: 12px !important; }
.zh-badge { border-radius: 8px !important; }

.zh-topbar-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
  padding-inline: 8px !important;
}
.zh-topbar-brand-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
}
.zh-topbar-tools-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.zh-topbar-search-wrap {
  position: relative;
  flex: 1 1 0% !important;
  min-width: 0 !important;
}
.zh-desktop-actions {
  display: none !important;
}
.zh-mobile-only {
  display: inline-flex !important;
}
.zh-desktop-only {
  display: none !important;
}
.zh-nav-bar-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
  padding-inline: 16px !important;
}
.zh-nav-right-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
}
.zh-nav-right-leftpair {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
}

@media (min-width: 768px) {
  .zh-topbar-inner {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    padding-inline: 16px !important;
  }
  .zh-topbar-brand-row {
    width: auto !important;
    flex-shrink: 0 !important;
  }
  .zh-topbar-tools-row {
    flex: 1 1 auto !important;
    justify-content: space-between !important;
    gap: 14px !important;
  }
  .zh-topbar-search-wrap {
    max-width: 560px !important;
    margin-inline: auto !important;
  }
  .zh-desktop-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }
  .zh-mobile-only {
    display: none !important;
  }
  .zh-desktop-only {
    display: inline !important;
  }
}

@media (min-width: 1024px) {
  .zh-nav-right-group {
    width: auto !important;
    flex-shrink: 0 !important;
    justify-content: flex-end !important;
  }
}

/* V90.9: Uniform 36x36 mobile header icon buttons (Menu, EN/FA, Cart, Login) — Desktop untouched */
@media (max-width: 767px) {
  .zh-mob-icon-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    font-size: 0.72rem !important;
  }
  .zh-mob-cart-btn {
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 9px !important;
    font-size: 0.74rem !important;
  }
}

/* === V91.0 Strict Mobile (<768px) vs Desktop (>=768px) Isolation === */
.zh-mobile-only-block { display: flex !important; flex-direction: column; }
.zh-desktop-only-block { display: none !important; }
@media (min-width: 768px) {
  .zh-mobile-only-block { display: none !important; }
  .zh-desktop-only-block { display: block !important; }
}
