/* Tienda KROMA (precio, carrito y checkout) — se apoya en assets/css/styles.css */

[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.u { text-decoration: underline; }
.btn--sm { padding: .62rem 1.1rem; font-size: .88rem; }
.btn--block { width: 100%; }

/* ---------- Header: moneda + carrito ---------- */
.shop-actions { display: flex; align-items: center; gap: .7rem; }
@media (min-width: 781px) {
  .site-header__inner .nav > .shop-actions { grid-column: 3; justify-self: end; }
}
.cur-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px;
  background: var(--paper);
}
.cur-toggle button {
  border: 0; background: none;
  font-family: var(--font-head); font-weight: 600; font-size: .8rem;
  padding: .3rem .7rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
}
.cur-toggle button.is-active { background: var(--ink); color: #fff; }
.cart-btn {
  position: relative;
  color: inherit;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.cart-btn svg { width: 22px; height: 22px; }
.cart-btn__count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px;
  background: var(--brand); color: #fff;
  font: 700 .72rem/20px var(--font-head);
  text-align: center;
}
.cart-btn__count[hidden] { display: none; }

/* ---------- Precio y stock ---------- */
.stock { font: 600 .74rem var(--font-head); letter-spacing: .03em; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock--ok { color: #1E8A45; }
.stock--eta { color: #B26A00; }
.stock--no { color: var(--muted-2); }
.section--ink .stock--ok { color: #4CC27A; }
.section--ink .stock--eta { color: #F0A93B; }

.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .4rem; }
.price strong { font: 700 1.15rem var(--font-head); }
.price small { color: var(--muted); font-size: .82rem; }
.price__lista { color: var(--muted-2); font-size: .95rem; }
.buybox .price__lista { color: #8A8B90; }
.desc-pill { display: inline-flex; align-items: center; justify-self: start; font: 700 .74rem/1 var(--font-head); padding: .38rem .6rem; border-radius: 999px; background: #1E8A45; color: #fff; white-space: nowrap; }
.price .desc-pill { margin-left: .2rem; align-self: center; }
.price__alt { flex-basis: 100%; color: var(--muted-2); font-size: .8rem; }
.price--lg strong { font-size: 1.8rem; }

/* ---------- Ficha de baldosa (secciones oscuras): precio → color → cantidad → botones ---------- */
.ficha-price { margin-top: .4rem; }
.section--ink .price small { color: #A7A8AD; }
.section--ink .price__alt { color: #8A8B90; }
.ficha-opt { margin-top: 1.4rem; }
.ficha-opt .pvc-picker { margin-top: 0; }
.ficha-lbl { display: block; font: 600 .82rem var(--font-head); color: #A7A8AD; margin-bottom: .5rem; }
.ficha-lbl b { color: #fff; }
.ficha-sws { display: flex; flex-wrap: wrap; gap: .45rem; }
.ficha-sws .sw { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: var(--c); padding: 0; transition: transform .12s var(--ease); }
.ficha-sws .sw:hover { transform: translateY(-1px); }
.ficha-sws .sw.is-active { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--brand); }
.buybox { margin-top: 1.4rem; color: #EDEDEF; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: .45rem 1rem; border-radius: var(--radius-pill); font: 600 .88rem var(--font-head); color: var(--muted); }
.seg button.is-active { background: var(--ink); color: #fff; }
.buy-line { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.buy-tot { text-align: right; font-family: var(--font-head); display: flex; flex-direction: column; }
.buy-tot b { font-size: 1.45rem; line-height: 1.2; }
.buy-tot small { font: 400 .8rem var(--font-body); color: #8A8B90; }
.ficha-details { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: clamp(2rem, 5vw, 3rem); padding-top: 2rem; border-top: 1px solid #24262B; color: #C9C9CE; }
.ficha-details h3 { color: #fff; font-size: 1.1rem; margin-bottom: .6rem; }
.ficha-details .split__list { margin-top: 0; }
.buybox__tip { font-size: .84rem; color: #A7A8AD; margin-top: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.buybox__tip a { color: #fff; text-decoration: underline; }
.buybox__actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.buybox__actions .btn { flex: 1; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.qty button { width: 44px; height: 46px; border: 0; background: none; font-size: 1.2rem; }
.qty input { width: 70px; text-align: center; border: 0; background: none; font: 600 1rem var(--font-head); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { display: none; }
.qty--dark { border-color: #33353B; }
.qty--dark button, .qty--dark input { color: #fff; }
.qty--dark button:hover { background: #222328; }
.qty--sm button { width: 30px; height: 30px; font-size: 1rem; }
.qty--sm span { min-width: 30px; text-align: center; font: 600 .9rem var(--font-head); }

/* ---------- Accesorios ---------- */
.acc-buy { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line); display: grid; gap: .6rem; }
.acc-buy__price { display: flex; align-items: baseline; gap: .5rem; }
.acc-buy__price strong { font: 700 1.25rem var(--font-head); }
.acc-buy__cuotas { color: var(--muted); font-size: .86rem; margin-top: -.3rem; }
.acc-buy__row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }

/* ---------- Carrito lateral ---------- */
.drawer { position: fixed; inset: 0; z-index: 300; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(14,14,16,.45); opacity: 0; transition: opacity .25s var(--ease); }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--paper);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s var(--ease);
  box-shadow: var(--shadow-lg);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: none; }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.3rem; }
.drawer__foot { border-top: 1px solid var(--line); padding: 1rem 1.3rem 1.3rem; }
.drawer__foot:empty { display: none; }
.drawer__foot .btn { margin-top: .7rem; }
.cart-empty { text-align: center; padding-top: 3rem; color: var(--muted); display: grid; gap: 1rem; justify-items: center; }
.from-design { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; background: var(--brand-soft); border-radius: var(--radius-sm); padding: .65rem .9rem; font-size: .86rem; margin-block: .6rem; }
.from-design b { font-family: var(--font-head); color: var(--brand-strong); }
.cart-lines li { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; padding-block: .9rem; border-bottom: 1px solid var(--line); }
.cart-lines__img { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #121316; }
.cart-lines__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-lines__img.is-light { background: var(--surface); }
.cart-lines__img.is-light img { object-fit: contain; padding: 4px; }
.cart-lines__img .shape { width: 100%; height: 100%; padding: 8px; }
.cart-lines__info { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.cart-lines__info b { font-family: var(--font-head); line-height: 1.25; }
.cart-lines__info small { color: var(--muted); }
.cart-lines__info .qty { align-self: flex-start; margin-top: .2rem; }
.cart-lines__end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; font-size: .92rem; white-space: nowrap; }
.link-x { border: 0; background: none; color: var(--muted); font-size: .8rem; text-decoration: underline; padding: 0; }
.cart-hint { background: #EAF7EE; color: #1B6B33; border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .85rem; margin-bottom: .8rem; }
.cart-sub { display: flex; justify-content: space-between; font-family: var(--font-head); font-size: 1.1rem; }
.cart-sub__alt { color: var(--muted); font-size: .86rem; margin-top: .2rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 250;
  transform: translate(-50%, 20px); opacity: 0;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
  background: var(--ink); color: #fff;
  padding: .8rem 1rem .8rem 1.2rem; border-radius: var(--radius-pill);
  font-size: .9rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-lg);
  max-width: calc(100% - 2rem);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast button { border: 0; background: var(--brand); color: #fff; font: 600 .82rem var(--font-head); padding: .4rem .8rem; border-radius: var(--radius-pill); white-space: nowrap; }

/* ---------- Página de carrito ---------- */
.cart-page { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; padding-block: clamp(2rem, 5vw, 3.5rem) var(--section); }
.cart-page h1, .checkout__form h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin-bottom: .6rem; }
.cart-page .link-arrow { margin-top: 1.2rem; }

/* ---------- Checkout ---------- */
.crumbs { padding-block: 1.2rem; font-size: .86rem; color: var(--muted); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span { color: var(--ink); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; padding-bottom: var(--section); }
.co-step { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.3rem .4rem; margin-top: 1.4rem; }
.co-step legend { display: flex; align-items: center; gap: .6rem; font: 700 1.1rem var(--font-head); padding-inline: .4rem; margin-left: -.4rem; }
.co-step legend span { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .85rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; margin-block: .2rem 1.1rem; }
.check input { margin-top: .3rem; accent-color: var(--brand); }
.checkout__form > .check { margin-top: 1.4rem; }
.options { display: grid; gap: .6rem; margin-bottom: 1.1rem; }
.option { display: flex; gap: .8rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.option:hover { border-color: var(--muted-2); }
.option.is-active { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.option input { margin-top: .3rem; accent-color: var(--brand); }
.option span { display: flex; flex-direction: column; gap: .1rem; }
.option b { font-family: var(--font-head); }
.option small { color: var(--muted); font-size: .86rem; }
.paycur { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-bottom: 1.1rem; font: 600 .88rem var(--font-head); }
.paycur small { flex-basis: 100%; color: var(--muted); font: 400 .82rem var(--font-body); }

.summary { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; background: var(--paper); box-shadow: var(--shadow-md); }
.summary h3 { margin-bottom: .8rem; }
.sum-lines { margin-bottom: .9rem; max-height: 260px; overflow-y: auto; }
.sum-lines li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; padding-block: .45rem; font-size: .88rem; border-bottom: 1px solid var(--line); }
.sum-lines__q { min-width: 26px; height: 22px; padding: 0 5px; border-radius: 6px; background: var(--surface-2); font: 600 .78rem/22px var(--font-head); text-align: center; }
.sum-tot div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .3rem; font-size: .92rem; }
.sum-tot dd { margin: 0; text-align: right; }
.sum-tot__total dd { white-space: nowrap; }
.sum-tot .is-good { color: #1E8A45; }
.sum-tot .muted { color: var(--muted-2); }
.sum-tot__total { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .7rem !important; font: 700 1.25rem var(--font-head) !important; }
.summary .btn { margin-block: 1rem .5rem; }

/* ---------- Confirmación ---------- */
.done, .empty-page { max-width: 640px; text-align: center; padding-block: clamp(3rem, 8vw, 6rem); display: grid; justify-items: center; gap: 1rem; }
.done__icon { width: 64px; height: 64px; border-radius: 50%; background: #EAF7EE; color: #1E8A45; display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; }
.done__icon--wait { background: #FFF6D6; }
.done p { color: var(--muted); }
.bank { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; margin-block: .5rem; }
.bank div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1.1rem; border-bottom: 1px solid var(--line); font-size: .93rem; }
.bank div:last-child { border-bottom: 0; }
.bank span { color: var(--muted); }
.bank b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cart-page, .checkout, .ficha-details { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 780px) {
  .site-header__inner { justify-content: space-between; }
  .nav { width: 100%; justify-content: flex-end; gap: .7rem; }
  .nav[data-open="true"] .shop-actions .btn { display: none; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .buy-line .qty button { width: 40px; }
  .buy-line .qty input { width: 54px; }
  .buy-tot b { font-size: 1.25rem; }
  .buybox__actions .btn { flex-basis: 100%; }
}

/* ---------- Tienda real: estados que el prototipo no tenía ---------- */
.ficha-price:empty { display: none; }
.cart-btn:hover { border-color: var(--muted-2); }
.cart-lines li.is-off .cart-lines__img, .cart-lines li.is-off .cart-lines__info b { opacity: .5; }
.cart-lines__off { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.option.is-static { cursor: default; }
.field.is-error input, .field.is-error select { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225, 37, 27, .12); }
.field__err { display: block; color: var(--brand-strong, #B51A12); font-size: .8rem; margin-top: .35rem; }
.field .check { display: flex; margin-bottom: 0; font-family: inherit; font-weight: inherit; font-size: .92rem; }
.field .check input { width: auto; flex: none; padding: 0; border: 0; background: none; box-shadow: none; }
.checkout__form > .field[data-field="aceptaTerminos"] { margin-top: 1.4rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { background: #FDECEA; color: #8F1A12; border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .88rem; margin-top: .9rem; text-align: left; }
.alert--info { background: #FFF6D6; color: #6B5200; width: 100%; }
.done__icon--off { background: var(--surface-2); color: var(--muted); }
.copy-btn { margin-left: .5rem; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .15rem .6rem; font: 600 .72rem var(--font-head); color: var(--muted); vertical-align: middle; }
.copy-btn:hover { color: var(--ink); border-color: var(--muted-2); }
.center { text-align: center; }
@media (max-width: 520px) {
  .bank div { flex-direction: column; gap: .15rem; }
  .bank b { text-align: left; }
}
/* En el carrito el botón flotante de WhatsApp tapaba "Confirmar pedido": ahí hay enlaces de WhatsApp propios */
main[data-spa] ~ .wa-float { display: none; }
.done .eyebrow::before, .empty-page .eyebrow::before { display: none; }

/* ---------- Pago con tarjeta (Plexo) ---------- */
.field__hint { display: block; color: var(--muted); font-size: .8rem; margin-top: .35rem; }
.field[data-field="pago.cuotas"] { max-width: 360px; }
.pay-retry { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-align: left; display: grid; gap: .9rem; margin-block: .5rem; }
.pay-retry .field { margin: 0; }
.pay-retry .alert { margin-top: 0; }
.pay-retry p { margin: 0; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
