:root {
  --pink: #e5678f;
  --pink-dark: #c94873;
  --pink-light: #ffe3ec;
  --teal: #14636b;
  --teal-dark: #0d4a50;
  --teal-light: #3a8f95;
  --mint: #c9e9df;
  --peach: #ffe3d6;
  --lavender: #cdbbe6;
  --cream: #fff9f5;
  --ink: #2b2530;
  --ink-soft: #6b6270;
  --border: #f0e3e8;
  --shadow: 0 10px 30px rgba(43, 37, 48, 0.08);
  --shadow-lg: 0 20px 50px rgba(43, 37, 48, 0.18);
  --radius: 16px;
  --whatsapp: #25d366;
  --font-display: 'Dancing Script', cursive;
  --font-body: 'Poppins', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 8px 20px rgba(229, 103, 143, 0.35); }
.btn-primary:hover { background: var(--pink-dark); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35); }
.btn-whatsapp:hover { background: #1eb256; }
.btn-block { width: 100%; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 249, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 46px; height: 46px; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
}
.header-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  max-width: 460px;
}
.header-search i { color: var(--ink-soft); }
.header-search input {
  border: none;
  outline: none;
  flex: 1;
  font-family: inherit;
  font-size: 0.95rem;
  background: transparent;
}
.cart-btn {
  position: relative;
  background: var(--teal);
  color: #fff;
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--pink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--cream);
}
.category-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-soft);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.cat-pill.active, .cat-pill:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(135deg, var(--peach) 0%, var(--pink-light) 45%, var(--mint) 100%);
  padding: 70px 20px;
  text-align: center;
}
.hero-content { max-width: 640px; margin: 0 auto; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: var(--teal-dark);
  margin: 0 0 10px;
}
.hero p { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 28px; }

/* ---------- CATALOG ---------- */
.catalog-section { max-width: 1200px; margin: 0 auto; padding: 50px 20px 80px; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.catalog-head h2 { font-size: 1.6rem; color: var(--teal-dark); margin: 0; }
.result-count { color: var(--ink-soft); font-size: 0.9rem; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.skeleton-grid { display: contents; }
.skeleton-card { height: 320px; border-radius: var(--radius); background: linear-gradient(90deg, #f3e9ec 25%, #fbf3f0 37%, #f3e9ec 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-thumb {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--peach), var(--mint));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .placeholder-icon { font-size: 3rem; color: rgba(255,255,255,0.7); }
.badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--pink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}
.badge-featured {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--teal);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}
.product-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-category { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--pink); font-weight: 700; }
.product-name { font-size: 1rem; font-weight: 600; margin: 0; color: var(--ink); }
.product-price-row { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.price-current { font-size: 1.15rem; font-weight: 700; color: var(--teal-dark); }
.price-compare { font-size: 0.85rem; color: var(--ink-soft); text-decoration: line-through; }
.stock-low { font-size: 0.75rem; color: var(--pink-dark); font-weight: 600; }

.empty-state { text-align: center; color: var(--ink-soft); padding: 60px 20px; font-size: 1.05rem; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--teal-dark); color: #fdf6f2; margin-top: 40px; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px 30px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-logo { width: 60px; height: 60px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25)); }
.footer-brand p { font-family: var(--font-display); font-size: 1.4rem; margin: 0; }
.footer-col h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mint); margin: 0 0 12px; }
.footer-col p { margin: 0 0 10px; font-size: 0.9rem; opacity: 0.9; display: flex; gap: 8px; align-items: flex-start; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.social-links a:hover { background: var(--pink); }
.footer-bottom { text-align: center; font-size: 0.8rem; opacity: 0.7; padding: 18px 20px; border-top: 1px solid rgba(255,255,255,0.1); }

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
  z-index: 45;
  transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------- ASISTENTE IA ---------- */
.assistant-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 25px rgba(20, 99, 107, 0.4);
  z-index: 45;
  transition: transform 0.15s ease;
}
.assistant-float:hover { transform: scale(1.08); }

.assistant-panel {
  position: fixed;
  bottom: 96px;
  left: 24px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 140px));
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}
.assistant-header {
  background: var(--teal);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
  gap: 8px;
}
.assistant-header .modal-close { position: static; background: rgba(255,255,255,0.15); color: #fff; }
.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cream);
}
.assistant-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 0.88rem; line-height: 1.4; }
.assistant-msg-bot { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.assistant-msg-user { align-self: flex-end; background: var(--pink); color: #fff; border-bottom-right-radius: 4px; }
.assistant-msg-typing { align-self: flex-start; background: #fff; color: var(--ink-soft); font-style: italic; }
.assistant-input-row { display: flex; border-top: 1px solid var(--border); padding: 10px; gap: 8px; }
.assistant-input-row input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}
.assistant-input-row input:focus { border-color: var(--teal); }
.assistant-input-row button { background: var(--teal); color: #fff; border: none; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }

@media (max-width: 480px) {
  .assistant-panel { left: 12px; right: 12px; width: auto; bottom: 88px; }
  .assistant-float { left: 16px; }
}

/* ---------- MODAL / OVERLAYS ---------- */
.modal-overlay, .cart-overlay {
  position: fixed; inset: 0;
  background: rgba(43, 37, 48, 0.5);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cart-overlay { justify-content: flex-end; padding: 0; }

.modal {
  background: #fff;
  border-radius: 20px;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--cream);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-soft);
  z-index: 2;
}
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.modal-gallery { background: linear-gradient(135deg, var(--peach), var(--mint)); padding: 24px; }
.modal-gallery img#modalMainImage { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 14px; background: #fff; }
.modal-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.modal-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.modal-thumbs img.active { border-color: var(--pink); }
.modal-info { padding: 34px 30px; display: flex; flex-direction: column; gap: 10px; }
.modal-category { color: var(--pink); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.modal-info h2 { margin: 0; font-size: 1.5rem; color: var(--ink); }
.modal-price { font-size: 1.5rem; font-weight: 700; color: var(--teal-dark); display: flex; gap: 10px; align-items: baseline; }
.modal-description { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }
.field-label { font-size: 0.8rem; font-weight: 700; color: var(--ink); display: block; margin-bottom: 6px; }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip { border: 1.5px solid var(--border); background: #fff; padding: 7px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; }
.size-chip.active { border-color: var(--pink); background: var(--pink-light); color: var(--pink-dark); }
.qty-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty-stepper button { background: var(--cream); border: none; width: 36px; height: 36px; font-size: 1.1rem; }
.qty-stepper span { width: 40px; text-align: center; font-weight: 600; }
.stock-note { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }

/* ---------- CART DRAWER ---------- */
.cart-drawer {
  background: #fff;
  width: min(420px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,0.15);
}
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.cart-header h2 { font-size: 1.15rem; margin: 0; display: flex; align-items: center; gap: 8px; color: var(--teal-dark); }
.cart-header .modal-close { position: static; }
.cart-items { flex: 1; overflow-y: auto; padding: 14px 22px; display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; background: var(--cream); flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info .name { font-weight: 600; font-size: 0.9rem; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-info .meta { font-size: 0.78rem; color: var(--ink-soft); margin: 0; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; }
.cart-item-actions button { background: var(--cream); border: none; width: 26px; height: 26px; border-radius: 50%; font-size: 0.9rem; }
.cart-item-remove { background: none; border: none; color: var(--pink-dark); font-size: 1rem; margin-left: 4px; }
.cart-footer { border-top: 1px solid var(--border); padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.cart-footer textarea { resize: none; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 0.85rem; min-height: 56px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; }
.cart-total strong { font-size: 1.3rem; color: var(--teal-dark); }
.cart-hint { font-size: 0.75rem; color: var(--ink-soft); text-align: center; margin: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--teal-dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 80;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; max-width: none; width: 100%; }
  .brand-name { display: none; }
  .hero h1 { font-size: 2.3rem; }
  .modal-body { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
