/* ============================================================
   ZENTRO — Design System
   Modern 3D / Glass Morphism / Neon Accents
   ============================================================ */

:root {
  /* Core palette — deep violet/cyan cosmos */
  --bg:            #070712;
  --bg-elev:       #0d0d1f;
  --surface:       rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border:        rgba(255, 255, 255, 0.08);
  --border-glow:   rgba(137, 94, 255, 0.35);

  --text:          #f4f4ff;
  --text-muted:    #9797b3;
  --text-dim:      #5e5e7a;

  --primary:       #895eff;   /* violet */
  --primary-glow:  #a78bfa;
  --accent:        #00e5ff;   /* cyan */
  --success:       #22d68a;
  --danger:        #ff4d6d;
  --warning:       #ffb347;

  /* Gradient presets */
  --gradient-primary: linear-gradient(135deg, #895eff 0%, #00e5ff 100%);
  --gradient-aurora:  radial-gradient(ellipse at top left,  #895eff33 0%, transparent 55%),
                      radial-gradient(ellipse at bottom right, #00e5ff22 0%, transparent 55%);
  --gradient-card:    linear-gradient(135deg, rgba(137,94,255,.12), rgba(0,229,255,.05));
  --gradient-glow:    radial-gradient(circle at 50% 0%, rgba(137, 94, 255, 0.35), transparent 70%);

  /* Radii + shadows */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --shadow:      0 8px 32px rgba(0,0,0,.4);
  --shadow-lg:   0 24px 60px rgba(0,0,0,.6);
  --shadow-glow: 0 0 40px rgba(137, 94, 255, 0.4);

  /* Typography */
  --font-display: 'Space Grotesk', 'Cairo', system-ui, sans-serif;
  --font-body:    'Inter', 'Cairo', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --ease:         cubic-bezier(.22, 1, .36, 1);
  --ease-bounce:  cubic-bezier(.34, 1.56, .64, 1);
}

/* RTL overrides */
[dir="rtl"] {
  --font-display: 'Cairo', 'Space Grotesk', sans-serif;
  --font-body:    'Cairo', 'Inter', sans-serif;
}

/* ============================================================ */
/* RESET */
/* ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Cosmic background ambient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--gradient-aurora);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .6;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--primary-glow); }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; }

main { position: relative; z-index: 2; }

/* ============================================================ */
/* LAYOUT */
/* ============================================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.section {
  padding: 100px 0;
  position: relative;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  font-size: 1.05rem;
}

/* ============================================================ */
/* NAV */
/* ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(7, 7, 18, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}
.logo-mark::before {
  content: 'Z';
  font-weight: 900;
  color: var(--bg);
  font-size: 1.1rem;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: .95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width .3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.search-box {
  position: relative;
  width: 280px;
  max-width: 100%;
}
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  outline: none;
  transition: all .3s var(--ease);
}
[dir="rtl"] .search-box input { padding: 10px 40px 10px 16px; }
.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus {
  border-color: var(--border-glow);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px rgba(137, 94, 255, .15);
}
.search-box svg {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.lang-switch {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
}
.lang-switch a {
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 100px;
  transition: all .3s var(--ease);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lang-switch a.active {
  background: var(--gradient-primary);
  color: var(--bg);
}

.nav-toggle { display: none; }

/* ============================================================ */
/* BUTTONS */
/* ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: .95rem;
  transition: all .3s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-primary);
  color: var(--bg);
  box-shadow: 0 8px 24px rgba(137, 94, 255, .35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(137, 94, 255, .5);
  color: var(--bg);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-glow);
  color: var(--text);
}
.btn-whatsapp {
  background: #25D366;
  color: white;
}
.btn-whatsapp:hover {
  background: #1da851;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
}
.btn-block { width: 100%; }

/* ============================================================ */
/* HERO */
/* ============================================================ */
.hero {
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: var(--gradient-glow);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: float 12s ease-in-out infinite;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .85rem;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: 24px;
}
.hero h1 .gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero visual — 3D floating cards */
.hero-visual {
  position: relative;
  height: 520px;
  perspective: 1200px;
}
.hero-card {
  position: absolute;
  background: var(--gradient-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  transition: transform .6s var(--ease);
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-aurora);
  opacity: .4;
  pointer-events: none;
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
}
.hero-card:nth-child(1) {
  top: 0; left: 10%;
  width: 260px; height: 320px;
  transform: rotate(-6deg) translateZ(20px);
  animation: float 8s ease-in-out infinite;
}
.hero-card:nth-child(2) {
  top: 60px; right: 0;
  width: 200px; height: 260px;
  transform: rotate(8deg) translateZ(-10px);
  animation: float 10s ease-in-out infinite reverse;
}
.hero-card:nth-child(3) {
  bottom: 0; left: 25%;
  width: 220px; height: 220px;
  transform: rotate(-3deg) translateZ(0);
  animation: float 9s ease-in-out infinite .5s;
}

/* ============================================================ */
/* CATEGORIES GRID */
/* ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.category-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all .4s var(--ease);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(137, 94, 255, .2), transparent 70%);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}
.category-card:hover::before { opacity: 1; }
.category-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(137, 94, 255, .4));
}
.category-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* ============================================================ */
/* PRODUCT GRID */
/* ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .4s var(--ease);
  position: relative;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-elev);
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.product-card:hover .product-image img { transform: scale(1.08); }

.product-badges {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  display: flex;
  gap: 6px;
}
.badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  backdrop-filter: blur(10px);
}
.badge-sale     { background: var(--danger); color: white; }
.badge-new      { background: var(--success); color: var(--bg); }
.badge-featured { background: var(--gradient-primary); color: var(--bg); }

.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-category {
  font-size: .75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
}
.product-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.price-current {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}
.price-old {
  font-size: .9rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

/* ============================================================ */
/* FORMS */
/* ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: all .3s var(--ease);
}
.form-control:focus {
  border-color: var(--border-glow);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px rgba(137, 94, 255, .15);
}
textarea.form-control { min-height: 100px; resize: vertical; font-family: inherit; }

/* ============================================================ */
/* FOOTER */
/* ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
  margin-top: 80px;
  backdrop-filter: blur(10px);
  background: rgba(7, 7, 18, .5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer h4 {
  font-family: var(--font-display);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 20px;
  color: var(--text);
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer li a { color: var(--text-muted); font-size: .95rem; }
.footer li a:hover { color: var(--primary-glow); }
.footer-about p { color: var(--text-muted); max-width: 360px; margin-top: 16px; }
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: .85rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================ */
/* FLASH / ALERTS */
/* ============================================================ */
.flash-wrap {
  position: fixed;
  top: 90px;
  inset-inline-end: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.flash {
  padding: 14px 20px;
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  background: var(--surface-hover);
  border: 1px solid var(--border-glow);
  min-width: 280px;
  max-width: 380px;
  animation: slideIn .4s var(--ease);
}
.flash-success { border-color: var(--success); }
.flash-error   { border-color: var(--danger); }

/* ============================================================ */
/* ANIMATIONS */
/* ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-20px) rotate(var(--r, 0deg)); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.3); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
[dir="rtl"] @keyframes slideIn {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================ */
/* RESPONSIVE */
/* ============================================================ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { height: 400px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .container { padding: 0 16px; }
  .nav-links, .search-box { display: none; }
  .nav-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
  }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .hero { padding: 60px 0 40px; }
  .hero-visual { height: 340px; }
  .hero-card:nth-child(1) { width: 200px; height: 260px; }
  .hero-card:nth-child(2) { width: 160px; height: 200px; }
  .hero-card:nth-child(3) { width: 170px; height: 170px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
}
