/* KAMI · base que comparten las tres versiones.
   Cada versión define sus tokens (--bg, --surface, --text, --accent, fuentes y radios) y su propio concepto encima. */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #FF5FA2; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 18px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 22px; height: 22px; flex: none; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border: 0; border-radius: var(--btn-radius, 14px); font-weight: 700; font-size: 17px; text-decoration: none; transition: transform .15s cubic-bezier(.25,1,.5,1), filter .15s, background .2s; }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: var(--on-accent, #111); }
.btn-accent:hover { filter: brightness(1.07); }
.btn-block { width: 100%; }

/* ---------- Tallas ---------- */
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.size { min-width: 56px; height: 48px; padding: 0 12px; background: transparent; border: 1.5px solid var(--line-strong, var(--line)); border-radius: var(--size-radius, 12px); font-weight: 600; font-size: 16px; transition: background .15s, color .15s, border-color .15s; }
.size:hover { border-color: var(--text); }
.size[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.hint { min-height: 1.4em; margin: 8px 0 0; font-size: 15px; color: var(--hint, var(--accent)); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Capas ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(6,5,10,.6); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }

/* ---------- Carrito ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .45s cubic-bezier(.16,1,.3,1); }
.drawer.on { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font: var(--drawer-title, 800 28px/1 var(--font-display)); }
.drawer-close { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: 12px; }
.drawer-close:hover { background: var(--surface-2); }
#shipMeter { padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 15px; }
.meter { height: 7px; margin-top: 9px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); transition: width .45s cubic-bezier(.16,1,.3,1); }
#cartItems { flex: 1; overflow-y: auto; padding: 4px 22px 16px; }
.cart-empty { padding: 48px 8px; text-align: center; color: var(--muted); }
.line { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 70px; height: 88px; object-fit: cover; border-radius: 10px; }
.line h3 { margin: 0; font: 700 17px/1.2 var(--font-body); }
.line .meta { margin-top: 3px; font-size: 14px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1.5px solid var(--line); border-radius: 10px; }
.qty button { width: 36px; height: 36px; background: none; border: 0; font-size: 18px; }
.qty span { min-width: 22px; text-align: center; font-size: 15px; }
.line .lp { align-self: start; font-weight: 700; }
.upsell { margin-top: 18px; }
.upsell h4 { margin: 0 0 4px; font-size: 16px; }
.upsell > p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.up-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; margin-bottom: 8px; padding: 9px; border-radius: 12px; background: var(--surface-2); }
.up-item img { width: 52px; height: 65px; object-fit: cover; border-radius: 8px; }
.up-item b { display: block; font-size: 15px; font-weight: 600; }
.up-item span { font-size: 14px; color: var(--muted); }
.up-item button { height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 15px; }
#cartFoot { padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.sum { display: flex; justify-content: space-between; padding: 3px 0; font-size: 15px; }
.sum.disc { color: var(--disc, var(--accent)); }
.sum.total { padding-top: 10px; font-size: 20px; font-weight: 800; }
#cartFoot .btn { margin-top: 12px; }
.secure { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Aviso ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 90; max-width: calc(100% - 32px); padding: 13px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px; box-shadow: 0 18px 40px rgba(0,0,0,.35); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s, transform .35s cubic-bezier(.16,1,.3,1); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

[data-cart-count]:empty { display: none; }
.bump { animation: bump .45s cubic-bezier(.16,1,.3,1); }
@keyframes bump { 40% { transform: scale(1.35); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
