/* =========================================================
   Patachín · Tienda y formulario de compra
   ========================================================= */

.shop main { padding-top: var(--nav-h); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Producto ---------- */
.shop-hero {
  max-width: 1400px; margin: 0 auto; padding: clamp(30px, 5vw, 70px) var(--gut) clamp(40px, 6vw, 90px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); align-items: center;
}
.shop-hero__title { font-family: var(--px); font-size: clamp(52px, 7vw, 104px); margin-bottom: .25em; }
.shop-hero .lead { max-width: 36ch; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 22px 0 18px; }
.price b { font-family: var(--px); font-size: clamp(44px, 5vw, 64px); line-height: 1; color: var(--ink); background: var(--yellow); padding: 4px 14px 8px; box-shadow: 0 0 0 4px var(--ink), 6px 8px 0 4px var(--coral); margin: 4px; }
.price span { color: var(--muted); font-weight: 700; }
.includes { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.includes li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; font-size: 17px; }
.includes li > span { width: 34px; height: 30px; }
.shop-hero__stage { position: relative; }
.stage--shop { height: min(70vh, 640px); }

/* ---------- Checkout ---------- */
.checkout { padding: clamp(60px, 8vw, 110px) 0 clamp(80px, 10vw, 140px);
  background: radial-gradient(circle at 1px 1px, rgba(72,1,62,.08) 1.4px, transparent 1.6px) 0 0 / 22px 22px; }
.checkout__head { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.checkout__head a { color: var(--coral-d); font-weight: 800; }
.checkout__grid {
  max-width: 1260px; margin: clamp(30px, 4vw, 50px) auto 0; padding: 0 var(--gut);
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 3vw, 44px); align-items: start;
}

.order { background: #fff; border-radius: 28px; padding: clamp(20px, 3vw, 44px); box-shadow: 0 0 0 2px rgba(72,1,62,.07), 0 40px 70px -50px rgba(72,1,62,.6); }

/* stepper */
.stepper { list-style: none; padding: 0; margin: 0 0 34px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.stepper button {
  width: 100%; border: 0; background: none; cursor: pointer; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--px); font-size: 14px; color: var(--muted); position: relative;
}
.stepper button:disabled { cursor: default; }
.stepper i { width: 40px; height: 36px; display: grid; place-items: center; padding: 6px; background: #f3eff3; filter: grayscale(1) opacity(.5); transition: filter .2s, background .2s; }
.stepper i svg { width: auto; height: 100%; max-width: 100%; }
.stepper li.is-done i { filter: none; background: var(--mint); }
.stepper li.is-on i { filter: none; background: var(--yellow); box-shadow: 0 0 0 3px var(--ink); }
.stepper li.is-on button { color: var(--ink); font-weight: 700; }
.stepper li:not(:last-child) button::after { content: ""; position: absolute; top: 26px; left: calc(50% + 26px); right: calc(-50% + 26px); height: 4px;
  background: repeating-linear-gradient(90deg, #e6dfe6 0 6px, transparent 6px 10px); }
.stepper li.is-done:not(:last-child) button::after { background: repeating-linear-gradient(90deg, var(--mint-d) 0 6px, transparent 6px 10px); }

/* panels */
.panel { border: 0; margin: 0; padding: 0; min-width: 0; display: none; }
.panel.is-on { display: block; animation: panelIn .35s ease; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.panel__title { font-family: var(--px); font-weight: 700; font-size: clamp(30px, 3.2vw, 44px); color: var(--ink); padding: 0; margin-bottom: 14px; display: flex; align-items: center; gap: 14px; }
.panel__title > span:first-child { font-size: .42em; background: var(--ink); color: #fff; padding: 5px 8px; letter-spacing: .08em; }
.panel__intro { font-size: 18px; max-width: 60ch; }

.q { margin: 0 0 26px; }
.q__label { display: block; font-family: var(--px); font-weight: 600; font-size: 19px; color: var(--ink); margin: 0 0 8px; }
.q__label small { font-family: var(--body); font-weight: 600; font-size: 14px; color: var(--muted); }
.q__label em, .check em { color: var(--coral-d); font-style: normal; }
.q__help { font-size: 15px; color: var(--muted); margin: -4px 0 8px; }
.mt { margin-top: 12px; }

.inp {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); background: #faf7fa; border: 0; border-radius: 12px;
  padding: 12px 14px; box-shadow: inset 0 0 0 2px #e4dbe3; transition: box-shadow .15s, background .15s;
}
.inp:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 4px var(--yellow); }
.inp.is-bad { box-shadow: inset 0 0 0 3px var(--coral); background: #fff5f4; }
textarea.inp { resize: vertical; min-height: 64px; line-height: 1.5; }
.inp::placeholder { color: #a898a5; }
.inp--name { font-family: var(--px); font-size: 26px; text-transform: none; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.row3 { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 0 20px; }
.age { display: flex; gap: 12px; }
.age label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); }
.age .inp { width: 86px; }

/* tarjetas grandes de elección */
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pick { cursor: pointer; position: relative; }
.pick input { position: absolute; opacity: 0; }
.pick__box { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 18px; border-radius: 18px; background: #faf7fa; box-shadow: inset 0 0 0 2px #e4dbe3; transition: all .15s; }
.pick__box i { grid-row: 1 / 3; width: 56px; height: 50px; }
.pick__box b { font-family: var(--px); font-size: 22px; color: var(--ink); }
.pick__box small { color: var(--muted); font-size: 14.5px; line-height: 1.35; }
.pick input:checked + .pick__box { background: var(--butter); box-shadow: inset 0 0 0 3px var(--ink), 6px 7px 0 0 var(--coral); }
.pick input:focus-visible + .pick__box { outline: 3px dashed var(--coral); outline-offset: 4px; }
.chips--big span { font-size: 18px; padding: 10px 16px; }

/* interruptores */
.toggle { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; font-size: 16.5px; line-height: 1.45; }
.toggle input { position: absolute; opacity: 0; }
.toggle__ui { flex: none; width: 52px; height: 28px; margin-top: 1px; background: #e4dbe3; position: relative; box-shadow: inset 0 0 0 3px var(--ink); transition: background .15s; }
.toggle__ui::after { content: ""; position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; background: var(--ink); transition: left .18s steps(3); }
.toggle input:checked + .toggle__ui { background: var(--lime); }
.toggle input:checked + .toggle__ui::after { left: 30px; }
.toggle input:focus-visible + .toggle__ui { outline: 3px dashed var(--coral); outline-offset: 3px; }
.toggle b { font-family: var(--px); font-weight: 600; color: var(--ink); }
.toggle--letter { background: var(--lilac); padding: 16px 18px; border-radius: 16px; margin: 6px 0 26px; }

/* carta */
.paper {
  --lh: 34px; width: 100%; border: 0; resize: vertical; min-height: 420px;
  font-family: "Caveat", var(--hand); font-size: 24px; line-height: var(--lh); color: #24408e;
  padding: 18px 20px 18px 64px; border-radius: 4px;
  background-color: #fffdf6;
  background-image:
    linear-gradient(90deg, transparent 46px, rgba(240,140,160,.55) 46px, rgba(240,140,160,.55) 48px, transparent 48px),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--lh) - 1px), #d3def2 calc(var(--lh) - 1px) var(--lh));
  background-position: 0 0, 0 11px; background-attachment: local;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 20px 40px -30px rgba(72,1,62,.5), inset 0 0 0 2px #efe6d4;
}
.paper:focus { outline: none; box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px var(--yellow); }
.paper::placeholder { color: #9aa7cc; }

/* subida de fotos */
.tips { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tips li { background: #faf7fa; border-radius: 14px; padding: 12px; font-size: 14.5px; font-weight: 700; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; line-height: 1.3; }
.tips i { width: 30px; height: 26px; }
.uploader { margin-top: 12px; }
.drop--big { padding: 34px 24px; justify-content: center; }
.drop--big .drop__ico { width: 64px; height: 54px; }
.uploader--sm .drop { padding: 14px 16px; }
.uploader--sm .drop b { font-size: 18px; }
.uploader--sm .drop__ico { width: 40px; height: 34px; }
.thumbs-up { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.thumbs-up:empty { display: none; }
.thumbs-up li { position: relative; aspect-ratio: 1; background: #fff; padding: 6px; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 20px -12px rgba(72,1,62,.5); rotate: var(--r, 0deg); animation: drop-in .35s cubic-bezier(.2,1.4,.4,1); }
.thumbs-up img { width: 100%; height: 100%; object-fit: cover; }
.thumbs-up li.is-main { box-shadow: 0 0 0 3px var(--ink), 5px 6px 0 3px var(--yellow); }
.thumbs-up li.is-busy img { opacity: .35; }
.thumbs-up li.is-busy::after { content: "…"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--px); font-size: 28px; color: var(--ink); }
.thumbs-up button { position: absolute; width: 28px; height: 28px; border: 0; cursor: pointer; font-family: var(--px); font-size: 16px; line-height: 1; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ink); }
.thumbs-up .rm { top: -8px; right: -8px; background: #fff; color: var(--ink); }
.thumbs-up .mk { bottom: -8px; left: -8px; background: #fff; color: var(--muted); }
.thumbs-up li.is-main .mk { background: var(--yellow); color: var(--ink); }
.uploader__hint { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.uploader:not([data-group="mascota"]) .mk { display: none; }
@keyframes drop-in { from { transform: translateY(-14px) scale(.85); opacity: 0; } }

.q--star { background: var(--butter); padding: 18px; border-radius: 18px; }

.err { margin: 6px 0 0; min-height: 1.2em; font-family: var(--px); color: var(--coral-d); font-size: 16px; }
.err:empty { display: none; }

/* revisión */
.review { margin: 10px 0 24px; background: #faf7fa; border-radius: 20px; padding: 22px 24px; }
.review h4 { font-family: var(--px); font-size: 22px; color: var(--ink); margin: 0 0 12px; }
.review dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; font-size: 15.5px; }
.review dt { font-weight: 800; color: var(--ink-2); }
.review dd { margin: 0; color: var(--text); white-space: pre-line; }
.review dd.miss { color: var(--muted); font-style: italic; }
.review__fotos { display: flex; gap: 6px; flex-wrap: wrap; }
.review__fotos img { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.review button { border: 0; background: none; color: var(--coral-d); font-weight: 800; cursor: pointer; padding: 0; text-decoration: underline; }

.check { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; font-size: 16px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; margin-top: 2px; }
.check a { color: var(--coral-d); }

.order__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 2px dashed #eadfe8; }
.order__nav .btn--ghost { font-size: 22px; }
.order__nav .btn--ghost[hidden] { display: inline-flex !important; visibility: hidden; }
.order__saved { margin: 0; font-size: 14px; color: var(--muted); text-align: center; flex: 1; }

/* resumen lateral */
.summary {
  position: sticky; top: calc(var(--nav-h) + 20px);
  background: #fff; border-radius: 28px; padding: 26px 24px 22px;
  box-shadow: 0 0 0 2px rgba(72,1,62,.07), 0 40px 70px -50px rgba(72,1,62,.6);
}
.summary__device {
  width: 216px; margin: 6px auto 18px; padding: 16px; border-radius: 30px; background: #f4f3f1;
  box-shadow: inset 0 -6px 0 #e1dfdb, 0 18px 30px -18px rgba(0,0,0,.35), 0 0 0 1px #e6e3df;
  position: relative;
}
.summary__device::before { content: ""; position: absolute; top: -5px; left: 50%; width: 90px; height: 6px; translate: -50% 0; background: repeating-linear-gradient(90deg, #e1dfdb 0 22px, transparent 22px 34px); border-radius: 3px; }
.summary__device canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; border: 12px solid #111; border-radius: 10px; background: #fff; }
.summary__name { font-family: var(--px); font-weight: 700; font-size: 26px; text-align: center; color: var(--ink); margin: 0; }
.summary__hint { text-align: center; font-size: 14px; color: var(--muted); margin: 4px 0 16px; }
.summary__lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 12px; padding: 14px 0 0; border-top: 2px dashed #eadfe8; font-size: 15px; }
.summary__lines dt { color: var(--text); } .summary__lines dd { margin: 0; text-align: right; font-weight: 800; color: var(--ink); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding-top: 12px; border-top: 3px solid var(--ink); font-family: var(--px); color: var(--ink); }
.summary__total span { font-size: 20px; } .summary__total b { font-size: 34px; }
.summary__note { margin: 6px 0 0; font-size: 13px; color: var(--muted); text-align: right; }

/* barra móvil */
.paybar { display: none; }

/* confirmación */
.done { padding: calc(var(--nav-h) + 60px) var(--gut) 120px; text-align: center; outline: none; }
.done__card { max-width: 720px; margin: 0 auto; }
.done__px { width: 120px; height: 86px; margin: 0 auto 24px; animation: hop 1.8s steps(1) infinite; }
.demo { background: var(--butter); border-radius: 20px; padding: 22px; margin: 26px 0; text-align: left; box-shadow: inset 0 0 0 2px rgba(72,1,62,.15); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .checkout__grid { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; display: grid; grid-template-columns: 150px 1fr; column-gap: 20px; align-items: center; padding: 18px; }
  .summary__device { grid-row: 1 / 6; width: 150px; padding: 10px; border-radius: 22px; margin: 0; }
  .summary__device canvas { border-width: 8px; }
  .summary__name, .summary__hint { text-align: left; }
  .paybar { display: flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; justify-content: space-between; align-items: center;
    background: var(--ink); color: #fff; font-family: var(--px); padding: 12px 18px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); transform: translateY(150%); transition: transform .3s; }
  .paybar.is-on { transform: none; }
  .checkout { padding-bottom: 150px; }
  .paybar b { color: var(--yellow); font-size: 22px; margin-left: 6px; }
}
@media (max-width: 900px) {
  .shop-hero { grid-template-columns: 1fr; }
  .shop-hero__stage { order: -1; }
  .stage--shop { height: min(52vh, 440px); }
  .shop-hero__copy { text-align: center; }
  .shop-hero .lead { margin-inline: auto; }
  .price { justify-content: center; }
  .includes { max-width: 460px; margin-inline: auto; text-align: left; }
}
@media (max-width: 640px) {
  .stepper { grid-template-columns: repeat(6, 1fr); gap: 2px; margin-bottom: 26px; }
  .stepper span { display: none; }
  .stepper li.is-on span { display: none; }
  .stepper i { width: 38px; height: 34px; }
  .stepper li:not(:last-child) button::after { left: calc(50% + 22px); right: calc(-50% + 22px); top: 24px; }
  .row2, .row3, .cards2 { grid-template-columns: 1fr; }
  .tips { grid-template-columns: 1fr 1fr; }
  .summary { grid-template-columns: 110px 1fr; }
  .summary__device { width: 110px; padding: 7px; border-radius: 16px; }
  .summary__device canvas { border-width: 6px; }
  .summary__lines, .summary__note { display: none; }
  .summary__total b { font-size: 26px; }
  .review dl { grid-template-columns: 1fr; gap: 2px; }
  .review dd { margin-bottom: 10px; }
  .order { border-radius: 20px; }
  .order__nav .btn--px { padding: 14px 16px; font-size: 17px; }
  .paper { padding-left: 44px; font-size: 22px; background-image:
    linear-gradient(90deg, transparent 30px, rgba(240,140,160,.55) 30px, rgba(240,140,160,.55) 32px, transparent 32px),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--lh) - 1px), #d3def2 calc(var(--lh) - 1px) var(--lh)); }
}

/* ---------- Envío con Correos ---------- */
.ship { display: grid; gap: 12px; }
.ship__opt { cursor: pointer; position: relative; display: block; }
.ship__opt input { position: absolute; opacity: 0; }
.ship__box { display: grid; gap: 3px; padding: 16px 18px 16px 52px; border-radius: 16px; background: #faf7fa; box-shadow: inset 0 0 0 2px #e4dbe3; position: relative; transition: all .15s; }
.ship__box::before { content: ""; position: absolute; left: 18px; top: 19px; width: 18px; height: 18px; background: #fff; box-shadow: 0 0 0 3px var(--ink); }
.ship__opt input:checked + .ship__box { background: var(--mint); box-shadow: inset 0 0 0 3px var(--ink), 5px 6px 0 0 var(--lime-d); }
.ship__opt input:checked + .ship__box::before { background: var(--ink); box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 4px #fff; }
.ship__opt input:focus-visible + .ship__box { outline: 3px dashed var(--coral); outline-offset: 4px; }
.ship__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ship__head b { font-family: var(--px); font-size: 20px; color: var(--ink); }
.ship__head strong { font-family: var(--px); font-size: 22px; color: var(--ink); white-space: nowrap; }
.ship__box small { font-weight: 800; color: var(--ink-2); font-size: 14px; }
.ship__desc { font-size: 14.5px; color: var(--muted); line-height: 1.4; }
.ship__note { margin: 10px 0 0; font-size: 14.5px; background: var(--butter); padding: 10px 14px; border-radius: 12px; }

/* ---------- Plazo urgente ---------- */
.rush { background: #fff8e0; border-radius: 20px; padding: 18px; box-shadow: inset 0 0 0 2px #f3e3a3; }
.pick--rush input:checked + .pick__box { background: var(--yellow); }
.pick__box b span { white-space: nowrap; }
#eta { color: var(--ink-2); font-weight: 700; }

/* Aviso precontractual antes de pagar */
.legal-note { background: var(--pink); border-radius: 16px; padding: 14px 18px; margin: 0 0 18px; font-size: 15.5px; line-height: 1.5; box-shadow: inset 0 0 0 2px rgba(72,1,62,.12); }
.legal-note a { color: var(--coral-d); font-weight: 800; }
