/* ============================================================
   AURORA — Design Tokens & Custom Styles
   ============================================================ */

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

:root {
  /* Color Tokens */
  --bg:       #FAFAF8;
  --surface:  #FFFFFF;
  --surface2: #F4F3F0;
  --text:     #1A1A1A;
  --muted:    #6B6B6B;
  --accent:   #C8A96E;       /* Dorado cálido — CTAs, precios, badges */
  --accent-h: #B8955A;       /* hover del acento */
  --danger:   #E85D4A;
  --success:  #4CAF7D;
  --border:   #E8E6E1;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   250ms ease;
  --t-slow:   400ms ease;

  /* Container */
  --container: min(1280px, 100% - 2rem);
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button { cursor: pointer; font-family: inherit; }

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

/* ── Container ──────────────────────────────────────────────── */
.container { width: var(--container); margin-inline: auto; }

/* ── Promo Banner ───────────────────────────────────────────── */
#promo-banner {
  background: var(--text);
  color: #fff;
  text-align: center;
  padding: .5rem 1rem;
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .03em;
  position: relative;
  z-index: 100;
}

/* ── Navbar ─────────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250,250,248,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t-base);
}

#navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.nav-logo span { color: var(--accent); }

.nav-cats {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-left: .5rem;
}

.nav-cats a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--t-fast);
  white-space: nowrap;
}

.nav-cats a:hover, .nav-cats a.active { color: var(--text); }

.nav-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

#nav-search {
  width: 200px;
  padding: .4rem .75rem .4rem 2rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .875rem;
  background: var(--surface2);
  transition: width var(--t-base), border-color var(--t-fast), background var(--t-fast);
  outline: none;
}

#nav-search:focus {
  width: 240px;
  border-color: var(--accent);
  background: var(--surface);
}

.nav-search-icon {
  position: absolute;
  left: .6rem;
  color: var(--muted);
  pointer-events: none;
  width: 14px; height: 14px;
}

.icon-btn {
  position: relative;
  background: none;
  border: none;
  padding: .4rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}

.icon-btn:hover { background: var(--surface2); }

.cart-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--accent);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  transform: translate(25%,-25%);
  transition: transform var(--t-fast);
}

.cart-badge.bump {
  animation: badge-bump .25s ease;
}

@keyframes badge-bump {
  0%   { transform: translate(25%,-25%) scale(1); }
  50%  { transform: translate(25%,-25%) scale(1.45); }
  100% { transform: translate(25%,-25%) scale(1); }
}

/* Mobile hamburger */
#hamburger {
  display: none;
  background: none;
  border: none;
  padding: .4rem;
  color: var(--text);
}

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  position: relative;
  height: clamp(480px, 70vh, 760px);
  overflow: hidden;
}

.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 8s ease;
}

#hero:hover .hero-img { transform: scale(1.03); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 560px;
  color: #fff;
  padding: 2rem;
}

.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.0625rem;
  opacity: .85;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: .9375rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  padding: .75rem 1.5rem;
  border: none;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); box-shadow: 0 4px 16px rgba(200,169,110,.35); }

.btn-dark {
  background: var(--text);
  color: #fff;
}
.btn-dark:hover { background: #333; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: .5rem .75rem;
  font-size: .875rem;
}
.btn-ghost:hover { background: var(--surface2); }

.btn-white {
  background: #fff;
  color: var(--text);
}
.btn-white:hover { background: var(--surface2); }

.btn-lg { padding: .9rem 2rem; font-size: 1rem; }
.btn-sm { padding: .5rem 1rem; font-size: .8125rem; }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Section Headers ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.section-sub {
  font-size: .9375rem;
  color: var(--muted);
  margin-top: .25rem;
}

/* ── Category Cards ─────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.cat-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.cat-card:hover img { transform: scale(1.07); }

.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  transition: background var(--t-base);
}

.cat-card:hover .cat-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.1) 55%);
}

.cat-card-label {
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* ── Product Cards ──────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow var(--t-base), transform var(--t-base);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--surface2);
}

.product-card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

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

.product-card-badge {
  position: absolute;
  top: .75rem; left: .75rem;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 100px;
}

.badge-nuevo   { background: var(--text); color: #fff; }
.badge-oferta  { background: var(--accent); color: #fff; }
.badge-agotado { background: var(--muted); color: #fff; }

.product-card-quick {
  position: absolute;
  bottom: .75rem; right: .75rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  background: var(--surface);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.product-card:hover .product-card-quick {
  opacity: 1;
  transform: translateY(0);
}

.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.product-card-cat {
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

.product-card-name {
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: .1rem;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: .5rem;
}

.price-current {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.price-current.offer { color: var(--accent); }

.price-original {
  font-size: .875rem;
  color: var(--muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(200,169,110,.12);
  padding: .1rem .4rem;
  border-radius: 100px;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Filter Bar ─────────────────────────────────────────────── */
#filter-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.filter-select {
  padding: .45rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: .875rem;
  font-family: inherit;
  background: var(--surface);
  cursor: pointer;
  outline: none;
  transition: border-color var(--t-fast);
  appearance: none;
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
}

.filter-select:focus { border-color: var(--accent); }

.filter-chip {
  padding: .4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 500;
  background: var(--surface);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--text); }
.filter-chip.active { background: var(--text); color: #fff; border-color: var(--text); }

.filter-count {
  font-size: .875rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Product Modal ──────────────────────────────────────────── */
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

#modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

#product-modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(20px) scale(.97);
  transition: transform var(--t-base);
  position: relative;
}

#modal-backdrop.open #product-modal {
  transform: translateY(0) scale(1);
}

.modal-gallery {
  position: relative;
  background: var(--surface2);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  overflow: hidden;
}

.modal-gallery-main {
  width: 100%; aspect-ratio: 3/4;
  object-fit: cover;
}

.modal-thumbs {
  display: flex;
  gap: .5rem;
  padding: .75rem;
  position: absolute;
  bottom: 0; left: 0; right: 0;
}

.modal-thumb {
  width: 52px; height: 52px;
  object-fit: cover;
  border-radius: var(--r-sm);
  cursor: pointer;
  opacity: .6;
  transition: opacity var(--t-fast), transform var(--t-fast);
  border: 2px solid transparent;
  flex-shrink: 0;
}

.modal-thumb.active, .modal-thumb:hover {
  opacity: 1;
  transform: scale(1.05);
  border-color: var(--accent);
}

.modal-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  color: var(--text);
  z-index: 1;
  transition: background var(--t-fast), transform var(--t-fast);
}

.modal-close:hover { background: var(--surface2); transform: rotate(90deg); }

.modal-cat {
  font-size: .8125rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 700;
}

.modal-price-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.modal-price {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-price.offer { color: var(--accent); }

.variant-label {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .5rem;
  color: var(--muted);
}

.variant-label span { color: var(--text); font-weight: 700; }

.variants-row {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}

.variant-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .8125rem;
  font-weight: 600;
  background: var(--surface);
  cursor: pointer;
  transition: all var(--t-fast);
}

.variant-btn:hover { border-color: var(--text); }
.variant-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

.color-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast), border-color var(--t-fast);
  box-shadow: 0 0 0 1.5px var(--border);
}

.color-btn.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--accent);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  width: 36px; height: 40px;
  background: var(--surface2);
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
  color: var(--text);
}

.qty-btn:hover { background: var(--border); }

.qty-value {
  width: 48px;
  text-align: center;
  font-size: .9375rem;
  font-weight: 600;
  border: none;
  background: none;
  outline: none;
}

.modal-desc {
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--muted);
}

.stock-info {
  font-size: .8125rem;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* ── Cart Drawer ────────────────────────────────────────────── */
#cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}

#cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 301;
  width: min(440px, 100vw);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  box-shadow: var(--shadow-lg);
}

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

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: .875rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

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

.cart-item-img {
  width: 80px; height: 100px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--surface2);
}

.cart-item-info { display: flex; flex-direction: column; gap: .3rem; }

.cart-item-name {
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.cart-item-variant {
  font-size: .8125rem;
  color: var(--muted);
}

.cart-item-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .25rem;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9375rem;
  font-weight: 600;
}

.cart-qty button {
  width: 26px; height: 26px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all var(--t-fast);
  color: var(--text);
}

.cart-qty button:hover { border-color: var(--text); background: var(--surface2); }

.cart-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: .875rem;
  padding: .2rem .4rem;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  cursor: pointer;
}

.cart-remove:hover { color: var(--danger); background: rgba(232,93,74,.08); }

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

.cart-empty svg { opacity: .25; }

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* Free shipping bar */
.free-ship-bar {
  font-size: .8125rem;
  color: var(--muted);
}

.free-ship-bar strong { color: var(--text); }

.progress-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 100px;
  overflow: hidden;
  margin-top: .4rem;
}

.progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 100px;
  transition: width var(--t-base);
}

.cart-totals {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .9375rem;
}

.cart-totals-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.cart-totals-row.total {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  margin-top: .25rem;
}

/* ── Checkout ───────────────────────────────────────────────── */
#checkout-page {
  min-height: 60vh;
  padding: 3rem 0 5rem;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.form-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

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

.form-grid.full { grid-template-columns: 1fr; }

.form-field { display: flex; flex-direction: column; gap: .375rem; }
.form-field.span2 { grid-column: span 2; }

.form-field label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: .6875rem .875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .9375rem;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  transition: border-color var(--t-fast);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--accent); }

.form-field input.error { border-color: var(--danger); }

.form-error {
  font-size: .75rem;
  color: var(--danger);
  margin-top: .2rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  margin-bottom: .625rem;
}

.payment-option:hover { border-color: var(--text); }
.payment-option.active { border-color: var(--accent); background: rgba(200,169,110,.05); }

.payment-option input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }

.payment-option-info { flex: 1; }

.payment-option-title { font-weight: 600; font-size: .9375rem; }
.payment-option-sub { font-size: .8125rem; color: var(--muted); margin-top: .1rem; }

.checkout-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.5rem;
  position: sticky;
  top: 88px;
}

.checkout-summary h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}

.summary-item:last-of-type { border-bottom: none; }

.summary-item-img {
  width: 52px; height: 64px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--surface2);
  flex-shrink: 0;
}

.summary-item-name { font-size: .875rem; font-weight: 600; flex: 1; }
.summary-item-variant { font-size: .8125rem; color: var(--muted); }
.summary-item-price { font-size: .9375rem; font-weight: 700; }

/* ── Order Confirmation ─────────────────────────────────────── */
#confirmation-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 4rem 1rem;
  gap: 1.25rem;
}

.confirm-icon {
  width: 80px; height: 80px;
  background: rgba(76,175,125,.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  animation: pop-in .4s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.confirm-order-number {
  font-size: .875rem;
  color: var(--muted);
  background: var(--surface2);
  padding: .35rem .875rem;
  border-radius: 100px;
  font-weight: 600;
}

/* ── Trust Band ─────────────────────────────────────────────── */
#trust-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .625rem;
}

.trust-icon {
  width: 44px; height: 44px;
  background: rgba(200,169,110,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.trust-label {
  font-size: .9375rem;
  font-weight: 700;
}

.trust-sub {
  font-size: .8125rem;
  color: var(--muted);
}

/* ── Newsletter ─────────────────────────────────────────────── */
#newsletter {
  padding: 4rem 0;
  background: var(--text);
  color: #fff;
  text-align: center;
}

.newsletter-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: .5rem;
}

.newsletter-sub {
  color: rgba(255,255,255,.65);
  margin-bottom: 2rem;
  font-size: .9375rem;
}

.newsletter-form {
  display: flex;
  gap: .5rem;
  max-width: 420px;
  margin-inline: auto;
}

.newsletter-form input {
  flex: 1;
  padding: .75rem 1rem;
  border: none;
  border-radius: var(--r-sm);
  font-size: .9375rem;
  font-family: inherit;
  outline: none;
  background: rgba(255,255,255,.12);
  color: #fff;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form input:focus { background: rgba(255,255,255,.18); }

/* ── Footer ─────────────────────────────────────────────────── */
#footer {
  background: #111;
  color: rgba(255,255,255,.65);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}

.footer-brand-name span { color: var(--accent); }

.footer-tagline {
  font-size: .875rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: .5rem;
}

.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  color: rgba(255,255,255,.65);
}

.footer-social a:hover { border-color: var(--accent); color: var(--accent); }

.footer-col h4 {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  list-style: none;
}

.footer-links a {
  font-size: .875rem;
  transition: color var(--t-fast);
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .8125rem;
}

.footer-dev {
  color: rgba(255,255,255,.4);
}

.footer-dev a { color: var(--accent); }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--text);
  color: #fff;
  padding: .875rem 1.125rem;
  border-radius: var(--r-md);
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 360px;
  transform: translateX(120%);
  transition: transform var(--t-base);
}

.toast.show { transform: translateX(0); }

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ── WhatsApp Float ─────────────────────────────────────────── */
#whatsapp-float {
  position: fixed;
  bottom: 1.5rem; left: 1.5rem;
  z-index: 400;
  width: 52px; height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  color: #fff;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  text-decoration: none;
}

#whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,.6);
}

/* ── Section Spacing ────────────────────────────────────────── */
.section { padding: 4rem 0; }

/* ── Page Views ─────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── Scroll Reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  #hero:hover .hero-img { transform: none; }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}

@media (max-width: 768px) {
  .nav-cats { display: none; }
  #hamburger { display: flex; }
  #nav-search { width: 36px; padding: .4rem .5rem .4rem 1.75rem; }
  #nav-search:focus { width: 160px; padding: .4rem .75rem .4rem 2rem; }

  #product-modal {
    grid-template-columns: 1fr;
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    align-self: flex-end;
  }

  #modal-backdrop { align-items: flex-end; padding: 0; }

  .modal-gallery {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    aspect-ratio: 4/3;
  }

  .modal-gallery-main { aspect-ratio: 4/3; }

  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .form-grid { grid-template-columns: 1fr; }
  .form-field.span2 { grid-column: span 1; }

  .newsletter-form { flex-direction: column; }
  .newsletter-form input { text-align: center; }

  #filter-bar { gap: .5rem; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .hero-content { padding: 1.5rem; }
  #toast-container { bottom: 5rem; right: 1rem; left: 1rem; }
  .toast { min-width: auto; max-width: 100%; }
}

/* ── Mobile Nav Drawer ──────────────────────────────────────── */
#mobile-nav {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  background: var(--surface);
  z-index: 400;
  transform: translateX(-100%);
  transition: transform var(--t-slow);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-lg);
}

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

#mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 399;
  background: rgba(0,0,0,.5);
  display: none;
}

#mobile-nav-overlay.open { display: block; }

.mobile-nav-link {
  font-size: 1.125rem;
  font-weight: 600;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: color var(--t-fast);
}

.mobile-nav-link:hover { color: var(--accent); }

/* Back to top */
#back-top {
  position: fixed;
  bottom: 1.5rem; right: 5rem;
  z-index: 50;
  width: 40px; height: 40px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--t-base), transform var(--t-base);
}

#back-top.show { opacity: 1; transform: translateY(0); }
