/* Zlix Central — Marketplace Storefront v2 */
:root {
  --p: #ea580c;
  --p2: #f97316;
  --p-dark: #c2410c;
  --accent: #ea580c;
  --bg: #fff7ed;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #6b7280;
  --border: #e5e7eb;
  --ok: #059669;
  --danger: #dc2626;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(234, 88, 12, 0.08);
  --shadow-lg: 0 20px 50px rgba(234, 88, 12, 0.12);
  --font: Vazirmatn, Tahoma, system-ui, sans-serif;
  --max: 1180px;
  --header-h: 72px;
  --transition: 0.22s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--p); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--p-dark); }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.35rem; color: var(--text);
}
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--p), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 18px;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35);
}
.nav-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-main a {
  color: var(--text); font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 10px;
}
.nav-main a:hover { background: #ffedd5; color: var(--p); }
.nav-cta {
  background: var(--p) !important; color: #fff !important;
  padding: 10px 18px !important; border-radius: 12px !important;
  box-shadow: 0 6px 16px rgba(109,40,217,0.3);
}
.nav-cta:hover { background: var(--p-dark) !important; color: #fff !important; }
.menu-toggle {
  display: none; border: none; background: #ffedd5; color: var(--p);
  width: 44px; height: 44px; border-radius: 12px; font-size: 20px; cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(145deg, #1c1917 0%, #9a3412 45%, #c2410c 100%);
  color: #fff;
  padding: 72px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(251,146,60,0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(251,146,60,0.2), transparent 35%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.35; font-weight: 800; margin-bottom: 16px;
}
.hero h1 span { color: #fdba74; }
.hero-lead {
  font-size: 1.05rem; opacity: 0.92; max-width: 520px; margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 13px 22px; border-radius: 12px; border: none; cursor: pointer;
  min-height: 48px; transition: all var(--transition);
}
.btn-primary {
  background: #fff; color: var(--p-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.btn-primary:hover { transform: translateY(-2px); background: #fff7ed; color: var(--p-dark); }
.btn-ghost {
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); color: #fff; }
.btn-solid {
  background: var(--p); color: #fff;
  box-shadow: 0 8px 20px rgba(109,40,217,0.35);
}
.btn-solid:hover { background: var(--p-dark); color: #fff; transform: translateY(-1px); }
.btn-outline {
  background: #fff; color: var(--p); border: 1.5px solid var(--p);
}
.btn-outline:hover { background: #fff7ed; }
.btn-block { width: 100%; }

.hero-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 28px;
}
.hero-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.hero-card ul { list-style: none; }
.hero-card li {
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.hero-card li:last-child { border-bottom: none; }
.hero-card li::before { content: '✓'; color: #fdba74; font-weight: 900; }

/* Sections */
.section { padding: 64px 0; }
.section-head {
  text-align: center; margin-bottom: 40px;
}
.section-head .eyebrow {
  display: inline-block; color: var(--p); font-weight: 700;
  font-size: 13px; margin-bottom: 8px; letter-spacing: 0.02em;
}
.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 10px;
}
.section-head p { color: var(--muted); max-width: 520px; margin: 0 auto; }

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, #ffedd5, #ccfbf1);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}
.feature h3 { font-size: 1rem; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* Product grid */
.tabs {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; flex-wrap: wrap;
}
.tab {
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-family: inherit; font-weight: 700; font-size: 13px;
  color: var(--muted); cursor: pointer; transition: all var(--transition);
}
.tab.active, .tab:hover {
  background: var(--p); color: #fff; border-color: var(--p);
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-thumb {
  height: 160px;
  background: linear-gradient(135deg, #ffedd5 0%, #e0f2fe 50%, #ccfbf1 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; position: relative;
}
.product-thumb .badge {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  background: #fff; color: var(--p); box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.product-thumb .badge.theme { color: #c2410c; }
.product-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 {
  font-size: 1.05rem; margin-bottom: 8px; line-height: 1.4;
}
.product-body h3 a { color: var(--text); }
.product-body h3 a:hover { color: var(--p); }
.product-desc {
  font-size: 13px; color: var(--muted); flex: 1; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto;
}
.price {
  font-weight: 800; font-size: 1.1rem; color: var(--p);
}
.price .old {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); text-decoration: line-through;
}
.price .sale-tag {
  display: inline-block; margin-right: 6px;
  background: #fef2f2; color: var(--danger);
  font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 700;
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, #c2410c, #c2410c);
  border-radius: 24px;
  padding: 48px 40px;
  color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { font-size: 1.5rem; margin-bottom: 8px; }
.cta-band p { opacity: 0.9; max-width: 420px; }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: -40px; position: relative; z-index: 2;
}
.stat {
  background: #fff; border-radius: 16px; padding: 22px 16px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.stat .n { font-size: 1.6rem; font-weight: 800; color: var(--p); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Product single */
.product-hero {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  box-shadow: var(--shadow);
}
.product-hero-visual {
  background: linear-gradient(135deg, #ffedd5, #ccfbf1);
  border-radius: 16px; min-height: 280px;
  display: flex; align-items: center; justify-content: center; font-size: 80px;
}
.product-hero .badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; background: #ffedd5; color: var(--p); margin-bottom: 12px;
}
.buy-box {
  background: #fafafa; border: 1px solid var(--border); border-radius: 16px;
  padding: 20px; margin-top: 20px;
}
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: 12px; font-family: inherit; font-size: 14px; min-height: 46px;
  background: #fff; transition: border-color var(--transition);
}
.form-control:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(109,40,217,0.12); }

/* Auth cards */
.auth-wrap {
  max-width: 420px; margin: 40px auto;
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 28px; box-shadow: var(--shadow);
}
.auth-wrap h1 { text-align: center; font-size: 1.35rem; margin-bottom: 20px; }

/* Alerts */
.alert {
  padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px;
}
.alert-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Tables */
.wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: right; }
th { background: #f9fafb; color: var(--muted); font-size: 12px; }

/* Footer */
.site-footer {
  background: #0f0a1e; color: #a1a1aa; margin-top: auto; padding: 56px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px;
}
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; line-height: 1.8; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-col a {
  display: block; color: #a1a1aa; font-size: 13px; padding: 4px 0;
}
.footer-col a:hover { color: #fdba74; }
.footer-bottom {
  border-top: 1px solid #27272a; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .product-hero { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-main {
    display: none; position: absolute; top: var(--header-h); right: 0; left: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px; align-items: stretch;
  }
  .nav-main.open { display: flex; }
  .nav-main a { padding: 12px 14px; }
  .features { grid-template-columns: 1fr; }
  .stats { margin-top: 24px; }
  .section { padding: 48px 0; }
  .cta-band { padding: 32px 24px; }
}


/* —— Hardening (layout integrity) —— */
.store-body { overflow-x: hidden; }
.site-main { flex: 1 0 auto; width: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.logo-img { max-height: 40px; max-width: 160px; width: auto; object-fit: contain; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #ea580c, #c2410c); color: #fff; font-weight: 900; font-size: 1rem;
}
.hero-grid {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}
.stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: -36px auto 40px;
  position: relative;
  z-index: 5;
  max-width: var(--max);
  padding: 0 20px;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .n { font-size: 1.5rem; font-weight: 800; color: var(--p); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 4px; }
.features {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.products-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.nav-main.open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: var(--header-h);
  right: 0; left: 0;
  background: #fff;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 200;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr !important; }
  .stats { grid-template-columns: repeat(2, 1fr) !important; margin-top: -24px; }
  .features { grid-template-columns: repeat(2, 1fr) !important; }
  .menu-toggle { display: inline-flex !important; align-items: center; justify-content: center; }
  .nav-main { display: none; }
}
@media (max-width: 560px) {
  .stats, .features { grid-template-columns: 1fr !important; }
}
