:root {
  --bg: #0d0d10;
  --surface: #16161b;
  --surface-2: #1e1e25;
  --line: #2a2a33;
  --text: #f3f1ea;
  --muted: #a3a1a8;
  --gold: #d4af37;
  --gold-2: #f1d27a;
  --gold-dark: #9c7c1c;
  --danger: #ef5b5b;
  --ok: #3ecf8e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 6vw, 3rem); }
h2 { font-size: clamp(1.35rem, 4.5vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.gold { color: var(--gold); }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 20px; padding-bottom: 60px; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(13, 13, 16, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: .3px; display: flex; align-items: center; gap: 6px; }
.brand-mark { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--text); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--gold); }
.cart-link { position: relative; display: flex; }
.badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--gold); color: #111; font-size: .7rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}
@media (max-width: 600px) { .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 12px 22px; font: inherit; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 50%, var(--gold-dark));
  color: #141210; transition: transform .1s, filter .2s;
  text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #5a2a2a; }
.btn-wa { background: #25d366; color: #fff; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 4px; text-decoration: underline; }
.link-btn:hover { color: var(--danger); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 48px 22px 40px; margin-bottom: 18px;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(212, 175, 55, .22), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(212, 175, 55, .10), transparent 60%),
    linear-gradient(160deg, #1a1915, #0f0f12);
  border: 1px solid #2e2a1d;
}
.hero .eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-size: .78rem; font-weight: 700; }
.hero h1 { margin: 10px 0 12px; max-width: 14ch; }
.hero h1 span { background: linear-gradient(90deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #cfccc4; max-width: 46ch; font-size: 1.05rem; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
@media (min-width: 800px) { .hero { padding: 80px 56px; } }

/* Benefits */
.benefits { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 36px; }
.benefit { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.benefit .ic { font-size: 1.5rem; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(212, 175, 55, .12); border-radius: 12px; flex: none; }
.benefit strong { display: block; }
.benefit span { color: var(--muted); font-size: .88rem; }
@media (min-width: 700px) { .benefits { grid-template-columns: repeat(3, 1fr); } }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin: 8px 0 16px; }
.section-head h2 { margin: 0; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1020px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: #4a3f1f; transform: translateY(-2px); }
.card .img { aspect-ratio: 1; background: #111; position: relative; display: block; }
.card .img img { width: 100%; height: 100%; object-fit: cover; }
.tag-off { position: absolute; top: 8px; left: 8px; background: var(--gold); color: #111; font-weight: 800; font-size: .72rem; padding: 3px 8px; border-radius: 999px; }
.card .body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .cat { color: var(--gold); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.card h3 { font-size: .98rem; margin: 0; color: var(--text); }
.card .desc { color: var(--muted); font-size: .84rem; margin: 0; flex: 1; }
.price { font-weight: 800; font-size: 1.1rem; color: var(--text); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .85rem; font-weight: 400; margin-left: 6px; }
.card .btn { margin-top: 8px; padding: 10px 12px; font-size: .88rem; }

/* Filters */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.search { position: relative; }
.search input { padding-left: 42px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .9rem; cursor: pointer;
}
.chip.active, .chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active { background: rgba(212, 175, 55, .12); }
.empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.empty .big { font-size: 3rem; }

/* Forms */
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 600px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.check input { width: auto; }
.error-box { background: rgba(239, 91, 91, .1); border: 1px solid #5a2a2a; color: #ffb4b4; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; }

/* Product detail */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.detail { display: grid; gap: 22px; }
@media (min-width: 860px) { .detail { grid-template-columns: 1.1fr 1fr; gap: 40px; } }
.gallery .main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: #111; border: 1px solid var(--line); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { flex: none; width: 70px; height: 70px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #111; }
.thumbs button.active { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail .price { font-size: 1.6rem; }
.opt-group { margin: 18px 0; }
.opt-group .chips { flex-wrap: wrap; overflow: visible; }
.info-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.info-list li { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.buy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.buy-row .btn { flex: 1; min-width: 160px; }

/* Qty stepper */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.qty button { width: 38px; height: 40px; border: 0; background: none; color: var(--text); font-size: 1.2rem; cursor: pointer; }
.qty button:hover { color: var(--gold); }
.qty input { width: 44px; text-align: center; border: 0; background: none; padding: 0; height: 40px; border-radius: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cart & checkout */
.layout-2 { display: grid; gap: 20px; }
@media (min-width: 900px) { .layout-2 { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.sticky { position: sticky; top: 76px; }
.cart-item { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: #111; }
.cart-item .top { display: flex; justify-content: space-between; gap: 8px; }
.cart-item .name { font-weight: 600; color: var(--text); }
.cart-item .bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; flex-wrap: wrap; }
.sum-line { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.sum-line.total { color: var(--text); font-weight: 800; font-size: 1.2rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.free-bar { background: var(--surface-2); border-radius: 999px; height: 6px; overflow: hidden; margin: 6px 0 2px; }
.free-bar > div { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold-2)); }
.mini-item { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: .9rem; }
.mini-item img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.mini-item .grow { flex: 1; }

.success { text-align: center; max-width: 560px; margin: 20px auto; }
.success .check-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: rgba(212, 175, 55, .15); color: var(--gold); font-size: 2.2rem; }
.order-code { font-size: 2rem; font-weight: 800; color: var(--gold); letter-spacing: 1px; margin: 4px 0 14px; }

/* Content pages */
.content { max-width: 760px; }
.content h2 { margin-top: 28px; color: var(--gold); font-size: 1.2rem; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--gold); font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: '–'; }
details.faq p { padding: 0 16px 14px; margin: 0; color: #cfccc4; }
table.ship { width: 100%; border-collapse: collapse; margin: 10px 0 20px; }
table.ship td, table.ship th { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.ship th { color: var(--muted); font-weight: 600; font-size: .85rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: #0a0a0c; padding: 30px 0 90px; }
.footer-in { display: grid; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { color: var(--muted); font-size: .92rem; }
.footer-links a:hover { color: var(--gold); }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .35);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translate(-50%, 20px);
  background: var(--surface-2); border: 1px solid var(--gold-dark); color: var(--text);
  padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin */
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.tabs .chip { border-radius: 10px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 1.3rem; }
.stat span { color: var(--muted); font-size: .82rem; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.order-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; }
.order-head .who { flex: 1; min-width: 160px; }
.order-body { border-top: 1px solid var(--line); padding: 12px 14px; font-size: .92rem; }
.status { font-size: .75rem; font-weight: 800; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; letter-spacing: .5px; }
.status.nuevo { background: rgba(212, 175, 55, .18); color: var(--gold-2); }
.status.enviado { background: rgba(80, 150, 255, .16); color: #8fbaff; }
.status.entregado { background: rgba(62, 207, 142, .15); color: var(--ok); }
.order select { width: auto; padding: 8px 12px; }
.prod-row { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.prod-row img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.prod-row .grow { flex: 1; min-width: 0; }
.prod-row .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.img-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.img-item { position: relative; width: 92px; }
.img-item img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.img-item .ops { display: flex; justify-content: space-between; margin-top: 4px; }
.img-item .ops button { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: .8rem; padding: 2px 7px; }
.img-item .ops button:hover { border-color: var(--gold); }
.warn { background: rgba(212, 175, 55, .1); border: 1px solid var(--gold-dark); padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; font-size: .92rem; }
.login-box { max-width: 380px; margin: 40px auto; }
