/**
 * JANE · Demo Store — Stylesheet
 * =================================
 * Design system: Clean Commerce aesthetic.
 * Fonts: Plus Jakarta Sans (display) + Figtree (body)
 * Colors: Indigo accent, dark/light themes.
 *
 * Structure:
 *  1. Reset
 *  2. CSS Custom Properties (:root + light theme)
 *  3. Typography
 *  4. Utilities (.skip-link, .fade-in, .container, .btn)
 *  5. Header / Nav
 *  6. Hero
 *  7. About + Values
 *  8. Catalog (controls, filters, search, grid, states)
 *  9. Product cards
 * 10. Cart drawer
 * 11. Contact
 * 12. WhatsApp floating button
 * 13. Footer
 * 14. Noscript fallback
 * 15. Animations
 * 16. Media queries (mobile-first: 480, 640, 768, 900, 1024, 1280)
 */

/* ═══ 1. RESET ════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input { font: inherit; }

/* ═══ 2. CSS CUSTOM PROPERTIES ════════════════════════════════ */
:root {
  /* Dark theme (default) */
  --bg-primary:     #0f1117;
  --bg-secondary:   #1a1d27;
  --bg-card:        rgba(255, 255, 255, 0.04);
  --bg-card-hover:  rgba(255, 255, 255, 0.07);
  --text-primary:   #f5f6fa;
  --text-secondary: #9ca3b4;
  --accent:         #6366f1;
  --accent-hover:   #4f46e5;
  --accent-text:    #818cf8;
  --accent-fill:    #5557e8;
  --accent-glow:    rgba(99, 102, 241, 0.25);
  --border:         rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(99, 102, 241, 0.5);

  /* Catalog-specific */
  --color-price:          #f5a623;
  --color-featured:       #fbbf24;
  --color-featured-bg:    rgba(251, 191, 36, 0.12);
  --color-whatsapp:       #25D366;
  --color-whatsapp-hover: #1EBE5A;
  --color-whatsapp-glow:  rgba(37, 211, 102, 0.25);
  --color-badge:          var(--accent);
  --color-success:        #22c55e;
  --color-success-bg:     rgba(34, 197, 94, 0.12);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Figtree', sans-serif;

  /* Cart drawer */
  --cart-drawer-width:        420px;
  --cart-drawer-width-mobile: 100vw;

  /* Layout */
  --section-padding: clamp(3rem, 8vw, 6rem);
  --container-max:   1280px;
  --container-pad:   1.5rem;
  --gap:             1.5rem;
  --radius:          0.625rem;
  --radius-lg:       1rem;
  --radius-xl:       1.5rem;

  /* Transitions */
  --transition:      0.25s ease;
  --transition-slow: 0.45s ease;
}

[data-theme="light"] {
  --bg-primary:     #ffffff;
  --bg-secondary:   #f4f5f8;
  --bg-card:        rgba(0, 0, 0, 0.03);
  --bg-card-hover:  rgba(0, 0, 0, 0.06);
  --text-primary:   #14161f;
  --text-secondary: #5b6172;
  --accent:         #4f46e5;
  --accent-hover:   #4338ca;
  --accent-text:    #4338ca;
  --accent-fill:    #4f46e5; /* white on #4f46e5 = 5.89:1 — passes WCAG AA */
  --accent-glow:    rgba(79, 70, 229, 0.15);
  --border:         rgba(0, 0, 0, 0.08);
  --border-hover:   rgba(79, 70, 229, 0.4);

  --color-price:        #d97706;
  --color-featured:     #d97706;
  --color-featured-bg:  rgba(217, 119, 6, 0.1);
}

/* ═══ 3. TYPOGRAPHY ═══════════════════════════════════════════ */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: background var(--transition), color var(--transition);
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 600; }

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-text);
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

.section-title {
  margin-bottom: 2.5rem;
  color: var(--text-primary);
}

/* ═══ 4. UTILITIES ════════════════════════════════════════════ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  z-index: 10000;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
  transition: top 0.2s;
  white-space: nowrap;
}
.skip-link:focus { top: 0; outline: 2px solid #fff; outline-offset: 2px; }

/* Scroll animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid transparent;
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn--outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn--outline:hover { background: var(--accent); color: #fff; }

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  border: 2px solid transparent;
}
.btn--whatsapp:hover {
  background: var(--color-whatsapp-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--color-whatsapp-glow);
}

.btn--sm { position: relative; padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 36px; }
/* Expand touch target to 44x44 without affecting visual layout */
.btn--sm::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.btn--lg { padding: 0.875rem 2rem; font-size: 1rem; }

/* ═══ 5. HEADER / NAV ═════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}
[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.9);
}
.header--scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.nav__logo-dot { color: var(--accent); }
.nav__logo:hover .nav__logo-dot { filter: brightness(1.2); }

/* Hamburger */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 1001;
  border-radius: var(--radius);
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.nav__hamburger:hover { background: var(--bg-card); }
.nav__hamburger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav__hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
  display: block;
}
.nav__hamburger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Actions group: cart + hamburger, always visible, outside the collapsible menu */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Nav menu (mobile hidden by default) */
.nav__menu { display: none; }
.nav__menu.nav--open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 4rem; left: 0; right: 0; height: calc(100dvh - 4rem);
  background: var(--bg-primary);
  padding: 2rem var(--container-pad);
  gap: 2rem;
  z-index: 999;
  overflow-y: auto;
  animation: slideDown 0.25s ease;
}

.nav__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav__link {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  padding: 0.5rem 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav__link:hover,
.nav__link--active { color: var(--text-primary); }
.nav__link--active { color: var(--accent-text); font-weight: 600; }
.nav__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Nav controls (theme, lang, cart) */
.nav__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__toggle {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 700;
  transition: all var(--transition);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.nav__toggle:hover { border-color: var(--accent); color: var(--accent); }
.nav__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav__toggle svg { width: 1rem; height: 1rem; }

/* Cart button in nav */
.nav__cart-btn {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
.nav__cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav__cart-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav__cart-icon svg { width: 1.1rem; height: 1.1rem; }

/* Cart badge */
.nav__cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-primary);
  line-height: 1;
  transition: transform 0.2s ease;
}
.nav__cart-badge:not([hidden]) { animation: badgePop 0.2s ease; }

/* ═══ 6. HERO ══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: var(--section-padding) 0;
  padding-top: calc(4rem + var(--section-padding));
  overflow: hidden;
  background: var(--bg-primary);
}

/* CSS gradient mesh background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% -10%, rgba(99, 102, 241, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 95% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at -10% 50%, rgba(79, 70, 229, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 60% -10%, rgba(79, 70, 229, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 95% 80%, rgba(79, 70, 229, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at -10% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
}

/* Grid dot pattern */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__headline {
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  max-width: 560px;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ═══ 7. ABOUT + VALUES ════════════════════════════════════════ */
.about {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.about::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.about__paragraphs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 3rem;
  max-width: 720px;
}
.about__paragraphs p { font-size: clamp(0.95rem, 2vw, 1.05rem); }

/* Values grid */
.values__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.value-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.value-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius);
}
.value-card__icon svg { width: 1.4rem; height: 1.4rem; }

.value-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.value-card__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ═══ 8. CATALOG SECTION ══════════════════════════════════════ */
.catalog {
  padding: var(--section-padding) 0;
}

.catalog__controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Search */
.catalog__search {
  position: relative;
}
.catalog__search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  width: 1rem;
  height: 1rem;
}
.catalog__search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition);
  height: 44px;
}
.catalog__search-input::placeholder { color: var(--text-secondary); }
.catalog__search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Category filters */
.catalog__filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.catalog__filters::-webkit-scrollbar { display: none; }

.catalog__filter {
  position: relative;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  font-family: var(--font-body);
}
/* Expand touch target to 44x44 without affecting visual layout */
.catalog__filter::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.catalog__filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.catalog__filter--active {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: #fff;
}
.catalog__filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Loading state */
.catalog__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
}

.catalog__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Error state */
.catalog__error {
  text-align: center;
  padding: 3rem 2rem;
}
.catalog__error-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Empty state */
.catalog__empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ═══ 9. PRODUCT CARDS ════════════════════════════════════════ */
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Product image */
.product-card__image {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background: var(--bg-secondary);
  display: block;
  transition: transform var(--transition-slow);
}
.product-card:hover .product-card__image {
  transform: scale(1.03);
}

/* Product body */
.product-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.product-card__description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product footer: price + add button */
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-card__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-price);
  white-space: nowrap;
  line-height: 1;
}

.product-card__add {
  flex-shrink: 0;
}
.product-card__add--added {
  background: var(--color-success) !important;
  border-color: var(--color-success) !important;
  pointer-events: none;
}

/* Badges */
.product-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  pointer-events: none;
}
.product-card__badge svg { width: 0.8em; height: 0.8em; }

.product-card__badge--featured {
  background: var(--color-featured-bg);
  color: var(--color-featured);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.product-card__badge--cat {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ═══ 10. CART DRAWER ═════════════════════════════════════════ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1999;
  opacity: 0;
  transition: opacity var(--transition);
  backdrop-filter: blur(3px);
}
.cart-overlay.active { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--cart-drawer-width-mobile);
  max-width: var(--cart-drawer-width);
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition);
}
.cart-drawer.active { transform: translateX(0); }

/* Cart drawer header */
.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-drawer__header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.cart-drawer__close {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all var(--transition);
}
/* Expand touch target to 44x44 without affecting visual layout */
.cart-drawer__close::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.cart-drawer__close:hover { background: var(--bg-card); color: var(--text-primary); }
.cart-drawer__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cart-drawer__close svg { width: 1.1rem; height: 1.1rem; }

/* Cart items list */
.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cart-drawer__items::-webkit-scrollbar { width: 4px; }
.cart-drawer__items::-webkit-scrollbar-track { background: transparent; }
.cart-drawer__items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Empty cart state */
.cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  min-height: 200px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  padding: 2rem;
}
.cart-drawer__empty-icon {
  font-size: 3rem;
  line-height: 1;
  opacity: 0.5;
}

/* Individual cart item */
.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }

.cart-item__image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.cart-item__info { min-width: 0; }
.cart-item__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.cart-item__price {
  font-size: 0.875rem;
  color: var(--color-price);
  font-weight: 700;
  font-family: var(--font-display);
  margin-top: 0.2rem;
}

/* Quantity controls */
.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.cart-item__qty-btn {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
/* Expand touch target to 44x44 without affecting visual layout */
.cart-item__qty-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.cart-item__qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-item__qty-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cart-item__qty-btn svg { width: 0.75rem; height: 0.75rem; }
.cart-item__qty {
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-display);
}

/* Remove button */
.cart-item__remove {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
/* Expand touch target to 44x44 without affecting visual layout */
.cart-item__remove::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
}
.cart-item__remove:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.cart-item__remove:focus-visible { outline: 2px solid #ef4444; outline-offset: 2px; }
.cart-item__remove svg { width: 0.9rem; height: 0.9rem; }

/* Cart footer: totals + actions */
.cart-drawer__footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cart-drawer__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}
#cart-total-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}
#cart-total-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-price);
}

.cart-drawer__whatsapp {
  width: 100%;
  gap: 0.6rem;
  font-size: 0.95rem;
  padding: 0.875rem;
  box-shadow: 0 4px 16px var(--color-whatsapp-glow);
}
.cart-drawer__whatsapp svg { width: 1.15rem; height: 1.15rem; }

.cart-drawer__clear {
  width: 100%;
  font-size: 0.875rem;
  padding: 0.5rem;
  min-height: 36px;
  border-color: var(--border);
  color: var(--text-secondary);
}
.cart-drawer__clear:hover { border-color: #ef4444; color: #ef4444; background: transparent; }

/* ═══ 11. CONTACT ═════════════════════════════════════════════ */
.contact {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 100% 100%, rgba(99, 102, 241, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.contact__layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact__content { position: relative; z-index: 1; }

.contact__text {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.1rem);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  padding: 1rem 2rem;
}
.contact__cta-link svg { width: 1.25rem; height: 1.25rem; }

/* ═══ 12. WHATSAPP FLOAT ══════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--color-whatsapp-glow);
  z-index: 998;
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
  background: var(--color-whatsapp-hover);
}
.whatsapp-float:focus-visible {
  outline: 3px solid var(--color-whatsapp);
  outline-offset: 3px;
}
.whatsapp-float svg { width: 26px; height: 26px; }

/* ═══ 13. FOOTER ══════════════════════════════════════════════ */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.footer__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
#footer-copyright {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
#footer-developer {
  font-size: 0.875rem;
  color: var(--text-secondary);
  opacity: 0.7;
}
#footer-developer a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: color 0.25s ease, background-size 0.25s ease, opacity 0.25s ease;
}
#footer-developer a:hover,
#footer-developer a:focus-visible {
  color: var(--accent);
  background-size: 100% 1px;
  opacity: 1;
  outline: none;
}

/* ═══ 14. NOSCRIPT FALLBACK ═══════════════════════════════════ */
.noscript-fallback {
  text-align: center;
  padding: 4rem 2rem;
  font-family: sans-serif;
  background: #0f1117;
  color: #f5f6fa;
}
.noscript-fallback h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.noscript-fallback p  { margin-bottom: 0.75rem; color: #9ca3b4; font-size: 0.95rem; }
.noscript-fallback a  { color: #25D366; font-weight: 700; text-decoration: underline; }

/* ═══ 14b. CART SENT TOAST ════════════════════════════════════ */
.cart-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--color-whatsapp);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  font-size: 0.875rem;
  color: var(--text-primary);
  max-width: calc(100vw - 3rem);
  animation: toastIn 0.25s ease;
}
.cart-toast--hide {
  animation: toastOut 0.3s ease forwards;
}
.cart-toast__msg {
  font-weight: 600;
  white-space: nowrap;
}
.cart-toast__clear {
  background: var(--color-whatsapp);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.4rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: background var(--transition);
  font-family: var(--font-body);
}
.cart-toast__clear:hover { background: var(--color-whatsapp-hover); }
.cart-toast__clear:focus-visible { outline: 2px solid var(--color-whatsapp); outline-offset: 2px; }
.cart-toast__dismiss {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: all var(--transition);
  font-family: var(--font-body);
}
.cart-toast__dismiss:hover { border-color: var(--accent); color: var(--text-primary); }
.cart-toast__dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ═══ 14c. PWA ════════════════════════════════════════════════ */
.offline-banner {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 998;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .offline-banner { transition: opacity var(--transition); }
}

/* ═══ 15. ANIMATIONS ══════════════════════════════════════════ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes badgePop {
  0%   { transform: scale(0.6); }
  70%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* 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; }
}

/* ═══ 16. MEDIA QUERIES (mobile-first) ════════════════════════ */

/* 480px — 2-col product grid, search max-width */
@media (min-width: 480px) {
  .catalog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .catalog__controls {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .catalog__search { flex: 1; min-width: 200px; }
}

/* 640px — values 2-col */
@media (min-width: 640px) {
  .values__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__ctas { flex-wrap: nowrap; }
}

/* 768px — about side-by-side, cart drawer wider */
@media (min-width: 768px) {
  .catalog__controls {
    flex-direction: row;
    align-items: center;
  }
  .catalog__search { max-width: 320px; }
  .catalog__filters { flex-wrap: wrap; overflow-x: visible; }
  .cart-drawer {
    width: 380px;
  }
  .contact__layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 4rem;
  }
  .contact__content { flex: 1; }
}

/* 900px — horizontal nav */
@media (min-width: 900px) {
  .nav__hamburger { display: none; }
  .nav__menu {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    position: static;
    background: none;
    padding: 0;
    animation: none;
    overflow-y: visible;
  }
  .nav__links {
    flex-direction: row;
    gap: 0.25rem;
  }
  .nav__link {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    min-height: auto;
  }
  .nav__link:hover { background: var(--bg-card); }
}

/* 1024px — 3-4 col product grid, full cart drawer */
@media (min-width: 1024px) {
  .catalog__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  .values__grid { grid-template-columns: repeat(4, 1fr); }
  .cart-drawer { width: var(--cart-drawer-width); }
  .catalog__search { max-width: 360px; }
}

/* 1280px — wider container padding */
@media (min-width: 1280px) {
  :root { --container-pad: 2rem; }
}
