:root {
  /* Paleta lila clarito: fondos casi blancos con un toque lila; el lila más fuerte solo en botones */
  --bg: #fbf9fd;
  --card: #ffffff;
  --ink: #2f2838;
  --muted: #756c80;
  --line: #e8e0f0;
  --accent: #8566b0;
  --accent-ink: #ffffff;
  --accent-soft: #f1ebf8;
  --btn: #dccdf0;          /* botones: lila clarito con texto oscuro */
  --btn-hover: #d0bde9;
  --btn-ink: #2f2838;
  --danger: #b4443a;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 Inter, system-ui, sans-serif;
}
h1, h2, h3, .brand { font-family: Fraunces, Georgia, serif; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 100px; }
.brand { font-size: 26px; font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: -.5px; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand img { height: 84px; width: auto; }
@media (max-width: 600px) { header.top .wrap { height: 84px; } .brand img { height: 68px; } }

.btn {
  font: inherit; font-weight: 600; border: 0; cursor: pointer;
  background: var(--btn); color: var(--btn-ink); transition: background .15s;
  padding: 10px 18px; border-radius: 99px;
}
.btn:hover:not(:disabled) { background: var(--btn-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: var(--danger); color: #fff; }

/* Hero */
.hero { padding: 40px 0 20px; text-align: center; }
.hero h1 { font-size: clamp(26px, 4.5vw, 38px); margin: 0 0 8px; letter-spacing: -.5px; font-weight: 500; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 520px; }

.tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 26px 0 24px; }
/* Frase del encabezado, en letra manuscrita como la del logo */
.tagline {
  flex: 1; margin: 0 12px; text-align: center; color: var(--ink);
  font: 400 clamp(26px, 3.6vw, 40px)/1.1 'Great Vibes', cursive;
}
.tabs button {
  font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 16px; border-radius: 99px; cursor: pointer;
}
.tabs button.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn-hover); font-weight: 600; }
@media (max-width: 600px) {
  header.top .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; row-gap: 0; }
  header.top .tagline { order: 3; flex-basis: 100%; margin: 2px 0 4px; font-size: 27px; }
  .tabs { margin: 18px 0 18px; }
  .tabs button { padding: 7px 14px; font-size: 14px; }
}

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; padding-bottom: 80px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .ph { aspect-ratio: 1; background: var(--accent-soft); display: grid; place-items: center; font-size: 42px; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; object-position: center; } /* foto completa, centrada */
.card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 18px; }
.card { cursor: pointer; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card .desc { color: var(--muted); font-size: 13px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.price { font-weight: 600; font-size: 17px; }
.stock { font-size: 12px; color: var(--muted); }
.stock.out { color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1 / -1; }

/* Carrito */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: .2s; z-index: 20; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: var(--card); z-index: 21; transform: translateX(100%); transition: .25s;
  display: flex; flex-direction: column; overflow-y: auto;
}
.open .drawer-bg { opacity: 1; pointer-events: auto; }
.open .drawer { transform: none; }
.step { display: flex; flex-direction: column; flex: 1 0 auto; }
.drawer header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px; border-bottom: 1px solid var(--line); }
.drawer h2 { margin: 0; font-size: 22px; }
.drawer .items { flex: 1; padding: 8px 18px; }
.line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line img, .line .mini { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--accent-soft); flex: none; }
.line .info { flex: 1; font-size: 14px; }
.line .info small { display: block; color: var(--muted); font-size: 12px; margin: 1px 0 2px; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.drawer footer { padding: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; position: sticky; bottom: 0; background: var(--card); }
.total { display: flex; justify-content: space-between; font-weight: 600; font-size: 18px; }

/* Checkout */
.checkout { padding: 18px; display: grid; gap: 10px; }
.checkout h3 { margin: 10px 0 0; font-size: 16px; }
.summary { margin: 0; color: var(--muted); font-size: 14px; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { width: auto; margin-top: 3px; accent-color: var(--accent); }
.choice small { display: block; color: var(--muted); font-size: 12px; }

/* Formularios */
label.f { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%;
}
textarea { resize: vertical; min-height: 60px; }
.err { color: var(--danger); font-size: 14px; min-height: 1em; }

/* WhatsApp flotante */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 15;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.wa svg { width: 30px; height: 30px; fill: #fff; }

footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0 90px; border-top: 1px solid var(--line); }
.banner { background: var(--danger); color: #fff; text-align: center; padding: 10px; font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ficha del producto */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.4); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal-open { overflow: hidden; }
.modal-card { position: relative; background: var(--card); border-radius: 18px; width: min(860px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; outline: none; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); font-size: 16px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.pm { display: grid; grid-template-columns: 1fr 1fr; }
.pm-gallery { display: flex; flex-direction: column; background: var(--accent-soft); border-radius: 18px 0 0 18px; overflow: hidden; }
.pm-photo { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: 64px; touch-action: pan-y; }
.pm-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.pm-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.pm-nav.prev { left: 10px; }
.pm-nav.next { right: 10px; }
.pm-count { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.pm-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: var(--card); }
.pm-thumb { flex: none; width: 58px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; opacity: .7; }
.pm-thumb.on { border-color: var(--accent); opacity: 1; }
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-info { padding: 28px 26px; display: grid; gap: 10px; align-content: start; }
.pm-info h2 { margin: 0; font-size: 28px; padding-right: 30px; }
.pm-price { font-size: 22px; font-weight: 600; }
.pm-desc { margin: 4px 0; color: var(--ink); white-space: pre-line; line-height: 1.6; }
.opt-group { border: 0; padding: 0; margin: 6px 0 0; }
.opt-group legend { font-size: 14px; color: var(--muted); padding: 0; margin-bottom: 8px; }
.opt-group legend b { color: var(--ink); font-weight: 600; }
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.opt:hover { border-color: var(--muted); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.pm-buy { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pm-buy .btn { flex: 1; padding: 13px 18px; }
.qty.big button { width: 36px; height: 36px; font-size: 18px; }
.qty.big span { min-width: 22px; text-align: center; font-weight: 600; }
.qty button:disabled { opacity: .35; cursor: default; }
@media (max-width: 680px) {
  .modal { padding: 0; place-items: end stretch; }
  .modal-card { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .pm { grid-template-columns: 1fr; }
  .pm-gallery { border-radius: 18px 18px 0 0; }
  .pm-photo { aspect-ratio: 4 / 3; }
  .pm-info { padding: 20px 18px 26px; }
  .pm-info h2 { font-size: 24px; }
}

/* Validación del formulario */
.field-help { color: var(--muted); font-size: 12px; }
.field-err { color: var(--danger); font-size: 12px; min-height: 0; }
.field-err:empty { display: none; }
input.invalid, textarea.invalid { border-color: var(--danger); background: #fdf5f4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tabs[hidden] + .grid { margin-top: 28px; }

/* Pie de página */
footer.site { text-align: left; padding: 40px 0 90px; background: var(--card); margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h3 { font: 600 13px Inter, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 10px; }
.foot-grid nav, .foot-grid > div { display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.foot-grid a { color: var(--ink); text-decoration: none; }
.foot-grid a:hover { color: var(--accent); text-decoration: underline; }
.foot-grid small { color: var(--muted); }
.foot-logo { height: 70px; width: auto; align-self: flex-start; }
.foot-tag { font: 400 24px/1.1 'Great Vibes', cursive; margin: 0; }
.foot-regret { font-weight: 600; }
.foot-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.foot-bottom a { color: var(--muted); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }

/* Páginas de texto */
.page { padding: 34px 16px 20px; }
.prose { max-width: 720px; margin: 0 auto; line-height: 1.7; }
.prose h1 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 18px; }
.prose h2 { font-size: 20px; margin: 30px 0 6px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--accent); }

/* Contacto */
.contact-grid { max-width: 920px; margin: 26px auto 0; display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: start; }
.contact-cards { display: grid; gap: 12px; }
.contact-card { display: grid; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); text-decoration: none; }
a.contact-card:hover { border-color: var(--accent); }
.contact-card b { font-size: 14px; }
.contact-card span { font-size: 16px; }
.contact-card small { color: var(--muted); font-size: 12px; }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.contact-form h2 { margin: 0; font-size: 20px; }
.contact-form.narrow { max-width: 560px; margin: 24px auto 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.head-actions { display: flex; align-items: center; gap: 10px; }
.ig-head { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); border: 1px solid var(--line); background: var(--card); }
.ig-head:hover { background: var(--accent-soft); }
.ig-head svg { width: 20px; height: 20px; }

/* Ficha: notas para personalizar las velas y consultas por mayor */
.pm-note { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin: 14px 0; font-size: 14px; line-height: 1.5; }
.pm-note p { margin: 0 0 6px; }
.pm-note p:last-child { margin: 0; }
.pm-ask { font-size: 13px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.pm-ask a, .cart-wholesale a { color: var(--accent); font-weight: 600; }
.cart-wholesale { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.cart-wholesale:empty { display: none; }
.notes-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.notes-hint:empty { display: none; }
