/* Kaikkoot Foods - Artisanal Design Tokens & High-End Stylesheet */

@layer base {
  :root {
    --brand-maroon: #6C141B;
    --brand-maroon-dark: #4A0C12;
    --brand-maroon-light: #8E1F27;
    --brand-turmeric: #C8680C;
    --brand-turmeric-gold: #DF7D1B;
    --brand-ochre: #FAF2E6;
    --brand-stone: #F5EFE6;
    --brand-cream: #FAF6F0;
    --brand-border: #E8DED1;
    --brand-dark: #1C1613;
    --brand-charcoal: #2A221E;
    --brand-muted: #716358;
  }

  body {
    background-color: var(--brand-cream);
    color: var(--brand-dark);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, .font-serif {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    letter-spacing: -0.012em;
  }
}

/* Tabular figures for pricing and amounts */
.tabular-nums, #cart-total-price, #hero-active-price, .product-price {
  font-variant-numeric: tabular-nums;
}

/* Glassmorphism primitives */
.glass-panel {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 35px -5px rgba(28, 22, 19, 0.06), 0 0 0 1px rgba(232, 222, 209, 0.4);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px -4px rgba(28, 22, 19, 0.07), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

/* Smart Hide/Show Floating Navbar on Scroll */
#main-nav {
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
  will-change: transform, opacity;
}

#main-nav.nav-hidden {
  transform: translateY(-135%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Mobile Sticky Bottom Action Bar */
#mobile-bottom-bar {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  will-change: transform, opacity;
}

#mobile-bottom-bar.visible {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Touch Highlight & Ergonomics */
* {
  -webkit-tap-highlight-color: transparent;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

/* Subtle custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F5EFE6;
}
::-webkit-scrollbar-thumb {
  background: #D8CEBF;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B6A997;
}

/* ========================================================= */
/* RUNNING REVIEWS MARQUEE KEYFRAME ANIMATIONS ("Running Reviews") */
/* ========================================================= */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  display: inline-flex;
  animation: marquee-scroll 32s linear infinite;
  will-change: transform;
}

.marquee-track-reviews {
  display: inline-flex;
  animation: marquee-scroll 38s linear infinite;
  will-change: transform;
}

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

/* Slow rotating circular text in hero background */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 50s linear infinite;
  transform-origin: center center;
}

/* Product Card Hover and Transitions */
.product-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(108, 20, 27, 0.12);
}

/* Quiet borders & natural shadows */
.shadow-soft {
  box-shadow: 0 4px 20px -2px rgba(28, 22, 19, 0.05);
}

/* ========================================================= */
/* SLIDEOVER CART DRAWER TRANSITION & STRICT POINTER BEHAVIOR */
/* ========================================================= */
#cart-drawer {
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cart-drawer #cart-backdrop {
  pointer-events: none !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease;
}

#cart-drawer #cart-slide-panel {
  pointer-events: none !important;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

#cart-drawer.open {
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#cart-drawer.open #cart-backdrop {
  pointer-events: auto !important;
  opacity: 1 !important;
}

#cart-drawer.open #cart-slide-panel {
  pointer-events: auto !important;
  transform: translateX(0%) !important;
}

/* Filter tabs active state */
.filter-tab.active {
  background-color: #6C141B !important;
  color: #ffffff !important;
  border-color: #6C141B !important;
}

/* Clean payment radio cards */
.payment-method-card input:checked + div + p + span,
.payment-method-card:has(input:checked) {
  border-color: #6C141B !important;
  background-color: #FFFDF9 !important;
}

/* Carousel pagination active dot */
.carousel-dot {
  cursor: pointer;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.carousel-dot.active {
  background-color: #6C141B !important;
  width: 24px !important;
  border-radius: 9999px !important;
}

/* Details summary marker removal */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* Three.js canvas crisp rendering */
#hero-3d-canvas {
  touch-action: pan-y;
  outline: none;
}
