/* ===== Design Tokens ===== */
:root {
  --tulip-magenta: #FF30CC;
  --tulip-purple: #7B2D8E;
  --tulip-lavender: #C9A0DC;
  --tulip-green: #8BC34A;
  --tulip-neon-lime: #CCFD28;
  --tulip-mint: #E8F5E9;
  --tulip-cream: #FCF7ED;
  --tulip-charcoal: #1A1A1A;
  --tulip-magenta-dark: #D626A8;
  --tulip-purple-dark: #5E1F6E;
  --tulip-yellow-card: #FFE066;
  --tulip-pink-card: #FF8FAB;
  --tulip-green-card: #90EE90;
  --tulip-lavender-card: #DDA0DD;
  --tulip-soft-pink: #F3DCE2;
  --nav-height: 80px;
}

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: 'Fraunces', serif;
  color: var(--tulip-charcoal);
  background-color: var(--tulip-cream);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-block;
  background-color: var(--tulip-magenta);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 48, 204, 0.35);
}

.btn-secondary {
  display: inline-block;
  background-color: var(--tulip-neon-lime);
  color: var(--tulip-charcoal);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204, 253, 40, 0.35);
}

/* ===== Sticky Nav ===== */
.nav-sticky {
  transition: background-color 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}

.nav-sticky .nav-link,
.nav-sticky .hamburger-line {
  transition: color 0.3s, background-color 0.3s;
}

.nav-sticky.scrolled {
  background-color: rgba(252, 247, 237, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.nav-sticky.scrolled .nav-link {
  color: var(--tulip-charcoal) !important;
}

.nav-sticky.scrolled .hamburger-line {
  background-color: var(--tulip-charcoal) !important;
}

/* ===== Mobile Nav Drawer ===== */
.mobile-nav-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

/* ===== Rotating Hero Text ===== */
.rotating-text-container {
  display: inline-block;
  position: relative;
  min-width: 200px;
  vertical-align: bottom;
}

.rotating-word {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
  white-space: nowrap;
}

.rotating-word.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
}

/* ===== Marquee ===== */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* ===== Product Cards ===== */
.product-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ===== Product Card Images ===== */
.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card-img {
  transform: scale(1.08);
}

/* ===== Sale Badge ===== */
.sale-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--tulip-magenta);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ===== Testimonial Crossfade ===== */
.testimonial-crossfade-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.testimonial-crossfade-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(26, 26, 26, 0.25);
  transition: background-color 0.3s, transform 0.3s;
  cursor: pointer;
}

.testimonial-dot.active {
  background-color: var(--tulip-magenta);
  transform: scale(1.3);
}

/* ===== Expert Slider ===== */
.expert-slider-track {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.expert-card {
  flex-shrink: 0;
}

/* ===== Video Grid ===== */
.video-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  transition: background 0.3s;
  z-index: 1;
}

.video-thumb:hover::after {
  background: rgba(0,0,0,0.15);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  background: var(--tulip-magenta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.video-thumb:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ===== Video Thumb Images ===== */
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ===== Product Tabs ===== */
.product-tab {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s, color 0.3s;
  font-weight: 500;
}

.product-tab.active {
  border-color: var(--tulip-magenta);
  color: var(--tulip-magenta);
}

.product-tab-content {
  display: none;
}

.product-tab-content.active {
  display: block;
}

/* ===== FAQ Accordion ===== */
.faq-item {
  border-bottom: 1px solid #e5e5e5;
}

.faq-question {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq-question svg {
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
  padding-bottom: 0;
}

.faq-item.open .faq-answer {
  padding-bottom: 1.25rem;
}

/* ===== Scroll Animations ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children .fade-in-up:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in-up:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .fade-in-up:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .fade-in-up:nth-child(5) { transition-delay: 0.4s; }

/* ===== Image Gallery Thumbnails ===== */
.gallery-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.3s;
  overflow: hidden;
}

.gallery-thumb.active {
  border-color: var(--tulip-magenta);
}

/* ===== Trust Badges ===== */
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

/* ===== Feature Pill ===== */
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(204, 253, 40, 0.15);
  border: 1px solid rgba(204, 253, 40, 0.5);
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== CTA Gradient Banner ===== */
.cta-gradient {
  background: linear-gradient(135deg, var(--tulip-magenta) 0%, var(--tulip-purple) 100%);
}

/* ===== Gallery Main Image ===== */
.gallery-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

/* ===== Expert Avatar Images ===== */
.expert-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  object-fit: cover;
}

/* ===== Numbered Feature Images ===== */
.numbered-feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

/* ===== Hero Shell (cream inset wrapper) ===== */
.hero-shell {
  background: var(--tulip-cream);
  padding: 0 16px 20px;
}

/* ===== Hero Background Image ===== */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ===== Hero Slide Crossfade ===== */
.hero-slide {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity .9s cubic-bezier(.34,1.56,.64,1), transform 5s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

/* ===== Hero Gradient Overlay ===== */
.hero-overlay {
  background:
    linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 45%, rgba(0,0,0,.65) 100%),
    radial-gradient(ellipse at bottom left, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 55%);
}

/* ===== Content Block Image ===== */
.content-block-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

/* ===== Newsletter Input ===== */
.newsletter-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 48, 204, 0.2);
  border-color: var(--tulip-magenta);
}

/* ===== Section Dividers (Curved) ===== */
.section-curve-bottom {
  position: relative;
}

.section-curve-bottom::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 48px;
  background: inherit;
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: 2;
}

.section-curve-top {
  position: relative;
}

.section-curve-top::before {
  content: '';
  position: absolute;
  top: -47px;
  left: 0;
  width: 100%;
  height: 48px;
  background: inherit;
  clip-path: ellipse(55% 100% at 50% 100%);
  z-index: 2;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--tulip-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--tulip-lavender);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tulip-purple);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none;
  }

  .fade-in-up {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== Responsive Helpers ===== */
@media (max-width: 767px) {
  .hero-heading {
    font-size: 2.5rem;
    line-height: 1.15;
  }

  .section-heading {
    font-size: 2rem;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .numbered-feature {
    flex-direction: column;
  }

  .numbered-feature-reverse {
    flex-direction: column;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-heading {
    font-size: 3.5rem;
  }

  .section-heading {
    font-size: 2.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hero-heading {
    font-size: 4.5rem;
  }

  .section-heading {
    font-size: 3rem;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
