@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;600;700&family=Fredoka:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   DESIGN TOKENS & RESET
   ========================================================================== */
:root {
  /* Color Palette - Cozy Pastel Minimalism (Light Theme) */
  --bg-cream: #FAF6F0;       /* Rich warm vanilla cream */
  --bg-white: #FFFFFF;       /* Pure white for containers */
  --text-cocoa: #4A352F;     /* Deep cozy cocoa for primary typography */
  --text-muted: #806B65;     /* Warm grey-brown for secondary typography */
  
  --accent-pink: #F7D5CF;    /* Soft blossom pink */
  --accent-pink-hover: #EBB6AE;
  --accent-pink-dark: #D47B6E;
  
  --accent-yellow: #F7EAD0;  /* Warm buttery yellow */
  --accent-yellow-hover: #EBD3AB;
  
  --accent-green: #E1EBE2;   /* Soft sage green for fresh/vegan labels */
  --accent-green-dark: #6C8E70;
  
  --accent-caramel: #8D6257; /* Warm caramel accent */
  --accent-rose: #FAECE9;    /* Very light rose background highlight */
  
  --dialog-backdrop: rgba(74, 53, 47, 0.35);
  
  /* Header & Borders (Theme Adaptive) */
  --header-bg: rgba(250, 246, 240, 0.75);
  --header-bg-scrolled: rgba(250, 246, 240, 0.9);
  --header-border: rgba(74, 53, 47, 0.05);
  --border-soft: rgba(74, 53, 47, 0.08);
  
  /* Fonts */
  --font-heading: 'Fredoka', 'Nunito', sans-serif;
  --font-heading-cyrillic: 'Nunito', 'Comfortaa', sans-serif;
  --font-body: 'Outfit', 'Nunito', sans-serif;
  --font-body-cyrillic: 'Nunito', sans-serif;
  --font-accent: 'Playfair Display', serif;
  
  /* Shadows */
  --shadow-soft: 0 10px 40px rgba(74, 53, 47, 0.04);
  --shadow-medium: 0 15px 45px rgba(74, 53, 47, 0.08);
  --shadow-sticker: 0 4px 15px rgba(74, 53, 47, 0.06);
  --shadow-btn: 0 4px 15px rgba(212, 123, 110, 0.2);
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-fade: all 0.3s ease;
  
  /* Footer Specific Theme Colors (Optimized for Cozy Light/Dark Adaptation) */
  --footer-bg: var(--accent-rose);    /* Cozy pastel rose background */
  --footer-text: var(--text-cocoa);   /* Deep cocoa typography */
  --footer-text-muted: var(--text-muted); /* Warm brown secondary text */
  --footer-border: rgba(74, 53, 47, 0.08); /* Soft decorative dividers */
  --footer-icon-bg: rgba(74, 53, 47, 0.04); /* Soft social media buttons background */
  --footer-icon-hover-bg: var(--accent-pink-dark);
  --footer-icon-hover-color: #FFFFFF;
}

body.dark-theme {
  /* Cozy Chocolate-Caramel Dark Theme */
  --bg-cream: #201411;       /* Deep chocolate mocha background */
  --bg-white: #2D1D19;       /* Dark warm brown for cards/containers */
  --text-cocoa: #FAF6F0;     /* Cream vanilla for text in dark mode */
  --text-muted: #C0B2AE;     /* Warm sand/grey for muted text */
  
  --accent-pink: #442521;    /* Deep rose brown for borders/accents */
  --accent-pink-hover: #5A352F;
  --accent-pink-dark: #E29B90; /* Bright soft rose-pink for highlights/buttons */
  
  --accent-yellow: #4D3C28;  /* Deep amber/caramel for tags */
  --accent-yellow-hover: #634E35;
  
  --accent-green: #253328;   /* Deep forest sage green */
  --accent-green-dark: #A5C2AA; /* Soft pale sage green for text */
  
  --accent-caramel: #DDA89B; /* Light soft caramel highlight */
  --accent-rose: #33211D;    /* Subtle dark rose highlight */
  
  --dialog-backdrop: rgba(15, 10, 8, 0.7);
  
  /* Header & Borders (Theme Adaptive) */
  --header-bg: rgba(32, 20, 17, 0.8);
  --header-bg-scrolled: rgba(32, 20, 17, 0.95);
  --header-border: rgba(250, 246, 240, 0.08);
  --border-soft: rgba(250, 246, 240, 0.1);
  
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.2);
  --shadow-medium: 0 15px 45px rgba(0, 0, 0, 0.3);
  --shadow-sticker: 0 4px 15px rgba(0, 0, 0, 0.15);
  --shadow-btn: 0 4px 15px rgba(226, 155, 144, 0.15);
  
  /* Footer Dark Theme Custom Colors */
  --footer-bg: #1A100E;               /* Rich deep warm chocolate anchor */
  --footer-text: var(--text-cocoa);   /* Light cream vanilla text */
  --footer-text-muted: var(--text-muted); /* Warm sand grey secondary text */
  --footer-border: rgba(250, 246, 240, 0.1);
  --footer-icon-bg: rgba(250, 246, 240, 0.06);
  --footer-icon-hover-bg: var(--accent-pink-dark);
  --footer-icon-hover-color: var(--bg-cream);
}

/* Custom interactive inputs & toggles */
.lang-selector {
  display: inline-flex;
  background-color: var(--accent-rose);
  padding: 0.2rem;
  border-radius: 50px;
  border: 1px solid var(--border-soft);
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.lang-btn.active {
  background-color: var(--accent-pink-dark);
  color: var(--bg-cream) !important;
}

.theme-toggle-btn {
  background-color: var(--accent-rose);
  border: 1px solid var(--border-soft);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-cocoa);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background-color: var(--accent-pink-hover);
  transform: rotate(20deg) scale(1.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

/* Keep anchored sections clear of the fixed header */
section[id] {
  scroll-margin-top: 96px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-cream);
  color: var(--text-cocoa);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-pink);
  border: 3px solid var(--bg-cream);
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-cocoa);
  font-weight: 600;
  line-height: 1.2;
}

p {
  font-weight: 300;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fade);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   REUSABLE UTILITIES
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 6rem 0;
}

.text-center {
  text-align: center;
}

/* Cozy Ribbon / Sticker Elements */
.badge-sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-sticker);
  border: 1.5px dashed rgba(74, 53, 47, 0.15);
  animation: float 4s ease-in-out infinite alternate;
}

.badge-sticker.pink {
  background-color: var(--accent-pink);
  color: var(--text-cocoa);
}

.badge-sticker.yellow {
  background-color: var(--accent-yellow);
  color: var(--text-cocoa);
  animation-delay: 1s;
}

.badge-sticker.green {
  background-color: var(--accent-green);
  color: var(--accent-green-dark);
  animation-delay: 2s;
}

/* Handcrafted buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-pink-dark);
  color: white;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background-color: var(--accent-pink-hover);
  color: var(--text-cocoa);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 6px 20px rgba(212, 123, 110, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--accent-caramel);
  color: var(--text-cocoa);
}

.btn-secondary:hover {
  background-color: var(--accent-rose);
  transform: translateY(-3px);
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

/* Section Header Styling */
.section-header {
  margin-bottom: 4rem;
  position: relative;
}

.section-header h2 {
  font-size: 2.8rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-muted);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--header-border);
  transition: var(--transition-fade);
}

.header.scrolled {
  padding: 0.5rem 0;
  background-color: var(--header-bg-scrolled);
  box-shadow: var(--shadow-soft);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-cocoa);
}

.logo svg {
  color: var(--accent-pink-dark);
  animation: pulse-soft 3s ease-in-out infinite;
}

.logo span {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: -3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-cocoa);
  position: relative;
  font-size: 0.95rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent-pink-dark);
  border-radius: 10px;
  transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cart-btn-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--bg-white);
  border: 1.5px solid var(--accent-rose);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-cocoa);
  transition: var(--transition-smooth);
  position: relative;
}

.cart-btn-nav:hover {
  background-color: var(--accent-rose);
  transform: translateY(-2px);
  border-color: var(--accent-pink);
}

.cart-count {
  background-color: var(--accent-pink-dark);
  color: white;
  font-size: 0.75rem;
  min-width: 20px;
  height: 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-cocoa);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-white) 100%);
}

/* Floating decorative elements */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title-accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.hero-content h1 {
  font-size: 4.2rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-content h1 span {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-pink-dark);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-badges-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-circle-bg {
  position: absolute;
  width: 100%;
  max-width: 480px;
  height: 480px;
  background-color: var(--accent-rose);
  border-radius: 50%;
  z-index: 1;
  box-shadow: inset 0 0 50px rgba(74, 53, 47, 0.02);
}

.hero-main-img {
  position: relative;
  z-index: 2;
  border-radius: 50%;
  width: 90%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow: var(--shadow-medium);
  border: 12px solid var(--bg-white);
  animation: float-slow 8s ease-in-out infinite alternate;
}

/* Floating Badges overlaying image */
.hero-img-badge-1 {
  position: absolute;
  top: 10%;
  right: 0;
  z-index: 3;
}

.hero-img-badge-2 {
  position: absolute;
  bottom: 15%;
  left: -5%;
  z-index: 3;
}

/* ==========================================================================
   PRODUCTS CATALOG
   ========================================================================== */
.products-section {
  background-color: var(--bg-white);
}

.filters-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.filter-btn {
  background: var(--bg-cream);
  border: 1.5px solid transparent;
  color: var(--text-cocoa);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: var(--accent-rose);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent-pink-dark);
  color: white;
  box-shadow: var(--shadow-btn);
}

.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* centers the incomplete last row */
  gap: 2.5rem;
}

.product-card {
  background-color: var(--bg-cream);
  border-radius: 32px;
  overflow: hidden;
  padding: 1.5rem;
  transition: var(--transition-smooth);
  border: 1.5px solid rgba(74, 53, 47, 0.03);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-soft);
  flex: 1 1 320px;
  max-width: 380px;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-pink);
}

@keyframes scale-up-soft {
  0% { transform: scale(0.96); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Keep product cards visually unified across categories. */
.product-card.pelmeni,
.product-card.vareniki,
.product-card.golubtsi,
.product-card.cutlets,
.product-card.deruny,
.product-card.syrniki,
.product-card.cakes,
.product-card.desserts,
.product-card.sweets {
  background: var(--bg-cream);
}

/* ===== Out-of-stock card ===== */
.product-card-soldout {
  background: linear-gradient(180deg, #f4efe9 0%, #ece4db 100%);
  border-color: rgba(74, 53, 47, 0.08);
  box-shadow: none;
  opacity: 0.96;
}

.product-card-soldout:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
  border-color: rgba(74, 53, 47, 0.14);
}

.soldout-ribbon {
  position: absolute;
  top: 1.1rem;
  right: -2.6rem;
  transform: rotate(38deg);
  background: #8a7a72;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 3rem;
  z-index: 12;
  box-shadow: 0 2px 6px rgba(74, 53, 47, 0.2);
}

.soldout-img {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
}

.soldout-img img {
  filter: grayscale(0.85) brightness(0.96);
}

.soldout-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(74, 53, 47, 0.32);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-card-soldout .product-title,
.product-card-soldout .product-desc {
  color: var(--text-muted);
}

.soldout-price {
  color: var(--text-muted) !important;
  text-decoration: line-through;
  opacity: 0.8;
}

.btn-soldout {
  background: rgba(74, 53, 47, 0.08) !important;
  color: var(--text-muted) !important;
  border: 1px dashed rgba(74, 53, 47, 0.25) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  justify-content: center;
}

.btn-soldout:hover {
  transform: none !important;
  background: rgba(74, 53, 47, 0.08) !important;
}

.product-card-tag {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: calc(100% - 4rem);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  color: var(--text-cocoa);
  box-shadow: var(--shadow-sticker);
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.product-card-tag.hit {
  background-color: var(--accent-pink);
}

.product-card-tag.vegan {
  background-color: var(--accent-pink);
  color: var(--text-cocoa);
}

.product-card-tag.new {
  background-color: var(--accent-pink);
}

.product-img-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 1;
  background-color: var(--bg-cream);
  cursor: pointer;
}

.product-img-wrapper:focus-visible {
  outline: 3px solid var(--accent-pink-dark);
  outline-offset: 4px;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.product-category-label {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-cook-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.product-title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fade);
}

.product-title:hover {
  color: var(--accent-pink-dark);
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.min-order-callout {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  margin: -0.55rem 0 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: var(--accent-pink);
  border: 1.5px solid var(--accent-pink-hover);
  color: var(--text-cocoa);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.product-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px dashed rgba(74, 53, 47, 0.08);
  padding-top: 1.2rem;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-cocoa);
}

.product-price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.1rem;
}

.btn-add-cart {
  background-color: var(--text-cocoa);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-add-cart:hover {
  background-color: var(--accent-pink-dark);
  transform: rotate(90deg) scale(1.1);
  box-shadow: var(--shadow-btn);
}

/* Dark theme specific visibility and contrast polish for Add to Cart button */
body.dark-theme .btn-add-cart {
  background-color: var(--accent-pink-dark);
  color: var(--bg-white); /* Dark chocolate brown #2D1D19 for clear high contrast icon */
}

body.dark-theme .btn-add-cart:hover {
  background-color: var(--text-cocoa); /* Warm light cream #FAF6F0 in dark theme */
  color: var(--bg-cream); /* Dark chocolate mocha #201411 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-choose-flavor {
  background-color: var(--accent-pink-dark);
  color: white;
  padding: 0.65rem 1.1rem;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-btn);
  animation: buttonPulse 3s infinite ease-in-out;
}

.btn-choose-flavor.btn-full-width {
  width: 100%;
  justify-content: center;
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
}

.btn-choose-flavor:hover {
  background-color: var(--text-cocoa);
  color: var(--bg-white);
  transform: translateY(-2px);
  animation-play-state: paused; /* Pause pulsing on hover to focus on user interaction */
}

body.dark-theme .btn-choose-flavor {
  background-color: var(--accent-pink-dark);
  color: #2D1D19; /* High contrast dark brown in dark theme */
  animation: buttonPulseDark 3s infinite ease-in-out;
}

body.dark-theme .btn-choose-flavor:hover {
  background-color: var(--text-cocoa);
  color: var(--bg-cream);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Glowing Pulsing Keyframes for call-to-action */
@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(212, 123, 110, 0.25), 0 0 0 0px rgba(212, 123, 110, 0.25);
  }
  50% {
    box-shadow: 0 6px 18px rgba(212, 123, 110, 0.45), 0 0 0 8px rgba(212, 123, 110, 0);
  }
}

@keyframes buttonPulseDark {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(212, 123, 110, 0.15), 0 0 0 0px rgba(212, 123, 110, 0.15);
  }
  50% {
    box-shadow: 0 6px 18px rgba(212, 123, 110, 0.35), 0 0 0 8px rgba(212, 123, 110, 0);
  }
}

/* Image overlay for selecting flavor */
.product-img-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(74, 53, 47, 0.18); /* Soft warm brown blur overlay */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none; /* Mouse clicks pass through cleanly to wrapper click handler */
  z-index: 2;
}

.product-img-wrapper:hover .product-img-overlay,
.product-card:hover .product-img-overlay {
  opacity: 1;
}

.overlay-pill {
  background-color: var(--bg-white);
  color: var(--text-cocoa);
  padding: 0.6rem 1.1rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(74, 53, 47, 0.15);
  transform: scale(0.9) translateY(12px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1.5px solid var(--accent-pink-dark);
}

.product-img-wrapper:hover .overlay-pill,
.product-card:hover .overlay-pill {
  transform: scale(1) translateY(0);
}

/* Dark theme style variations for overlay-pill */
body.dark-theme .overlay-pill {
  background-color: var(--bg-cream);
  color: var(--text-cocoa);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-color: var(--accent-pink-dark);
}

/* Cozy horizontal spring wiggle highlight animation */
@keyframes cozyWiggle {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-1px); }
}

/* ==========================================================================
   PHILOSOPHY & VALUES
   ========================================================================== */
.philosophy-section {
  background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-cream) 100%);
  position: relative;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  background-color: var(--bg-white);
  border-radius: 28px;
  padding: 3rem 2rem;
  text-align: center;
  border: 1.5px solid rgba(74, 53, 47, 0.02);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.value-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--accent-pink-dark);
  border: 1.5px dashed rgba(74, 53, 47, 0.1);
}

.value-card:nth-child(2) .value-icon-box {
  background-color: var(--accent-yellow);
  color: var(--text-cocoa);
}

.value-card:nth-child(3) .value-icon-box {
  background-color: var(--accent-green);
  color: var(--accent-green-dark);
}

.value-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.value-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE DUMPLING QUIZ
   ========================================================================== */
.quiz-section {
  background-color: var(--bg-cream);
  position: relative;
}

.quiz-container {
  max-width: 680px;
  margin: 0 auto;
  background-color: var(--bg-white);
  border-radius: 36px;
  padding: 3.5rem;
  box-shadow: var(--shadow-medium);
  border: 2px dashed rgba(74, 53, 47, 0.08);
  position: relative;
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--bg-cream);
  border-radius: 10px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 25%;
  background-color: var(--accent-pink-dark);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.quiz-slide {
  display: none;
  animation: fade-in 0.4s ease forwards;
}

.quiz-slide.active {
  display: block;
}

.quiz-question-num {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--accent-pink-dark);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.quiz-question-text {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.quiz-options {
  display: grid;
  gap: 1rem;
}

.quiz-option {
  background-color: var(--bg-cream);
  border: 1.5px solid transparent;
  padding: 1.2rem 1.8rem;
  border-radius: 18px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 500;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option::after {
  content: '❤';
  color: var(--accent-pink-dark);
  font-size: 0.8rem;
  opacity: 0;
  transition: var(--transition-fade);
}

.quiz-option:hover {
  background-color: var(--accent-rose);
  transform: translateX(5px);
  border-color: var(--accent-pink);
}

.quiz-option:hover::after {
  opacity: 0.6;
}

/* Quiz Result Slide */
.quiz-result {
  text-align: center;
}

.quiz-result-sticker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  color: var(--accent-pink-dark);
  font-size: 4.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sticker);
  border: 2px dashed rgba(74, 53, 47, 0.15);
  animation: float 4s ease-in-out infinite alternate;
}

.quiz-result-title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.quiz-result-subtitle {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
}

.quiz-result-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.5;
}

.quiz-promo-box {
  background-color: var(--accent-yellow);
  padding: 1.5rem;
  border-radius: 20px;
  margin-bottom: 2.5rem;
  border: 1.5px dashed rgba(74, 53, 47, 0.15);
}

.quiz-promo-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.quiz-promo-code {
  font-size: 2.2rem;
  font-family: var(--font-heading);
  letter-spacing: 2px;
  color: var(--text-cocoa);
}

/* ==========================================================================
   TESTIMONIALS & REVIEWS
   ========================================================================== */
.reviews-section {
  background-color: var(--bg-white);
  overflow: hidden;
}

.reviews-carousel {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  transition: transform 0.5s ease;
}

.review-card {
  min-width: 360px;
  max-width: 400px;
  background-color: var(--bg-cream);
  border-radius: 28px;
  padding: 2.5rem;
  border: 1.5px solid rgba(74, 53, 47, 0.02);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.review-badge {
  position: absolute;
  top: -15px;
  right: 25px;
  background-color: var(--accent-pink);
  color: var(--text-cocoa);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  box-shadow: var(--shadow-sticker);
  border: 1px dashed rgba(74, 53, 47, 0.1);
  transform: rotate(3deg);
}

.review-stars {
  display: flex;
  gap: 0.2rem;
  color: #EDAC5A;
  margin-bottom: 1.2rem;
}

.review-text {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-cocoa);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.review-user-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1.5px solid var(--accent-rose);
  box-shadow: var(--shadow-sticker);
}

.review-user-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 550;
}

.review-user-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 3.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-dot.active {
  width: 25px;
  border-radius: 10px;
  background-color: var(--accent-pink-dark);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 6rem 0 3rem;
  position: relative;
  border-top: 1px solid var(--footer-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer h3 {
  color: var(--footer-text);
  font-size: 1.4rem;
  margin-bottom: 1.8rem;
}

.footer-brand h2 {
  color: var(--footer-text);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.footer-brand h2 span {
  font-family: var(--font-accent);
  color: var(--accent-pink-dark);
  font-style: italic;
  font-weight: 400;
}

.footer-brand p {
  color: var(--footer-text-muted);
  font-size: 0.95rem;
  max-width: 320px;
  margin-bottom: 2rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--footer-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  color: var(--footer-text);
  border: 1px solid var(--footer-border);
}

.social-icon-btn:hover {
  background-color: var(--footer-icon-hover-bg);
  color: var(--footer-icon-hover-color);
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow-sticker);
}

.footer-links-list li {
  margin-bottom: 1rem;
}

.footer-links-list a {
  color: var(--footer-text-muted);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.footer-links-list a:hover {
  color: var(--accent-pink-dark);
  padding-left: 5px;
}

.footer-contact p {
  color: var(--footer-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-contact p svg {
  color: var(--accent-pink-dark);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--footer-text-muted);
  opacity: 0.8;
}

.footer-bottom-links {
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--footer-text-muted);
}

.footer-bottom-links a {
  transition: var(--transition-fade);
}

.footer-bottom-links a:hover {
  color: var(--accent-pink-dark);
}

/* ==========================================================================
   NATIVE HTML5 DIALOGS & OVERLAYS
   ========================================================================== */
dialog {
  border: none;
  border-radius: 36px;
  box-shadow: 0 25px 60px rgba(74, 53, 47, 0.15);
  background-color: var(--bg-white);
  color: var(--text-cocoa); /* Fix default black text in dialog user-agent stylesheets */
  max-width: 600px;
  width: 90%;
  margin: auto;
  outline: none;
  overflow: hidden;
  padding: 0;
  animation: dialog-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.175) forwards;
}

dialog::backdrop {
  background-color: var(--dialog-backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: backdrop-fade 0.3s ease forwards;
}

.dialog-header {
  padding: 1.8rem 2.2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(74, 53, 47, 0.05);
}

.dialog-header h3 {
  font-size: 1.6rem;
}

.dialog-close-btn {
  background-color: var(--bg-cream);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-cocoa);
  transition: var(--transition-smooth);
}

.dialog-close-btn:hover {
  background-color: var(--accent-rose);
  transform: rotate(90deg);
}

.spec-item {
  text-align: center;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.spec-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-cocoa);
}

/* 2. Cart Drawer Modal */
#cart-drawer {
  height: 100vh;
  max-height: 100vh;
  max-width: 480px;
  margin-right: 0;
  margin-left: auto;
  border-radius: 36px 0 0 36px;
  animation: drawer-slide-in 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.cart-drawer-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

.cart-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 4s ease-in-out infinite alternate;
}

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr 100px;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(74, 53, 47, 0.05);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  object-fit: cover;
  background-color: var(--bg-cream);
}

.cart-item-info h4 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.cart-item-price {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cart-item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--bg-cream);
  border-radius: 50px;
  padding: 0.25rem 0.6rem;
}

.qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-cocoa);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fade);
}

.qty-btn:hover {
  color: var(--accent-pink-dark);
}

.qty-val {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  min-width: 14px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  text-decoration: underline;
  transition: var(--transition-fade);
}

.cart-item-remove:hover {
  color: var(--accent-pink-dark);
}

.cart-drawer-footer {
  padding: 2.2rem;
  background-color: var(--bg-cream);
  border-top: 1px solid rgba(74, 53, 47, 0.05);
}

.cart-promo-apply {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.promo-input {
  flex-grow: 1;
  border: 1.5px solid rgba(74, 53, 47, 0.1);
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  outline: none;
  background-color: var(--bg-white);
  color: var(--text-cocoa);
  transition: var(--transition-fade);
}

.promo-input:focus {
  border-color: var(--accent-pink-dark);
}

.cart-bill-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

.cart-bill-row.total {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-cocoa);
  border-top: 1px dashed rgba(74, 53, 47, 0.1);
  padding-top: 1rem;
  margin-top: 1rem;
}

.btn-checkout {
  width: 100%;
  margin-top: 1rem;
}

/* 3. Checkout Dialog & Forms */
.checkout-form-container {
  padding: 2.2rem;
}

.checkout-secure-note {
  margin: 0 0 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: var(--accent-green);
  color: var(--text-cocoa);
  font-size: 0.9rem;
  line-height: 1.5;
}

.checkout-notes-group {
  margin-bottom: 0;
}

.checkout-notes-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  border: 1.5px solid rgba(74, 53, 47, 0.1);
  padding: 0.8rem 1.4rem;
  border-radius: 16px;
  font-family: var(--font-body);
  outline: none;
  background-color: var(--bg-cream);
  color: var(--text-cocoa);
  transition: var(--transition-smooth);
}

.form-input:focus {
  border-color: var(--accent-pink-dark);
  background-color: var(--bg-white);
  box-shadow: 0 0 10px rgba(212, 123, 110, 0.15);
}

/* Custom placeholder styling for cozy input readability */
.promo-input::placeholder,
.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.checkout-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  border-top: 1px solid rgba(74, 53, 47, 0.05);
  padding-top: 1.8rem;
}

.payment-status {
  position: fixed;
  z-index: 9999;
  top: 1.25rem;
  left: 50%;
  width: min(92vw, 620px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(74, 53, 47, 0.14);
  border-radius: 18px;
  background: var(--bg-white);
  color: var(--text-cocoa);
  box-shadow: var(--shadow-medium);
}

.payment-status[hidden] {
  display: none;
}

.payment-status p {
  margin: 0;
  line-height: 1.45;
}

.payment-status-success { border-color: var(--accent-green-dark); }
.payment-status-error { border-color: var(--accent-pink-dark); }
.payment-status-pending { border-color: #EDAC5A; }

/* 4. Checkout Success / Receipt */
.receipt-container {
  padding: 3rem 2.2rem;
  text-align: center;
}

.receipt-icon {
  width: 80px;
  height: 80px;
  background-color: var(--accent-green);
  color: var(--accent-green-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  border: 2px dashed rgba(108, 142, 112, 0.2);
}

.receipt-paper {
  background-color: var(--bg-cream);
  border-radius: 24px;
  padding: 2.2rem;
  border: 1.5px solid rgba(74, 53, 47, 0.06);
  margin: 2rem 0;
  text-align: left;
  font-size: 0.9rem;
  position: relative;
}

.receipt-paper::before, .receipt-paper::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 6px;
  background-size: 12px 6px;
}

.receipt-paper::before {
  top: -6px;
  background-image: radial-gradient(circle at 6px 6px, transparent 6px, var(--bg-cream) 6px);
}

.receipt-paper::after {
  bottom: -6px;
  background-image: radial-gradient(circle at 6px 0, transparent 6px, var(--bg-cream) 6px);
}

.receipt-title {
  font-family: var(--font-heading);
  text-align: center;
  font-size: 1.3rem;
  border-bottom: 1px dashed rgba(74, 53, 47, 0.15);
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.receipt-row.bold {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  border-top: 1px dashed rgba(74, 53, 47, 0.15);
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}

.receipt-success-msg {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ==========================================================================
   ANIMATIONS & MEDIA QUERIES
   ========================================================================== */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes float-slow {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-15px) rotate(1.5deg); }
}

@keyframes pulse-soft {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dialog-pop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes backdrop-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drawer-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 3.2rem;
  }
  
  .hero-description {
    margin: 0 auto 2.5rem;
  }
  
  .hero-badges-row {
    justify-content: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 4rem 0;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    border-bottom: 2px solid var(--accent-rose);
    gap: 1.5rem;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .quiz-container {
    padding: 2rem;
  }
  
  .quiz-question-text {
    font-size: 1.4rem;
  }
  
  .checkout-form-container {
    padding: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ==========================================================================
   RUSSIAN TYPOGRAPHY COZINESS & BALANCE
   ========================================================================== */
html[lang="ru"] {
  --font-heading: var(--font-heading-cyrillic);
  --font-body: var(--font-body-cyrillic);
}

/* Keep Cyrillic close to Fredoka's rounded, soft feel without changing rhythm. */
html[lang="ru"] h1,
html[lang="ru"] h2,
html[lang="ru"] h3,
html[lang="ru"] h4,
html[lang="ru"] h5,
html[lang="ru"] h6,
html[lang="ru"] .btn,
html[lang="ru"] .badge-sticker {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0;
}

html[lang="ru"] body,
html[lang="ru"] p {
  font-family: var(--font-body);
  font-weight: 400;
}

html[lang="ru"] .hero-title-accent,
html[lang="ru"] .section-header p,
html[lang="ru"] .logo span,
html[lang="ru"] .receipt-success-msg {
  font-family: var(--font-accent);
}

html[lang="ru"] .hero-content h1 span {
  font-family: var(--font-accent);
  font-weight: 600;
}

/* ==========================================================================
   VIEW TRANSITIONS API (Circular Reveal Theme Toggle)
   ========================================================================== */
::view-transition {
  background: transparent;
}

@keyframes dummy-fade {
  from { opacity: 1; }
  to { opacity: 1; }
}

::view-transition-old(root) {
  animation: 650ms cubic-bezier(0.4, 0, 0.2, 1) dummy-fade;
  mix-blend-mode: normal;
  opacity: 1;
  z-index: 1;
  height: 100%;
}

::view-transition-new(root) {
  animation: 650ms cubic-bezier(0.4, 0, 0.2, 1) dummy-fade;
  mix-blend-mode: normal;
  opacity: 1;
  z-index: 9999;
  height: 100%;
}

/* Modal Grid Layout */
#all-flavors-modal {
  max-width: 760px;
  width: 95%;
}

.all-flavors-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* Compact text rows for flavor selection (no photos) */
.flavor-list-row {
  background-color: var(--bg-cream);
  border: 1.5px solid var(--border-soft);
  border-radius: 20px;
  padding: 1.1rem 1.4rem;
  transition: var(--transition-smooth);
}

.flavor-list-row:hover {
  border-color: var(--accent-pink);
  box-shadow: var(--shadow-soft);
}

.flavor-list-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.flavor-list-info {
  flex: 1;
  min-width: 220px;
}

.flavor-list-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.flavor-list-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-cocoa);
}

.flavor-list-badge {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
}

.flavor-list-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0.55rem;
}

.flavor-list-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.flavor-inline-toggle {
  margin: 0;
}

.flavor-modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.flavor-modal-specs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  width: 100%;
}
.spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border: 1px solid rgba(74, 53, 47, 0.05);
}
.spec-time { background-color: var(--accent-yellow); color: var(--text-cocoa); }
.spec-weight { background-color: var(--accent-green); color: var(--accent-green-dark); }
body.dark-theme .spec-tag {
  border-color: rgba(250, 246, 240, 0.05);
}

.flavor-min-order-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.8rem;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  background: var(--accent-pink);
  border: 1.5px solid var(--accent-pink-hover);
  color: var(--text-cocoa);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

/* 2. Collapsible Details Drawer */
.flavor-details-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin: 0;
  outline: none;
  transition: var(--transition-fade);
  width: auto;
}
.flavor-details-toggle:hover {
  color: var(--accent-pink-dark);
}
.flavor-modal-details-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, border-color 0.3s ease, margin 0.3s ease;
  text-align: left;
  background-color: var(--bg-white);
  border-radius: 16px;
  border: 1.5px solid transparent;
  margin-bottom: 0;
  width: 100%;
}
.flavor-modal-details-drawer.open {
  opacity: 1;
  border-color: var(--border-soft);
  margin-bottom: 0.8rem;
}
.drawer-inner { padding: 0.8rem 1rem; }
.drawer-section-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.drawer-text { font-size: 0.78rem; color: var(--text-cocoa); margin-top: 0.2rem; line-height: 1.4; }
.drawer-spices-list { font-size: 0.78rem; color: var(--text-cocoa); list-style: disc; margin-left: 1.2rem; margin-top: 0.2rem; }
.flavor-modal-desc-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, border-color 0.3s ease, margin 0.3s ease;
  text-align: left;
  background-color: var(--bg-white);
  border-radius: 16px;
  border: 1.5px solid transparent;
  margin-bottom: 0;
  width: 100%;
}
.flavor-modal-desc-drawer.open {
  opacity: 1;
  border-color: var(--border-soft);
  margin-bottom: 0.8rem;
}
.flavor-modal-desc-drawer .flavor-modal-desc {
  margin: 0;
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-cocoa);
  line-height: 1.45;
}
.flavor-qty-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  background-color: var(--bg-cream);
  border-radius: 50px;
  padding: 0.2rem 0.45rem;
  border: 1.5px solid var(--border-soft);
  box-shadow: inset 0 2px 4px rgba(74, 53, 47, 0.02);
}
.qty-control-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-cocoa);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fade);
}
.qty-control-btn:hover { color: var(--accent-pink-dark); }
.qty-value { font-family: var(--font-heading); font-size: 0.9rem; min-width: 14px; text-align: center; color: var(--text-cocoa); }

/* 4. Full-Width High Contrast Add Button */
.flavor-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-pink-dark);
  color: white;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 16px; /* Farmhouse rounded matching card theme */
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-btn);
  width: auto;
  white-space: nowrap;
}
.flavor-add-btn:hover {
  background-color: var(--text-cocoa);
  color: var(--bg-white);
  transform: translateY(-2px);
}
.flavor-add-btn.added {
  background-color: var(--accent-green-dark) !important;
  color: white !important;
  box-shadow: none;
}
body.dark-theme .flavor-add-btn {
  background-color: var(--accent-pink-dark);
  color: #2D1D19; /* High-contrast cocoa / dark brown */
}
body.dark-theme .flavor-add-btn:hover {
  background-color: var(--text-cocoa);
  color: var(--bg-cream);
}
body.dark-theme .flavor-add-btn.added {
  background-color: var(--accent-green-dark) !important;
  color: #2D1D19 !important; /* dark text contrast */
}

/* 5. Cozy Toast Notification */
.cozy-toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.cozy-toast {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1.5px solid var(--accent-pink);
  padding: 0.8rem 1.4rem;
  border-radius: 20px;
  box-shadow: var(--shadow-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: slide-down-toast 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  color: var(--text-cocoa);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
}
body.dark-theme .cozy-toast {
  background: rgba(45, 29, 25, 0.95);
  border-color: rgba(250, 246, 240, 0.1);
  color: var(--text-cocoa);
}
.cozy-toast-content { display: flex; align-items: center; gap: 0.6rem; }
.cozy-toast-icon { color: var(--accent-pink-dark); font-size: 1.1rem; }
.cozy-toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: var(--transition-fade); }
.cozy-toast-close:hover { color: var(--accent-pink-dark); }

@keyframes slide-down-toast {
  0% { transform: translateY(-40px) scale(0.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.fade-out-toast {
  animation: slide-up-fade-out 0.4s ease forwards;
}
@keyframes slide-up-fade-out {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-20px) scale(0.9); opacity: 0; }
}

/* 6. Button Pop & Particles */
.button-pop {
  animation: button-pop-anim 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes button-pop-anim {
  0% { transform: scale(1); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
