@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;650;700;800&display=swap');

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg, #f7f7fa);
    color: #16161d;
    -webkit-font-smoothing: antialiased;
}

.preview-banner {
    background: #fdf4e3;
    color: #92400e;
    text-align: center;
    padding: 9px;
    font-size: 12.5px;
    font-weight: 650;
}

/* Landing compacta: menos aire alrededor de la galería, título y botón. */
.product-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 12px 72px;
}

.product-gallery img.main {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius, 12px);
    display: block;
    background: #eee;
}

.thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.thumbs img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 9px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s ease, border-color .15s ease;
}

.thumbs img.selected, .thumbs img:hover { opacity: 1; }
.thumbs img.selected { border-color: var(--primary, #7c5cff); }

.product-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 12px 0 2px;
}

.product-subtitle {
    color: #85858f;
    font-size: 13.5px;
    margin: 0 0 12px;
    line-height: 1.45;
}

.product-title + .cta-button { margin-top: 10px; }
.cta-button.cta-no-title { margin-top: 12px; }

.checkout-form .field { margin-bottom: 16px; }

.checkout-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 8px;
    color: #2b2b33;
}

.checkout-form .field-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
}

.checkout-form .required-mark { color: var(--primary, #7c5cff); }

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid #e8e8ee;
    border-radius: var(--radius, 12px);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #16161d;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--primary, #7c5cff);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #7c5cff) 14%, transparent);
}

.checkout-form input::placeholder { color: #b5b5c0; }

/* ---------- Ubicación: departamento → provincia → distrito ---------- */
.ubigeo-group .ubigeo-field { margin-bottom: 16px; }
.checkout-form select:disabled { background: #f4f4f8; color: #9a9aa6; }

.summary-box {
    background: #fff;
    border: 1.5px solid #e8e8ee;
    border-radius: var(--radius, 12px);
    padding: 16px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-box .discount {
    color: #1fa669;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 2px;
}

/* ---------- Botón CTA (abre el popup) y botón sticky ---------- */
.cta-button {
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter .15s ease, transform .05s ease;
}

.cta-button:hover { filter: brightness(0.94); }
.cta-button:active { transform: translateY(1px); }

.sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 env(safe-area-inset-bottom);
}

.sticky-total { display: flex; flex-direction: column; line-height: 1.2; }
.sticky-total-label { font-size: 11px; opacity: .65; font-weight: 600; text-transform: uppercase; }
#sticky-total-amount { font-size: 17px; font-weight: 750; }

.sticky-btn {
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    padding-inline: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sticky-btn.full {
    width: 100%;
    flex: 1 1 auto;
}

/* ---------- Ofertas por cantidad: SIEMPRE 3 tarjetas en una sola fila horizontal (móvil, tablet, escritorio) ----------
   Colores y tamaños de texto configurables en Ofertas por cantidad → Diseño (variables en .offers-list); sin
   valor, estilo base. El badge está DENTRO del flujo de la tarjeta: no usa posición negativa ni depende de
   overflow del contenedor, así que nunca se recorta ni queda detrás de otro elemento.
   Grilla fija de 3 columnas iguales, sin breakpoints que cambien el número de columnas: las tarjetas nunca bajan
   de fila. Todo el contenido va CENTRADO (radio, badge, cantidad, precios), como una mini tabla comparativa.
   Las 3 tarjetas comparten la misma altura (CSS Grid las estira a la de la más alta) y el mismo padding; el
   bloque de precio (.offer-pricing) se ancla siempre al fondo de la tarjeta gracias a que .offer-info crece
   para absorber el espacio libre, así que "ahorro" queda alineado en la parte inferior en las 3 aunque el
   subtítulo tenga distinto largo. Sin badge, se muestra un placeholder gris (mismo alto que un badge real) para
   que la cantidad arranque siempre a la misma altura en las 3 tarjetas. Los tamaños de texto usan min(var(), Nvw):
   respetan el valor configurado en el panel, pero se recortan un poco más en pantallas muy angostas para no
   desbordar. */
.offers-field { margin-bottom: 18px; }
.offers-title { font-size: 14px; font-weight: 750; color: #16161d; margin: 0 0 10px; }
.offers-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
}

.offer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    height: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 5px;
    font: inherit;
    text-align: center;
    line-height: 1.2;
    border: var(--offer-border-width, 1.5px) solid var(--offer-border, #e3e3ea);
    border-radius: var(--radius, 12px);
    background: var(--offer-bg, #fff);
    color: var(--offer-text, #16161d);
    box-shadow: var(--offer-shadow, 0 0 0 0 transparent);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.offer-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary, #7c5cff) 35%, transparent); outline-offset: 2px; }

/* Resalta con borde/fondo/sombra, nunca cambiando tamaño (misma altura que las demás). */
.offer-card.selected {
    border-color: var(--offer-selected-border, var(--primary, #7c5cff));
    background: var(--offer-selected-bg, color-mix(in srgb, var(--primary, #7c5cff) 6%, white));
    box-shadow: 0 0 0 1px var(--offer-selected-border, var(--primary, #7c5cff)), var(--offer-shadow, 0 0 0 0 transparent);
}

.offer-radio {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #c9c9d4;
    background: #fff;
    position: relative;
}

.offer-card.selected .offer-radio { border-color: var(--offer-selected-border, var(--primary, #7c5cff)); }
.offer-card.selected .offer-radio::after {
    content: "";
    position: absolute;
    inset: 2.5px;
    border-radius: 50%;
    background: var(--offer-selected-border, var(--primary, #7c5cff));
}

/* Crece para absorber el espacio libre y empujar .offer-pricing al fondo de la tarjeta (mismas 3 alturas). */
.offer-info { flex: 1 1 auto; width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }

/* Con o sin badge real, el slot mide igual: la cantidad arranca siempre a la misma altura en las 3 tarjetas. */
.offer-badge-slot { display: flex; justify-content: center; width: 100%; }
.offer-badge,
.offer-badge-empty {
    display: inline-block;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: min(var(--offer-badge-size, 8px), 3vw);
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: .01em;
    white-space: normal;
    overflow-wrap: anywhere;
}
.offer-badge {
    background: var(--offer-badge-bg, var(--primary, #7c5cff));
    color: var(--offer-badge-text, #fff);
    text-transform: uppercase;
    font-size: min(var(--offer-badge-size, 8px), 3vw);
}
/* Placeholder cuando la oferta no tiene badge: mismo alto y forma, sin llamar la atención. */
.offer-badge-empty { background: color-mix(in srgb, currentColor 8%, transparent); color: color-mix(in srgb, currentColor 35%, transparent); }

.offer-qty { font-size: min(var(--offer-qty-size, 11px), 4vw); font-weight: 800; }
.offer-subtitle {
    font-size: min(var(--offer-subtitle-size, 9px), 3.2vw);
    color: color-mix(in srgb, currentColor 65%, transparent);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bloque de precio: apilado y centrado, siempre anclado al fondo de la tarjeta. El precio actual es lo más visible. */
.offer-pricing {
    flex-shrink: 0;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}
.offer-compare { font-size: min(var(--offer-compare-size, 8px), 3vw); text-decoration: line-through; color: var(--offer-compare, #9a9aa6); order: 1; }
.offer-price { font-size: min(var(--offer-price-size, 13px), 5vw); font-weight: 800; letter-spacing: -0.01em; color: var(--offer-price, inherit); order: 2; }
/* Separa visualmente el precio del precio por unidad, como una mini tabla comparativa. */
.offer-divider { order: 3; width: 100%; height: 1px; margin: 1px 0; background: color-mix(in srgb, currentColor 12%, transparent); }
.offer-unit { font-size: min(var(--offer-unit-size, 8px), 3vw); color: color-mix(in srgb, currentColor 60%, transparent); order: 4; }
.offer-savings {
    font-size: min(var(--offer-savings-size, 8px), 3vw);
    font-weight: 700;
    color: #067a3e;
    background: #e7f7ee;
    border-radius: 999px;
    padding: 2px 7px;
    max-width: 100%;
    margin-top: 1px;
    order: 5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Campo de ubicación (GPS) ---------- */
.location-btn {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px dashed #cfcfe0;
    border-radius: var(--radius, 12px);
    background: #fafafe;
    color: #4b4b58;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.location-btn.location-captured {
    border-style: solid;
    border-color: #1fa669;
    background: #e9f9f1;
    color: #12784a;
}

.location-status {
    font-size: 12px;
    color: #85858f;
    margin-top: 6px;
}

/* Mensaje amable cuando el navegador no entrega la ubicación (permiso, timeout o sin soporte). */
.location-status.is-warning { color: #a9761b; }

.location-btn:disabled { opacity: .7; cursor: progress; }

@keyframes cta-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

@keyframes cta-glow {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary, #7c5cff) 55%, transparent); }
    50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary, #7c5cff) 0%, transparent); }
}

@keyframes cta-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes cta-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

.cta-anim-pulse { animation: cta-pulse 1.6s ease-in-out infinite; }
.cta-anim-glow { animation: cta-glow 1.8s ease-in-out infinite; }
.cta-anim-float { animation: cta-float 2.2s ease-in-out infinite; }
.cta-anim-shake { animation: cta-shake 2.5s ease-in-out infinite; }

/* ---------- Popup COD ---------- */
.checkout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 20, 0.6);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(2px);
}

.checkout-modal-box {
    background: var(--bg, #f7f7fa);
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    max-height: 88dvh; /* iOS: se ajusta cuando la barra de Safari aparece/desaparece, sin dejar contenido tapado */
    overflow-y: auto;
    border-radius: 22px;
    padding: 26px 22px 22px;
    position: relative;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    -webkit-overflow-scrolling: touch;
    /* El scroll interno nunca debe "encadenarse" y arrastrar la página de fondo al llegar al tope/fondo del formulario. */
    overscroll-behavior: contain;
}

.modal-close-btn {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top));
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.06);
    color: #16161d;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.modal-product-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-right: 30px;
}

.modal-product-summary img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.modal-product-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.modal-product-offer { font-size: 13px; color: #85858f; margin-top: 2px; }

@media (max-width: 640px) {
    .checkout-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .checkout-modal-box {
        max-width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 22px 22px 0 0;
        padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
        animation: sheet-up .25s ease-out;
    }
}

@keyframes sheet-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 20, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
    backdrop-filter: blur(2px);
}

.modal-box {
    max-width: 380px;
    width: 100%;
    border-radius: 22px;
    padding: 28px 26px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.modal-box img {
    max-width: 100%;
    border-radius: 14px;
    margin-bottom: 14px;
}

.modal-box h2 {
    margin: 0 0 8px;
    font-size: 19px;
    letter-spacing: -0.01em;
}

.modal-box p {
    margin: 0 0 20px;
    font-size: 13.5px;
    opacity: .85;
    line-height: 1.5;
}

.modal-accept {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: #1fa669;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 12px;
}

.modal-dismiss {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    font-size: 12.5px;
    cursor: pointer;
    text-decoration: underline;
}

.upsell-page, .thanks-page {
    max-width: 460px;
    margin: 0 auto;
    padding: 48px 20px 60px;
    text-align: center;
    font-family: "Inter", -apple-system, sans-serif;
}

.upsell-page h1 {
    font-size: 21px;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.upsell-page img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 16px;
    margin-bottom: 18px;
}

.upsell-price {
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.02em;
    margin: 6px 0 24px;
}

.upsell-actions .btn-accept {
    width: 100%;
    padding: 17px;
    background: #1fa669;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
}

.upsell-actions .btn-reject {
    width: 100%;
    padding: 14px;
    background: #fff;
    border: 1.5px solid #e8e8ee;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #85858f;
    cursor: pointer;
}

.thanks-page .check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e9f9f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 18px;
}

.thanks-page h1 { font-size: 20px; letter-spacing: -0.01em; margin-bottom: 8px; }
.thanks-page p { color: #85858f; font-size: 13.5px; }

.thanks-summary {
    text-align: left;
    background: #fff;
    border: 1.5px solid #e8e8ee;
    border-radius: 16px;
    padding: 18px;
    margin-top: 22px;
    font-size: 13.5px;
}

.thanks-summary div {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f4;
}

.thanks-summary div:last-child { border-bottom: none; }

.redirect-notice {
    color: #85858f;
    font-size: 13px;
    margin-top: 18px;
}

/* ---------- Home / tienda pública ---------- */
.home-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 0 60px;
}

.home-header {
    display: flex;
    align-items: center;
    padding: 18px 20px;
}

.home-logo { height: 34px; object-fit: contain; }
.home-logo-text { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }

.home-banner {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.home-hero {
    text-align: center;
    padding: 40px 20px 30px;
}

.home-carousel {
    position: relative;
    max-width: 640px;
    margin: 0 auto 26px;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #eee;
}

.home-carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .5s ease;
}

.home-carousel-slide.active { opacity: 1; }

.home-carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.home-carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
}

.home-carousel-dots .dot.active { background: #fff; }

.home-hero-title {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.home-hero-subtitle {
    color: #85858f;
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

.home-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary, #7c5cff);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 15px 34px;
    border-radius: 14px;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.home-hero-cta:hover { filter: brightness(0.94); }

.home-featured { padding: 10px 20px 0; }

.home-section-title {
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
    text-align: center;
}

.home-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.home-product-card {
    background: #fff;
    border: 1.5px solid #e8e8ee;
    border-radius: 16px;
    padding: 12px;
    text-decoration: none;
    color: #16161d;
    transition: border-color .15s ease, transform .1s ease;
    display: block;
}

.home-product-card:hover {
    border-color: var(--primary, #7c5cff);
    transform: translateY(-2px);
}

.home-product-card img, .home-product-noimg {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #eee;
    display: block;
}

.home-product-name { font-weight: 650; font-size: 13.5px; margin-bottom: 4px; }
.home-product-price { font-weight: 750; font-size: 14px; color: var(--primary, #7c5cff); }

.home-empty { text-align: center; color: #85858f; padding: 30px 0; }

@media (max-width: 640px) {
    .home-hero-title { font-size: 24px; }
    .home-product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Descripción enriquecida del producto ---------- */
.product-description { margin: 14px 0 6px; font-size: 15px; line-height: 1.65; color: #2a2a33; overflow-wrap: anywhere; text-align: left; }
.product-description h2 { font-size: 21px; line-height: 1.3; margin: 22px 0 10px; }
.product-description h3 { font-size: 17px; line-height: 1.35; margin: 18px 0 8px; }
.product-description p { margin: 0 0 12px; }
.product-description ul, .product-description ol { margin: 0 0 12px; padding-left: 22px; }
.product-description li { margin-bottom: 4px; }
.product-description img { max-width: 100%; height: auto; border-radius: var(--radius, 12px); margin: 8px 0; vertical-align: middle; }
.product-description a { color: var(--primary); text-decoration: underline; }
.product-description blockquote { margin: 0 0 12px; padding: 4px 0 4px 12px; border-left: 3px solid var(--primary); color: #55555f; }
.product-description hr { border: none; border-top: 1px solid #e6e6ec; margin: 18px 0; }

/* =====================================================
   Landing de ventas: flujo vertical continuo (mobile-first)
   imagen → imagen/GIF → CTA → contenido → CTA … sin tarjetas, sin radios que corten, sin espacios muertos.
   ===================================================== */
.product-page.landing {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 0 12px;
    background: var(--bg, #fff);
}

.product-page.landing.has-sticky { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

.landing .product-gallery img.main {
    border-radius: 0;
    aspect-ratio: auto;
    max-height: none;
    height: auto;
    object-fit: cover;
}

.landing .thumbs { margin: 0; padding: 6px 12px 0; gap: 6px; }
.landing .thumbs img { width: 52px; height: 52px; border-radius: 6px; }

.landing .landing-heading { padding: 12px 16px 0; }
.landing .product-title { margin: 0 0 2px; font-size: 20px; }
.landing .product-subtitle { margin: 0; }

.landing .landing-cta { padding: 0; }
.landing .landing-cta .cta-button { margin: 0; }

.landing .product-description { margin: 0; padding: 0; line-height: 1.6; }
.landing .product-description > * { margin: 0; }
.landing .product-description p,
.landing .product-description h2,
.landing .product-description h3,
.landing .product-description h4,
.landing .product-description ul,
.landing .product-description ol,
.landing .product-description blockquote { padding-left: 16px; padding-right: 16px; }
.landing .product-description p,
.landing .product-description ul,
.landing .product-description ol { padding-top: 6px; padding-bottom: 6px; }
.landing .product-description ul, .landing .product-description ol { padding-left: 34px; }
.landing .product-description h2 { padding-top: 14px; padding-bottom: 4px; }
.landing .product-description h3 { padding-top: 10px; padding-bottom: 2px; }
.landing .product-description blockquote { margin: 6px 16px; padding: 4px 0 4px 12px; }

/* Imágenes y GIF a todo el ancho y pegados entre sí (sin fondos ni separaciones entre bloques). */
.landing .product-description img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
}
/* El editor suele dejar un <br> suelto junto a la imagen (p. ej. justo después de insertarla); eso rompe
   :only-child aunque el párrafo siga siendo "solo la imagen" a la vista, así que también se cubre ese caso. */
.landing .product-description p:has(> img:only-child),
.landing .product-description div:has(> img:only-child),
.landing .product-description p:has(> img):not(:has(> :not(img, br))),
.landing .product-description div:has(> img):not(:has(> :not(img, br))) { padding: 0; line-height: 0; }
.landing .product-description p:has(> img) { padding-left: 0; padding-right: 0; }
.landing .product-description p:empty { display: none; }

@media (min-width: 561px) {
    .product-page.landing { box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
}

/* Sticky: sin marco ni márgenes propios, pegado al borde inferior y a todo el ancho (integrado con el safe-area de iPhone). */
.sticky-bar .sticky-btn.full { width: 100%; }

/* ---------- Provincia: adelanto obligatorio (no es contraentrega) ---------- */
.province-advance {
    margin: 4px 0 14px;
    padding: 12px 14px;
    border: 1.5px solid #f3c969;
    background: #fff8e6;
    border-radius: 12px;
    color: #5b4200;
    font-size: 13px;
    line-height: 1.45;
}
.province-advance[hidden] { display: none; }
.province-advance p { margin: 0 0 6px; }
.province-advance-title { font-weight: 750; font-size: 14px; margin-bottom: 4px; }
.province-advance-warning { color: #9a3412; }
.province-advance-balance { font-weight: 600; }
.province-advance-balance:empty { display: none; }
.province-advance-check { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-weight: 650; cursor: pointer; color: #16161d; }
.province-advance-check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: #1fa669; }
.province-advance-error { color: #b3272c; font-weight: 600; margin-top: 6px; }
.province-advance-error:empty { display: none; }
.province-advance.has-error { border-color: #e5484d; background: #fdecec; }
.province-advance-modal { z-index: 1100; }
.province-advance-modal .modal-box { background: #fff; color: #16161d; }
.province-advance-modal .modal-box p { margin-bottom: 10px; }
.province-advance-modal .modal-accept { margin: 10px 0 0; }
.province-advance-modal .modal-cancel { margin: 8px 0 0; background: none; border: none; color: #6b6b76; font-weight: 650; font-size: 13px; cursor: pointer; text-decoration: underline; }

/* ---------- Formulario COD: errores por campo, ayuda, entrega, total, confirmación y confianza ---------- */
.checkout-errors { background: #fdecec; color: #b3272c; border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.checkout-form .field.has-error input,
.checkout-form .field.has-error select,
.checkout-form .field.has-error textarea { border-color: #e5484d; }
.field-error { color: #b3272c; font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.ubigeo-group + .field-error, .field-error + .field-error { margin: -8px 0 12px; }
.field-help { color: #6b6b76; font-size: 12px; margin-top: 6px; line-height: 1.4; }

/* Ancho "mitad" (Checkout COD → Campos → campo personalizado): dos campos por fila, uno debajo de otro en móvil. */
.checkout-form .field-half { display: inline-block; width: calc(50% - 6px); vertical-align: top; }
.checkout-form .field-half:nth-of-type(odd) { margin-right: 12px; }
@media (max-width: 420px) {
    .checkout-form .field-half { display: block; width: 100%; margin-right: 0; }
}

.field-radio-group { display: flex; flex-direction: column; gap: 8px; }
.field-radio-option,
.field-checkbox-option { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: #16161d; cursor: pointer; font-weight: 550; }
.field-radio-option input,
.field-checkbox-option input { width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--primary, #7c5cff); }
.delivery-info { margin: 4px 0 14px; padding: 10px 12px; border-radius: 12px; background: #e9f9f1; color: #12613d; font-size: 13px; line-height: 1.45; }
.delivery-info[hidden] { display: none; }
.summary-label { font-size: 14px; font-weight: 650; }
.summary-total { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.checkout-submit { min-height: 56px; font-size: 17px; }
.submit-note { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: #6b6b76; }
.trust-list { list-style: none; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #ececf2; display: grid; gap: 7px; }
.trust-list li { position: relative; padding-left: 24px; font-size: 13px; color: #33333d; line-height: 1.35; }
.trust-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; background: #e7f7ee; color: #067a3e; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
/* Ícono editable por mensaje (Checkout COD → Mensajes de confianza): reemplaza el check por defecto, nunca los dos juntos. */
.trust-list li:has(.trust-icon)::before { content: none; }
.trust-list .trust-icon { position: absolute; left: 0; top: 0; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; }
/* "Mostrar en" (Checkout COD → Mensajes de confianza): un mensaje puede limitarse a móvil o a escritorio. */
@media (max-width: 767px) {
    .trust-list .trust-desktop-only { display: none; }
}
@media (min-width: 768px) {
    .trust-list .trust-mobile-only { display: none; }
}

/* ---------- Downsell de salida (ExitOffer): simple, solo aceptar o rechazar ---------- */
.exit-modal { z-index: 1050; }
.exit-box {
    width: 100%;
    max-width: 380px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--dw-bg, #fff);
    color: var(--dw-text, #1f2430);
    border: var(--dw-border-width, 0px) solid var(--dw-border, transparent);
    border-radius: var(--dw-radius, 22px);
    padding: var(--dw-padding, 26px);
    text-align: var(--dw-align, center);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.exit-badge { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px; background: var(--dw-badge-bg, #fdecec); color: var(--dw-badge-text, #b3272c); font-size: 11.5px; font-weight: 750; line-height: 1.3; letter-spacing: .03em; text-transform: uppercase; }
.exit-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 650; opacity: .75; }
.exit-title { margin: 0 0 6px; font-size: var(--dw-title-size, 21px); line-height: 1.25; letter-spacing: -0.01em; }
.exit-subtitle { margin: 0 0 12px; font-size: 14.5px; font-weight: 600; opacity: .9; }
.exit-media { margin: 0 0 12px; line-height: 0; }
.exit-media img { display: inline-block; width: var(--dw-img-width, 100%); max-width: min(var(--dw-img-max, 360px), 100%); height: auto; border-radius: 14px; margin: 0; }
.exit-text { margin: 0 0 12px; font-size: var(--dw-desc-size, 14px); line-height: 1.5; opacity: .85; }
.exit-pricing { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px; margin: 0 0 16px; }
.exit-compare { font-size: 15px; text-decoration: line-through; opacity: .5; }
.exit-price { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.exit-savings { flex-basis: 100%; font-size: 13px; font-weight: 700; color: #067a3e; }
.exit-accept { width: 100%; min-height: 54px; padding: 14px; border: none; border-radius: 14px; background: var(--dw-cta-bg, #1fa669); color: var(--dw-cta-text, #fff); font: inherit; font-size: 16px; font-weight: 750; cursor: pointer; }
.exit-note { margin: 8px 0 0; font-size: 12.5px; opacity: .75; }
.exit-dismiss { margin-top: 10px; padding: 8px; background: none; border: none; color: inherit; font: inherit; font-size: 13.5px; opacity: .65; text-decoration: underline; cursor: pointer; }
