:root {
  --noche: #141B3A;
  --noche-2: #1E2752;
  --oro: #C9A24B;
  --oro-claro: #E9D29A;
  --crema: #FAF7F0;
  --papel: #FFFFFF;
  --tinta: #1B1F2E;
  --gris: #6B7085;
  --linea: #E7E3D8;
  --verde: #2F7D5B;
  --radio: 16px;
  --sombra: 0 1px 2px rgba(20, 27, 58, .06), 0 8px 24px rgba(20, 27, 58, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--tinta);
  background: var(--crema);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--gris); font-size: .9rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .8em 1.4em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--noche); color: #fff; }
.btn-primary:hover { background: var(--noche-2); }
.btn-gold { background: var(--oro); color: var(--noche); }
.btn-gold:hover { background: var(--oro-claro); }
.btn-outline-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-outline-light:hover { border-color: #fff; }
.btn-ghost { background: transparent; border-color: var(--linea); color: var(--noche); }
.btn-ghost:hover { border-color: var(--noche); }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--gris); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; padding: .5em; }
.icon-btn { background: none; border: 0; font-size: 1.1rem; cursor: pointer; padding: .4em; color: var(--tinta); }

/* Encabezado */
.topbar { background: var(--noche); color: var(--oro-claro); text-align: center; font-size: .8rem; padding: .45em 16px; letter-spacing: .02em; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250, 247, 240, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--serif); font-size: 1.35rem; color: var(--noche); }
.logo svg { width: 28px; height: 28px; color: var(--oro); }
.logo b { font-weight: 500; color: var(--oro); margin-left: 2px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: .5em .9em; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--gris); }
.nav a:hover { color: var(--noche); }
.nav a[aria-current="page"] { color: var(--noche); background: #EFEADC; }
.lang-switch { display: flex; border: 1.5px solid var(--linea); border-radius: 999px; padding: 2px; }
.lang-switch button { background: none; border: 0; border-radius: 999px; padding: .3em .6em; font: 700 .75rem var(--sans); letter-spacing: .04em; color: var(--gris); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--noche); color: #fff; }
.cart-btn { position: relative; background: var(--noche); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.cart-btn svg { width: 22px; height: 22px; }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--oro); color: var(--noche); font-size: .72rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.cart-count[hidden] { display: none; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% 20%, #2B3670 0%, transparent 60%), var(--noche); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 80px 0 90px; }
.hero h1 em { font-style: italic; color: var(--oro-claro); font-weight: 500; }
.lead { font-size: 1.1rem; color: #C9CDE3; max-width: 52ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--oro); margin-bottom: 1em; }
.eyebrow.dark { color: #9A7A2E; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 32px; }
.hero-stats strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--oro-claro); }
.hero-stats span { font-size: .85rem; color: #A9AECB; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.moon { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFF6DC, #E9D29A 55%, #C9A24B); box-shadow: 0 0 80px rgba(233, 210, 154, .35); }
.orbit { position: absolute; inset: 0; border: 1px dashed rgba(233, 210, 154, .25); border-radius: 50%; animation: girar 30s linear infinite; }
.orbit span { position: absolute; top: -22px; left: 50%; translate: -50% 0; width: 44px; height: 44px; display: grid; place-items: center; background: var(--noche-2); border: 1px solid rgba(233,210,154,.35); border-radius: 50%; font-size: 1.3rem; animation: girar 30s linear infinite reverse; }
.o2 { inset: 8%; animation-duration: 22s; animation-direction: reverse; }
.o2 span { animation-duration: 22s; animation-direction: normal; top: auto; bottom: -22px; }
.o3 { inset: -4%; animation-duration: 40s; }
.o3 span { animation-duration: 40s; top: 50%; left: -22px; translate: 0 -50%; }
@keyframes girar { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .orbit, .orbit span { animation: none; } }

.page-hero { background: var(--noche); color: #fff; padding: 56px 0 48px; }
.page-hero p { color: #C9CDE3; max-width: 60ch; margin: 0; }
.page-hero strong { color: var(--oro-claro); }

/* Secciones */
.section { padding: 64px 0; }
.section.alt { background: var(--papel); border-block: 1px solid var(--linea); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.more { color: #9A7A2E; font-weight: 600; text-decoration: none; white-space: nowrap; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

/* Categorías */
.cat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.cat-tile { background: var(--tono); border-radius: var(--radio); padding: 22px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; transition: transform .2s, box-shadow .2s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.cat-icon { font-size: 2rem; margin-bottom: 8px; }
.cat-tile small { color: var(--gris); }

/* Tarjetas de producto */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.thumb { background: var(--tono); aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 3.6rem; }
.thumb.sm { width: 56px; height: 56px; aspect-ratio: auto; font-size: 1.6rem; border-radius: 12px; flex: none; }
.thumb { overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.thumb.xs { display: inline-grid; width: 32px; height: 32px; aspect-ratio: auto; font-size: 1rem; border-radius: 8px; vertical-align: middle; margin-right: 10px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gris); font-weight: 700; }
.card h3 { margin: 4px 0 8px; }
.price-row strong { font-size: 1.3rem; font-family: var(--serif); color: var(--noche); }
.price-row span { color: var(--gris); font-size: .85rem; margin-left: 4px; }
.wholesale-hint { font-size: .85rem; color: var(--verde); margin: 2px 0 10px; }
.tiers { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; font-size: .8rem; text-align: center; }
.tiers li { padding: 6px 4px; font-weight: 600; }
.tiers li + li { border-left: 1px solid var(--linea); }
.tiers span { display: block; color: var(--gris); font-weight: 400; font-size: .72rem; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.card-actions .btn { padding: .65em .6em; font-size: .85rem; }

/* Pasos y ventajas */
.steps { list-style: none; counter-reset: paso; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: paso; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 20px 20px 20px 70px; position: relative; }
.steps li::before { content: counter(paso); position: absolute; left: 20px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border-radius: 50%; background: var(--noche); color: var(--oro-claro); display: grid; place-items: center; font-family: var(--serif); }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.perks span { font-size: 1.8rem; }
.perks h3 { margin: 10px 0 4px; }
.perks p { color: var(--gris); font-size: .92rem; margin: 0; }

/* Tienda */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--linea); background: var(--papel); border-radius: 999px; padding: .45em 1em; font: 500 .9rem var(--sans); cursor: pointer; color: var(--tinta); }
.chip:hover { border-color: var(--noche); }
.chip.active { background: var(--noche); border-color: var(--noche); color: #fff; }
.toolbar-right { display: flex; gap: 8px; }
input, select, textarea { font: inherit; padding: .65em .9em; border: 1.5px solid var(--linea); border-radius: 10px; background: var(--papel); color: var(--tinta); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--oro); outline-offset: 1px; border-color: transparent; }
.toolbar-right input { width: 220px; }
.toolbar-right select { width: auto; }

/* Mayoreo */
.table-wrap { overflow-x: auto; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); }
.tier-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.tier-table th, .tier-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--linea); font-size: .93rem; }
.tier-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); background: #FBFAF6; }
.tier-table td:nth-child(3), .tier-table td:nth-child(4) { color: var(--verde); font-weight: 600; }
.tier-table small { color: var(--gris); font-weight: 400; }
.tier-table tr:last-child td { border-bottom: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li::before { content: "✓"; color: var(--verde); font-weight: 700; margin-right: 10px; }
.form { background: var(--crema); border: 1px solid var(--linea); border-radius: var(--radio); padding: 24px; display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-ok { color: var(--verde); font-weight: 500; margin: 0; }

/* Carrito */
.cart-overlay { position: fixed; inset: 0; background: rgba(20, 27, 58, .45); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.cart-drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: var(--papel); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease; box-shadow: -10px 0 40px rgba(0,0,0,.15); }
.cart-open .cart-overlay { opacity: 1; pointer-events: auto; }
.cart-open .cart-drawer { transform: none; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--linea); }
.cart-head h3 { margin: 0; font-family: var(--serif); font-size: 1.3rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--linea); align-items: flex-start; }
.cart-line-info { flex: 1; display: grid; gap: 2px; font-size: .9rem; }
.cart-line-info span { color: var(--gris); font-size: .82rem; }
.cart-line-total { font-size: .95rem; white-space: nowrap; }
.tag-mayoreo { font-style: normal; background: #E3F1EA; color: var(--verde); padding: 1px 6px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 999px; width: max-content; margin-top: 6px; }
.qty button { background: none; border: 0; width: 30px; height: 30px; cursor: pointer; font-size: 1rem; color: var(--noche); }
.qty input { width: 46px; border: 0; text-align: center; padding: 0; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-foot { padding: 18px 20px; border-top: 1px solid var(--linea); display: grid; gap: 10px; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.05rem; }
.cart-savings { background: #E3F1EA; color: var(--verde); border-radius: 10px; padding: 8px 12px; font-size: .85rem; font-weight: 600; margin: 0; }
.cart-savings[hidden] { display: none; }
.cart-empty { text-align: center; color: var(--gris); padding: 40px 0; }
.cart-empty a { color: #9A7A2E; font-weight: 600; }

/* Pie */
.site-footer { background: var(--noche); color: #C9CDE3; padding: 56px 0 24px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-grid > div { display: flex; flex-direction: column; gap: 6px; }
.footer-grid p { max-width: 40ch; font-size: .92rem; }
.footer-grid h4 { color: var(--oro-claro); margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.footer-grid a, .footer-grid span { color: #C9CDE3; text-decoration: none; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .8rem; color: #8B90AE; }

/* Responsivo */
@media (max-width: 960px) {
  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero-art { max-width: 280px; order: -1; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .topbar { font-size: .72rem; }
  .header-inner { flex-wrap: wrap; gap: 6px 10px; height: auto; padding: 10px 0 6px; }
  .logo { font-size: 1.1rem; }
  .lang-switch { margin-left: auto; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 0; justify-content: space-between; }
  .nav a { padding: .4em .7em; font-size: .88rem; }
  .hero-inner { padding: 40px 0 56px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .perks { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .toolbar-right { width: 100%; }
  .toolbar-right input { width: 100%; }
  .section { padding: 48px 0; }
}
@media (max-width: 400px) {
  .logo span b { display: none; }
}
