/* =========================================================
   RC31.44 — TÍTULOS SVG EXACTOS PROMOCOMBO

   Único sistema visual para todas las categorías.

   Modelo:
   1. “Las mejores” manuscrita negra.
   2. Nombre principal rojo, grueso y condensado.
   3. Tres rayos a cada lado: negro / rojo / negro.
   4. “para vos” manuscrita negra.
   5. Subrayado rojo centrado.

   El título se dibuja como SVG para conservar exactamente
   las mismas proporciones en app, tablet y web.
========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Anton&family=Lobster&display=swap");

:root {
    --pc-exact-title-red: #d90817;
    --pc-exact-title-black: #111111;
    --pc-exact-title-script: "Lobster", "Brush Script MT", cursive;
    --pc-exact-title-main: "Anton", Impact, sans-serif;
}

/* =====================================================
   1. CONTENEDOR
===================================================== */
.pcReferenceTitle {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 164px !important;
    margin: 0 auto 16px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.pcReferenceTitle__content {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pcReferenceTitle__graphic {
    display: block !important;
    width: min(80%, 576px) !important;
    height: auto !important;
    overflow: visible !important;
}

/* =====================================================
   2. TIPOGRAFÍAS
===================================================== */
.pcReferenceTitle__script {
    fill: var(--pc-exact-title-black) !important;
    font-family: var(--pc-exact-title-script) !important;
    font-weight: 400 !important;
    font-style: normal !important;
    text-anchor: middle !important;
}

.pcReferenceTitle__top {
    font-size: 64px !important;
}

.pcReferenceTitle__bottom {
    font-size: 58px !important;
}

.pcReferenceTitle__main {
    fill: var(--pc-exact-title-red) !important;
    font-family: var(--pc-exact-title-main) !important;
    font-size: 154px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: 0 !important;
    text-anchor: middle !important;
    paint-order: stroke fill !important;
    stroke: rgba(150, 0, 8, .07) !important;
    stroke-width: 1.5px !important;
}

/* =====================================================
   3. ADORNOS
===================================================== */
.pcReferenceTitle__rayBlack {
    stroke: var(--pc-exact-title-black) !important;
    stroke-width: 8px !important;
    stroke-linecap: square !important;
}

.pcReferenceTitle__rayRed {
    stroke: var(--pc-exact-title-red) !important;
    stroke-width: 8px !important;
    stroke-linecap: square !important;
}

.pcReferenceTitle__underline {
    stroke: var(--pc-exact-title-red) !important;
    stroke-width: 9px !important;
    stroke-linecap: round !important;
}

/* =====================================================
   4. PROMOS DESTACADAS
===================================================== */
.mobileSectionHeading.pcReferenceTitle {
    min-height: 166px !important;
    margin-bottom: 8px !important;
}

.mobileSectionHeading.pcReferenceTitle > button {
    position: absolute !important;
    right: 18px !important;
    bottom: 12px !important;
    z-index: 5 !important;
    margin: 0 !important;
    padding: 7px 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--pc-exact-title-red) !important;
    font-family: "Segoe UI", Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.tituloSeccionDestacada.pcReferenceTitle {
    min-height: 180px !important;
}

/* =====================================================
   5. CATEGORÍAS
===================================================== */
.catalogoCategoria__cabecera.pcReferenceTitle {
    min-height: 164px !important;
    margin: 4px auto 14px !important;
    padding: 0 !important;
    border: 0 !important;
}

/* =====================================================
   6. CATEGORÍA ACTIVA
===================================================== */
@media (max-width: 900px) {
    .mobileCategoryChip {
        isolation: isolate !important;
        overflow: visible !important;
    }

    .mobileCategoryChip.active {
        position: relative !important;
        border-color: transparent !important;
        background: transparent !important;
        color: #111 !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .mobileCategoryChip.active::before,
    .mobileCategoryChip.active::after {
        content: "" !important;
        position: absolute !important;
        z-index: -1 !important;
        pointer-events: none !important;
    }

    .mobileCategoryChip.active::before {
        inset: 5px -6px !important;
        background: rgba(217, 8, 23, .78) !important;
        clip-path: polygon(
            2% 12%, 14% 4%, 35% 8%, 52% 2%, 71% 7%, 98% 1%,
            95% 25%, 100% 43%, 96% 61%, 100% 84%, 80% 91%,
            60% 96%, 37% 91%, 16% 98%, 2% 88%, 5% 68%, 0 48%, 5% 30%
        ) !important;
        transform: rotate(-1deg) !important;
    }

    .mobileCategoryChip.active::after {
        inset: 11px -10px 10px !important;
        background: rgba(217, 8, 23, .18) !important;
        clip-path: polygon(
            0 25%, 17% 12%, 39% 17%, 58% 8%, 79% 14%, 100% 4%,
            95% 34%, 100% 55%, 94% 79%, 72% 88%, 47% 83%,
            23% 92%, 3% 79%, 7% 52%
        ) !important;
        transform: rotate(1deg) !important;
    }

    .mobileCategoryChip.active > span {
        position: relative !important;
        z-index: 2 !important;
        opacity: 1 !important;
        filter: none !important;
    }
}

/* =====================================================
   7. RESPONSIVE
===================================================== */
@media (max-width: 900px) {
    .pcReferenceTitle {
        min-height: 156px !important;
    }

    .pcReferenceTitle__graphic {
        width: min(80%, 496px) !important;
    }
}

@media (max-width: 430px) {
    .pcReferenceTitle {
        min-height: 147px !important;
        margin-bottom: 6px !important;
    }

    .pcReferenceTitle__graphic {
        width: calc(80% - 8px) !important;
    }

    .mobileSectionHeading.pcReferenceTitle > button {
        right: 7px !important;
        bottom: 6px !important;
        font-size: 13px !important;
    }
}

@media (min-width: 901px) {
    .pcReferenceTitle {
        min-height: 188px !important;
    }

    .pcReferenceTitle__graphic {
        width: min(80%, 608px) !important;
    }
}

/* =====================================================
   8. TÍTULOS SECUNDARIOS
===================================================== */
.textoTituloCarrito h2,
.carritoVacio h3,
.ubicacionInformacion h2,
.cuentaClientePanel h2,
.panelPedidos h2,
.tituloGrupoConfigurador h3,
.detallePromocionMovil h2,
.modalContenido h2 {
    color: var(--pc-exact-title-red) !important;
    font-family: var(--pc-exact-title-main) !important;
    font-weight: 400 !important;
    line-height: .96 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
}


/* =========================================================
   RC31.39 — VISIBILIDAD ÚNICA DE TÍTULOS

   Había dos encabezados simultáneos en móvil:
   1. El encabezado móvil de promociones.
   2. El encabezado de promociones exclusivo de escritorio.

   La regla general `.pcReferenceTitle { display:flex !important; }`
   estaba volviendo a mostrar el encabezado de escritorio en celular.
   Estas reglas fijan explícitamente qué encabezado corresponde
   a cada experiencia.
========================================================= */

/* APP / MÓVIL */
@media (max-width: 900px) {
    /* El título general de escritorio nunca se muestra en la app. */
    .tituloSeccionDestacada.pcReferenceTitle {
        display: none !important;
    }

    /* El carrusel destacado solo pertenece a la categoría Promos. */
    .mobileFeaturedSection[hidden],
    body:not([data-categoria-movil="promociones"]) .mobileFeaturedSection {
        display: none !important;
    }

    body[data-categoria-movil="promociones"] .mobileFeaturedSection:not([hidden]) {
        display: block !important;
    }

    /* En Promos se usa el encabezado del carrusel, no otro título en el listado. */
    body[data-categoria-movil="promociones"]
    #promociones
    > .catalogoCategoria__cabecera.pcReferenceTitle {
        display: none !important;
    }
}

/* WEB / ESCRITORIO */
@media (min-width: 901px) {
    /* El bloque móvil nunca se muestra en la página de escritorio. */
    .mobileFeaturedSection {
        display: none !important;
    }

    /* En escritorio se conserva un solo título general de promociones. */
    .tituloSeccionDestacada.pcReferenceTitle {
        display: flex !important;
    }
}


/* =========================================================
   RC31.40 — AJUSTE DE ESCALA Y SEPARACIÓN

   - Todos los títulos se muestran al 80% del tamaño anterior.
   - La frase “Las mejores” se posiciona más arriba dentro del SVG.
   - La escala se controla desde un solo selector.
   - No se crean estilos distintos para Promos y las categorías.
========================================================= */


/* =========================================================
   RC31.41 — AJUSTE FINO DE COMPOSICIÓN

   - “Las mejores” sube levemente en todos los títulos.
   - Los rayos laterales se calculan desde JavaScript según
     el ancho real de cada palabra.
   - Se conserva el ángulo original de las líneas.
   - El mismo componente funciona en app, tablet y web.
========================================================= */


/* =========================================================
   RC31.44 — RAYOS CENTRADOS VERTICALMENTE

   Los tres rayos de cada lado se desplazaron hacia arriba
   manteniendo:
   - la misma inclinación;
   - la misma longitud;
   - la misma separación horizontal respecto del texto;
   - la misma composición en app, tablet y web.
========================================================= */


/* =========================================================
   RC31.44 — VARIANTE "SOLO NOMBRE"
   Usada actualmente por BEBIDAS.
========================================================= */
.pcReferenceTitle--soloNombre .pcReferenceTitle__graphic{
    display: block;
}


/* =========================================================
   RC31.44 — BEBIDAS CON RAYOS LATERALES
   La variante conserva solo el nombre, pero reutiliza los
   mismos rayos que el resto de las categorías.
========================================================= */
.pcReferenceTitle--soloNombre {
    min-height: 164px !important;
}


/* =========================================================
   RC31.104 — AVISOS DE ESTADO DEL PEDIDO
========================================================= */

.promocomboPedidoEstadoToast {
    position: fixed;
    z-index: 999999;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom));
    width: min(92vw, 520px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 18px;
    background: #121722;
    color: #fff;
    box-shadow: 0 18px 50px rgba(0,0,0,.30);
    opacity: 0;
    transform: translate(-50%, 26px);
    transition:
        opacity .28s ease,
        transform .28s ease;
}

.promocomboPedidoEstadoToast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.promocomboPedidoEstadoToast > div {
    min-width: 0;
}

.promocomboPedidoEstadoToast strong,
.promocomboPedidoEstadoToast span {
    display: block;
}

.promocomboPedidoEstadoToast strong {
    font-size: 16px;
    line-height: 1.15;
}

.promocomboPedidoEstadoToast span {
    margin-top: 4px;
    color: #d8dee8;
    font-size: 13px;
    line-height: 1.35;
}

.promocomboPedidoEstadoToast button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 12px;
    background: rgba(255,255,255,.07);
    color: #fff;
    font-size: 22px;
}


/* =========================================================
   RC31.105 — AVISOS IMPORTANTES / CHECKOUT VERIFICADO
========================================================= */

.promocomboPedidoEstadoToast {
    top: 50% !important;
    bottom: auto !important;
    width: min(92vw, 620px) !important;
    min-height: 210px;
    padding: 28px 30px !important;
    border-radius: 26px !important;
    transform: translate(-50%, calc(-50% + 28px)) scale(.96) !important;
    box-shadow: 0 26px 90px rgba(0,0,0,.42) !important;
}

.promocomboPedidoEstadoToast.visible {
    transform: translate(-50%, -50%) scale(1) !important;
}

.promocomboPedidoEstadoToast strong {
    font-size: clamp(24px, 5vw, 34px) !important;
    line-height: 1.08 !important;
}

.promocomboPedidoEstadoToast span {
    margin-top: 12px !important;
    font-size: clamp(16px, 3.6vw, 21px) !important;
    line-height: 1.4 !important;
}

.promocomboPedidoEstadoToast button {
    width: 48px !important;
    height: 48px !important;
    border-radius: 15px !important;
    font-size: 28px !important;
}

.selectorEntregaCarrito {
    margin-bottom: 14px;
    padding: 13px;
    border: 1px solid #e3e7ed;
    border-radius: 16px;
    background: #fff;
}

.selectorEntregaCarrito > div:first-child small,
.selectorEntregaCarrito > div:first-child strong {
    display: block;
}

.selectorEntregaCarrito > div:first-child small {
    color: #e30613;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
}

.selectorEntregaCarrito > div:first-child strong {
    margin-top: 2px;
    font-size: 15px;
}

.selectorEntregaCarrito__botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.selectorEntregaCarrito__botones button {
    min-height: 48px;
    border: 1px solid #dfe4ea;
    border-radius: 13px;
    background: #f8fafc;
    font-weight: 850;
}

.selectorEntregaCarrito__botones button.activo {
    border-color: #e30613;
    background: #fff1f2;
    color: #c80b17;
    box-shadow: inset 0 0 0 1px #e30613;
}

#nombreCliente[readonly],
#telefonoCliente[readonly],
#direccionCliente[readonly],
#entreCalles[readonly],
#barrioCliente[readonly] {
    background: #f3f5f7 !important;
    color: #344054 !important;
    cursor: default;
}

.avisoPagoCuentaVerificada {
    display: block;
    margin-top: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #fff6e5;
    color: #8a5400;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.avisoPagoCuentaVerificada[hidden] {
    display: none !important;
}


/* =========================================================
   RC31.110 — PEDIDO ENVIADO
========================================================= */
#pc-order-sent-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(13, 18, 29, .66);
    backdrop-filter: blur(5px);
}

.pc-order-sent-card {
    width: min(90vw, 460px);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 34px 26px;
    border-radius: 30px;
    background: #ffffff;
    color: #111827;
    text-align: center;
    box-shadow: 0 28px 90px rgba(0,0,0,.30);
}

.pc-order-sent-check {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf8ef;
    color: #15803d;
    font-size: 44px;
    font-weight: 900;
}

.pc-order-sent-card strong {
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1;
}

.pc-order-sent-card span {
    max-width: 340px;
    color: #5b6472;
    font-size: 16px;
    line-height: 1.45;
}


/* =========================================================
   RC31.133 — Selector de entrega visible dentro de "Mi pedido"
   Mantiene la selección inicial y hace evidente el cambio de modalidad.
========================================================= */
.selectorEntregaCarrito {
    margin-bottom: 16px;
    padding: 15px;
    border: 1px solid #e0e4ea;
    border-radius: 19px;
    background: linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);
    box-shadow: 0 8px 22px rgba(17,24,39,.055);
}

.selectorEntregaCarrito > div:first-child small {
    color: #d81827;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .12em;
}

.selectorEntregaCarrito > div:first-child strong {
    margin-top: 3px;
    color: #161b25;
    font-size: 15px;
    font-weight: 900;
}

.selectorEntregaCarrito__botones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.selectorEntregaCarrito__botones button {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 22px;
    align-items: center;
    gap: 9px;
    min-height: 66px;
    padding: 10px 10px;
    border: 1.5px solid #dce1e8;
    border-radius: 16px;
    background: #fff;
    color: #222936;
    text-align: left;
    box-shadow: 0 3px 10px rgba(17,24,39,.04);
    transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}

.selectorEntregaCarrito__botones button:active {
    transform: scale(.985);
}

.selectorEntregaCarrito__icono {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f2f4f7;
    font-size: 20px;
}

.selectorEntregaCarrito__texto {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.selectorEntregaCarrito__texto strong {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.05;
}

.selectorEntregaCarrito__texto small {
    color: #7b8491;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.2;
}

.selectorEntregaCarrito__check {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border: 1px solid #d6dce4;
    border-radius: 999px;
    color: transparent;
    background: #f6f7f9;
    font-size: 12px;
    font-weight: 950;
}

.selectorEntregaCarrito__botones button.activo {
    border-color: #df1f30;
    background: linear-gradient(180deg,#fff7f8 0%,#fff 100%);
    color: #b91422;
    box-shadow: 0 0 0 2px rgba(223,31,48,.08),0 7px 18px rgba(152,18,31,.08);
}

.selectorEntregaCarrito__botones button.activo .selectorEntregaCarrito__icono {
    background: #ffe9ec;
}

.selectorEntregaCarrito__botones button.activo .selectorEntregaCarrito__check {
    border-color: #df1f30;
    background: #df1f30;
    color: #fff;
}

@media (max-width: 390px) {
    .selectorEntregaCarrito__botones button {
        grid-template-columns: 34px minmax(0,1fr) 19px;
        gap: 7px;
        min-height: 62px;
        padding: 9px 8px;
    }
    .selectorEntregaCarrito__icono { width:34px;height:34px;font-size:18px; }
    .selectorEntregaCarrito__texto small { font-size:9.5px; }
}
