/* ============================================================
   ECOMMERCE-V3 — STYLES.CSS — NEXUS Tech
   Dark futuristic · Electric Blue + Black · Space Grotesk + JetBrains Mono
   ============================================================ */

:root {
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-light: #eff6ff;
  --blue-rgb: 59, 130, 246;

  --dark-950: #0c0c12;
  --dark-900: #101018;
  --dark-800: #161620;
  --dark-700: #1e1e2c;
  --dark-600: #2a2a3c;
  --dark-500: #3e3e54;
  --dark-400: #5a5a74;
  --dark-300: #8282a0;
  --dark-200: #ababc4;
  --dark-100: #d8d8e8;

  --white: #ffffff;
  --canvas: var(--dark-950);
  --canvas-alt: var(--dark-900);
  --ink: var(--dark-100);
  --ink-soft: var(--dark-200);
  --muted: var(--dark-300);
  --border: var(--dark-600);

  --font-main: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.76rem + 0.3vw, 0.9rem);
  --fs-base: clamp(0.92rem, 0.86rem + 0.3vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.6rem);
  --fs-4xl: clamp(2.8rem, 1.8rem + 5vw, 4.5rem);

  --section-py: clamp(60px, 8vw, 120px);
  --container-max: 1200px;
  --container-px: clamp(16px, 4vw, 32px);

  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-2xl: 28px; --radius-full: 9999px;
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4); --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --ease: cubic-bezier(0.4, 0, 0.2, 1); --duration: 0.35s;
  --z-sticky: 200; --z-overlay: 300; --z-preloader: 500;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; overflow-x: hidden; }
body { font-family: var(--font-main); font-size: var(--fs-base); color: var(--ink); background: var(--canvas); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
::selection { background: rgba(var(--blue-rgb), 0.2); }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.section-title { font-size: var(--fs-3xl); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--white); margin-bottom: 14px; }
.text-blue { color: var(--blue); }
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-full); padding: 12px 28px; transition: all var(--duration) var(--ease); border: 2px solid transparent; white-space: nowrap; }
.btn .material-icons { font-size: 18px; }
.btn--blue { background: var(--blue); color: var(--white); box-shadow: 0 4px 16px rgba(var(--blue-rgb), 0.3); }
.btn--blue:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--blue-rgb), 0.4); }
.btn--outline { border-color: var(--border); color: var(--ink); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--sm { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 36px; font-size: var(--fs-base); }

/* PRELOADER */
.preloader { position: fixed; inset: 0; z-index: var(--z-preloader); background: var(--dark-950); display: flex; align-items: center; justify-content: center; transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease); }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__hex { font-size: 32px; color: var(--blue); margin-bottom: 8px; animation: hexPulse 1.5s ease-in-out infinite; }
@keyframes hexPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.1); } }
.preloader__text { font-size: var(--fs-sm); font-weight: 700; color: var(--white); letter-spacing: 0.15em; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: calc(var(--z-sticky) + 1); background: var(--blue); transform-origin: left; transform: scaleX(0); }

/* ANNOUNCE */
.announce { text-align: center; font-size: var(--fs-xs); font-weight: 600; color: var(--blue); padding: 8px; background: rgba(var(--blue-rgb), 0.06); border-bottom: 1px solid rgba(var(--blue-rgb), 0.1); letter-spacing: 0.04em; }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(12,12,18,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.04); transition: box-shadow var(--duration); }
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.navbar__brand { font-size: var(--fs-base); font-weight: 700; color: var(--white); letter-spacing: 0.1em; display: flex; align-items: center; gap: 6px; }
.navbar__hex { color: var(--blue); font-size: 1.2em; }
.navbar__list { display: flex; gap: 4px; }
.navbar__link { padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--dark-300); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__link:hover { color: var(--blue); background: rgba(var(--blue-rgb), 0.06); }
.navbar__actions { display: flex; align-items: center; gap: 4px; }
.navbar__icon-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--dark-300); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__icon-btn:hover { color: var(--blue); background: rgba(var(--blue-rgb), 0.06); }
.navbar__icon-btn .material-icons { font-size: 20px; }
.navbar__cart { position: relative; }
.navbar__cart-count { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); color: var(--white); font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.navbar__burger { display: none; width: 28px; height: 20px; position: relative; }
.navbar__burger span { display: block; height: 2px; background: var(--white); border-radius: 2px; position: absolute; left: 0; right: 0; transition: all var(--duration); }
.navbar__burger span:nth-child(1) { top: 0; }
.navbar__burger span:nth-child(2) { bottom: 0; }
.navbar__burger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* HERO */
.hero { padding: clamp(60px, 8vw, 100px) 0 0; text-align: center; position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__grid-pattern { position: absolute; inset: 0; background-image: linear-gradient(rgba(var(--blue-rgb), 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--blue-rgb), 0.04) 1px, transparent 1px); background-size: 50px 50px; mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black, transparent); }
.hero__glow { position: absolute; top: -80px; left: 50%; transform: translateX(-50%); width: 500px; height: 350px; background: radial-gradient(ellipse, rgba(var(--blue-rgb), 0.12), transparent 70%); filter: blur(40px); }
.hero__content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 700; color: var(--blue); padding: 6px 16px; border: 1px solid rgba(var(--blue-rgb), 0.2); border-radius: var(--radius-full); background: rgba(var(--blue-rgb), 0.06); margin-bottom: 24px; }
.hero__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: dotPulse 2s infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero__title { font-size: var(--fs-4xl); font-weight: 700; line-height: 1.05; color: var(--white); margin-bottom: 20px; letter-spacing: -0.04em; }
.hero__lead { font-size: var(--fs-md); color: var(--muted); max-width: 540px; margin: 0 auto 32px; line-height: 1.8; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero__featured { position: relative; z-index: 1; margin-bottom: -40px; }
.hero__product { position: relative; border-radius: var(--radius-2xl); overflow: hidden; border: 1px solid var(--border); background: var(--dark-800); }
.hero__product img { width: 100%; height: 400px; object-fit: cover; }
.hero__product-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hero__product-badge { font-size: var(--fs-xs); font-weight: 700; padding: 4px 12px; background: var(--blue); color: var(--white); border-radius: var(--radius-full); }
.hero__product-info h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--white); flex: 1; }
.hero__product-price { font-family: var(--font-mono); font-size: var(--fs-xl); font-weight: 700; color: var(--blue); }

/* CATEGORIES PILLS */
.categories { padding: calc(40px + 40px) 0 40px; }
.categories__scroll { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: 1px solid var(--border); border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); transition: all var(--duration); }
.cat-pill .material-icons { font-size: 18px; }
.cat-pill:hover { border-color: var(--blue); color: var(--blue); background: rgba(var(--blue-rgb), 0.06); }

/* PRODUCTS */
.products { padding: var(--section-py) 0; }
.products__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); overflow: hidden; transition: all var(--duration); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(var(--blue-rgb), 0.15); }
.product-card__img { position: relative; overflow: hidden; background: var(--dark-700); }
.product-card__img img { width: 100%; height: 260px; object-fit: cover; transition: transform 0.5s var(--ease); }
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__badge { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 800; padding: 4px 10px; background: var(--blue); color: var(--white); border-radius: var(--radius-full); letter-spacing: 0.04em; }
.product-card__info { padding: 16px; }
.product-card__cat { font-size: var(--fs-xs); font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 4px; }
.product-card__info h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--white); margin-bottom: 4px; }
.product-card__specs { font-family: var(--font-mono); font-size: 10px; color: var(--dark-400); margin-bottom: 12px; display: block; }
.product-card__bottom { display: flex; align-items: center; justify-content: space-between; }
.product-card__price { font-family: var(--font-mono); font-size: var(--fs-base); font-weight: 700; color: var(--blue); }
.product-card__add { width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--blue-rgb), 0.1); color: var(--blue); display: flex; align-items: center; justify-content: center; transition: all var(--duration); }
.product-card__add:hover { background: var(--blue); color: var(--white); }
.product-card__add .material-icons { font-size: 18px; }

/* DEALS */
.deals { padding: var(--section-py) 0; background: var(--dark-900); overflow: hidden; }
.deals__slider { padding: 0 var(--container-px); }
.deal-card { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); overflow: hidden; text-align: center; transition: all var(--duration); }
.deal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.deal-card__badge { position: absolute; top: 10px; right: 10px; font-size: var(--fs-xs); font-weight: 800; padding: 4px 12px; background: #ef4444; color: var(--white); border-radius: var(--radius-full); z-index: 1; }
.deal-card { position: relative; }
.deal-card img { width: 100%; height: 220px; object-fit: cover; }
.deal-card__info { padding: 16px; }
.deal-card__info h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--white); margin-bottom: 8px; }
.deal-card__old { font-size: var(--fs-sm); color: var(--dark-400); text-decoration: line-through; margin-right: 6px; }
.deal-card__price { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 700; color: var(--blue); }
.deal-card__timer { font-family: var(--font-mono); font-size: var(--fs-xs); color: #ef4444; font-weight: 700; margin-top: 8px; padding: 4px 12px; background: rgba(239,68,68,0.08); border-radius: var(--radius-full); display: inline-block; }

/* FEATURES */
.features { padding: var(--section-py) 0; }
.features__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat-card { text-align: center; padding: 28px 20px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); transition: all var(--duration); }
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(var(--blue-rgb), 0.15); }
.feat-card .material-icons { font-size: 28px; color: var(--blue); margin-bottom: 12px; }
.feat-card h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--white); margin-bottom: 6px; }
.feat-card p { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }

/* ABOUT */
.about { padding: var(--section-py) 0; background: var(--dark-900); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about__content p { font-size: var(--fs-md); color: var(--muted); line-height: 1.8; margin-bottom: 14px; }
.about__stats { display: flex; gap: 28px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.about__stats div { text-align: center; }
.about__stats strong { display: block; font-size: var(--fs-xl); font-weight: 700; color: var(--blue); }
.about__stats span { font-size: var(--fs-xs); color: var(--muted); }
.about__img img { width: 100%; height: 480px; object-fit: cover; border-radius: var(--radius-2xl); }

/* NEWSLETTER */
.newsletter { padding: var(--section-py) 0; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.newsletter p { font-size: var(--fs-md); color: var(--muted); margin-bottom: 24px; }
.newsletter__form { display: flex; gap: 0; max-width: 440px; margin: 0 auto; }
.newsletter__form input { flex: 1; border: 1px solid var(--border); border-right: none; border-radius: var(--radius-full) 0 0 var(--radius-full); background: var(--dark-800); padding: 14px 20px; color: var(--ink); font-size: var(--fs-sm); }
.newsletter__form input:focus { outline: none; border-color: var(--blue); }
.newsletter__form .btn { border-radius: 0 var(--radius-full) var(--radius-full) 0; }

/* FOOTER */
.footer { padding: 48px 0 0; }
.footer__top { display: grid; grid-template-columns: 1.5fr 2fr; gap: 48px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.footer__logo { font-size: var(--fs-base); font-weight: 700; color: var(--white); letter-spacing: 0.1em; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.footer__logo span { color: var(--blue); font-size: 1.2em; }
.footer__brand p { font-size: var(--fs-sm); color: var(--dark-400); line-height: 1.5; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h5 { font-size: var(--fs-xs); font-weight: 700; color: var(--white); margin-bottom: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer__cols a { display: block; font-size: var(--fs-sm); color: var(--dark-400); padding: 3px 0; transition: color var(--duration); }
.footer__cols a:hover { color: var(--blue); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; font-size: var(--fs-xs); color: var(--dark-500); flex-wrap: wrap; gap: 10px; }
.footer__bottom div { display: flex; gap: 16px; }
.footer__bottom a { color: var(--dark-500); transition: color var(--duration); }
.footer__bottom a:hover { color: var(--blue); }

.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(var(--blue-rgb), 0.3); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--duration); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--blue-dark); transform: translateY(-3px); }

@media (max-width: 1024px) {
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .navbar__menu { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: var(--dark-950); z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
  .navbar__menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s var(--ease); }
  .navbar__list { flex-direction: column; gap: 8px; }
  .navbar__link { font-size: var(--fs-lg); padding: 12px 24px; }
  .navbar__burger { display: block; position: relative; z-index: calc(var(--z-overlay) + 1); }
}
@media (max-width: 768px) {
  .features__grid { grid-template-columns: 1fr; }
  .hero__product-info { flex-direction: column; align-items: flex-start; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form input { border-right: 1px solid var(--border); border-radius: var(--radius-full); }
  .newsletter__form .btn { border-radius: var(--radius-full); }
}
@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-2xl); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .products__grid { grid-template-columns: 1fr; }
  .categories__scroll { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
