@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=Outfit:wght@700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark:         #0D0D0D;
  --dark2:        #141414;
  --dark3:        #1c1c1c;
  --purple:       #8B5CF6;
  --purple-light: #A78BFA;
  --gray:         #888;
  --gray-light:   #ccc;
  --white:        #fff;
  --radius:       12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
}

/* ── NAV ─────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 6%;
  background: rgba(13,13,13,.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: padding .3s;
}
nav.scrolled { padding: 10px 6%; }

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: .06em; text-decoration: none; color: var(--white);
}
.nav-logo span { color: var(--purple); }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--gray-light);
  font-size: .9rem; font-weight: 500; transition: color .2s;
}
.nav-links a:hover { color: var(--purple); }

.cart-btn {
  position: relative; background: none; border: none;
  color: var(--white); font-size: 1.4rem; cursor: pointer; padding: 4px;
  display: flex; align-items: center;
}
.cart-count {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--purple); color: var(--white);
  font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px; transition: all .3s;
}

/* ── HERO ────────────────────────────────────────────── */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 6% 80px; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 60% 50%, rgba(139,92,246,.15) 0%, transparent 65%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(139,92,246,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content { max-width: 580px; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(139,92,246,.15); border: 1px solid rgba(139,92,246,.4);
  border-radius: 100px; padding: 6px 18px;
  font-size: .75rem; font-weight: 700; color: var(--purple-light);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 28px;
}
.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 900; line-height: 1.05; margin-bottom: 20px;
}
.hero-title .accent { color: var(--purple); }
.hero-sub {
  font-size: 1.05rem; color: var(--gray);
  line-height: 1.7; margin-bottom: 36px; max-width: 460px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purple); color: var(--white);
  padding: 14px 32px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: all .2s; box-shadow: 0 4px 24px rgba(139,92,246,.4);
}
.btn-primary:hover { background: var(--purple-light); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(139,92,246,.5); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--white);
  padding: 14px 32px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  font-weight: 600; font-size: .95rem; text-decoration: none; transition: all .2s;
}
.btn-secondary:hover { border-color: var(--purple); color: var(--purple); }

/* Hero visual */
.hero-visual {
  position: absolute; right: 6%; top: 50%;
  transform: translateY(-50%); z-index: 1; width: 380px;
}
.product-showcase {
  background: var(--dark3); border: 1px solid rgba(139,92,246,.3);
  border-radius: 20px; padding: 24px;
  box-shadow: 0 40px 80px rgba(0,0,0,.6);
  animation: floatY 4s ease-in-out infinite;
}
.product-showcase img {
  width: 100%; border-radius: 14px;
  aspect-ratio: 1/1; object-fit: cover;
}
.product-info {
  margin-top: 16px; display: flex;
  justify-content: space-between; align-items: center;
}
.product-name { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.05rem; }
.product-price { color: var(--purple); font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.3rem; }

@keyframes floatY { 0%,100%{transform:translateY(-50%)} 50%{transform:translateY(calc(-50% - 12px))} }

/* ── CATEGORIES ──────────────────────────────────────── */
#categories {
  background: var(--dark2); padding: 20px 6%;
  display: flex; gap: 12px; overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
#categories::-webkit-scrollbar { display: none; }

.cat-btn {
  padding: 10px 24px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,.12);
  background: none; color: var(--gray-light);
  font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all .2s;
}
.cat-btn:hover, .cat-btn.active {
  background: var(--purple); border-color: var(--purple); color: var(--white);
}

/* ── PRODUCTS ────────────────────────────────────────── */
#products { padding: 80px 6%; background: var(--dark); }

.products-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 40px;
}
.products-title {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}

.product-card {
  background: var(--dark3); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,92,246,.4);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}

.product-img { position: relative; aspect-ratio: 1/1; overflow: hidden; }
.product-img img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .4s;
  display: block;
}
.product-card:hover .product-img img { transform: scale(1.06); }

.product-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--purple); color: var(--white);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 100px;
}

.product-body { padding: 16px; }
.product-name-card { font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.product-cat { font-size: .75rem; color: var(--gray); margin-bottom: 12px; }

.product-footer { display: flex; justify-content: space-between; align-items: center; }
.product-price-card { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.15rem; }

.add-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(139,92,246,.2); border: 1px solid rgba(139,92,246,.4);
  color: var(--purple); font-size: 1.3rem; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.add-btn:hover { background: var(--purple); color: var(--white); }

/* ── CART DRAWER ─────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 499; display: none;
}
.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 400px; height: 100vh;
  background: var(--dark2); border-left: 1px solid rgba(255,255,255,.06);
  z-index: 500; transition: right .35s ease;
  padding: 24px; display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}

.cart-items {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: var(--dark3); }
.cart-items::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 2px; }

.cart-item { display: flex; gap: 12px; align-items: flex-start; }
.cart-item img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

.checkout-btn {
  display: block; width: 100%; text-align: center;
  background: var(--purple); color: var(--white);
  padding: 16px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  margin-top: 16px; transition: background .2s;
}
.checkout-btn:hover { background: var(--purple-light); }

/* ── NEWSLETTER ──────────────────────────────────────── */
#newsletter {
  background: linear-gradient(135deg, rgba(139,92,246,.15), rgba(139,92,246,.05));
  padding: 80px 6%; text-align: center;
  border-top: 1px solid rgba(139,92,246,.15);
}
#newsletter > div { max-width: 560px; margin: 0 auto; }

.newsletter-input {
  flex: 1; min-width: 200px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 14px 18px;
  color: var(--white); font-family: 'Inter', sans-serif;
  font-size: .95rem; outline: none; transition: border-color .2s;
}
.newsletter-input:focus { border-color: var(--purple); }
.newsletter-input::placeholder { color: var(--gray); }

.newsletter-submit {
  background: var(--purple); color: var(--white);
  padding: 14px 28px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; border: none; cursor: pointer;
  transition: background .2s;
}
.newsletter-submit:hover { background: var(--purple-light); }

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  background: var(--dark2);
  border-top: 1px solid rgba(255,255,255,.05);
  padding: 40px 6%;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 20px;
}

.footer-logo { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.1rem; }
.footer-logo span { color: var(--purple); }
.footer-credit { font-size: .75rem; color: var(--gray); margin-top: 6px; }
.footer-credit span { color: var(--purple); font-weight: 600; }

.footer-links a {
  font-size: .8rem; color: var(--gray); text-decoration: none;
  margin-left: 20px; transition: color .2s;
}
.footer-links a:hover { color: var(--purple); }

.footer-copy { font-size: .8rem; color: var(--gray); }

/* ── FADE ANIMATIONS ─────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1200px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .hero-visual { display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 65px; left: 0; right: 0;
    background: var(--dark2); padding: 24px 6%;
    gap: 20px; border-bottom: 1px solid rgba(255,255,255,.05);
  }
  .cart-drawer { width: 100%; right: -100%; }
}
@media (max-width: 500px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  footer { flex-direction: column; align-items: flex-start; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
  .footer-links a { margin-left: 0; }
}
