/* ============================================
   Mon Nourrisson - Complete Refonte
   Sidebar hover-expand, masonry layout,
   per-category sections
   ============================================ */

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */
:root {
  --brown: #634f3f;
  --cream: #ecdbd4;
  --peach: #fee6d9;
  --gray: #545454;
  --near-black: #2a2a29;
  --pink: #e8887a;
  --turquoise: #a8d8d2;
  --off-white: #f9f3ef;
  --white: #ffffff;
  --whatsapp: #25D366;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;

  --sidebar-width: 64px;
  --sidebar-expanded: 220px;
  --sidebar-mobile: 48px;
  --header-height: 70px;
  --mobile-tabs-height: 60px;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 50px;

  --transition-fast: 0.2s ease;
  --transition-base: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(99, 79, 63, 0.3);
  border-radius: 3px;
}

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

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 79, 63, 0.3) var(--cream);
}

/* ==========================================================================
   3. Sidebar - Hover Auto-Expand
   ========================================================================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #4a3f35 0%, #3d342b 100%);
  z-index: 1000;
  transition: width var(--transition-base);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar:hover {
  width: var(--sidebar-expanded);
}

.sidebar__nav {
  flex: 1;
  padding-top: 80px; /* below header area */
  overflow-y: auto;
}

.sidebar__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--cream);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

.sidebar__item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar__item.active {
  color: var(--pink);
  background: rgba(232, 136, 122, 0.12);
}

.sidebar__item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--pink);
  border-radius: 0 2px 2px 0;
}

.sidebar__item-icon {
  font-size: 22px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar__item-label {
  opacity: 0;
  transition: opacity 0.2s ease;
  flex: 1;
}

.sidebar:hover .sidebar__item-label {
  opacity: 1;
}

.sidebar__item-count {
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.sidebar:hover .sidebar__item-count {
  opacity: 1;
}

.sidebar__item.active .sidebar__item-count {
  background: rgba(232, 136, 122, 0.18);
  color: var(--pink);
}

/* ==========================================================================
   4. Main Wrapper
   ========================================================================== */
.main-wrap {
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition-base);
  min-height: 100vh;
}

/* ==========================================================================
   5. Header
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  z-index: 999;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background var(--transition-base), box-shadow var(--transition-base), left var(--transition-base), backdrop-filter var(--transition-base);
}

/* Header transparent on hero — white icons & text */
.header:not(.scrolled) .header__cart-btn,
.header:not(.scrolled) .header__search-toggle {
  color: #fff;
}
.header:not(.scrolled) .header__search-icon {
  color: rgba(255,255,255,0.8);
}
.header:not(.scrolled) .header__search-input {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.header:not(.scrolled) .header__search-input::placeholder {
  color: rgba(255,255,255,0.6);
}
.header:not(.scrolled) .header__cart-btn:hover,
.header:not(.scrolled) .header__search-toggle:hover {
  background: rgba(255,255,255,0.15);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 12px rgba(99, 79, 63, 0.06), 0 4px 20px rgba(212,181,160,0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  margin-left: 24px;
  margin-right: 16px;
}

.header__logo-img {
  height: calc(var(--header-height) - 6px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.header__brand {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--brown);
}

/* Search */
.header__search {
  flex: 1;
  max-width: 500px;
  margin: 0 24px;
  position: relative;
  display: flex;
  align-items: center;
}

.header__search-icon {
  position: absolute;
  left: 14px;
  color: var(--gray);
  font-size: 20px;
  pointer-events: none;
  opacity: 0.5;
}

.header__search-input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 44px;
  background: var(--cream);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--gray);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header__search-input::placeholder {
  color: var(--gray);
  opacity: 0.5;
}

.header__search-input:focus {
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(99, 79, 63, 0.1);
}

.header__search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--gray);
  transition: background var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.header__search-clear:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header__search-clear[hidden] {
  display: none;
}

.header__search-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition-fast);
  color: var(--gray);
  background: none;
  border: none;
  cursor: pointer;
}

.header__search-toggle:hover {
  background: var(--cream);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--gray);
  transition: background var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.header__cart-btn:hover {
  background: var(--cream);
}

.header__cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  line-height: 1;
  pointer-events: none;
}

.header__cart-badge:empty {
  display: none;
}

.header__cart-badge.pulse {
  animation: pulse 0.4s ease;
}

/* ==========================================================================
   6. Hero (compact 50vh)
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
  margin-top: 0;
  padding-top: var(--header-height);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(99, 79, 63, 0.55) 0%, rgba(99, 79, 63, 0.1) 50%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 0 24px;
  animation: fadeInUp 0.8s ease forwards;
}

.hero__logo {
  width: clamp(220px, 30vw, 360px);
  height: auto;
  margin: 0 auto 24px;
  margin-top: -40px;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero__tagline {
  font-size: clamp(13px, 2.5vw, 17px);
  opacity: 0.9;
  margin-bottom: 6px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero__catalog {
  font-size: clamp(11px, 2vw, 14px);
  opacity: 0.7;
  margin-bottom: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  animation: fadeInUp 0.8s ease 0.4s both;
  box-shadow: 0 4px 15px rgba(232, 136, 122, 0.35);
}

.hero__cta:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(232, 136, 122, 0.45);
}

.hero__cta:active {
  transform: scale(0.98);
}

/* ---------- Hero Floating Bubbles ---------- */
.hero__bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.hero__bubble {
  position: absolute;
  bottom: -10%;
  border-radius: 50%;
  opacity: 0;
  animation: heroBubbleFloat linear infinite;
}

.hero__bubble:nth-child(6n+1) { left: 8%;  width: 18px; height: 18px; background: rgba(236,219,212,0.35); animation-duration: 12s; animation-delay: 0s; }
.hero__bubble:nth-child(6n+2) { left: 25%; width: 28px; height: 28px; background: rgba(232,136,122,0.2);  animation-duration: 15s; animation-delay: 2s; }
.hero__bubble:nth-child(6n+3) { left: 45%; width: 14px; height: 14px; background: rgba(254,230,217,0.4);  animation-duration: 10s; animation-delay: 1s; }
.hero__bubble:nth-child(6n+4) { left: 62%; width: 22px; height: 22px; background: rgba(236,219,212,0.3);  animation-duration: 14s; animation-delay: 3s; }
.hero__bubble:nth-child(6n+5) { left: 78%; width: 16px; height: 16px; background: rgba(232,136,122,0.18); animation-duration: 18s; animation-delay: 0.5s; }
.hero__bubble:nth-child(6n+6) { left: 90%; width: 24px; height: 24px; background: rgba(254,230,217,0.35); animation-duration: 13s; animation-delay: 5s; }

@keyframes heroBubbleFloat {
  0%   { transform: translateY(0) translateX(0) scale(0.4); opacity: 0; }
  10%  { opacity: 0.7; }
  50%  { transform: translateY(-55vh) translateX(20px) scale(1); opacity: 0.5; }
  80%  { opacity: 0.3; }
  100% { transform: translateY(-110vh) translateX(-10px) scale(0.6); opacity: 0; }
}

/* ==========================================================================
   7. Category Sections
   ========================================================================== */
/* Full-width background wrapper via padding trick */
.cat-section {
  padding: 32px 24px 40px;
}

/* Alternating backgrounds — full width */
.cat-section:nth-child(odd) {
  background: #fdf9f5;
}

.cat-section:nth-child(even) {
  background: var(--off-white);
}

/* Constrain inner content */
.cat-section__header,
.cat-section .masonry-grid {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.cat-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, rgba(212,181,160,0.6), transparent) 1;
}

.cat-section__icon {
  font-size: 28px;
  color: var(--brown);
}

.cat-section__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--brown);
  flex: 1;
}

.cat-section__count {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray);
  opacity: 0.7;
}

/* ---------- Animated Section Headers ---------- */
.animate-header {
  border-bottom: none;
  border-image: none;
  position: relative;
}

.animate-header .cat-section__icon {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: 0s;
}

.animate-header .cat-section__title {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: 0.1s;
}

.animate-header .cat-section__count {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: 0.2s;
}

.animate-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, rgba(212,181,160,0.6), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: 0.15s;
}

.animate-header.header-visible .cat-section__icon,
.animate-header.header-visible .cat-section__title {
  opacity: 1;
  transform: translateX(0);
}

.animate-header.header-visible .cat-section__count {
  opacity: 0.7;
  transform: translateX(0);
}

.animate-header.header-visible::after {
  transform: scaleX(1);
}

/* Hidden when search filters out all products */
.cat-section.hidden {
  display: none;
}

/* ==========================================================================
   7b. Group Sections — Grid Tiles & Pill Bar
   ========================================================================== */

/* Container commun */
.group-section {
  max-width: 1400px;
  margin: 0 auto;
}

.group-section__content {
  position: relative;
  min-height: 200px;
}

.group-section__scroll {
  display: flex;
  gap: 14px;
  padding: 12px 18px 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(99,79,63,0.3) transparent;
  animation: groupFadeIn 0.25s ease;
}

.group-section__scroll[hidden] { display: none; }

.group-section__scroll .product-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  margin-bottom: 0;
}

/* Grid Tiles (couches) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(var(--tile-cols, 4), 1fr);
  gap: 10px;
  padding: 0 18px 12px;
}

.tile-grid__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 4px;
  min-height: 52px;
  border: 2px solid var(--cream);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--brown);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.tile-grid__tile:hover {
  border-color: var(--brown);
  background: var(--peach);
}

.tile-grid__tile.active {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,79,63,0.2);
  transform: scale(1.03);
}

.tile-grid__count {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
}

.tile-grid__tile.active .tile-grid__count {
  opacity: 0.85;
}

/* Pill Bar (sucettes, biberons) */
.pill-bar {
  display: flex;
  gap: 8px;
  padding: 0 18px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pill-bar::-webkit-scrollbar { height: 0; }

.pill-bar__pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1.5px solid var(--cream);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--brown);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  white-space: nowrap;
}

.pill-bar__pill:hover {
  border-color: var(--brown);
  background: var(--peach);
}

.pill-bar__pill.active {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99,79,63,0.15);
}

/* Animation de transition entre groupes */
@keyframes groupFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tablette */
@media (min-width: 769px) and (max-width: 1024px) {
  .group-section__scroll .product-card { flex: 0 0 190px; }
}

/* Mobile */
@media (max-width: 768px) {
  .tile-grid {
    gap: 8px;
    padding: 0 12px 10px;
  }
  .tile-grid__tile {
    min-height: 46px;
    padding: 8px 2px;
    font-size: 0.8rem;
  }
  .pill-bar {
    gap: 6px;
    padding: 0 12px 10px;
  }
  .pill-bar__pill {
    padding: 7px 14px;
    font-size: 12px;
  }
  .group-section__scroll {
    gap: 10px;
    padding: 8px 12px 14px;
  }
  .group-section__scroll .product-card { flex: 0 0 160px; }
  .group-section__scroll::-webkit-scrollbar { height: 2px; }
}

/* Très petit */
@media (max-width: 380px) {
  .tile-grid {
    gap: 6px;
    padding: 0 8px 8px;
  }
  .tile-grid__tile {
    min-height: 42px;
    font-size: 0.75rem;
    border-radius: 8px;
  }
  .tile-grid__count { display: none; }
  .pill-bar__pill {
    padding: 6px 12px;
    font-size: 11px;
  }
  .group-section__scroll {
    gap: 8px;
    padding: 8px 8px 12px;
  }
  .group-section__scroll .product-card { flex: 0 0 145px; }
}

/* ==========================================================================
   8. Masonry Grid (CSS Columns)
   ========================================================================== */
.masonry-grid {
  column-count: 4;
  column-gap: 12px;
}

.masonry-grid .product-card {
  break-inside: avoid;
  margin-bottom: 12px;
  display: inline-block;
  width: 100%;
}

@media (max-width: 1440px) {
  .masonry-grid { column-count: 3; }
}

@media (max-width: 1024px) {
  .masonry-grid { column-count: 3; }
}

@media (max-width: 768px) {
  .masonry-grid { column-count: 2; column-gap: 10px; }
  .masonry-grid .product-card { margin-bottom: 10px; }
}

@media (max-width: 380px) {
  .masonry-grid { column-count: 2; }
}

/* ==========================================================================
   9. Product Cards
   ========================================================================== */
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(99,79,63,0.06), 0 4px 16px rgba(212,181,160,0.08);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  position: relative;
  cursor: pointer;
}

.product-card:hover:not(.tilt-active) {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(99,79,63,0.08), 0 12px 32px rgba(212,181,160,0.12);
  background: #fdfbf9;
}

/* ---------- 3D Tilt on Cards ---------- */
.tilt-active {
  transition: transform 0.15s ease-out, box-shadow var(--transition-base), background var(--transition-base);
  box-shadow: 0 6px 16px rgba(99,79,63,0.08), 0 12px 32px rgba(212,181,160,0.12);
  background: #fdfbf9;
}

.tilt-reset {
  transition: transform 0.4s ease, box-shadow var(--transition-base), background var(--transition-base);
}

.product-card__image-wrap {
  position: relative;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.5) 0%, var(--img-bg, #fee6d9) 100%);
}

/* Soft gradient overlay that blends dark-bg images into the card */
.product-card__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 80% at center, transparent 50%, var(--img-bg, #fee6d9) 100%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

.product-card__image-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 200px;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 0;
  filter: drop-shadow(0 2px 6px rgba(99, 79, 63, 0.08));
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at center, black 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 90% at center, black 65%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.3s ease;
}

.product-card__image-wrap img.img-loaded {
  opacity: 1;
}

/* Dark background product images — stronger blending */
.product-card__image-wrap.dark-bg {
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.45) 0%, var(--img-bg, #fee6d9) 100%);
}

.product-card__image-wrap.dark-bg::after {
  opacity: 0.7;
}

.product-card__image-wrap.dark-bg img {
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, black 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at center, black 55%, transparent 100%);
  filter: drop-shadow(0 2px 8px rgba(99,79,63,0.15)) brightness(1.05);
}

/* Hover: subtle scale on image */
.product-card:hover .product-card__image-wrap img {
  transform: scale(1.03);
}

.product-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  background: var(--pink);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  z-index: 1;
  line-height: 1.4;
}

.product-card__badge--new {
  background: var(--turquoise);
  color: var(--near-black);
}

.product-card__badge--sale {
  background: var(--pink);
}

.product-card__body {
  padding: 14px 16px 16px;
  padding-right: 54px; /* space for round + button */
  position: relative;
  min-height: 100px;
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__price {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 4px;
}

.product-card__description {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  opacity: 0.8;
}

/* Round "+" button, bottom-right, NOT full-width */
.product-card__add-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
  box-shadow: 0 2px 8px rgba(232, 136, 122, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
}

.product-card__add-btn:hover {
  background: #d47a6d;
  transform: scale(1.1);
}

.product-card__add-btn:active {
  transform: scale(0.95);
}

.product-card__add-btn .material-icons-round {
  font-size: 20px;
}

.product-card__add-btn.added {
  background: var(--whatsapp);
}

.product-card__add-btn.added .add-icon {
  display: none;
}

.product-card__add-btn.added .check-icon {
  display: block;
}

.product-card__add-btn .check-icon {
  display: none;
}

.product-card.animate-in {
  opacity: 0;
  transform: translateY(20px);
}

.product-card.animate-in.visible {
  animation: fadeInUp 0.4s ease forwards;
}

/* Added flash animation */
.product-card.added-flash {
  box-shadow: 0 0 0 3px var(--whatsapp), 0 8px 24px rgba(99, 79, 63, 0.12);
}

/* ==========================================================================
   10. Cart Sidebar (Desktop, right panel)
   ========================================================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100%;
  background: var(--white);
  z-index: 1101;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--cream);
  min-height: var(--header-height);
}

.cart-sidebar__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-sidebar__close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--gray);
  transition: background var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.cart-sidebar__close:hover {
  background: var(--cream);
}

.cart-sidebar__close svg {
  width: 20px;
  height: 20px;
}

.cart-sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-sidebar__items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

/* Cart Empty State */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 48px 24px;
  text-align: center;
}

.cart-empty__icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
  color: var(--brown);
}

.cart-empty__text {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 500;
  color: var(--gray);
  margin-bottom: 4px;
}

.cart-empty__subtext {
  font-size: 13px;
  color: var(--gray);
  opacity: 0.7;
}

/* Cart Footer */
.cart-sidebar__footer {
  position: sticky;
  bottom: 0;
  padding: 24px;
  background: var(--white);
  border-top: 1px solid var(--cream);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

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

.cart-total__label {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray);
}

.cart-total__price {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--brown);
}

.cart-whatsapp-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--whatsapp);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  min-height: 48px;
  border: none;
  cursor: pointer;
}

.cart-whatsapp-btn:hover {
  background: #1EBE57;
}

.cart-whatsapp-btn:active {
  transform: scale(0.98);
}

.cart-whatsapp-btn svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   11. Cart Items (shared for both desktop and mobile)
   ========================================================================== */
.cart-items {
  list-style: none;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--off-white);
}

.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item__details {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__price {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--pink);
}

.cart-item__quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.cart-item__qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--cream);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  transition: all var(--transition-fast);
  background: none;
  cursor: pointer;
}

.cart-item__qty-btn:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}

.cart-item__count {
  font-size: 13px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.cart-item__remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--gray);
  opacity: 0.5;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.cart-item__remove:hover {
  background: #fde8e8;
  color: #ef4444;
  opacity: 1;
}

/* ==========================================================================
   12. Mobile Cart Bottom Sheet
   ========================================================================== */
.mobile-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.mobile-cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-cart-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 85vh;
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1101;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
}

.mobile-cart-sheet.open {
  transform: translateY(0);
}

.mobile-cart-sheet__handle {
  display: flex;
  justify-content: center;
  padding: 8px 0;
  cursor: grab;
}

.mobile-cart-sheet__bar {
  width: 40px;
  height: 4px;
  background: var(--cream);
  border-radius: 2px;
}

.mobile-cart-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 16px;
}

.mobile-cart-sheet__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-cart-sheet__count {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray);
}

.mobile-cart-sheet__close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--gray);
  transition: background var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-cart-sheet__close:hover {
  background: var(--cream);
}

.mobile-cart-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px;
}

.mobile-cart-sheet__footer {
  padding: 24px;
  border-top: 1px solid var(--cream);
  background: var(--white);
}

.mobile-cart-sheet__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--gray);
}

.mobile-cart-sheet__total strong {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--brown);
}

.mobile-cart-sheet__whatsapp {
  width: 100%;
  padding: 14px 24px;
  background: var(--whatsapp);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition-fast);
  min-height: 48px;
  border: none;
  cursor: pointer;
}

.mobile-cart-sheet__whatsapp:hover {
  background: #1EBE57;
}

/* ==========================================================================
   13. Mobile Bottom Tabs
   ========================================================================== */
.mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--cream);
  z-index: 998;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-tabs__inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--mobile-tabs-height);
}

.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  padding: 6px 4px;
  color: var(--gray);
  font-size: 10px;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  min-height: 44px;
}

.mobile-tab.active {
  color: var(--pink);
}

.mobile-tab__icon {
  font-size: 22px;
}

.mobile-tab__label {
  font-size: 10px;
}

/* ==========================================================================
   14. Category Sheet (Mobile)
   ========================================================================== */
.category-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1101;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
}

.category-sheet.open {
  transform: translateY(0);
}

.category-sheet__handle {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.category-sheet__bar {
  width: 40px;
  height: 4px;
  background: var(--cream);
  border-radius: 2px;
}

.category-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 16px;
  border-bottom: 1px solid var(--cream);
}

.category-sheet__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--brown);
}

.category-sheet__close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--gray);
  transition: background var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.category-sheet__close:hover {
  background: var(--cream);
}

.category-sheet__list {
  overflow-y: auto;
  padding: 8px 0;
  list-style: none;
}

.category-sheet__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background var(--transition-fast);
}

.category-sheet__item:hover {
  background: var(--off-white);
}

.category-sheet__item.active {
  color: var(--pink);
  font-weight: 600;
}

.category-sheet__item-icon {
  font-size: 22px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.category-sheet__item-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--gray);
  opacity: 0.6;
}

.category-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.category-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   15. FABs, Toast, Scroll-to-top
   ========================================================================== */

/* FAB Cart */
.fab-cart {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 997;
  box-shadow: 0 4px 16px rgba(232, 136, 122, 0.35);
  transition: transform var(--transition-base);
  border: none;
  cursor: pointer;
}

.fab-cart[hidden] {
  display: none;
}

.fab-cart:hover {
  transform: scale(1.08);
}

.fab-cart:active {
  transform: scale(0.9);
}

.fab-cart__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--white);
  color: var(--pink);
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--near-black);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}

.toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast__icon {
  color: var(--whatsapp);
  font-size: 20px;
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--white);
  color: var(--brown);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 79, 63, 0.15);
  z-index: 996;
  transition: transform var(--transition-base), opacity var(--transition-base), box-shadow var(--transition-base);
  border: none;
  cursor: pointer;
}

.scroll-top[hidden] {
  display: none;
}

.scroll-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 79, 63, 0.2);
}

/* ==========================================================================
   16. WhatsApp Chat Widget
   ========================================================================== */
.wa-widget {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-width) + 16px);
  width: 60px;
  height: 60px;
  background: var(--whatsapp);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 997;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
}

.wa-widget:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.wa-widget:active {
  transform: scale(0.95);
}

.wa-widget__icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

/* Pulse ring animation */
.wa-widget__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid var(--whatsapp);
  opacity: 0;
  animation: waPulse 2.5s ease-out infinite;
}

@keyframes waPulse {
  0% {
    opacity: 0.6;
    transform: scale(0.95);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

/* Tooltip on hover */
.wa-widget__tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: var(--near-black);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.wa-widget__tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--near-black);
}

.wa-widget:hover .wa-widget__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Mobile: position next to sidebar, smaller */
@media (max-width: 768px) {
  .wa-widget {
    bottom: 20px;
    left: calc(var(--sidebar-mobile) + 8px);
    width: 48px;
    height: 48px;
  }

  .wa-widget__icon {
    width: 24px;
    height: 24px;
  }

  .wa-widget__tooltip {
    display: none;
  }

  .wa-widget__pulse {
    inset: -3px;
    border-width: 2px;
  }
}

/* ==========================================================================
   17. Footer
   ========================================================================== */
.footer {
  background: var(--near-black);
  color: #fff;
  padding: 48px 24px 24px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__logo {
  width: 48px;
  height: auto;
}

.footer__name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--cream);
}

.footer__slogan {
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.5;
}

.footer__contact {}

.footer__heading {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.8;
}

.footer__item .material-icons-round {
  font-size: 18px;
  opacity: 0.6;
}

.footer__link {
  transition: opacity var(--transition-fast);
  color: rgba(255, 255, 255, 0.8);
}

.footer__link:hover {
  opacity: 1;
  color: #fff;
}

.footer__whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--whatsapp) !important;
  font-weight: 500;
}

.footer__whatsapp-link:hover {
  color: #1EBE57 !important;
}

.footer__social {}

.footer__social-links {
  display: flex;
  gap: 16px;
}

.footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background var(--transition-fast), transform var(--transition-fast);
  color: #fff;
}

.footer__social-link:hover {
  background: var(--pink);
  transform: translateY(-2px);
}

.footer__social-link--whatsapp:hover {
  background: var(--whatsapp);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.footer__bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 13px;
  opacity: 0.5;
}

.footer__made {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.footer__heart {
  color: var(--pink);
  font-size: 16px;
}

/* ==========================================================================
   17. Loading Skeleton
   ========================================================================== */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

.skeleton-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(99, 79, 63, 0.08);
}

.skeleton-card__image {
  aspect-ratio: 1 / 1;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.skeleton-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

.skeleton-card__body {
  padding: 12px;
}

.skeleton-card__line {
  height: 14px;
  background: var(--cream);
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}

.skeleton-card__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

.skeleton-card__line--short {
  width: 60%;
}

.skeleton-card__line--price {
  height: 20px;
  width: 40%;
  margin-bottom: 16px;
}

/* ==========================================================================
   18. Scroll Progress Bar
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--pink), var(--turquoise));
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ==========================================================================
   19. Animations
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes slideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

/* ---------- Fly-to-Cart ---------- */
.fly-to-cart {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: var(--radius-sm);
  object-fit: contain;
  transition: left 0.7s cubic-bezier(0.2, 0.6, 0.35, 1),
              top 0.7s cubic-bezier(0.2, 0.6, 0.35, 1),
              width 0.7s cubic-bezier(0.2, 0.6, 0.35, 1),
              height 0.7s cubic-bezier(0.2, 0.6, 0.35, 1),
              opacity 0.7s cubic-bezier(0.2, 0.6, 0.35, 1),
              transform 0.7s cubic-bezier(0.2, 0.6, 0.35, 1);
}

.fly-to-cart.flying {
  width: 24px !important;
  height: 24px !important;
  opacity: 0;
  transform: scale(0.2);
}

/* ==========================================================================
   20. Mobile Responsive
   ========================================================================== */
@media (max-width: 768px) {
  /* ── Sidebar: slim vertical, icons only, no hover expand ── */
  .sidebar {
    width: var(--sidebar-mobile);
    transition: none; /* no hover expand on touch */
  }

  .sidebar:hover {
    width: var(--sidebar-mobile); /* disable hover expand */
  }

  .sidebar__nav {
    padding-top: 64px; /* below header */
  }

  .sidebar__item {
    padding: 12px 0;
    justify-content: center;
    gap: 0;
  }

  .sidebar__item-icon {
    font-size: 20px;
  }

  /* Hide labels & counts on mobile sidebar */
  .sidebar__item-label,
  .sidebar__item-count {
    display: none !important;
  }

  .sidebar__item.active::before {
    width: 3px;
    top: 6px;
    bottom: 6px;
  }

  /* ── Hide bottom tabs ── */
  .mobile-tabs {
    display: none !important;
  }

  /* ── Main wrap: offset by mobile sidebar ── */
  .main-wrap {
    margin-left: var(--sidebar-mobile);
    padding-bottom: 0;
  }

  .header {
    left: var(--sidebar-mobile);
  }

  .header__brand {
    font-size: 15px;
  }

  .header__search {
    display: none;
  }

  .header__search-toggle {
    display: flex;
  }

  .header__search.expanded {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: var(--header-height);
    max-width: none;
    margin: 0;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
  }

  .hero {
    height: 100vh;
    min-height: 400px;
  }

  .cat-section {
    padding: 16px 12px 24px;
  }

  .cat-section__title {
    font-size: 18px;
  }

  .product-card__body {
    padding-right: 42px;
    min-height: 80px;
  }

  .product-card__add-btn {
    width: 32px;
    height: 32px;
  }

  .product-card__add-btn .material-icons-round {
    font-size: 18px;
  }

  .product-card__name {
    font-size: 13px;
  }

  .product-card__price {
    font-size: 16px;
  }

  .product-card__description {
    -webkit-line-clamp: 1;
    font-size: 11px;
  }

  .product-card__image-wrap {
    padding: 12px;
  }

  .product-card__image-wrap img {
    max-height: 150px;
  }

  .fab-cart {
    bottom: 20px;
    right: 16px;
  }

  .toast {
    bottom: 80px;
    white-space: normal;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    left: calc(50% + var(--sidebar-mobile) / 2);
  }

  .scroll-top {
    bottom: 20px;
    right: 16px;
  }

  .footer {
    margin-left: 0;
  }

  /* Cart as bottom sheet on mobile */
  .cart-sidebar {
    width: 100%;
    top: auto;
    bottom: 0;
    left: 0;
    height: 85vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
  }

  .cart-sidebar.open {
    transform: translateY(0);
  }

  /* Pull handle */
  .cart-sidebar__handle {
    display: block;
    width: 40px;
    height: 4px;
    background: var(--cream);
    border-radius: 2px;
    margin: 8px auto 4px;
  }
}

/* Desktop: hide mobile-only elements */
@media (min-width: 769px) {
  .cart-sidebar__handle {
    display: none;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .sidebar {
    width: 42px;
  }

  .sidebar:hover {
    width: 42px;
  }

  .sidebar__item {
    padding: 10px 0;
  }

  .sidebar__item-icon {
    font-size: 18px;
  }

  .main-wrap {
    margin-left: 42px;
  }

  .header {
    left: 42px;
  }

  .masonry-grid {
    column-count: 2;
  }

  .header__brand {
    font-size: 13px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header__logo-img {
    height: 54px;
  }

  .product-card__body {
    padding: 8px 10px 12px;
    padding-right: 38px;
    min-height: 70px;
  }

  .product-card__name {
    font-size: 12px;
  }

  .product-card__price {
    font-size: 14px;
  }

  .product-card__add-btn {
    width: 30px;
    height: 30px;
    bottom: 8px;
    right: 8px;
  }

  .product-card__add-btn .material-icons-round {
    font-size: 16px;
  }

  .cat-section__header {
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .cat-section__icon {
    font-size: 22px;
  }

  .cat-section__title {
    font-size: 16px;
  }

  .cat-section {
    padding: 12px 8px 20px;
  }

  .hero__content {
    padding: 0 16px;
  }

  .wa-widget {
    left: calc(42px + 6px);
    width: 44px;
    height: 44px;
  }

  .wa-widget__icon {
    width: 22px;
    height: 22px;
  }
}

/* Tablet tweaks */
@media (min-width: 769px) and (max-width: 1024px) {
  .masonry-grid {
    column-count: 3;
  }

  .header__search {
    max-width: 350px;
    margin: 0 16px;
  }

  .product-card__body {
    padding-right: 46px;
  }
}

/* ==========================================================================
   21. Utility Classes
   ========================================================================== */
.hidden {
  display: none !important;
}

.overlay-active {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.product-exit {
  animation: fadeOut 0.3s ease forwards;
}

.product-enter {
  animation: fadeInUp 0.4s ease forwards;
}

/* WhatsApp icon in buttons */
.whatsapp-icon {
  flex-shrink: 0;
}

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

  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   23. Checkout Address Form
   ========================================================================== */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.checkout-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.checkout-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  z-index: 2101;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-base), opacity var(--transition-base);
  box-shadow: 0 8px 24px rgba(99,79,63,0.1), 0 24px 48px rgba(212,181,160,0.15);
}

.checkout-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.checkout-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--off-white);
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.checkout-modal__close:hover {
  background: var(--pink);
  color: #fff;
}

.checkout-modal__header {
  padding: 28px 24px 16px;
  text-align: center;
  border-bottom: 1px solid var(--cream);
}

.checkout-modal__header-icon {
  font-size: 36px;
  color: var(--pink);
  margin-bottom: 8px;
}

.checkout-modal__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 4px;
}

.checkout-modal__subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--gray);
}

.checkout-form {
  padding: 20px 24px 24px;
}

.checkout-form__field {
  margin-bottom: 14px;
}

.checkout-form__field label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--brown);
  margin-bottom: 5px;
}

.checkout-form__field input,
.checkout-form__field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--cream);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--near-black);
  background: var(--off-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.checkout-form__field input:focus,
.checkout-form__field textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(232, 136, 122, 0.12);
}

.checkout-form__field input::placeholder,
.checkout-form__field textarea::placeholder {
  color: #b5a49a;
}

.checkout-form__field input.error,
.checkout-form__field textarea.error {
  border-color: var(--pink);
  background: #fff5f5;
}

.checkout-form__field textarea {
  resize: vertical;
  min-height: 50px;
}

.checkout-form__submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  margin-top: 8px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--whatsapp);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.checkout-form__submit:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.checkout-form__submit:active {
  transform: scale(0.97);
}

@media (max-width: 768px) {
  .checkout-modal {
    max-width: none;
    width: 100vw;
    max-height: 95vh;
    top: auto;
    bottom: 0;
    left: 0;
    transform: translateY(100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .checkout-modal.open {
    transform: translateY(0);
  }

  .checkout-modal__header {
    padding: 20px 20px 12px;
  }

  .checkout-form {
    padding: 16px 20px 20px;
  }
}

/* ==========================================================================
   24. Product Zoom Modal
   ========================================================================== */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.product-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  z-index: 2001;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-base), opacity var(--transition-base);
  box-shadow: 0 8px 24px rgba(99,79,63,0.1), 0 24px 48px rgba(212,181,160,0.15);
}

.product-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.product-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-modal__close:hover {
  background: var(--pink);
  color: #fff;
}

.product-modal__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--peach);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-modal__image {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-modal:hover .product-modal__image {
  transform: scale(1.05);
}

.product-modal__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.product-modal__badge:empty {
  display: none;
}

.product-modal__body {
  padding: 24px;
}

.product-modal__name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-modal__price {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 12px;
}

.product-modal__description {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-modal__add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--pink);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 12px rgba(232, 136, 122, 0.35);
}

.product-modal__add-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(232, 136, 122, 0.45);
}

.product-modal__add-btn:active {
  transform: scale(0.97);
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
  .product-modal {
    max-width: none;
    width: 100vw;
    max-height: 100vh;
    top: auto;
    bottom: 0;
    left: 0;
    transform: translateY(100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .product-modal.open {
    transform: translateY(0);
  }

  .product-modal__image-wrap {
    aspect-ratio: 4/3;
  }
}

/* ==========================================================================
   24. Print Styles
   ========================================================================== */
@media print {
  .header,
  .sidebar,
  .cart-sidebar,
  .cart-overlay,
  .mobile-cart-sheet,
  .mobile-cart-overlay,
  .mobile-tabs,
  .category-sheet,
  .category-sheet-overlay,
  .scroll-progress,
  .fab-cart,
  .scroll-top,
  .toast,
  .product-card__add-btn,
  .hero__cta {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .main-wrap {
    margin-left: 0;
  }

  .masonry-grid {
    column-count: 3;
  }

  .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .footer {
    background: #333;
  }
}
