*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

:root {
  /* === SPATIAL BACKGROUND === */
  --bg-void: #F8F9FA;
  --bg-space: #F1F3F5;
  --bg-deep: #E9ECEF;
  --bg-mid: #DEE2E6;

  /* === GLASS SURFACES === */
  --glass-1: rgba(255, 255, 255, 0.50);
  --glass-2: rgba(255, 255, 255, 0.65);
  --glass-3: rgba(255, 255, 255, 0.85);
  --glass-hover: rgba(255, 255, 255, 0.95);

  /* === GLASS BORDERS === */
  --border-glass: rgba(0, 0, 0, 0.05);
  --border-glass-bright: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(251, 111, 146, 0.40);

  /* === BLUR LEVELS === */
  --blur-sm: blur(8px);
  --blur-md: blur(20px);
  --blur-lg: blur(40px);
  --blur-xl: blur(60px);

  /* === VISIONOS PRISM PALETTE (Soft Pink Delight) === */
  --prism-violet: #FFE5EC;
  --prism-blue: #FFC2D1;
  --prism-cyan: #FFB3C6;
  --prism-pink: #FF8FAB;
  --prism-rose: #FB6F92;
  --prism-gold: #fbbf24;

  /* === GRADIENTS === */
  --grad-prism: linear-gradient(135deg, #FFE5EC 0%, #FFC2D1 35%, #FFB3C6 65%, #FB6F92 100%);
  --grad-glow: radial-gradient(ellipse at 50% 0%, rgba(251, 111, 146, 0.3) 0%, transparent 70%);
  --grad-card: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
  --grad-cta: linear-gradient(135deg, #FFB3C6 0%, #FF8FAB 50%, #FB6F92 100%);

  /* === SHADOWS === */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  --shadow-glow-violet: 0 0 40px rgba(255, 179, 198, 0.4); /* using #FFB3C6 */
  --shadow-glow-blue: 0 0 40px rgba(255, 143, 171, 0.4); /* using #FF8FAB */
  --shadow-button: 0 4px 24px rgba(251, 111, 146, 0.3), 0 1px 0 rgba(255, 255, 255, 0.5) inset;

  /* === TYPOGRAPHY === */
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* === EASING === */
  --ease-vision: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);

  /* === SPACING === */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-full: 9999px;
}

/* === GLOBAL SCROLLBAR === */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
  border-left: 1px solid var(--border-glass);
}
::-webkit-scrollbar-thumb {
  background: var(--prism-pink);
  border-radius: var(--radius-xl);
  border: 3px solid var(--bg-void); /* Creates a padded look */
}
::-webkit-scrollbar-thumb:hover {
  background: var(--prism-rose);
}

body {
  background: var(--bg-void);
  color: rgba(15, 15, 20, 0.9);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(251, 111, 146, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255, 179, 198, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(255, 229, 236, 0.08) 0%, transparent 70%),
    var(--bg-void);
}

.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 1px solid rgba(255, 179, 198, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(251, 111, 146, 0.03), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  transition: all 0.4s var(--ease-vision);
}

.glass:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 179, 198, 0.5);
  box-shadow: 0 15px 35px rgba(251, 111, 146, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transform: translateY(-2px);
}

.glass-heavy {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 240, 243, 0.8) 100%);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: 1px solid rgba(255, 179, 198, 0.4);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(251, 111, 146, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.prism-text, .logo-prism {
  background: linear-gradient(135deg, #FB6F92 0%, #ff4d6d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-right: 0.1em; /* Prevents italic overhangs from getting clipped */
}

.prism-badge {
  background: linear-gradient(135deg, #FB6F92 0%, #ff4d6d 100%);
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
  padding: 4px 12px;
  font-weight: 600;
}

#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 179, 198, 0.15) 0%, rgba(255, 179, 198, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s;
}

#ambient-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* NAVBAR */
.visionos-nav {
  position: fixed; 
  top: 20px; 
  left: 50%; 
  transform: translateX(-50%);
  width: min(92%, 1200px); 
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(32px); 
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 12px 28px;
  transition: all 0.4s var(--ease-vision);
  box-shadow: 0 8px 40px rgba(0,0,0,0.06), 0 1px 0 rgba(255,255,255,0.6) inset;
  box-sizing: border-box;
}

.visionos-nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 60px rgba(0,0,0,0.08), 0 0 0 1px rgba(167,139,250,0.15);
}

.nav-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 2rem; 
}

.nav-logo { 
  font-family: var(--font-display); 
  font-size: 1.4rem; 
  font-weight: 600; 
  text-decoration: none; 
}

.logo-light { 
  color: rgba(15,15,20,0.9); 
}

.nav-links { 
  display: flex; 
  gap: 0; 
  list-style: none; 
  padding: 0; 
  margin: 0; 
}

.nav-links a {
  font-size: 0.875rem; 
  font-weight: 500; 
  color: rgba(15,15,20,0.65);
  text-decoration: none; 
  padding: 8px 16px; 
  border-radius: var(--radius-full);
  transition: all 0.3s var(--ease-vision);
}

.nav-links a:hover {
  color: #000; 
  background: var(--glass-3);
}

.nav-links a.active { 
  color: #fff; 
  background: var(--prism-rose);
}

.nav-actions { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--glass-1);
  border: 1px solid var(--border-glass);
  color: rgba(15,15,20,0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-hamburger:hover {
  background: var(--glass-3);
  color: #000;
}

.nav-mobile-drawer {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  padding: 20px;
  border-radius: var(--radius-xl);
  display: none;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s var(--ease-vision);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.nav-mobile-drawer.active {
  display: flex !important;
  opacity: 1;
  transform: translateY(0);
}
.nav-mobile-drawer a {
  color: rgba(15,15,20,0.8);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 500;
  transition: all 0.3s;
}
.nav-mobile-drawer a:hover {
  background: var(--glass-3);
  color: black;
}
.nav-mobile-drawer a.active {
  background: var(--prism-rose);
  color: white;
}

.nav-icon-btn {
  width: 40px; 
  height: 40px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: transparent;
  border: none; 
  color: rgba(15,15,20,0.7);
  font-size: 1.4rem; 
  text-decoration: none;
  transition: all 0.3s var(--ease-vision);
}

.nav-icon-btn:hover { 
  background: transparent; 
  color: #FB6F92; 
}

.nav-icon-btn.active {
  background: var(--prism-rose);
  color: white;
  border-radius: var(--radius-full);
}

.cart-icon { 
  position: relative; 
}

.cart-count {
  position: absolute; 
  top: -4px; 
  right: -4px;
  min-width: 18px; 
  height: 18px; 
  border-radius: var(--radius-full);
  background: var(--grad-cta); 
  color: #fff; 
  font-size: 0.65rem; 
  font-weight: 600;
  display: flex; 
  align-items: center; 
  justify-content: center;
  padding: 2px;
}

.nav-icon-btn.active .cart-count {
  background: white;
  color: var(--prism-rose);
}

.nav-cta-btn {
  padding: 8px 20px; 
  border-radius: var(--radius-full); 
  font-size: 0.875rem; 
  font-weight: 500;
  color: #111; 
  text-decoration: none; 
  background-color: #FB6F92;
  border: 1px solid var(--border-glass-bright);
  white-space: nowrap;
  transition: all 0.3s var(--ease-vision);
}

.nav-cta-btn:hover { 
  background: var(--glass-3); 
  box-shadow: var(--shadow-glow-violet); 
}

/* UTILITIES */
.magnetic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Add any other missing component CSS classes below */
.reveal, .reveal-up, .reveal-left, .reveal-scale, .stagger-child {
  will-change: transform, opacity;
}

/* === PRODUCT GRID & CARDS === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.product-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 240, 243, 0.5) 100%);
  border: 1px solid rgba(255, 179, 198, 0.4);
  box-shadow: 0 15px 35px rgba(251, 111, 146, 0.05);
  transition: all 0.4s var(--ease-vision);
  overflow: hidden;
}

.product-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 243, 0.9) 100%);
  border-color: #FB6F92;
  box-shadow: 0 20px 45px rgba(251, 111, 146, 0.15);
  transform: translateY(-5px);
}

.product-badge {
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 10;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--glass-3); /* Default background */
  color: #111;
  backdrop-filter: blur(8px);
}

.badge-featured { background: var(--grad-prism); color: white; }
.badge-new { background: var(--prism-cyan); color: #000; }
.badge-sale { background: var(--prism-rose); color: white; }

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(0,0,0,0.03) 0%, transparent 100%); /* Adds a subtle backlight to dark images */
}

.product-img-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.8), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
  pointer-events: none;
}

.product-card:hover .product-img-glow {
  opacity: 1;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

.product-overlay {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  padding: 15px;
  display: flex;
  gap: 10px;
  background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
  transition: bottom 0.4s var(--ease-spring);
  z-index: 2;
}

.product-card:hover .product-overlay {
  bottom: 0;
}

.overlay-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-full);
  color: #111;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: var(--glass-3);
}

.overlay-btn:hover { background: var(--grad-cta); }

/* === CTA BUTTON (compact, used for Start Shopping etc.) === */
.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background: var(--grad-cta);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  width: fit-content;
  margin: 0 auto;
  cursor: pointer;
  border: none;
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-violet);
}

.overlay-icon {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--glass-3);
  transition: all 0.3s;
}

.overlay-icon:hover { background: var(--prism-rose); color: white; }

.product-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
}

.product-category {
  font-size: 0.75rem;
  color: var(--prism-rose);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #111;
  text-decoration: none;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  transition: color 0.3s;
  line-height: 1.3;
}

.product-title:hover { color: var(--prism-rose); }

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
}

.stars { color: var(--prism-gold); }
.review-count { color: rgba(15,15,20,0.5); }

.product-pricing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.price-current {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--prism-rose);
  font-weight: 600;
}

.price-original {
  font-size: 0.9rem;
  color: rgba(15,15,20,0.4);
  text-decoration: line-through;
}

.price-discount {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--prism-rose);
  border: 1px solid rgba(251,113,133,0.3);
}

@media (max-width: 576px) {
  .product-grid, .product-grid.stagger-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 4px !important;
  }
  .product-card {
    padding: 6px !important;
    gap: 8px !important;
  }
  .product-img {
    transform: scale(1.15) !important;
  }
  .product-card:hover .product-img {
    transform: scale(1.22) !important;
  }
  .product-overlay {
    bottom: 0;
    padding: 6px;
    gap: 4px;
  }
  .overlay-btn {
    font-size: 0.7rem;
    padding: 6px;
    gap: 4px;
  }
  .overlay-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .product-badge {
    top: 12px !important;
    left: 14px !important;
    font-size: 0.6rem !important;
    padding: 2px 6px !important;
  }
  .product-title { font-size: 0.9rem !important; }
  .price-current { 
    font-size: 1rem !important; 
    white-space: nowrap;
  }
  .price-original { 
    font-size: 0.75rem !important; 
    white-space: nowrap;
  }
  .price-discount { 
    font-size: 0.65rem !important; 
    padding: 1px 4px !important;
    white-space: nowrap;
  }
  .product-pricing {
    gap: 5px !important;
    flex-wrap: wrap !important;
  }
}

/* === MOBILE PERFORMANCE & RESPONSIVENESS FIXES === */
@media (max-width: 768px) {
  /* MASSIVE PERFORMANCE FIX: Disable expensive backdrop-filters on all generic elements.
     Since ambient background animations are disabled on mobile, blurring the static background
     is a waste of GPU cycles and causes severe scroll lag. */
  .glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(245, 245, 250, 0.9) !important; /* Solid fallback */
    box-shadow: none !important;
  }
  .glass-heavy {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: none !important;
  }
  
  /* Keep blur ONLY for the floating navbar since it floats over products */
  .visionos-nav {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    width: 95%;
    padding: 10px 15px;
  }
  .nav-inner { gap: 0.5rem; }
  .nav-logo { font-size: 1.2rem; }
  .nav-links { display: none !important; }
  .nav-hamburger { display: flex !important; }
  .stagger-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  }
  .section-heading, .hero-heading {
    font-size: 2.5rem !important;
  }
  .testimonials-overflow {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 30px;
  }
  .testimonial-card {
    scroll-snap-align: center;
    min-width: 85vw !important;
  }
}

/* === EXTRA SMALL MOBILE SCREENS (Phones) === */
@media (max-width: 480px) {
  .visionos-nav {
    padding: 8px 15px;
    /* width: 98%; */
  }
  .nav-inner { gap: 0.5rem; }
  .nav-logo { font-size: 1.05rem; }
  .nav-actions { gap: 6px; }
  .nav-icon-btn, .nav-hamburger {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }
  .section-heading, .hero-heading {
    font-size: 2rem !important;
  }
  .stagger-grid {
    grid-template-columns: 1fr; /* Force 1 column on tiny phones */
    gap: 20px;
  }
  .product-detail-view { padding: 90px 5% 30px !important; }
  .price-current { font-size: 1.8rem !important; }
  .reviews-list h2 { font-size: 1.8rem !important; }
  .product-gallery-wrap .main-image { padding: 15px !important; }
}

/* === FOOTER RESPONSIVENESS === */
.footer-bottom {
  justify-content: space-between;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 20px;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px;
    text-align: center;
    width: 100% !important;
  }
  .footer-copyright {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
    display: block !important;
  }
  .footer-links {
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}
