/* Carrito y cierre del pedido. */

/* --- Indicador en la cabecera --- */
.nav-cart {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.22); transition: background .15s, border-color .15s;
}
.nav-cart:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }
.nav-cart.tiene { border-color: #67E578; }
.nav-cart-n {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #67E578; color: #04034A;
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
}

/* --- Botón de compra en la ficha --- */
.pd-comprar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 10px; }
.pd-cant {
  width: 84px; padding: 13px 12px; text-align: center; font: inherit; font-weight: 600;
  border: 1px solid var(--line, #DFE3F4); border-radius: 12px; background: #fff; color: #04034A;
}
.pd-envio { margin: 0 0 18px; font-size: .9rem; color: #4B4B7A; }

/* --- Avisos --- */
.cart-aviso { margin: 0 0 22px; padding: 14px 18px; border-radius: 12px; font-size: .95rem; line-height: 1.6; }
.cart-aviso ul { margin: 8px 0 0; padding-left: 20px; }
.cart-aviso-ok { background: #E3F8E6; border: 1px solid #A9E3B4; color: #155F26; }
.cart-aviso-error { background: #FDEBE9; border: 1px solid #F3BDB6; color: #8C241B; }

/* --- Carrito vacío --- */
.cart-vacio { background: #fff; border: 1px solid var(--line, #DFE3F4); border-radius: 20px; padding: 48px 36px; text-align: center; }
.cart-vacio h2 { margin: 0 0 10px; color: #04034A; font-size: clamp(1.3rem, 2.4vw, 1.7rem); letter-spacing: -.02em; }
.cart-vacio p { margin: 0 auto 24px; color: #4B4B7A; max-width: 520px; line-height: 1.65; }
.cart-vacio-acciones { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --- Disposición --- */
.cart-layout, .ped-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.cart-items, .ped-form { flex: 999 1 540px; min-width: 0; }
.cart-resumen {
  flex: 1 1 320px; min-width: 0; position: sticky; top: 96px;
  background: #fff; border: 1px solid var(--line, #DFE3F4); border-radius: 20px; padding: 28px;
}
@media (max-width: 900px) { .cart-resumen { position: static; } }
.cart-resumen h2 { margin: 0 0 18px; font-size: 1.15rem; color: #04034A; }

/* --- Tabla --- */
.cart-tabla { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line, #DFE3F4); border-radius: 18px; overflow: hidden; }
.cart-tabla th { background: #04034A; color: #fff; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; padding: 14px 16px; text-align: left; }
.cart-tabla td { padding: 14px 16px; border-top: 1px solid #ECEEF8; vertical-align: middle; }
.cart-tabla .num { text-align: right; white-space: nowrap; }
.cart-foto { width: 88px; }
.cart-foto img { width: 72px; height: 72px; object-fit: contain; display: block; background: #F1F2FB; border-radius: 10px; }
.cart-nombre a { color: #04034A; font-weight: 600; text-decoration: none; }
.cart-nombre a:hover { color: #1857D8; }
.cart-ref { display: block; margin-top: 3px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11.5px; color: #8A8FC0; }
.cart-cant { width: 72px; padding: 9px; text-align: center; font: inherit; border: 1px solid var(--line, #DFE3F4); border-radius: 10px; }
.cart-sub { font-weight: 700; color: #04034A; }
.cart-quitar { width: 46px; text-align: center; }
.cart-x { border: 0; background: none; font-size: 24px; line-height: 1; color: #9A9AC0; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.cart-x:hover { color: #C0261B; background: #FDEBE9; }
.cart-acciones { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 18px; }
@media (max-width: 620px) {
  .cart-tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cart-tabla, .cart-tabla tbody, .cart-tabla tr, .cart-tabla td { display: block; width: 100%; }
  .cart-tabla tr { border-top: 1px solid #ECEEF8; padding: 14px 4px; position: relative; }
  .cart-tabla td { border: 0; padding: 4px 16px; text-align: left; }
  .cart-tabla .num { text-align: left; }
  .cart-quitar { position: absolute; top: 12px; right: 8px; width: auto; }
}

/* --- Totales --- */
.cart-totales { margin: 0 0 10px; }
.cart-totales > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #ECEEF8; }
.cart-totales dt { color: #4B4B7A; margin: 0; }
.cart-totales dd { margin: 0; font-weight: 600; color: #04034A; white-space: nowrap; }
.cart-totales .cart-total { border-bottom: 0; padding-top: 14px; }
.cart-totales .cart-total dt { font-weight: 700; color: #04034A; font-size: 1.05rem; }
.cart-totales .cart-total dd { font-size: 1.35rem; font-weight: 700; }
.cart-gratis { color: #1C7A2E; font-weight: 700; }
.cart-pendiente { color: #8A4B00; font-weight: 600; font-size: .9rem; }
.cart-iva { margin: 0 0 18px; font-size: .86rem; color: #6E6E9C; }
.cart-falta { margin: 0 0 16px; padding: 11px 14px; background: #F1F2FB; border-radius: 10px; font-size: .9rem; color: #04034A; }
.cart-seguir { width: 100%; justify-content: center; margin-bottom: 16px; }
.cart-notas { margin: 0 0 16px; padding: 0; list-style: none; font-size: .86rem; color: #6E6E9C; line-height: 1.8; }
.cart-notas-pie { margin: 0 0 12px; font-size: .84rem; color: #6E6E9C; line-height: 1.6; }
.cart-vaciar { margin: 0; }
.cart-link { border: 0; background: none; padding: 0; font: inherit; font-size: .88rem; color: #8C241B; text-decoration: underline; cursor: pointer; }

/* --- Formulario del pedido --- */
.ped-form fieldset { border: 1px solid var(--line, #DFE3F4); border-radius: 18px; background: #fff; padding: 24px 26px 26px; margin: 0 0 20px; }
.ped-form legend { padding: 0 10px; font-weight: 600; color: #04034A; font-size: 1.02rem; }
.ped-row { display: flex; flex-wrap: wrap; gap: 18px; }
.ped-campo { flex: 1 1 240px; min-width: 0; margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.ped-campo label { font-size: .9rem; font-weight: 600; color: #04034A; }
.ped-campo input, .ped-campo textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line, #DFE3F4);
  border-radius: 11px; background: #FBFCFF; color: #22224F; width: 100%; box-sizing: border-box;
}
.ped-campo input:focus, .ped-campo textarea:focus { outline: 2px solid #1857D8; outline-offset: 1px; background: #fff; }
.ped-ayuda { font-size: .8rem; color: #8A8FC0; }
.ped-error { font-size: .84rem; color: #8C241B; font-weight: 600; }
.ped-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ped-pago { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line, #DFE3F4); border-radius: 14px; margin-bottom: 12px; cursor: pointer; }
.ped-pago:hover { border-color: #1857D8; }
.ped-pago input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; }
.ped-pago span { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; color: #4B4B7A; line-height: 1.55; }
.ped-pago strong { color: #04034A; font-size: 1rem; }
.ped-acepta { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: #4B4B7A; line-height: 1.6; margin-bottom: 8px; }
.ped-acepta input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; }

/* --- Comprobante --- */
.ped-ok { background: #fff; border: 1px solid #A9E3B4; border-radius: 20px; padding: 40px 34px; text-align: center; margin-bottom: 26px; }
.ped-ok h2 { margin: 14px 0 10px; color: #04034A; font-size: clamp(1.35rem, 2.6vw, 1.8rem); letter-spacing: -.02em; }
.ped-ok p { margin: 0 auto 8px; max-width: 580px; color: #4B4B7A; line-height: 1.65; }
.ped-num { font-size: 1.05rem; }
.ped-num strong { font-family: 'IBM Plex Mono', ui-monospace, monospace; color: #04034A; }
.ped-grid { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 22px; }
.ped-caja { flex: 1 1 320px; min-width: 0; background: #fff; border: 1px solid var(--line, #DFE3F4); border-radius: 18px; padding: 26px; }
.ped-caja h3 { margin: 0 0 14px; font-size: 1.05rem; color: #04034A; }
.ped-caja p { margin: 0 0 10px; color: #4B4B7A; line-height: 1.65; }
.ped-banco { background: #F1F2FB; border-radius: 12px; padding: 14px 16px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: .88rem; color: #04034A; }
.ped-nota { font-size: .88rem; }
.ped-lista { margin: 0 0 16px; padding: 0; list-style: none; }
.ped-lista li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid #ECEEF8; font-size: .9rem; color: #4B4B7A; }
.ped-lista li span:last-child { font-weight: 600; color: #04034A; white-space: nowrap; }
.ped-legal { font-size: .88rem; color: #6E6E9C; line-height: 1.7; margin-bottom: 22px; }

/* --- Clases que faltaban: botón principal y sección oscura --- */
.btn-primary { background: var(--green, #67E578); color: var(--navy, #04034A); font-weight: 700; }
.btn-primary:hover { background: #7DEB8C; color: var(--navy, #04034A); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.42); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.section-navy { background: var(--navy, #04034A); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p { color: #C9CBEA; }

/* --- Módulo programado: opción en la ficha --- */
.pd-prog {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  margin-top: 6px; padding: 16px 18px; border: 1.5px solid #67E578;
  border-radius: 14px; background: #F2FDF4; cursor: pointer;
}
.pd-prog input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; }
.pd-prog span { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; line-height: 1.55; color: #3A5A42; }
.pd-prog strong { color: #04034A; font-size: .98rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.pd-prog em { font-style: normal; color: #1C7A2E; font-weight: 700; }
.pd-prog a { font-size: .85rem; }

/* --- Módulo programado: casilla dentro del carrito --- */
.cart-prog { display: flex; gap: 9px; align-items: flex-start; margin-top: 8px; font-size: .84rem; line-height: 1.5; color: #4B4B7A; cursor: pointer; }
.cart-prog input { margin-top: 2px; flex: 0 0 auto; }
.cart-prog em { font-style: normal; color: #1C7A2E; font-weight: 700; }
.ped-progmark { font-style: normal; font-size: .82rem; color: #1C7A2E; }
.ped-planta { border-color: #67E578 !important; background: #F7FEF8 !important; }
.ped-intro { margin: 0 0 16px; font-size: .9rem; color: #4B4B7A; line-height: 1.6; }

/* --- Página del servicio --- */
.prog-split { display: flex; flex-wrap: wrap; gap: 44px; align-items: center; }
.prog-texto { flex: 999 1 460px; min-width: 0; }
.prog-lead { font-size: 1.15rem; line-height: 1.6; color: #04034A; font-weight: 500; margin: 0 0 16px; }
.prog-texto p { color: #4B4B7A; line-height: 1.7; margin: 0 0 16px; }
.prog-foto { flex: 1 1 300px; min-width: 0; margin: 0; }
.prog-foto img { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line, #DFE3F4); background: #fff; display: block; }
.prog-foto figcaption { margin-top: 12px; font-size: .85rem; color: #6E6E9C; line-height: 1.55; }
.prog-cifras { display: flex; flex-wrap: wrap; gap: 14px; margin: 24px 0; }
.prog-cifras > div { flex: 1 1 160px; min-width: 0; background: #F1F2FB; border: 1px solid var(--line, #DFE3F4); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; }
.prog-cifras strong { font-size: 1.3rem; color: #04034A; line-height: 1.15; }
.prog-cifras span { font-size: .82rem; color: #6E6E9C; line-height: 1.45; }

.prog-pasos-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 34px; }
@media (max-width: 980px) { .prog-pasos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .prog-pasos-grid { grid-template-columns: 1fr; } }
.prog-pasos-grid article { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-left: 3px solid #67E578; border-radius: 14px; padding: 24px 22px; }
.prog-num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.6rem; color: #67E578; display: block; margin-bottom: 10px; }
.prog-pasos-grid h3 { margin: 0 0 8px; font-size: 1.02rem; }
.prog-pasos-grid p { margin: 0; font-size: .9rem; line-height: 1.6; color: #AFB1DC; }

.prog-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
@media (max-width: 900px) { .prog-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .prog-items { grid-template-columns: 1fr; } }
.prog-items article { background: #fff; border: 1px solid var(--line, #DFE3F4); border-radius: 16px; padding: 24px 22px; }
.prog-items h3 { margin: 0 0 8px; font-size: 1.02rem; color: #04034A; }
.prog-items p { margin: 0; font-size: .92rem; line-height: 1.65; color: #4B4B7A; }

.prog-faq-lista { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; max-width: 880px; }
.prog-faq-lista article { background: #fff; border: 1px solid var(--line, #DFE3F4); border-radius: 16px; padding: 24px 26px; }
.prog-faq-lista h3 { margin: 0 0 8px; font-size: 1.02rem; color: #04034A; }
.prog-faq-lista p { margin: 0; font-size: .94rem; line-height: 1.7; color: #4B4B7A; }

.prog-cta-caja { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.prog-cta-caja > div:first-child { flex: 999 1 420px; min-width: 0; }
.prog-cta-caja h2 { margin: 0 0 10px; font-size: clamp(1.4rem, 2.8vw, 2rem); letter-spacing: -.02em; }
.prog-cta-caja p { margin: 0; line-height: 1.65; max-width: 620px; }
.prog-cta-acciones { flex: 1 1 260px; min-width: 0; display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Banda del servicio en portada y en la línea --- */
.prog-banda { background: #04034A; color: #fff; }
.prog-banda-caja { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; }
.prog-banda-texto { flex: 999 1 460px; min-width: 0; }
.prog-banda .eyebrow { color: #67E578; }
.prog-banda h2 { margin: 8px 0 12px; font-size: clamp(1.45rem, 3vw, 2.1rem); letter-spacing: -.025em; color: #fff; }
.prog-banda p { margin: 0 0 18px; color: #C9CBEA; line-height: 1.7; max-width: 640px; }
.prog-banda-sello { flex: 1 1 240px; min-width: 0; background: rgba(103,229,120,.1); border: 1.5px solid #67E578; border-radius: 18px; padding: 24px; }
.prog-banda-sello strong { display: block; font-size: 1.5rem; color: #67E578; margin-bottom: 4px; }
.prog-banda-sello span { font-size: .88rem; color: #C9CBEA; line-height: 1.5; display: block; }

/* Aviso de programación en fichas sin precio publicado */
.pd-prog-nota {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line, #e3e6ef);
  border-left: 3px solid var(--green, #67E578);
  border-radius: 10px;
  background: #f7f9fc;
  font-size: .94rem;
  line-height: 1.55;
}
.pd-prog-nota strong { display: block; color: var(--navy, #04034A); }
.pd-prog-nota a { color: var(--blue, #1857D8); font-weight: 600; }

.prog-banda-top { padding-top: clamp(32px, 5vw, 56px); }

/* "IVA incluido" junto a cada precio publicado */
.iva-nota {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3ff;
  color: #1857D8;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  vertical-align: middle;
}
.pd-price .iva-nota { font-size: .8rem; padding: 3px 10px; }
.th-iva { display: block; font-weight: 500; font-size: .72rem; color: #6b7280; }
