/* Ajustes globales: tablet / móvil, vertical y horizontal (última carga = prioridad) */

/* Evita desbordes laterales y respeta “safe area” (notch) */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

.super_container {
    max-width: 100%;
    box-sizing: border-box;
}

/* —— Tablet retrato (p. ej. iPad 768×1024) —— */
@media screen and (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
    .container2 {
        max-width: 100% !important;
        padding-left: 20px;
        padding-right: 20px;
    }

    .arrivals {
        height: auto !important;
    }

    .arrivals .products_container {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .mosaic-container {
        margin: 16px !important;
        gap: 12px !important;
    }

    .mosaic-item.tall1 {
        min-height: 50vh;
        height: auto !important;
    }

    .mosaic-item.tall1 .logo2 img {
        margin-top: 60px !important;
    }
}

/* —— Tablet apaisada —— */
@media screen and (min-width: 768px) and (max-width: 1366px) and (orientation: landscape) {
    .home .home_slider_container,
    .page-nosotros .home .home_slider_container {
        height: 72vh;
        min-height: 360px;
    }

    .home,
    .page-nosotros .home {
        min-height: auto;
    }

    .container2 {
        max-width: min(1200px, 100%) !important;
        padding-left: 24px;
        padding-right: 24px;
    }

    .mosaic-container {
        margin: 20px auto !important;
        grid-auto-rows: minmax(200px, auto) !important;
    }

    .mosaic-item.tall1 {
        min-height: 40vh;
        max-height: 70vh;
    }

    .mosaic-item.tall1 .logo2 img {
        margin-top: 40px !important;
    }
}

/* —— Móvil en horizontal (poca altura útil) —— */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .header {
        min-height: 56px;
    }

    body:has(#publicidad-banner) .header {
        top: 30px;
    }

    .home .home_slider_container,
    .page-nosotros .home .home_slider_container {
        height: 100svh;
        min-height: 0;
    }

    .testimonials,
    .arrivals {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    .mosaic-item.tall1 {
        min-height: 200px;
        max-height: none;
    }
}

/* —— Móvil estrecho —— */
@media screen and (max-width: 576px) {
    .container2,
    .container {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .btn_ver_todo {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .whatsapp-btn {
        bottom: max(16px, env(safe-area-inset-bottom)) !important;
    }

    /* Newsletter full-bleed en móvil (imagen de borde a borde) */
    .newsletter {
        padding-left: 0 !important;
        padding-right: 0 !important;
         margin-bottom: 22px;
    }

    .newsletter > .newsletter_content > .container {
        max-width: 100% !important;
        width: 100%;
       /* Conserva gutters internos para evitar que filas de Bootstrap se monten */
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .newsletter .section_title_container,
    .newsletter .newsletter_container {
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }

    .newsletter_content {
        position: relative;
        padding-top: 56px !important;
        padding-bottom: 56px !important;
    }

    .newsletter_button {
        width: 100%;
        position: relative !important;
        margin-top: 10px !important;
        right: auto;
    }
}

/* Categorías / producto: ancho fluido en tablets */
@media screen and (max-width: 1024px) {
    .page-categories .products .container,
    .page-product .container {
        max-width: 100% !important;
    }
}
