/* Ajustes responsivos globales de Noperti */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

.container,
.container-fluid,
.row,
[class*="col-"] {
    min-width: 0;
}

figure img,
.product-images-grid img {
    width: 100%;
    object-fit: contain;
}

.product-images-grid img {
    aspect-ratio: 1 / 1;
}

#mainProductImage {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

table {
    max-width: 100%;
}

/* Tabletas y portátiles pequeños */
@media (max-width: 991.98px) {
    #header .navbar {
        min-height: 72px;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    #header .navbar-brand img {
        width: 100px;
        height: auto;
    }

    #header .navbar-collapse {
        max-width: 100%;
    }

    #header .navbar-nav {
        width: 100%;
    }

    #header .list-inline {
        flex-shrink: 0;
    }

    .swiper-slide,
    .vh-75 {
        height: 55vh !important;
        min-height: 390px;
    }

    .swiper-slide .container img[align="left"] {
        float: none;
        width: min(60%, 520px) !important;
        height: auto !important;
    }

    .section h1,
    .section .h1 {
        overflow-wrap: anywhere;
    }
}

/* Celulares */
@media (max-width: 767.98px) {
    #top_bar .container {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    #top_bar .text-nowrap {
        white-space: normal !important;
    }

    #top_bar .d-flex {
        justify-content: center !important;
        text-align: center;
    }

    #top_bar .list-inline-item {
        margin: 0 !important;
    }

    #top_bar a {
        padding: 0.45rem 0.35rem !important;
        font-size: 0.78rem;
    }

    #header > .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #header .navbar {
        min-height: 64px;
        gap: 0.4rem;
    }

    #header .navbar-brand img {
        width: 88px;
    }

    #header .navbar-toggler {
        padding: 0.4rem;
    }

    #header .list-inline.list-unstyled {
        gap: 0.3rem;
    }

    #header .list-inline-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #header .list-inline-item a > span.d-block.small {
        font-size: 0.68rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    #header .dropdown-menu {
        max-width: calc(100vw - 1.5rem);
    }

    .swiper-slide,
    .vh-75 {
        height: 43vh !important;
        min-height: 280px;
        max-height: 430px;
    }

    .swiper-slide,
    .swiper-slide .lazy {
        background-position: center center !important;
    }

    .swiper-slide .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .swiper-slide .container img[align="left"] {
        display: block;
        width: min(82%, 360px) !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    .swiper-slide .position-absolute img {
        max-width: 82% !important;
    }

    video.w-100 {
        height: 38vh !important;
        min-height: 260px;
    }

    .container.py-5 .col-md-4 {
        margin-bottom: 2rem;
    }

    .container.py-5 .col-md-4 h5.mb-5 {
        margin-bottom: 1rem !important;
    }

    .bg-gray-200 .col-lg-7 img[style*="height:550px"],
    .bg-gray-200 .col-lg-7 img[style*="height: 550px"] {
        height: auto !important;
        max-height: 420px;
        margin-top: 1.5rem;
        object-fit: cover;
    }

    .container.py-5 > .row > .col-md-2 {
        width: 50%;
        padding: 0.35rem;
    }

    .container.py-5 > .row > .col-md-2 .btn {
        width: 100%;
        min-height: 44px;
        padding-left: 0.45rem;
        padding-right: 0.45rem;
        white-space: normal;
    }

    .section.pt-5 {
        padding-top: 1.5rem !important;
    }

    .section.pt-5 h1 {
        margin-bottom: 1.5rem !important;
        font-size: clamp(1.45rem, 7vw, 2rem);
        line-height: 1.15;
    }

    #mainProductImage {
        max-height: 390px;
    }

    #addToCartForm .form-control-lg {
        width: 82px !important;
        min-width: 82px;
    }

    .sticky-top[style*="top:0.3rem"] {
        position: static !important;
    }

    .list-item .float-end {
        max-width: 58%;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .breadcrumb {
        flex-wrap: wrap;
    }

    footer,
    footer .text-end,
    footer [align="right"] {
        text-align: center !important;
    }

    .table-responsive,
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Celulares estrechos */
@media (max-width: 389.98px) {
    #top_bar a {
        font-size: 0.7rem;
    }

    #header .navbar-brand img {
        width: 76px;
    }

    #header .list-inline-item a > span.d-block.small {
        font-size: 0.61rem;
    }

    .swiper-slide,
    .vh-75 {
        min-height: 245px;
    }

    .container.py-5 > .row > .col-md-2 {
        width: 100%;
    }
}
