/* Onawa — pago (/finalizar-compra/), «tu pedido» (/pedido/) y tienda (/tienda/). Sobre crema (.sub-page, formaciones.css).
   Colores y letras: los de styles.css. Por fotograma solo transform/opacity. */

.sub-page .btn--brown { background: var(--brown); color: var(--cream); }
.sub-page .btn--line { box-shadow: inset 0 0 0 1px rgba(22, 17, 13, .28); color: var(--ink); background: transparent; }
.sub-page .btn[disabled] { opacity: .5; cursor: default; }
.sub-page main a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(22, 17, 13, .35); }

/* ── Finalizar compra ─────────────────────────────────────────────── */
.co { max-width: 1180px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); padding-bottom: clamp(64px, 9vw, 120px); color: var(--ink); min-height: 78svh; }
.co__head { padding: 26px 0 22px; }
.co__t { font-size: clamp(36px, 5vw, 60px); line-height: 1; letter-spacing: -.045em; font-weight: 800; margin-top: 10px; }
.co__empty { display: grid; gap: 18px; justify-items: start; padding: 28px; border-radius: 22px; background: var(--paper); box-shadow: var(--lift); font-size: 18px; }

.co__grid { display: grid; gap: 18px; align-items: start; }
.co__grid[hidden], .co__empty[hidden] { display: none; }
.co__main { display: grid; gap: 18px; min-width: 0; }
.co__card { min-width: 0; padding: clamp(20px, 2.6vw, 30px); border-radius: 22px; background: var(--paper); box-shadow: var(--lift); }
.co__card h2 { font-size: 21px; letter-spacing: -.02em; font-weight: 700; margin-bottom: 16px; }
.co__card h2 i, .fld span i { font-style: normal; font-weight: 400; color: rgba(22, 17, 13, .55); font-size: .86em; letter-spacing: 0; }
.co__card--info { background: rgba(255, 250, 243, .55); box-shadow: inset 0 0 0 1px var(--line-d); }
.co__card--info h2 { margin-bottom: 6px; }
.co__card--info p { color: var(--ink-soft); font-size: 16px; }

.co__fields { display: grid; gap: 14px; grid-template-columns: 1fr; }
.co__fields[hidden] { display: none; }
.fld { display: grid; gap: 6px; min-width: 0; align-content: start; }
.fld > span { font-size: 14.5px; font-weight: 600; color: rgba(22, 17, 13, .78); }
.fld input, .fld textarea, .co__couponrow input {
  width: 100%; min-width: 0; height: 52px; padding: 0 15px; border: 0; border-radius: 13px;
  background: #fff; box-shadow: inset 0 0 0 1px rgba(22, 17, 13, .2); color: var(--ink);
  font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none;
  transition: box-shadow .2s;
}
.fld textarea { height: auto; min-height: 96px; padding: 13px 15px; line-height: 1.45; resize: vertical; }
.fld input::placeholder, .fld textarea::placeholder, .co__couponrow input::placeholder { color: rgba(22, 17, 13, .42); }
.fld input:focus-visible, .fld textarea:focus-visible, .co__couponrow input:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--brown); border-radius: 13px; }
.fld input.is-bad { box-shadow: inset 0 0 0 2px #b3261e; }
.fld em, .co__err { font-style: normal; font-size: 14px; color: #a1231c; min-height: 0; }
.fld em:empty, .co__err:empty { display: none; }
.co__err { display: block; margin-top: 8px; }

/* Entrega: dos opciones grandes */
.dlv { display: grid; gap: 10px; margin-bottom: 18px; }
.dlv__o, .place { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 15px; background: #fff; box-shadow: inset 0 0 0 1px rgba(22, 17, 13, .2); cursor: pointer; transition: box-shadow .2s, background-color .2s; }
.dlv__o input, .place input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--brown); }
.dlv__o span, .place span { display: grid; gap: 1px; min-width: 0; }
.dlv__o b, .place b { font-weight: 600; font-size: 16.5px; }
.dlv__o small, .place small { font-size: 14px; color: rgba(22, 17, 13, .62); }
.dlv__o:has(input:checked), .place:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brown); background: #fffdf9; }
.dlv__o:has(input:focus-visible), .place:has(input:focus-visible) { outline: 2px solid var(--ray-d); outline-offset: 2px; }
.places { display: grid; gap: 8px; }
.co__hint { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 12px; }
.co__alert { grid-column: 1 / -1; padding: 12px 14px; border-radius: 12px; background: #fbe4dd; color: #7a2416; font-size: 15px; line-height: 1.45; }

/* Resumen */
.co__sumhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.co__edit { border: 0; background: none; padding: 6px 0; font: inherit; font-size: 15px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.co__lines { list-style: none; margin: 0; padding: 0; display: grid; }
.co__lines li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line-d); }
.co__q { min-width: 28px; height: 28px; padding: 0 6px; display: grid; place-items: center; border-radius: 9px; background: rgba(63, 44, 31, .09); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.co__n { display: grid; gap: 1px; min-width: 0; }
.co__n b { font-weight: 600; font-size: 16px; line-height: 1.3; }
.co__n small { font-size: 14px; color: rgba(22, 17, 13, .62); }
.co__n em { font-style: normal; font-size: 14px; color: #a1231c; }
.co__p { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.co__lines li.is-bad b { text-decoration: line-through; text-decoration-color: rgba(22, 17, 13, .4); }
.is-loading .co__totals, .is-loading .co__lines { opacity: .55; transition: opacity .2s .15s; }

.co__coupon { padding: 14px 0; border-bottom: 1px solid var(--line-d); }
.co__coupon summary { cursor: pointer; font-size: 15.5px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.co__coupon summary::-webkit-details-marker { display: none; }
.co__coupon summary::after { content: '+'; font-size: 22px; font-weight: 400; line-height: 1; }
.co__coupon[open] summary::after { content: '−'; }
.co__couponrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.co__couponrow input { height: 46px; }
.co__couponmsg { font-size: 14.5px; margin-top: 8px; color: #3d6b2a; }
.co__couponmsg.is-bad { color: #a1231c; }
.co__couponmsg:empty { display: none; }

.co__totals { margin: 0; padding: 14px 0 4px; display: grid; gap: 8px; }
.co__totals div { display: flex; justify-content: space-between; gap: 16px; font-size: 16px; color: rgba(22, 17, 13, .78); }
.co__totals dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.co__totals small { font-size: 13px; color: rgba(22, 17, 13, .55); font-weight: 400; }
.co__totals .co__total { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line-d); font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); align-items: baseline; }

.co__accept { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 15px; line-height: 1.45; color: rgba(22, 17, 13, .8); cursor: pointer; }
.co__accept input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--brown); }
.co__pay { width: 100%; justify-content: center; margin-top: 16px; height: 58px; font-size: 18px; font-variant-numeric: tabular-nums; }
.co__msg { margin-top: 12px; font-size: 15px; color: #a1231c; }
.co__msg:empty { display: none; }
.co__safe { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; line-height: 1.45; color: rgba(22, 17, 13, .62); }
.co__safe svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 620px) {
  .co__fields { grid-template-columns: 1fr 1fr; }
  .fld--wide { grid-column: 1 / -1; }
  .fld--cp { max-width: 220px; }
  .dlv { grid-template-columns: 1fr 1fr; }
  .places { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .co__grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); gap: 26px; }
  .co__side { position: sticky; top: 104px; }
}

/* ── Tu pedido ────────────────────────────────────────────────────── */
.ord { max-width: 980px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); padding-bottom: clamp(64px, 9vw, 120px); color: var(--ink); min-height: 70svh; }
.ord__wait { display: grid; justify-items: center; gap: 18px; padding: 90px 0; font-size: 18px; color: var(--ink-soft); }
.ord__wait[hidden], .ord__box[hidden] { display: none; }
.ord__spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(63, 44, 31, .18); border-top-color: var(--brown); animation: ord-spin .9s linear infinite; }
@keyframes ord-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ord__spin { animation-duration: 2.4s; } }
.ord__box { padding-top: 30px; }
.ord__t { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin-top: 12px; text-wrap: balance; }
.ord__lead { margin-top: 16px; max-width: 60ch; font-size: 18px; color: var(--ink-soft); }
.ord__lead b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.ord__test { margin-top: 18px; padding: 12px 16px; border-radius: 13px; background: #fbe9c8; color: #6b4a12; font-size: 15px; max-width: 60ch; }
.ord__grid { display: grid; gap: 18px; margin-top: 28px; align-items: start; }
.ord__grid > div { display: grid; gap: 18px; }
.ord__grid > div:empty { display: none; }
.ord__card { padding: clamp(20px, 2.6vw, 28px); border-radius: 22px; background: var(--paper); box-shadow: var(--lift); }
.ord__card h2 { font-size: 20px; letter-spacing: -.02em; font-weight: 700; margin-bottom: 10px; }
.ord__card p { font-size: 16.5px; line-height: 1.5; }
.ord__card p + p { margin-top: 8px; }
.ord__soft { color: var(--ink-soft); }
.ord__back { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
@media (min-width: 820px) {
  .ord__grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
  .ord__grid > .ord__sum:only-child { grid-column: 1 / -1; max-width: 520px; }
}

/* ── Tienda: listado ──────────────────────────────────────────────── */
.shop, .pd { max-width: 1320px; margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); padding-bottom: clamp(64px, 9vw, 120px); color: var(--ink); }
.shop__head { padding: 30px 0 8px; max-width: 900px; }
.shop__t { font-size: clamp(42px, 6.6vw, 88px); line-height: .96; letter-spacing: -.045em; font-weight: 800; margin-top: 12px; text-wrap: balance; }
.shop__t em { font-style: normal; color: var(--ray-d); font-weight: 500; }
.shop__lead { margin-top: 18px; max-width: 58ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); }
.shop__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.sub-page main .shop__chips a { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(22, 17, 13, .2); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .3s; }
@media (hover: hover) { .sub-page main .shop__chips a:hover { background: rgba(22, 17, 13, .06); } }
.shop__sec { padding-top: clamp(40px, 5vw, 68px); scroll-margin-top: 80px; }
.shop__sec[hidden] { display: none; }
.shop__sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 20px; }
.shop__h { font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -.035em; font-weight: 700; line-height: 1; }
.shop__sechead p { color: var(--ink-soft); font-size: 16px; }
.shop__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; min-width: 0; border-radius: 20px; background: var(--paper); box-shadow: var(--lift); overflow: hidden; }
.pcard[hidden] { display: none; }
.pcard__img { display: block; aspect-ratio: 1; background: #fff; }
.pcard__img img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform .6s var(--ease); }
@media (hover: hover) { .pcard:hover .pcard__img img { transform: scale(1.04); } }
.pcard__body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 14px 14px 16px; }
.pcard__name { font-size: 16.5px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.sub-page main .pcard__name a { text-decoration: none; }
.pcard__meta { font-size: 14px; color: rgba(22, 17, 13, .6); }
.pcard__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; }
.pcard__price { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcard__foot .btn { height: 42px; padding: 0 16px; }
/* Cafés y packs en la tienda (29-11): la bolsa sobre el color de su origen; el pack, con su foto a sangre. */
.pcard--coffee .pcard__img { position: relative; aspect-ratio: 1 / 1.08; background: var(--tint, var(--dark)); }
.pcard--coffee .pcard__img img { position: absolute; inset: 0; margin: auto; width: auto; height: 84%; padding: 0; border-radius: 6px; box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .6); }
/* Packs: las mismas bolsas 3D de la portada (imagen con fondo transparente) sobre su mismo degradado marrón. */
.pcard--pack .pcard__img { aspect-ratio: 832 / 978; background: radial-gradient(78% 60% at 50% 46%, #3b2718 0%, #24170e 58%, #1a110a 100%); }
.pcard--pack .pcard__img img { object-fit: cover; padding: 0; }
.pcard__price small { font-size: 13px; font-weight: 500; color: rgba(22, 17, 13, .6); }
.pcard__lleva { font-size: 14px; line-height: 1.4; color: rgba(22, 17, 13, .78); margin-top: 4px; }
.pcard__lleva:empty { display: none; }
.pcard.is-out .pcard__img { opacity: .6; }
.sub-page main a.btn.btn--brown { text-decoration: none; }
@media (min-width: 700px) { .shop__grid--packs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shop__ship { margin-top: clamp(36px, 5vw, 60px); padding: 18px 22px; border-radius: 18px; background: rgba(255, 250, 243, .55); box-shadow: inset 0 0 0 1px var(--line-d); color: var(--ink-soft); font-size: 16px; }
@media (min-width: 700px) { .shop__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } .pcard__body { padding: 18px 18px 20px; } }
@media (min-width: 1080px) { .shop__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

/* ── Tienda: ficha ────────────────────────────────────────────────── */
.pd .crumbs { padding-left: 0; padding-right: 0; }
.pd__grid { display: grid; gap: 22px; margin-top: 20px; align-items: start; }
.pd__media { border-radius: 26px; background: #fff; box-shadow: var(--lift); aspect-ratio: 1; overflow: hidden; }
.pd__media img { width: 100%; height: 100%; object-fit: contain; padding: 7%; }
.pd__body { min-width: 0; }
.pd__t { font-size: clamp(32px, 4.4vw, 56px); line-height: 1; letter-spacing: -.04em; font-weight: 800; margin-top: 10px; text-wrap: balance; }
.pd__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-top: 16px; }
.pd__price[hidden] { display: none; }
.pd__price b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pd__price small { font-size: 15px; color: rgba(22, 17, 13, .6); }
.pd__add { margin-top: 18px; min-width: min(100%, 300px); justify-content: center; height: 58px; font-size: 17px; }
.pd__add[hidden] { display: none; }
.pd__gone { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #fbe9c8; color: #6b4a12; font-size: 16px; }
.pd__perks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15.5px; color: var(--ink-soft); }
.pd__perks li { padding-left: 22px; position: relative; }
.pd__perks li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--ray-d); }
.pd__text { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line-d); display: grid; gap: 12px; max-width: 66ch; }
.pd__text p { font-size: 17px; line-height: 1.6; color: rgba(22, 17, 13, .82); }
.pd__text h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin-top: 8px; }
.pd__specs { margin: 24px 0 0; display: grid; max-width: 66ch; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-d); overflow: hidden; }
.pd__specs div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line-d); font-size: 15.5px; }
.pd__specs div:first-child { border-top: 0; }
.pd__specs dt { font-weight: 600; }
.pd__specs dd { margin: 0; color: rgba(22, 17, 13, .78); }
.pd__more { padding-top: clamp(48px, 6vw, 84px); }
@media (min-width: 860px) {
  .pd__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 64px); }
  .pd__media { position: sticky; top: 104px; }
}
