:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --card: #161616;
  --line: #262626;
  --line-2: #333333;
  --text: #f2f2f2;
  --muted: #8c8c8c;
  --accent: #ffffff;
  --danger: #ff4d4d;
  --ok: #3ddc84;
  --radius: 4px;
  --display: 'Anton', 'Archivo Black', Impact, sans-serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ---------- Barra de anuncio + header ---------- */
.announce { background: var(--accent); color: #000; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .12em; padding: 8px 16px; text-transform: uppercase; }
.header { position: sticky; top: 0; z-index: 50; background: rgba(10,10,10,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { font-family: var(--display); font-size: 30px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.logo span { color: var(--muted); }
.nav { display: flex; gap: 20px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--text); }
.cart-btn { position: relative; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.cart-count { background: var(--accent); color: #000; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 28px; border: 1px solid var(--accent); background: var(--accent); color: #000; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; cursor: pointer; border-radius: var(--radius); transition: opacity .15s, background .15s, color .15s; }
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--text); opacity: 1; }
.btn.small { height: 36px; padding: 0 14px; font-size: 11px; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.block { width: 100%; }

label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; height: 46px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 14px; color: var(--text); outline: none; transition: border-color .15s; }
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--text); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .container { padding-top: 90px; padding-bottom: 90px; position: relative; z-index: 1; }
.hero::before { content: 'CONSTRUCTO'; position: absolute; inset: auto -2% -8% auto; font-family: var(--display); font-size: clamp(120px, 24vw, 360px); color: #141414; line-height: .8; pointer-events: none; white-space: nowrap; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.hero h1 { font-family: var(--display); font-size: clamp(48px, 9vw, 120px); line-height: .9; text-transform: uppercase; max-width: 900px; margin-bottom: 24px; font-weight: 400; }
.hero p { color: var(--muted); max-width: 480px; margin-bottom: 32px; font-size: 16px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.perks div { padding: 22px 20px; border-right: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.perks div:last-child { border-right: 0; }
.perks strong { display: block; color: var(--text); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-bottom: 2px; }

/* ---------- Secciones y catálogo ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-title { font-family: var(--display); font-size: clamp(32px, 5vw, 56px); text-transform: uppercase; line-height: 1; font-weight: 400; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cat-tile { aspect-ratio: 1; background: var(--card); border: 1px solid var(--line); display: flex; align-items: end; padding: 16px; font-family: var(--display); font-size: 24px; text-transform: uppercase; line-height: 1; transition: border-color .15s, background .15s; }
.cat-tile:hover { border-color: var(--text); background: #1c1c1c; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar .input { width: auto; min-width: 180px; height: 42px; }
.toolbar .search { flex: 1; min-width: 200px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { height: 34px; padding: 0 14px; border: 1px solid var(--line-2); background: transparent; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.active { background: var(--text); color: #000; border-color: var(--text); }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 16px; }
.card { display: block; }
.card .media { position: relative; aspect-ratio: 4 / 5; background: var(--card); border: 1px solid var(--line); overflow: hidden; margin-bottom: 12px; }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .media img { transform: scale(1.04); }
.card .badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #000; font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 4px 8px; text-transform: uppercase; }
.card .badge.out { background: #000; color: var(--muted); border: 1px solid var(--line-2); }
.card .brand { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.card .name { font-weight: 600; margin: 2px 0 4px; }
.price { font-weight: 700; }
.price s { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: .9em; }

.placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #222 0%, #121212 60%); }
.placeholder span { font-family: var(--display); font-size: 28px; color: #2e2e2e; text-transform: uppercase; letter-spacing: .05em; text-align: center; padding: 10px; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; border: 1px dashed var(--line-2); }

/* ---------- Página de producto ---------- */
.pdp { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; padding: 40px 0 72px; }
.gallery .main { aspect-ratio: 4 / 5; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 8px; }
.thumbs button { aspect-ratio: 1; border: 1px solid var(--line); background: var(--card); padding: 0; cursor: pointer; overflow: hidden; }
.thumbs button.active { border-color: var(--text); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 56px); text-transform: uppercase; line-height: 1; font-weight: 400; margin: 6px 0 14px; }
.pdp-info .price { font-size: 22px; margin-bottom: 24px; }
.opt-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 22px 0 10px; }
.opt-label span { color: var(--muted); font-weight: 500; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; }
.size-btn { min-height: 46px; padding: 6px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 600; font-size: 13px; border-radius: var(--radius); }
.size-btn:hover:not(:disabled) { border-color: var(--text); }
.size-btn.active { background: var(--text); color: #000; border-color: var(--text); }
.size-btn:disabled { color: #444; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); height: 46px; }
.qty button { width: 42px; background: none; border: 0; cursor: pointer; font-size: 18px; }
.qty input { width: 48px; text-align: center; background: none; border: 0; outline: none; }
.pdp-actions { display: flex; gap: 12px; margin-top: 26px; }
.pdp-actions .btn { flex: 1; }
.desc { color: #bdbdbd; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); white-space: pre-line; }
.ship-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* ---------- Carrito / checkout ---------- */
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; padding: 40px 0 72px; align-items: start; }
.panel { background: var(--bg-2); border: 1px solid var(--line); padding: 24px; border-radius: var(--radius); }
.panel h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 28px; margin-bottom: 18px; }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line .thumb { width: 76px; aspect-ratio: 4/5; background: var(--card); overflow: hidden; }
.line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line .meta { font-size: 12px; color: var(--muted); }
.line .remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; margin-top: 6px; }
.line .qty { height: 34px; margin-top: 6px; }
.line .qty button { width: 32px; }
.line .qty input { width: 36px; }
.totals { margin-top: 18px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.totals .grand { color: var(--text); font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.free-bar { margin: 16px 0 4px; font-size: 13px; color: var(--muted); }
.free-bar .track { height: 4px; background: var(--line); margin-top: 8px; border-radius: 2px; overflow: hidden; }
.free-bar .fill { height: 100%; background: var(--accent); transition: width .3s; }
.error { color: var(--danger); font-size: 14px; margin-top: 12px; min-height: 20px; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 13px; }
.footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .logo { font-size: 24px; color: var(--text); margin-bottom: 8px; display: block; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 120px); background: var(--text); color: #000; padding: 14px 22px; font-weight: 700; font-size: 14px; border-radius: var(--radius); transition: transform .25s; z-index: 100; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pdp, .checkout { grid-template-columns: 1fr; gap: 28px; }
  .perks { grid-template-columns: 1fr; }
  .perks div { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header .container { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 10px 16px; }
  .logo { flex: 1; font-size: 26px; }
  .nav { order: 3; flex-basis: 100%; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 20px 10px; }
  .hero .container { padding-top: 56px; padding-bottom: 56px; }
  .pdp-actions { flex-direction: column; }
}

/* ---------- Carrito lateral ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .25s; }
.drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: var(--bg); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 26px; }
.drawer-x { background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }
.drawer-x:hover { color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 20px; }
.drawer-body .free-bar { margin: 16px 0 6px; }
.drawer-empty { display: grid; place-content: center; gap: 18px; text-align: center; color: var(--muted); }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.drawer-foot .totals { margin: 0 0 6px; }
.drawer-foot .grand { margin: 0; padding-top: 0; border: 0; }
.muted-sm { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.free-bar strong { color: var(--text); }

/* ---------- WhatsApp ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.5); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }

/* ---------- Hover de segunda imagen ---------- */
.card .media .hover-img { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.card:hover .media .hover-img { opacity: 1; }

/* ---------- Guía de tallas ---------- */
.link-btn { background: none; border: 0; color: var(--text); text-decoration: underline; cursor: pointer; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 0; }
.modal { margin: auto; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 40px); background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; }
.modal::backdrop { background: rgba(0,0,0,.75); }
.modal h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 28px; margin-bottom: 14px; }
.modal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.modal th, .modal td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.modal th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-2); }
.modal .note { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ---------- Cupón y rastreo ---------- */
.coupon { display: flex; gap: 8px; margin-top: 16px; }
.coupon .input { height: 42px; text-transform: uppercase; }
.coupon .btn { height: 42px; }
.coupon-ok { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; background: var(--bg); border: 1px dashed var(--line-2); padding: 8px 12px; border-radius: var(--radius); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 24px 0; }
.steps div { border-top: 3px solid var(--line-2); padding-top: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.steps div.done { border-color: var(--text); color: var(--text); }
.related { padding-bottom: 72px; }
