:root {
  --bg: #0b0b0d;
  --bg2: #141418;
  --card: #18181d;
  --line: #2a2a31;
  --text: #f3f1ee;
  --muted: #a3a1a8;
  --accent: #ff7a2a;
  --accent2: #ffb23e;
  --grad: linear-gradient(135deg, #ffb23e, #ff4d1f);
  --ok: #3ccf8e;
  --warn: #ffcc4d;
  --bad: #ff5d5d;
  --pastel: linear-gradient(135deg, #ff9fd1, #ffd27a 35%, #8fe3c8 65%, #9fb8ff);
  --r: 16px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Bricolage Grotesque', var(--font);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-top: 24px; padding-bottom: 64px; outline: none; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11,11,13,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: .04em; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand img { border-radius: 9px; }
.brand.small { font-size: 1.05rem; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a.on { color: var(--text); background: var(--bg2); }
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--grad); color: #160800; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .cart-btn { margin-left: auto; }
}

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 22px; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--grad); color: #1a0900; transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg2); }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }

/* Home */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 24px 0 40px; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.hero .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hero-art { position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,11,13,.5), transparent 40%); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 8px; } .hero-art { order: -1; aspect-ratio: 4/3; } }

.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 48px; }
.cat { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; padding: 24px; border-radius: var(--r); text-decoration: none; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.cat::before { content: ''; position: absolute; inset: 0; opacity: .16; }
.cat.fig::before { background: var(--grad); }
.cat.acc::before { background: var(--pastel); opacity: .22; }
.cat h3 { font-size: 1.6rem; position: relative; }
.cat p { position: relative; margin: 0; color: var(--muted); }
.cat .arrow { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.cat:hover { border-color: #3b3b44; }
@media (max-width: 600px) { .cats { grid-template-columns: 1fr; } .cat { min-height: 150px; } }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 48px 0 0; }
.perk { padding: 18px; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); }
.perk strong { display: block; margin-bottom: 4px; }
.perk span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .perks { grid-template-columns: 1fr; } }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head a { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }

/* Grilla de productos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.card { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--r); overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: #3b3b44; }
.card .ph { aspect-ratio: 1; background: #fff; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .name { font-weight: 600; font-size: .98rem; line-height: 1.3; }
.card .price { font-family: var(--display); font-size: 1.2rem; font-weight: 800; margin-top: auto; }
.tag { display: inline-block; align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgba(255,122,42,.15); color: var(--accent2); }
.tag.out { background: rgba(255,93,93,.12); color: var(--bad); }
.tag.pastel { background: rgba(159,184,255,.15); color: #c8d4ff; }

/* Producto */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; gap: 20px; } }
.gallery .main { aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { flex: 0 0 72px; height: 72px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #fff; cursor: pointer; }
.thumbs button.on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp .price { font-family: var(--display); font-size: 2.2rem; font-weight: 800; margin: 4px 0 2px; }
.pdp .desc { color: #d6d3d0; white-space: pre-line; margin: 16px 0; }
.stock { font-size: .92rem; margin-bottom: 18px; }
.stock.ok { color: var(--ok); } .stock.low { color: var(--warn); } .stock.out { color: var(--bad); }
.buy { display: flex; gap: 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 42px; height: 46px; border: 0; background: var(--bg2); cursor: pointer; font-size: 1.2rem; }
.qty span { min-width: 40px; text-align: center; font-weight: 600; }
.pdp .info { margin-top: 24px; display: grid; gap: 8px; font-size: .92rem; color: var(--muted); }

/* Formularios */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .88rem; font-weight: 500; color: #d6d3d0; }
.field .hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); outline: none; min-height: 46px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,42,.18); }
textarea { min-height: 90px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row, .row3 { grid-template-columns: 1fr; } }

/* Carrito / checkout */
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.box + .box { margin-top: 16px; }
.box h3 { font-size: 1.15rem; margin-bottom: 14px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: #fff; }
.line .pers { font-size: .85rem; color: var(--accent2); }
.line .right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.sum { display: grid; gap: 8px; }
.sum div { display: flex; justify-content: space-between; }
.sum .total { font-family: var(--display); font-weight: 800; font-size: 1.4rem; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--bg2); }
.opt:has(input:checked) { border-color: var(--accent); background: rgba(255,122,42,.07); }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.opt .t { flex: 1; }
.opt .t small { display: block; color: var(--muted); }
.opt .p { font-weight: 700; white-space: nowrap; }
.mp-note { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); margin-top: 10px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: .92rem; margin-bottom: 14px; }
.alert.err { background: rgba(255,93,93,.12); color: #ffb3b3; }
.alert.info { background: rgba(255,178,62,.1); color: #ffd79a; }
.alert.ok { background: rgba(60,207,142,.12); color: #a6f0cf; }

/* Estados */
.empty { text-align: center; padding: 60px 16px; }
.empty p { color: var(--muted); }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.st-pendiente { background: rgba(255,204,77,.15); color: var(--warn); }
.st-pagado { background: rgba(60,207,142,.15); color: var(--ok); }
.st-enviado, .st-entregado { background: rgba(159,184,255,.15); color: #c8d4ff; }
.st-cancelado { background: rgba(255,93,93,.12); color: var(--bad); }
.skel { background: linear-gradient(90deg, var(--bg2), #1d1d23, var(--bg2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* Info */
.prose { max-width: 720px; }
.prose h2 { margin-top: 32px; }
.prose p, .prose li { color: #d6d3d0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 90px; background: #08080a; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot p { font-size: .9rem; margin: 8px 0 0; }
.foot-links { display: grid; gap: 6px; font-size: .92rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.wa-float { position: fixed; right: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 30; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #f3f1ee; color: #111; padding: 12px 18px; border-radius: 12px; font-weight: 600; transition: .2s; z-index: 40; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
