/* Custom CSS added to load last - simplified
   Goal: make header/nav and main section span full width on large screens (>=1400px)
   and avoid forcing product image heights or inline overrides that crop images.
*/

/* Keep previous behavior for >=1200 if present, but do not force widths here */
@media (min-width: 1200px) {

    .container,
    .page-main,
    .page-wrapper>.header,
    .page-wrapper>.footer,
    .nav-container,
    .main-container {
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Product grid: minimal safe rules so theme JS/template controls sizes */
.grid.products-grid .item {
    height: auto !important;
    min-height: 0 !important;
    padding: 8px !important;
    margin-bottom: 12px !important;
}

.images-container,
.product-image-container,
.product-image-wrapper {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}

.images-container img,
.product-image-wrapper img.product-image-photo {
    display: block !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto !important;
}

/* Full-width layout for very large screens (>=1400px)
   - Make navigation and main container span the full viewport width
   - Add small horizontal padding so content isn't flush to edges
*/
@media (min-width: 1400px) {

    .container,
    .page-main,
    .page-wrapper>.header,
    .page-wrapper>.footer,
    .nav-container,
    .main-container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure inner navigation elements expand */
    .nav-container .nav,
    .header .nav,
    .header .navigation {
        width: 100% !important;
    }
}

/* Mobile tweaks kept unchanged */
@media (max-width: 991px) {
    .nuestrastiendas {
        display: block !important;
        width: 100% !important;
        float: none !important;
        clear: both !important;
        padding: 15px 0 !important;
        text-align: center !important;
    }

    .page-main {
        margin-top: 60px !important;
        margin-bottom: 30px !important;
    }

    .amsearch-wrapper-block {
        margin-top: 35px !important;
    }
}

/* Helpers: override inline heights set by scripts that cause cropping */
.products.list.items.product-items>li.item.product.product-item,
.grid.products-grid .item.product.product-item {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.products.list.items.product-items>li.item.product.product-item[style] {
    height: auto !important;
}

.page-header .amsearch-wrapper-block:before {
    background: none !important;
}