:root{
  /* Theme tokens (Dark default) */
  --bg:#0b0d10;
  --bg-grad1: rgba(110,231,255,.12);
  --bg-grad2: rgba(180,255,138,.10);
  --bg-grad3: rgba(180,180,255,.08);

  --card:#12161d;
  --card-bg: rgba(18,22,29,.75);

  --text:#eef2f7;
  --text-soft: rgba(238,242,247,.88);
  --label: rgba(238,242,247,.75);
  --muted:#9aa4b2;

  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);

  --accent:#6ee7ff;
  --accent2:#b4ff8a;

  --nav-bg: rgba(11,13,16,.55);
  --menu-mobile-bg: rgba(11,13,16,.92);
  --ghost-bg: rgba(255,255,255,.05);
  --input-bg: rgba(255,255,255,.04);
  --media-bg: rgba(255,255,255,.03);

  --badge-bg: rgba(255,255,255,.07);
  --badge-border: rgba(255,255,255,.14);

  --hero-text: #eef2f7;
  --hero-muted: rgba(238,242,247,.88);

  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --radius: 18px;
}


body{
  transition: background .25s ease, color .25s ease;
}

/* Font switch (Admin → Settings) */
body.font-system{ --font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body.font-inter{ --font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
body.font-serif{ --font-family: Georgia, 'Times New Roman', serif; }
body.font-vazirmatn{ --font-family: 'Vazirmatn', Tahoma, Arial, sans-serif; }

/* RTL support (Admin → Settings → Language = فارسی) */
body.rtl{ direction: rtl; }
body.rtl .header-inner{ flex-direction: row-reverse; }
body.rtl .menu{ flex-direction: row-reverse; }
body.rtl .brand{ margin-left: 0; margin-right: auto; }
body.rtl .footer-grid{ direction: rtl; }
body.rtl .footer-links a{ text-align: right; }
body.theme-light{
  
  --nav-text: rgba(14,18,24,.88);
  --nav-text-muted: rgba(14,18,24,.62);
  --nav-bg: rgba(255,255,255,.88);
  --nav-border: rgba(14,18,24,.10);
--bg:#f6f7fb;
  --bg-grad1: rgba(110,231,255,.10);
  --bg-grad2: rgba(180,255,138,.08);
  --bg-grad3: rgba(99,102,241,.06);

  --card:#ffffff;
  --card-bg: rgba(255,255,255,.92);

  --text:#0b1220;
  --text-soft: rgba(15,23,42,.82);
  --label: rgba(15,23,42,.70);
  --muted:#5b677a;

  --border: rgba(15,23,42,.14);
  --border-strong: rgba(15,23,42,.18);

  --nav-bg: rgba(255,255,255,.78);
  --menu-mobile-bg: rgba(255,255,255,.92);
  --ghost-bg: rgba(15,23,42,.06);
  --input-bg: rgba(15,23,42,.04);
  --media-bg: rgba(15,23,42,.04);

  --badge-bg: rgba(15,23,42,.06);
  --badge-border: rgba(15,23,42,.14);

  /* Keep hero readable on video */
  --hero-text: #ffffff;
  --hero-muted: rgba(255,255,255,.90);

  --shadow: 0 18px 50px rgba(15,23,42,.10);
}


*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font-family, Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% 10%, var(--bg-grad1), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, var(--bg-grad2), transparent 60%),
    radial-gradient(900px 500px at 50% 80%, var(--bg-grad3), transparent 60%),
    var(--bg);
}

a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.92; }

.container{
  width:min(1120px, calc(100% - 40px));
  margin:0 auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom:1px solid var(--border);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
}
.brand-mark{
  display:grid;
  place-items:center;
  width:36px;height:36px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(110,231,255,.35), rgba(180,255,138,.25));
  box-shadow: var(--shadow);
  border:1px solid var(--border);
}

.menu{
  display:flex;
  align-items:center;
  gap:14px;
}
.menu a{
  padding:10px 12px;
  border-radius:12px;
  color: rgba(238,242,247,.92);
}
.menu a:hover{
  background: rgba(255,255,255,.06);
}
.menu .cart-link{
  display:flex;
  align-items:center;
  gap:8px;
}
.pill{
  display:inline-grid;
  place-items:center;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background: rgba(110,231,255,.18);
  border:1px solid rgba(110,231,255,.28);
  font-size:12px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 14px;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(110,231,255,.30), rgba(180,255,138,.22));
  border:1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-weight:600;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn-ghost{
  background: var(--ghost-bg);
  box-shadow:none;
}
.btn-danger{
  background: rgba(255,80,100,.12);
  border:1px solid rgba(255,80,100,.30);
}

.menu-toggle{
  display:none;
  background: var(--ghost-bg);
  border:1px solid var(--border);
  color: var(--text);
  border-radius:12px;
  padding:10px 12px;
}

.site-main{ padding: 26px 0 70px; }

.hero{
  position:relative;
  border-radius: calc(var(--radius) + 8px);
  overflow:hidden;
  min-height: 560px;
  border:1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: #0a0c0f;
}
.hero video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
}
.hero::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(900px 520px at 30% 30%, rgba(110,231,255,.20), transparent 60%),
    linear-gradient(180deg, rgba(11,13,16,.25), rgba(11,13,16,.88) 70%);
}
.hero-content{
  color: var(--hero-text);
  position:relative;
  z-index:1;
  padding: 64px 46px;
  max-width: 720px;
}
.hero h1{
  font-size: clamp(34px, 4.6vw, 54px);
  line-height:1.05;
  margin:0 0 12px;
  letter-spacing: -0.8px;
}
.hero p{
  margin:0 0 22px;
  color: var(--hero-muted);
  font-size: 16px;
  line-height:1.6;
}
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.section{
  margin-top: 26px;
}
.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin: 28px 0 14px;
}
.section-title{
  font-size: 20px;
  margin:0;
}
.muted{ color: var(--muted); }

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.card{
  background: var(--card-bg);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card-pad{ padding: 16px; }

.product-card{
  grid-column: span 4;
  display:flex;
  flex-direction:column;
  min-height: 100%;
}
.product-media{
  width:100%;
  aspect-ratio: 4 / 3;
  background: var(--media-bg);
  border-bottom:1px solid var(--border);
  overflow:hidden;
  position:relative;
}
.product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.badge{
  position:absolute;
  top:12px; left:12px;
  padding:6px 10px;
  border-radius:999px;
  background: var(--badge-bg);
  border:1px solid var(--badge-border);
  font-size:12px;
}
.price{
  display:flex; align-items:baseline; gap:10px;
  margin-top: 8px;
}
.price del{ color: var(--muted); }
.price strong{ font-size: 18px; }

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.form{
  display:grid;
  gap:12px;
}
.input, textarea, select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  outline:none;
}
textarea{ min-height: 110px; resize: vertical; }
label{ font-size: 13px; color: var(--label); }

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: var(--radius);
  border:1px solid var(--border);
  background: var(--card-bg);
}
.table th,.table td{
  padding: 12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  font-size: 14px;
}
.table th{ color: rgba(238,242,247,.84); font-weight:600; }

.notice{
  padding:12px 14px;
  border-radius: 14px;
  border:1px solid rgba(110,231,255,.30);
  background: rgba(110,231,255,.10);
}
.notice.error{
  border:1px solid rgba(255,80,100,.30);
  background: rgba(255,80,100,.10);
}

.footer-grid{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  padding: 26px 0;
  border-top:1px solid var(--border);
}
.footer-brand{ font-weight:800; }
.footer-title{ font-weight:600; margin-bottom:8px; }
.footer-links, .social{ display:grid; gap:8px; }
.footer-bottom{
  display:flex;
  justify-content:space-between;
  padding: 14px 0 26px;
  border-top:1px solid var(--border);
}

.gallery{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.gallery .gitem{
  grid-column: span 4;
  border-radius: var(--radius);
  border:1px solid var(--border);
  overflow:hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}
.gallery img{ width:100%; height:260px; object-fit:cover; display:block; }
.gallery .cap{ padding:12px; color: var(--text-soft); }

@media (max-width: 900px){
  .product-card{ grid-column: span 6; }
  .footer-grid{ grid-template-columns:1fr; }
}
@media (max-width: 720px){
  .menu{ display:none; position:absolute; top:64px; right:20px; left:20px;
    flex-direction:column; background: var(--menu-mobile-bg);
    border:1px solid var(--border);
    border-radius: 18px; padding: 10px;
  }
  .menu.show{ display:flex; }
  .menu-toggle{ display:block; }
  .hero-content{ padding: 56px 18px; }
  .product-card{ grid-column: span 12; }
  .gallery .gitem{ grid-column: span 12; }
}


/* Light mode navbar fixes */
body.theme-light header{
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}
body.theme-light .nav a,
body.theme-light header a{
  color: var(--nav-text);
}
body.theme-light .nav a:hover,
body.theme-light header a:hover{
  color: rgba(14,18,24,1);
}
body.theme-light .nav .muted,
body.theme-light header .muted{
  color: var(--nav-text-muted);
}


/* Explicit dark class (uses default variables) */
body.theme-dark{ }


/* Product lightbox */
.lightbox{ position:fixed; inset:0; display:none; z-index:9999; }
.lightbox[aria-hidden="false"]{ display:block; }
.lightbox-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.65); }
.lightbox-panel{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; }
.lightbox-img{ max-width:min(100%, 1100px); max-height:90vh; border-radius:18px; border:1px solid rgba(255,255,255,.12); background:rgba(0,0,0,.2); }
.lightbox-close{ position:absolute; top:18px; right:18px; }
.lightbox-nav{ position:absolute; top:50%; transform:translateY(-50%); font-size:28px; padding:10px 14px; }
.lightbox-nav.prev{ left:18px; }
.lightbox-nav.next{ right:18px; }
/* ---------- Home Hero (v2, premium) ---------- */
.hero2{
  position:relative;
  overflow:hidden;
  border-radius: calc(var(--radius) + 10px);
  border:1px solid var(--border-strong);
  box-shadow: var(--shadow);
  min-height: clamp(520px, 70vh, 760px);
  background:#070a0f;
}
.hero2-video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.02);
  filter:saturate(1.08) contrast(1.06);
}
.hero2-shade{
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 520px at 20% 15%, rgba(110,231,255,.22), transparent 55%),
    radial-gradient(900px 520px at 82% 18%, rgba(180,255,138,.16), transparent 58%),
    linear-gradient(180deg, rgba(10,12,15,.40), rgba(10,12,15,.78));
}
.hero2-glow{
  position:absolute;
  inset:-40%;
  background: conic-gradient(from 180deg, rgba(110,231,255,.0), rgba(110,231,255,.14), rgba(180,255,138,.12), rgba(180,180,255,.10), rgba(110,231,255,.0));
  filter: blur(60px);
  opacity:.7;
  animation: heroGlow 10s linear infinite;
}
@keyframes heroGlow{ 0%{ transform: rotate(0deg);} 100%{ transform: rotate(360deg);} }
.hero2-wrap{
  position:relative;
  z-index:2;
  padding: clamp(22px, 4vw, 44px);
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 860px){ .hero2-wrap{ grid-template-columns: 1fr; } }
.hero2-copy{ max-width: 720px; }
.hero2-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(18,22,29,.35);
  backdrop-filter: blur(10px);
  color: rgba(238,242,247,.92);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero2-title{
  margin: 16px 0 10px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,.98);
}
.hero2-desc{
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(238,242,247,.88);
  max-width: 60ch;
}
.hero2-actions{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.btn.btn-lg{ padding: 12px 16px; border-radius: 14px; }
.hero2-chips{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip2{
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(18,22,29,.28);
  backdrop-filter: blur(10px);
  color: rgba(238,242,247,.88);
  font-weight: 650;
  font-size: 13px;
}
.hero2-panel{ display:flex; align-items: stretch; justify-content: flex-end; }
.hero2-panel-card{
  width:100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(18,22,29,.38);
  backdrop-filter: blur(12px);
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}
.hero2-panel-title{ font-weight: 900; color: rgba(255,255,255,.96); font-size: 14px; }
.hero2-panel-sub{ margin-top: 6px; color: rgba(238,242,247,.82); font-size: 13px; line-height: 1.6; }
.hero2-panel-row{ margin-top: 14px; display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero2-metric{
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  padding: 12px;
}
.hero2-metric-k{ color: rgba(238,242,247,.74); font-size: 12px; }
.hero2-metric-v{ margin-top: 6px; font-size: 20px; font-weight: 900; color: rgba(255,255,255,.96); }

/* Light mode: navbar text should be dark */
.theme-light .site-header{ background: rgba(255,255,255,.78); }
.theme-light .site-header .menu a{ color: rgba(15,23,42,.92); }
.theme-light .site-header .brand-text{ color: rgba(15,23,42,.96); }
.theme-light .site-header .brand-mark{ color: rgba(15,23,42,.96); }

/* RTL tweaks for hero */
body.rtl .hero2-copy{ text-align: right; }
body.rtl .hero2-actions{ justify-content: flex-start; }
body.rtl .hero2-panel{ justify-content: flex-start; }
