/* =========================================================
   Tienda Nuvel · demo de ecommerce
   ========================================================= */

:root {
  --nv-navy: #13306b;
  --nv-blue: #1d5aa6;
  --nv-sky: #4fb3e8;
  --nv-ice: #eaf4fb;
  --ink: #15233b;
  --soft: #5a6577;
  --line: #e3e8ef;
  --bg: #f6f9fc;
  --white: #fff;
  --oxxo: #e4002b;
  --gold: #f2b705;
  --sans: "Jost", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--white); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
[hidden] { display: none !important; }

.demo-ribbon { background: var(--ink); color: rgba(255, 255, 255, .75); text-align: center; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; padding: 6px 12px; }
.announce { background: linear-gradient(90deg, var(--nv-navy), var(--nv-blue)); color: #fff; text-align: center; font-size: .8rem; padding: 8px 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px;
  border: 0; border-radius: 40px;
  background: var(--nv-navy); color: #fff;
  font-weight: 500; font-size: .9rem;
  transition: background .3s var(--ease), transform .2s;
}
.btn:hover { background: var(--nv-blue); }
.btn:active { transform: scale(.98); }
.btn--light { background: #fff; color: var(--nv-navy); }
.btn--light:hover { background: var(--nv-ice); }
.btn--full { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.7rem; letter-spacing: .02em; color: var(--nv-navy); text-decoration: none; }
.brand sup { font-size: .5em; font-weight: 500; }
.brand--light { color: #fff; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav button { border: 0; background: none; padding: 8px 12px; border-radius: 20px; font-size: .88rem; font-weight: 500; color: var(--soft); transition: .25s; }
.nav button:hover, .nav button.is-active { color: var(--nv-navy); background: var(--nv-ice); }
.header__tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.search { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 30px; background: var(--bg); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--soft); stroke-width: 2; stroke-linecap: round; }
.search input { border: 0; outline: 0; background: none; font: inherit; font-size: .85rem; width: 150px; color: var(--ink); }
.cart-btn { position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--nv-navy); display: grid; place-items: center; }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--nv-sky); color: #fff;
  font-size: .7rem; font-weight: 600; display: grid; place-items: center;
}
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- Banner ---------- */
.banner {
  display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 24px;
  margin: 24px 32px 0;
  padding: 48px 56px;
  border-radius: 24px;
  background: linear-gradient(120deg, var(--nv-navy) 0%, var(--nv-blue) 55%, var(--nv-sky) 100%);
  color: #fff;
  overflow: hidden;
}
.banner__tag { display: inline-block; padding: 5px 12px; border-radius: 20px; background: rgba(255, 255, 255, .18); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.banner h1 { font-size: clamp(1.8rem, 3.4vw, 2.9rem); font-weight: 600; }
.banner p { opacity: .9; margin: 0 0 24px; max-width: 26em; }
.banner__products { display: flex; justify-content: center; align-items: flex-end; gap: 0; }
.banner__products img {
  width: 34%;
  border-radius: 18px;
  box-shadow: 0 30px 50px -25px rgba(0, 0, 0, .45);
  background: #fff;
}
.banner__products img:nth-child(1) { transform: rotate(-6deg) translateX(18px); }
.banner__products img:nth-child(2) { transform: translateY(-14px); z-index: 1; width: 38%; }
.banner__products img:nth-child(3) { transform: rotate(6deg) translateX(-18px); }

/* ---------- Beneficios ---------- */
.perks { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 32px 0; padding: 0; }
.perks li { padding: 16px 18px; border-radius: 14px; background: var(--bg); display: grid; }
.perks strong { font-weight: 600; color: var(--nv-navy); }
.perks span { font-size: .8rem; color: var(--soft); }

/* ---------- Catálogo ---------- */
.catalog { padding: 48px 32px 24px; }
.catalog__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.catalog__head h2 { font-size: 1.6rem; font-weight: 600; margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { padding: 8px 16px; border: 1px solid var(--line); border-radius: 30px; background: #fff; font-size: .82rem; transition: .25s; }
.chips button:hover { border-color: var(--nv-blue); }
.chips button.is-active { background: var(--nv-navy); border-color: var(--nv-navy); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.product {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 18px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.product:hover { box-shadow: 0 20px 40px -24px rgba(19, 48, 107, .35); transform: translateY(-3px); }
.product__img { aspect-ratio: 1; padding: 14px; background: #fff; }
.product__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease); }
.product:hover .product__img img { transform: scale(1.05); }
.badge { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 10px; border-radius: 20px; font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--nv-sky); color: #fff; }
.badge--hot { background: var(--gold); color: var(--ink); }
.product__body { display: flex; flex-direction: column; gap: 4px; padding: 0 16px 16px; flex: 1; }
.product__cat { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--nv-blue); font-weight: 500; }
.product__name { font-size: .92rem; font-weight: 500; line-height: 1.3; margin: 0; }
.product__size { font-size: .78rem; color: var(--soft); }
.stars { color: var(--gold); font-size: .78rem; letter-spacing: 1px; }
.stars span { color: var(--soft); letter-spacing: 0; margin-left: 4px; }
.product__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price { font-weight: 600; font-size: 1.1rem; color: var(--nv-navy); }
.price s { font-weight: 400; font-size: .78rem; color: var(--soft); margin-left: 4px; }
.add {
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: var(--nv-ice); color: var(--nv-navy); font-size: 1.3rem; line-height: 1;
  transition: .25s;
}
.add:hover { background: var(--nv-navy); color: #fff; }
.add.is-added { background: #1f9d55; color: #fff; }
.empty { text-align: center; color: var(--soft); padding: 40px 0; }

/* ---------- Marketplaces y pagos ---------- */
.markets { margin: 32px; padding: 40px 32px; border-radius: 24px; background: var(--bg); text-align: center; }
.markets h2 { font-size: 1.3rem; font-weight: 600; }
.markets p { color: var(--soft); margin: 14px 0 0; font-size: .9rem; }
.markets__row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.mk { padding: 12px 26px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 1.05rem; }
.mk--amazon { color: #232f3e; }
.mk--meli { color: #2d3277; background: #ffe600; border-color: #ffe600; }

.pay-strip { padding: 8px 32px 40px; text-align: center; }
.pay-strip p { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); margin: 0 0 12px; }
.pay-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pm { padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; font-weight: 600; color: var(--ink); background: #fff; }
.pm--oxxo { background: var(--oxxo); border-color: var(--oxxo); color: #fff; }

.footer { background: var(--nv-navy); color: rgba(255, 255, 255, .7); text-align: center; padding: 36px 20px; font-size: .85rem; }
.footer p { margin: 6px 0 0; }

/* ---------- Carrito ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(21, 35, 59, .45); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(400px, 100%);
  display: flex; flex-direction: column;
  background: #fff;
  transform: translateX(100%);
  transition: transform .4s var(--ease);
}
.drawer.is-open { transform: none; box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .3); }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); font-size: 1.4rem; line-height: 1; }
.ship-bar { padding: 14px 22px; background: var(--nv-ice); font-size: .8rem; }
.ship-bar p { margin: 0 0 8px; color: var(--nv-navy); }
.ship-bar span { display: block; height: 5px; border-radius: 4px; background: rgba(19, 48, 107, .12); overflow: hidden; }
.ship-bar i { display: block; height: 100%; width: 0; background: var(--nv-blue); transition: width .4s var(--ease); }
.lines { list-style: none; margin: 0; padding: 8px 22px; overflow-y: auto; flex: 1; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; }
.line__name { font-size: .85rem; font-weight: 500; line-height: 1.3; }
.line__price { font-size: .8rem; color: var(--soft); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; margin-top: 6px; }
.qty button { width: 28px; height: 28px; border: 0; background: none; font-size: 1rem; }
.qty span { min-width: 22px; text-align: center; font-size: .85rem; }
.line__total { font-weight: 600; font-size: .9rem; color: var(--nv-navy); }
.cart-empty { text-align: center; color: var(--soft); padding: 40px 22px; margin: 0; }
.drawer__foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.sum { display: flex; justify-content: space-between; font-size: .9rem; color: var(--soft); }
.sum--total { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 6px 0 10px; }

/* ---------- Checkout ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(21, 35, 59, .55); }
.modal__box {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 30px 28px 26px;
  border-radius: 22px;
  background: #fff;
  animation: pop .35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.x--modal { position: absolute; top: 14px; right: 14px; }
.modal h3 { font-size: 1.35rem; font-weight: 600; padding-right: 40px; }
.co-total { color: var(--soft); margin: 0 0 18px; }
.co-total strong { color: var(--nv-navy); font-size: 1.15rem; }
.methods { display: grid; gap: 10px; margin-bottom: 18px; }
.method {
  display: grid; grid-template-columns: auto 52px 1fr; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 14px;
  cursor: pointer;
  transition: border-color .25s, background .25s;
}
.method:has(input:checked) { border-color: var(--nv-blue); background: var(--nv-ice); }
.method input { accent-color: var(--nv-navy); width: 18px; height: 18px; margin: 0; }
.method__ic { display: grid; place-items: center; width: 52px; height: 34px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.method__ic svg { width: 22px; height: 22px; fill: none; stroke: var(--nv-navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.method__ic--oxxo { background: var(--oxxo); border-color: var(--oxxo); color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .04em; }
.method strong { display: block; font-size: .9rem; font-weight: 500; }
.method small { color: var(--soft); font-size: .76rem; }

.card-demo { margin-bottom: 18px; }
.card-visual {
  position: relative;
  aspect-ratio: 1.6;
  max-width: 300px;
  margin: 0 auto 12px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(130deg, var(--nv-navy), var(--nv-sky));
  color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  box-shadow: 0 20px 40px -24px rgba(19, 48, 107, .6);
}
.card-chip { position: absolute; top: 22px; left: 22px; width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #f6d97a, #c79a2a); }
.card-num { font-size: 1.05rem; letter-spacing: .12em; }
.card-meta { display: flex; justify-content: space-between; font-size: .7rem; letter-spacing: .12em; opacity: .85; }
.note { font-size: .76rem; color: var(--soft); text-align: center; margin: 0 0 12px; }
.msi { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: .85rem; }
.msi select { font: inherit; font-size: .85rem; border: 0; background: none; color: var(--nv-navy); font-weight: 500; }

.done-ic { width: 64px; height: 64px; margin: 6px auto 16px; border-radius: 50%; display: grid; place-items: center; background: #1f9d55; color: #fff; font-size: 1.8rem; }
.done-ic--oxxo { background: var(--oxxo); font-size: .9rem; font-weight: 700; }
#stepDone { text-align: center; }
#stepDone p { color: var(--soft); }
.voucher { margin: 10px 0 20px; padding: 18px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--bg); }
.voucher__label { margin: 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.voucher__ref { margin: 6px 0 12px !important; font-size: 1.35rem; font-weight: 600; letter-spacing: .14em; color: var(--ink) !important; }
.barcode {
  height: 54px; margin: 0 auto 10px; max-width: 280px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px);
}
.voucher__meta { margin: 0; font-size: .82rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 30px;
  background: var(--ink); color: #fff;
  font-size: .85rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav { display: none; }
}
@media (max-width: 760px) {
  .header { padding: 12px 16px; gap: 12px; }
  .search input { width: 90px; }
  .banner { grid-template-columns: 1fr; margin: 16px 16px 0; padding: 32px 24px; }
  .banner__products { order: -1; }
  .perks { grid-template-columns: repeat(2, 1fr); margin: 16px 16px 0; }
  .catalog { padding: 36px 16px 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product__body { padding: 0 12px 12px; }
  .markets { margin: 16px; }
  .pay-strip { padding: 8px 16px 32px; }
}
@media (max-width: 420px) {
  .search { display: none; }
}
