/* Anabella Candles — estilos.
   Para cambiar los colores de la marca, cambia las variables de aquí abajo. */
:root {
  --cream: #faf5ef;
  --paper: #ffffff;
  --sand: #f1e7dc;
  --ink: #2f2622;
  --muted: #7a6b62;
  --line: #e6d9cc;
  --rose: #b86b6b;       /* color principal (botones, enlaces) */
  --rose-dark: #9a5555;
  --gold: #b8925a;
  --sage: #7f8f74;
  --ok: #4f7a55;
  --warn: #b7791f;
  --danger: #b04646;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(47, 38, 34, .05), 0 8px 24px rgba(47, 38, 34, .06);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--rose-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; color: var(--gold); font-weight: 500; margin-bottom: 1rem; }
[hidden] { display: none !important; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 1px solid var(--rose); background: var(--rose); color: #fff;
  padding: .8em 1.6em; border-radius: 999px; font: 500 .95rem var(--sans); letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: background .2s, transform .1s; }
.btn:hover { background: var(--rose-dark); border-color: var(--rose-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.light { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.light:hover { border-color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { padding: .45em 1em; font-size: .85rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--rose-dark); cursor: pointer; font: inherit; text-decoration: underline; }

label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .35rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: .7em .85em; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--rose) 35%, transparent); border-color: var(--rose); }
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 1rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 400; cursor: pointer; }
.check input { width: auto; }
.alert { padding: .8em 1em; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; }
.alert.error { background: #f8e5e3; color: #8a2f2f; }
.alert.ok { background: #e6f0e4; color: #2f5a35; }
.alert.info { background: var(--sand); color: var(--ink); }

/* ---------- Encabezado ---------- */
#site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.announce { background: var(--ink); color: #f5ece3; text-align: center; font-size: .82rem; letter-spacing: .04em; padding: .45em 1em; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.55rem; font-weight: 600; letter-spacing: .01em; }
.brand img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: .95rem; position: relative; }
.nav-links a.active::after, .nav-links a:not(.cart-link):hover::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; }
.lang-btn { background: none; border: 1px solid var(--line); border-radius: 999px; padding: .3em .9em; font: .85rem var(--sans); color: var(--ink); cursor: pointer; }
.lang-btn:hover { border-color: var(--ink); }
.cart-link { display: inline-flex; position: relative; }
.badge { position: absolute; top: -6px; right: -10px; background: var(--rose); color: #fff; font-size: .7rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.2rem 20px 1.6rem; background: var(--cream); border-bottom: 1px solid var(--line); }
  #site-header.open .nav-links { display: flex; }
  .row { grid-template-columns: 1fr; }
}

/* ---------- Secciones ---------- */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }

.hero { padding-top: clamp(2.5rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 32em; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 4/5; border-radius: 240px 240px var(--radius) var(--radius); overflow: hidden; background: var(--sand); box-shadow: var(--shadow); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 420px; } }

.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.cat { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--sand); text-decoration: none; color: #fff; }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat:hover img { transform: scale(1.04); }
.cat span { position: absolute; left: 1.2rem; bottom: 1rem; font-family: var(--serif); font-size: 1.7rem; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.cat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(47,38,34,.45)); }
.cat span { z-index: 1; }
@media (max-width: 700px) { .cats { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.6rem; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--gold); margin-bottom: .6rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.story { background: var(--sand); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.story-grid img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; width: 100%; }
.story p { font-size: 1.08rem; }
@media (max-width: 760px) { .story-grid { grid-template-columns: 1fr; } }

.contact-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.5rem); text-align: center; max-width: 720px; margin: 0 auto; }
.contact-links { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.5rem; }

/* ---------- Productos ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.6rem; }
.card { display: block; text-decoration: none; color: var(--ink); }
.card-img { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: .9rem .2rem 0; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.card-body h3 { font-size: 1.2rem; margin: 0; }
.price { font-weight: 500; white-space: nowrap; }
.tag { position: absolute; top: .8rem; left: .8rem; background: var(--paper); color: var(--ink); font-size: .75rem; padding: .25em .7em; border-radius: 999px; }

.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.chip { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .45em 1.1em; cursor: pointer; font: .92rem var(--sans); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.gallery-main { aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 86px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--sand); }
.thumbs button.active { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info .price { font-size: 1.4rem; display: block; margin-bottom: 1.2rem; }
.product-info .desc { color: var(--muted); white-space: pre-line; margin-bottom: 1.6rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.qty button { background: none; border: 0; width: 38px; height: 40px; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.qty input { width: 42px; border: 0; text-align: center; padding: 0; background: transparent; }
.buy-row { display: flex; gap: .8rem; align-items: center; margin: 1.2rem 0; flex-wrap: wrap; }
.stock-note { font-size: .88rem; color: var(--warn); }
@media (max-width: 800px) { .product { grid-template-columns: 1fr; } }

/* ---------- Carrito ---------- */
.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; align-items: start; }
.cart-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 88px; height: 104px; object-fit: cover; border-radius: 10px; background: var(--sand); }
.cart-item h3 { font-size: 1.15rem; margin: 0 0 .2rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.sum-row { display: flex; justify-content: space-between; padding: .35rem 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .9rem; font-weight: 600; font-size: 1.1rem; }
.radio-card { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; margin-bottom: .6rem; cursor: pointer; font-weight: 400; }
.radio-card input { width: auto; margin-top: .3rem; }
.radio-card:has(input:checked) { border-color: var(--ink); }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }

/* ---------- Cuenta ---------- */
.auth-box { max-width: 440px; margin: 0 auto; }
.tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }
.tabs button { background: none; border: 0; padding: .8rem 1rem; font: 500 .98rem var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }
.order-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.order-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.status { display: inline-block; font-size: .78rem; padding: .2em .75em; border-radius: 999px; background: var(--sand); font-weight: 500; }
.status.paid, .status.processing { background: #fbefd9; color: #7a5212; }
.status.shipped { background: #e1ebf5; color: #2b4f75; }
.status.delivered { background: #e3efe1; color: #2f5a35; }
.status.cancelled { background: #f3e1e1; color: #8a2f2f; }
.status.pending { background: #eee; color: #666; }
.account-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
#site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { text-decoration: underline; }
.copyright { margin-top: 2.5rem; font-size: .82rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

.page-head { padding: 3rem 0 1rem; }
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--sand), #f7efe6, var(--sand)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7em 1.3em; border-radius: 999px; font-size: .92rem; z-index: 50; box-shadow: var(--shadow); }
