/* =========================================================
   Zona de entrega por código postal (2026-11-06)
   Barra "Entregar en" bajo el encabezado + ventana para capturar el CP.
   Usa la paleta de site.css (--papaya, --ciruela, --crema, --tinta).
   ========================================================= */

.entrega-bar {
    background: var(--crema, #FFF8EE);
    border-bottom: 1px solid rgba(36, 28, 27, .08);
    font-size: 14px;
    color: var(--tinta, #241C1B);
}

.entrega-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.entrega-bar-pin { flex: none; }

.entrega-bar-text {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}

.entrega-bar-text strong { color: var(--ciruela, #5B1F8C); }
.entrega-bar-sep { opacity: .45; margin: 0 2px; }

.entrega-bar.is-sin-cobertura { background: #fff4e5; }
.entrega-bar.is-sin-cobertura .entrega-bar-text strong { color: #b45309; }

.entrega-bar-btn {
    flex: none;
    border: 1.5px solid var(--papaya, #F2921D);
    background: #fff;
    color: #b8650a;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.entrega-bar-btn:hover,
.entrega-bar-btn:focus-visible {
    background: var(--papaya, #F2921D);
    color: #fff;
}

/* ---------- Ventana ---------- */
.cp-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(36, 18, 40, .55);
    backdrop-filter: blur(3px);
}

.cp-modal.is-open { display: flex; }

.cp-modal-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius-lg, 28px);
    padding: 34px 28px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(36, 18, 40, .28);
    animation: cpIn .28s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes cpIn {
    from { transform: translateY(14px) scale(.97); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cp-modal-card { animation: none; }
}

.cp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f4efed;
    color: var(--tinta, #241C1B);
    font-size: 15px;
    cursor: pointer;
}

.cp-modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    font-size: 38px;
    border-radius: 50%;
    background: var(--crema, #FFF8EE);
    border: 2px solid var(--amarillo, #F5C331);
}

.cp-modal-card h2 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 26px;
    line-height: 1.15;
    margin: 0 0 6px;
    color: var(--ciruela, #5B1F8C);
}

.cp-modal-sub {
    margin: 0 0 18px;
    color: #6b5c56;
    font-size: 15px;
    line-height: 1.45;
}

.cp-modal-form {
    display: flex;
    gap: 8px;
}

.cp-modal-form input {
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .18em;
    text-align: center;
    padding: 10px 12px;
    border: 2px solid #e6dcd8;
    border-radius: 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cp-modal-form input:focus {
    border-color: var(--papaya, #F2921D);
    box-shadow: 0 0 0 4px rgba(242, 146, 29, .18);
}

.cp-modal-form .btn { flex: none; white-space: nowrap; }
.cp-modal-form .btn[disabled] { opacity: .65; cursor: progress; }

.cp-modal-msg {
    min-height: 22px;
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 600;
}

.cp-modal-msg.is-error { color: #dc2626; }
.cp-modal-msg.is-ok { color: #15803d; }

.cp-modal-fuera {
    margin-top: 6px;
    padding: 14px;
    border-radius: 14px;
    background: #fff4e5;
    font-size: 14px;
    line-height: 1.45;
    color: #6b4a00;
}

.cp-modal-fuera p { margin: 0 0 12px; }

.cp-modal-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.cp-modal-sec {
    background: #fff;
    border: 1.5px solid #e6dcd8;
    color: var(--tinta, #241C1B);
}

.cp-modal-tiendas {
    margin: 16px 0 0;
    font-size: 12px;
    color: #8a7d78;
}

/* ---------- Ficha de producto: disponibilidad ---------- */
.pd-stock {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
}

.pd-stock.is-in { color: #15803d; }
.pd-stock.is-out { color: #b91c1c; }
.pd-stock strong { font-weight: 800; }

.pd-add[disabled],
.pd-sticky-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 560px) {
    .entrega-bar { font-size: 13px; }
    .entrega-bar-sep { display: none; }
    .cp-modal-card { padding: 30px 18px 20px; }
    .cp-modal-form { flex-direction: column; }
    .cp-modal-form .btn { width: 100%; }
}
