﻿/* =========================================================
   RESPONSIVE PÚBLICO - LONGOS
   ========================================================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* Navbar pública */
@media (max-width: 768px) {
    .navbar .container {
        gap: 0.75rem;
    }

    .navbar-brand {
        max-width: 55%;
        overflow: hidden;
    }

    .brand-logo-nav {
        width: 38px;
        height: 38px;
    }

    .brand-name {
        font-size: 1rem;
        white-space: nowrap;
    }

    .navbar .ms-auto {
        gap: 0.35rem !important;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .navbar .btn-sm {
        font-size: 0.78rem;
        padding: 0.35rem 0.5rem;
    }
}

/* Hero */
@media (max-width: 991.98px) {
    .hero-public {
        padding: 48px 0 42px;
        text-align: center;
    }

        .hero-public p {
            margin-left: auto;
            margin-right: auto;
        }

    .hero-logo {
        max-width: 170px;
    }

    .hero-promo-img {
        max-height: 420px;
        border-radius: 1.5rem;
    }

    .hero-public .d-flex {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .hero-public {
        padding: 36px 0 32px;
    }

        .hero-public h1 {
            font-size: 2.25rem;
            line-height: 1;
        }

        .hero-public p {
            font-size: 1rem;
        }

    .hero-logo {
        max-width: 135px;
    }

    .hero-promo-img {
        max-height: 320px;
        border-radius: 1rem;
    }

    .hero-public .btn-lg {
        width: 100%;
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
}

/* Banner slogan */
@media (max-width: 768px) {
    .slogan-banner {
        margin-top: -18px;
        border-radius: 1rem;
        padding: 0.6rem;
    }
}

/* Cards de productos */
@media (max-width: 575.98px) {
    .producto-card {
        border-radius: 1rem;
    }

        .producto-card img,
        .producto-img,
        .producto-imagen {
            max-height: 220px;
            object-fit: cover;
        }

        .producto-card .card-body {
            padding: 1rem;
        }

        .producto-card h5,
        .producto-card .fw-bold {
            font-size: 1.05rem;
        }
}

/* Producto detalle */
@media (max-width: 991.98px) {
    .producto-detalle-card,
    .detalle-producto-card {
        margin-top: 1rem;
    }

    .producto-detalle-img,
    .detalle-producto-img {
        max-height: 360px;
        object-fit: cover;
    }
}

@media (max-width: 575.98px) {
    .producto-detalle-img,
    .detalle-producto-img {
        max-height: 260px;
        border-radius: 1rem;
    }

    .precio-detalle {
        font-size: 1.35rem;
    }

    .cantidad-control {
        width: 100%;
        justify-content: space-between;
    }

        .cantidad-control input {
            max-width: 80px;
        }
}

/* Opciones visuales */
@media (max-width: 575.98px) {
    .opcion-check-visual {
        grid-template-columns: 52px 1fr;
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .opcion-img {
        width: 46px;
        height: 46px;
    }

    .opcion-check span strong {
        font-size: 0.95rem;
    }

    .opcion-check span small {
        font-size: 0.78rem;
    }
}

/* Carrito */
@media (max-width: 768px) {
    .carrito-item > .d-flex {
        flex-direction: column;
    }

    .carrito-item .text-end {
        text-align: left !important;
    }

    .carrito-item .cantidad-control-sm {
        max-width: 100%;
    }

    .resumen-carrito {
        border-radius: 1rem;
        padding: 1.15rem;
    }

    .total-carrito {
        font-size: 1.35rem;
    }
}

/* Checkout */
@media (max-width: 768px) {
    .checkout-card {
        padding: 1.1rem;
        border-radius: 1rem;
    }

    .opcion-card {
        width: 100%;
    }

    .opcion-card-body {
        min-height: auto;
    }

    #btnConfirmarPedido {
        position: sticky;
        bottom: 12px;
        z-index: 10;
        box-shadow: 0 12px 28px rgba(0,0,0,0.25);
    }
}

/* Seguimiento */
@media (max-width: 768px) {
    .seguimiento-card {
        padding: 1.1rem;
        border-radius: 1rem;
    }

        .seguimiento-card .d-flex.justify-content-between {
            gap: 0.75rem;
        }

    .seguimiento-badge {
        display: inline-block;
        margin-top: 0.5rem;
    }

    .timeline-pedido {
        padding-left: 1rem;
    }

    .timeline-item {
        padding-left: 1.35rem;
    }

    .timeline-content {
        padding: 0.85rem;
    }
}

/* Confirmación */
@media (max-width: 575.98px) {
    .confirmacion-card {
        padding: 2rem 1.1rem;
        border-radius: 1rem;
    }

    .folio-box strong {
        font-size: 1.2rem;
        word-break: break-word;
    }

    .confirmacion-card .btn-lg {
        width: 100%;
    }
}

/* Formularios generales */
@media (max-width: 575.98px) {
    input,
    select,
    textarea,
    .form-control,
    .form-select {
        font-size: 16px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
