/* ==========================================================================
   1. REGOLE GENERALI & BASE
   ========================================================================== */

body, html {
    overflow-x: hidden;
}

body {
    background: #ffffff;
    font-family: "Roboto", sans-serif;
}

body#body_home {
    color: #000000 !important;
}

tbody, 
#mainTable, 
#sheetBox .detailsBox th, 
#sheetBox .detailsBox td, 
.mainPrice {
    font-family: "Roboto", sans-serif;
}

#mainTableContainer {
    width: 90%;
}

div#colMid {
    padding: 30px 0px 30px 0px;
    width: 100%;
    display: table-cell;
    vertical-align: top;
}

#colSx {
    width: 20%;
    min-width: 20%;
    max-width: 20%;
    padding: 30px 20px 30px 20px;
}

#colMid .cubes .resultBox {
    border-color: #ffffff;
}

/* ==========================================================================
   2. HEADER & NAVIGAZIONE
   ========================================================================== */

#header_responsive #header_top_bar_wrapper {
    background: #ffffff;
}

#header_responsive #logo {
    max-width: 200px;
}

#header_responsive .top_buttons .btn_menu > a {
    background-image: url(https://www.ledivebeauty.it/readycontent/images/menubianco-1.png);
}

div#header_responsive > div#head > div#top_buttons_wrapper,
div#header_responsive > div#head > div#top_buttons_wrapper > ul.top_buttons > li.box_logo:nth-of-type(2) > a > img#logo,
div#menu > ul {
    background-color: #000000 !important;
}

#header_responsive #top_buttons_wrapper {
    -webkit-border-radius: 0px; 
    -moz-border-radius: 0px;
    -khtml-border-radius: 0px;
    border-radius: 0px;
}

#navBar {
    color: black;
    background-image: url(https://www.ledivebeauty.it/readycontent/images/ldpiccolo.png);
    background-repeat: no-repeat;
}

#navBar li:before {
    display: inline-block;
    content: "/ ";
    margin-right: 0.8em;
}

div#header_responsive > div#head > div#header_top_bar_wrapper > ul.header_top_bar > li#top_text > div > div.ordina_su_whatsapp_wrapper.hide_mobile:nth-of-type(2) > div.spacer > p,
div#header_responsive > div#head > div#header_top_bar_wrapper > ul.header_top_bar > li#top_text > div > div.ordina_su_whatsapp_wrapper.hide_mobile:nth-of-type(2) > div.spacer > p > span {
    color: #5c5c5c !important;
}

#languagesBox, 
#accessMessageBox .text,
.location-title {
    display: none;
}

/* ==========================================================================
   3. MENU LATERALE & CATEGORIE
   ========================================================================== */

#categories .boxTitle, #userBox .boxTitle, .rssFeed .boxTitle, .feedBackBox .boxTitle, 
#colDx .miniBox .boxTitle, #colSx .miniBox .boxTitle, .feedbackBoxMedia .boxTitle, 
#sendOrderDetails .boxTitle {
    display: block;
    background-color: unset;
}

#colMid .bigBox .boxTitle, #colMid .carousel .boxTitle, #colMid .bigBoxFade .boxTitle, 
#colMid .feedBackBox_mid .boxTitle, #colMid #formRequestInfo .boxTitle, 
.fancybox-inner #formRequestInfo .boxTitle, #existentUserBox .boxTitle, 
#regForm.gCheckout .boxTitle, #newUserBox .boxTitle {
    background-color: #edecec00;
}

#colMid .bigBox .bottomLink, #colMid .carousel .bottomLink, #colMid .bigBoxFade .bottomLink {
    text-align: right;
    background: none;
}

#megamenuLayer dt {
    background-image: none;
}

#r_left_menu ul.r_left_menu_btn {
    display: none;
}

#r_left_menu {
    left: -100%;
    width: 100%;
}

#r_left_menu .r_left_menu_container {
    clip: rect(auto, auto, auto, auto);
}

#r_left_menu .r_left_menu_cat_panel {
    left: 100%;
    width: 100%;
}

#r_left_menu .r_left_menu_cat_panel.show {
    left: 0px !important;
}

div#r_left_menu > div.r_left_menu_container:nth-of-type(2) > div.r_left_menu_container_scroll {
    color: #ffffff !important;
    background-color: #000000 !important;
}

#r_left_menu .r_left_menu_categories li a {
    color: #000000;
    font-weight: normal !important;
}

div#r_left_menu > div.r_left_menu_container:nth-of-type(2) > div.r_left_menu_container_scroll > div#left_languages > div.list > a.lang.it:nth-of-type(1),
div#r_left_menu > div.r_left_menu_container:nth-of-type(2) > div.r_left_menu_container_scroll > div#left_languages > div.list > a.lang.en:nth-of-type(2) {
    color: #ffffff !important;
    font-weight: bold !important;
}

div#r_left_menu > div.r_left_menu_container:nth-of-type(2) > div.r_left_menu_container_scroll > ul:nth-of-type(1) > li.btn_left_close.btn > span {
    background-color: #000000 !important;
}

#searchBrandForm .boxTitle, #latestModelsBox .boxTitle, #searchForm .boxTitle, 
#cartBoxRight .boxTitle, #qrCodeBox .boxTitle, .web-page-search .boxTitle, 
#r_left_menu .btn_left_close, #r_left_menu .btn_left_logout, 
#r_left_menu .r_left_menu_cat_panel .label {
    background-color: #ffffff;
    font-weight: 500;
    color: #000000;
}

#r_left_menu .r_left_menu_cat_panel .label {
    text-decoration: auto;
}

/* ==========================================================================
   4. SCHEDA PRODOTTO, PREZZI E CARRELLO
   ========================================================================== */

#sheetBox {
    clear: both;
    margin-top: 4em;
}

#sheetBox .detailsBox th, #sheetBox .detailsBox strong.th {
    border-top: 1px solid #ddd;
    padding: 10px 0 10px 0;
}

#sheetBox .detailsBox th, #sheetBox .detailsBox td {
    display: inline-block;
    width: 50%;
    padding: 0 0 10px 0;
    border: 0;
}

#sheetBoxTopDetails .boxTitle span {
    display: block;
    text-align: center;
}

.mainPrice {
    font-size: 138.5%;
    color: #000000;
    margin-bottom: 3px;
    line-height: 1.5;
}

.mainPriceCurrency {
    display: inline-block !important;
    margin-right: 3px;
    font-size: 12px;
}

.price strong {
    display: none !important;
}

#colMid .cart_form input.butt1, 
#colMid .cart_form_disabled input.butt1,
#colMid #sheetAddToCartRow input.butt1 {
    text-align: left;
    background-color: #000000;
    color: #ffffff;
    border-radius: 0px;
}

#colMid #sheetAddToCartRow input.butt1 {
    text-align: center;
}

div#mainTableContainer > div > div > div > div.wp > div.bigBox.boxColumns > ul > li.column > div.details > form.cart_form > input.butt1,
div#mainTableContainer > div > div > div > div.wp > div.carousel > div.carousel_wp > ul > li.carousel_item > div.details > form.cart_form_disabled > input.butt1,
div#mainTableContainer > div > div > div > div.wp > div.carousel > div.carousel_wp > ul > li.carousel_item > div.details > form.cart_form > input.butt1,
div#mainTableContainer > div#mainTable > div#colMid > div#sheetBox > div#sheetBoxTopDetails > div.col.col2:nth-of-type(2) > div.detailsBox:nth-of-type(1) > table > tbody > tr#sheetAddToCartRow > td > form#cart_form_29377 > input.butt1:nth-of-type(1),
div#mainTableContainer > div#mainTable > div#colMid > div#sheetBox > div#sheetBoxTopDetails > div.col.col2:nth-of-type(2) > div.detailsBox:nth-of-type(1) > table > tbody > tr#sheetAddToCartRow > td > form#cart_form_32156 > input.butt1:nth-of-type(1),
div#mainTableContainer > div > div > div > div.productsWrapper.listProduct.horizontal.view.box > div.resultBox.prod > div.content > ul > li.cart > form.cart_form_disabled > input.butt1 {
    background-color: #000000 !important;
    color: #ffffff !important;
}

div#mainTableContainer > div#mainTable > div#colMid > div#showCart > table.showCartTable > tfoot > tr.mainTotal:nth-of-type(5) > td.mainTotalValue:nth-of-type(2) > h3,
div#mainTableContainer > div > div > div > div.wp > div.bigBox.boxColumns > ul > li.column > div.details > h3.mainPrice > span.mainPriceCurrency,
div#mainTableContainer > div > div > div > div.wp > div.bigBox.boxColumns > ul > li.column > div.details > h3.mainPrice > span.mainPriceAmount,
div#mainTableContainer > div > div > div > div.wp > div.carousel > div.carousel_wp > ul > li.carousel_item > div.details > h3.mainPrice > span.mainPriceAmount,
div#mainTableContainer > div > div > div > div.wp > div.carousel > div.carousel_wp > ul > li.carousel_item > div.details > h3.mainPrice > span.mainPriceCurrency,
div#mainTableContainer > div#mainTable > div#colMid > div#sheetBox > div#sheetBoxTopDetails > div.col.col2:nth-of-type(2) > div.detailsBox:nth-of-type(1) > table > tbody > tr.price:nth-of-type(1) > td.price > h3.mainPrice > span.mainPriceAmount:nth-of-type(2),
div#mainTableContainer > div#mainTable > div#colMid > div#sheetBox > div#sheetBoxTopDetails > div.col.col2:nth-of-type(2) > div.detailsBox:nth-of-type(1) > table > tbody > tr.price:nth-of-type(1) > td.price > h3.mainPrice > span.mainPriceCurrency:nth-of-type(1),
div#mainTableContainer > div > div > div > div.productsWrapper.listProduct.horizontal.view.box > div.resultBox.prod > div.content > ul > li.price > h3.mainPrice > span.mainPriceAmount,
div#mainTableContainer > div > div > div > div.productsWrapper.listProduct.horizontal.view.box > div.resultBox.prod > div.content > ul > li.price > h3.mainPrice > span.mainPriceCurrency,
.mainPrice, .mainPrice *, .rdy-search-results .cubes .resultBox .mainPrice * {
    color: #000000 !important;
}

div#mainTableContainer > div#mainTable > div#colMid > div#showCart > div#discountCodesBox > form#frmDiscountCode {
    background-color: #ebebeb !important;
}

#colMid .cart_form_update select {
    padding: 9px 14px 9px 4px !important;
}

#mainResultBox .cubes .resultBox .cart, 
.rdy-search-results .cubes .resultBox .cart {
    background: none;
}

/* ==========================================================================
   5. LAYOUT GRIGLIA PRODOTTI
   ========================================================================== */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 1em;
}

.resultBox.prod .content {
    display: flex;
    flex-direction: column;
    align-items: center !important; 
    height: 100%;
}

.resultBox.prod .imageLink, .resultBox.prod .thumb {
    order: -2 !important; 
    position: static !important;
    transform: none !important;
}

.resultBox.prod dl {
    order: -1 !important;
    position: static !important;
    transform: none !important;
    display: block !important;
    width: 100%; 
    text-align: center !important;
    margin-bottom: 5px;
    color: #777;
    font-weight: 300;
}

.resultBox.prod dl dd {
    text-align: center !important; 
    float: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: auto !important;
}

dt.T9 {
    display: none !important;
}

.resultBox.prod .title {
    order: 0 !important; 
    text-align: center !important;
    margin-top: 0 !important;
}

.rdy-search-results .cubes .resultBox .price {
    display: block !important;
    text-align: center !important;
    padding: 5px 0;
    order: 1 !important; 
    width: 100% !important;
}

.rdy-search-results .cubes .resultBox .price h3 {
    text-align: center !important;
    float: none !important;
    display: block !important;
    margin: 0 auto !important;
}

div#mainTableContainer > div#mainTable > div#colMid > div#staticPage > div.wp:nth-of-type(17) > div.html_block.block-20 > div.html_block.block-24 > h3:nth-of-type(1) > strong > font,
div#mainTableContainer > div > div > div > div.wp > div.html_block.block-20 > div.html_block.block-24 > p > font,
div#mainTableContainer > div#mainTable > div#colMid > div#staticPage > div.wp:nth-of-type(17) > div.html_block.block-20 > div.html_block.block-24 > h3:nth-of-type(2) > font {
    color: #000000 !important;
}

/* ==========================================================================
   6. CAROSELLO & COMPONENTI EXTRA
   ========================================================================== */

.carouselmio {
    position: relative;
    width: 100%;
    padding: 10px 40px;
}

.carouselmio img {
    width: 420px;
    margin-right: 30px;
    height: 228px;
    display: inline-table;
}

.arrowmio {
    position: absolute;
    top: 60px;
    padding: 0;
    font-size: 24px;
    line-height: 24px;
    display: block;
}

.arrowmio:focus { outline: none; }
.arrowmio:hover { cursor: pointer; }
.prev { left: 7px; }
.next { right: 7px; }

.gallerymio {
    width: 90%;
    overflow: hidden;
}

.gallerymio ul {
    height: 228px;
    width: 9999px;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: margin-left 250ms;
    font-size: 0;
}

.gallerymio li {
    display: inline-block;
}

.TITOLIHOME {
    margin-top: 7.5rem;
}

.alto {
    float: left;
}

.assistenza-top {
    margin: 0 auto;
    float: none;
    width: 298px;
}

.assistenza-top span {
    padding-right: 25px;
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: right center;
    line-height: 22px;
    display: inline-block;
    background-image: url(/readycontent/images/call-center-symbol.png);
}

.ordina_su_whatsapp_wrapper {
    font-size: 14px;
    text-transform: uppercase;
    color: #36115f;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 2;
}

.sy-pager {
    display: none;
}

div#cookieAlert > div.btn:nth-of-type(2) > a.ok:nth-of-type(2) {
    color: #ffffff !important;
    background-color: #000000 !important;
}

div#mainTableContainer > div#mainTable > div#colMid > div#staticPage > div.wp:nth-of-type(5) > div#eighthGroupBox > div.bottomLink {
    background-color: #ffffff !important;
}

/* Lightbox & Fancybox */
div.fancybox-overlay.fancybox-overlay-fixed:nth-of-type(12) > div.fancybox-wrap.fancybox-desktop.fancybox-type-html.fancybox-opened > div.fancybox-skin > div.fancybox-outer > div.fancybox-inner > div.ajax_message > form.cross_selling_lightbox_form > div#cross_selling_lightbox > div.wrapper > div.content:nth-of-type(2) > div:nth-of-type(1) > ul > li.checkbox-view:nth-of-type(1) > label > p.label-text > span.price:nth-of-type(2),
div.fancybox-overlay.fancybox-overlay-fixed:nth-of-type(12) > div.fancybox-wrap.fancybox-desktop.fancybox-type-html.fancybox-opened > div.fancybox-skin > div.fancybox-outer > div.fancybox-inner > div.ajax_message > form.cross_selling_lightbox_form > div#cross_selling_lightbox > div.wrapper > div.content:nth-of-type(2) > div:nth-of-type(1) > ul > li.checkbox-view:nth-of-type(2) > label > p.label-text > span.price:nth-of-type(2),
div.fancybox-overlay.fancybox-overlay-fixed:nth-of-type(12) > div.fancybox-wrap.fancybox-desktop.fancybox-type-html.fancybox-opened > div.fancybox-skin > div.fancybox-outer > div.fancybox-inner > div.ajax_message > form.cross_selling_lightbox_form > div#cross_selling_lightbox > div.wrapper > div.content:nth-of-type(2) > div:nth-of-type(1) > ul > li.checkbox-view:nth-of-type(3) > label > p.label-text > span.price:nth-of-type(2),
div.fancybox-overlay.fancybox-overlay-fixed:nth-of-type(12) > div.fancybox-wrap.fancybox-desktop.fancybox-type-html.fancybox-opened > div.fancybox-skin > div.fancybox-outer > div.fancybox-inner > div.ajax_message > div.details_wrap:nth-of-type(1) > div.details:nth-of-type(2) > h3.mainPrice > span.mainPriceAmount:nth-of-type(2),
div.fancybox-overlay.fancybox-overlay-fixed:nth-of-type(12) > div.fancybox-wrap.fancybox-desktop.fancybox-type-html.fancybox-opened > div.fancybox-skin > div.fancybox-outer > div.fancybox-inner > div.ajax_message > div.details_wrap:nth-of-type(1) > div.details:nth-of-type(2) > h3.mainPrice > span.mainPriceCurrency:nth-of-type(1) {
    color: #000000 !important;
}

div.fancybox-overlay.fancybox-overlay-fixed:nth-of-type(12) > div.fancybox-wrap.fancybox-desktop.fancybox-type-html.fancybox-opened > div.fancybox-skin > div.fancybox-outer > div.fancybox-inner > div.ajax_message > div.btn_wrapp:nth-of-type(3) > a.btn.ok.stop_shop:nth-of-type(2) {
    background-color: #d6d6d6 !important;
}

.btn_wrapp .ok, .cross_selling.lightbox .cross_selling_cart .butt1 {
    background-color: #eee;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */

#foot {
    font-size: 13px;
    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    -khtml-border-radius: 0px;
    border-radius: 0px;
}

#foot_top_html {
    text-align-last: center;
}

.rowfooter {
    color: #ffffff;
    border-top: solid;
    padding: 20px 0 20px 20px;
    text-align: center;
    line-height: 20px;
}

div#foot_top_html > div.content > div.rowfooter {
    color: #ffffff !important;
    background-color: #000000 !important;
    min-height: 200px;
}

.columnfooter {
    float: left;
    width: 25%;
    color: #ffffff;
    font-size: 1.17em;
}

div#foot_top_html > div.content > div.rowfooter > div.columnfooter > p > a {
    color: #ffffff !important;
    font-weight: bold !important;
}

div#foot_top_html > div.content > table.background > tbody > tr > td > table.wrapper2 > tbody > tr > td > table.block > tbody > tr > td > a > p.block_title,
div#foot_top_html > div.content > table.background > tbody > tr > td > table.wrapper2 > tbody > tr > td > table.block > tbody > tr > td > p.block_title {
    color: #ffffff !important;
}

div#foot_top_html > div.content > table.background > tbody > tr > td > table.wrapper2 > tbody > tr > td,
div#foot_top_html > div.content > table.background > tbody > tr > td {
    background-color: #000000 !important;
}

div#foot_top_html > div.content > div.rowfooter:nth-of-type(2) > div.columnfooter:nth-of-type(4) > div.social > p:nth-of-type(1) > a {
    color: #707070 !important;
}

.newsletter {
    max-width: initial !important;
    width: 100% !important;
    background-image: linear-gradient(to bottom, #000 0, #000 100%);
    color: white;
    text-align: -webkit-center;
    padding-top: 20px;
}

.footer_block_newsletter {
    padding: 7px !important;
    margin-top: 5px;
    width: 70%;
}

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVE)
   ========================================================================== */

@media (max-width: 768px) {
    .whatsapp-icon {
        bottom: 15px;
    }

    #top_buttons_wrapper .top_buttons {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        flex-wrap: nowrap;
    }

    .carousel_nav.right {
        right: 0;
        visibility: collapse;
    }

    .carousel_nav.left {
        left: 0;
        visibility: collapse;
    }

    #top_buttons_wrapper .top_buttons li {
        margin: 0 0px;
    }

    #top_buttons_wrapper .box_logo {
        order: 1; 
        margin-right: auto;
    }

    #top_buttons_wrapper .box_logo img {
        max-width: 150px;
        height: auto;
    }

    #top_buttons_wrapper .box_search {
        order: 2;
        flex-grow: 0; 
        flex-shrink: 1; 
        width: auto; 
        min-width: 0;
    }

    #top_buttons_wrapper #top_login_button { order: 3; }
    #top_buttons_wrapper #top_cart_button { order: 4; }
    #top_buttons_wrapper #top_languages { order: 5; }
    #top_buttons_wrapper #top_menu_button { order: 6; }
}

@media screen and (max-width: 790px) {
    #header_responsive #top_buttons_wrapper {
        padding: 0px;
    }

    #header_responsive .top_buttons .btn_menu {
        padding: 15px;
    }

    .carousel {
        width: 100%!important;
        padding: 0!important;
    }

    .carousel_wp {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%!important;
        padding: 0px!important;
    }

    .carousel_wp::-webkit-scrollbar {
        display: none;
    }

    .carousel_wp ul {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0;
        width: max-content!important;
    }

    .carousel_item {
        flex-shrink: 0;
        width: 315px !important;
        margin-right: 20px;
        height: auto;
        padding: 10px;
        box-sizing: border-box;
        text-align: center;
    }

    .carousel_item img {
        max-width: 100%;
        height: auto;
    }

    .carousel_item h2 {
        font-size: 1.2em;
    }

    .details {
        margin-top: 10px;
    }
}

@media screen and (max-width: 699px) {
    #top_buttons_wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1600;
        background-color: #fff;
    }

    #colMid .cubes .resultBox {
        text-align: center !important;
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        padding-bottom: calc(8px + 8px + 35px) !important;
        flex-wrap: wrap !important;
        width: 48% !important;
        max-width: initial;
        border-top: 1px solid #fff !important;
        border-right: 1px solid #fff !important;
        border-bottom: 1px solid #ddd !important;
        border-left: 1px solid #fff !important;
        display: block !important;
    }

    .cubes .row {
        border-top: 1px solid #fff !important;
        border-right: 1px solid #fff !important;
        border-bottom: 1px solid #fff !important;
        border-left: 1px solid #fff !important;
        display: -webkit-box !important;
        width: 100% !important;
        padding: 0px !important;
    }

    .listProduct {
        width: 100% !important;
        table-layout: fixed !important;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
        display: grid !important;
        gap: 20px !important;
    }

    .resultBox.prod .description {
        margin-top: -10px !important;
        margin-bottom: 20px !important;
        text-align: center !important;
    }

    .productsWrapper {
        width: 100%;
        position: relative;
        overflow-x: hidden;
    }

    .cubes .resultBox dl, .cubes .resultBox p {
        display: block !important;
    }

    #mainResultBox .cubes .resultBox .cart, 
    .rdy-search-results .cubes .resultBox .cart {
        background: none;
        bottom: auto;
    }
}

@media screen and (max-width: 600px) {
    .columnfooter {
        text-align: center;
        width: 100%;
    }

    div#foot_top_html > div.content > div.rowfooter {
        color: #ffffff !important;
        background-color: #000000 !important;
        min-height: 500px;
    }

    #colMid .cart_form_quantity, 
    #colMid .cart_form_update select {
        text-align: right;
        margin: 0 5px 5px 0;
        width: 50px;
        padding: 4px 10px 4px 4px;
    }
}

@media screen and (max-width: 480px) {
    #header_responsive #logo {
        max-width: 90px;
    }

    #navBar li:before {
        display: inline-block;
        content: "/ ";
        margin-right: 1.4em;
    }
}


li.column .imageLink img {
  width: 100%;
  height: auto;
  display: block; /* Rimuove lo spazio vuoto sotto l'immagine tipico degli elementi inline */
}

div#w_5 {
  aspect-ratio: 1080 / 421;
  width: 100%;
  height: auto;
  overflow: hidden; /* Evita che il contenuto trabocchi prima dell'inizializzazione */
}

#eighthGroupBox img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1; /* Forza il browser a riservare uno spazio quadrato */
  background-color: #f0f0f0; /* Opzionale: un placeholder colorato mentre carica */
}

.wp:nth-child(4) { /* O una classe pił specifica per questo blocco */
  min-height: 340px;
}


/* 1. Riserva lo spazio per lo slider basandosi sul rapporto d'aspetto delle immagini (421/1080) */
.wp > div:has(#w_5) {
    display: block;
    width: 100%;
    aspect-ratio: 1080 / 421;
    min-height: 100px; /* Altezza minima di sicurezza per evitare il collasso totale */
    overflow: hidden;
    background-color: #f0f0f0; /* Opzionale: un colore di sfondo neutro mentre carica */
}

/* 2. Assicurati che le immagini non causino shift interni */
#w_5 img {
    width: 100%;
    height: auto;
    display: block;
}

/* 3. Forza l'altezza minima sui dispositivi mobili se lo slider tende a sparire */
@media (max-width: 768px) {
    .wp > div:has(#w_5) {
        min-height: 150px; /* Regola in base all'altezza desiderata su mobile */
    }
}
/* Correzione CLS per il banner cookie solo su versione Mobile */
@media (max-width: 767px) {
    div#cookieAlert {
        /* Riserva lo spazio verticale per evitare il salto del layout */
        min-height: 218px !important;
        
        /* Forza l'altezza per evitare calcoli dinamici durante il caricamento */
        height: auto !important;
        
        /* Disabilita le transizioni iniziali che PageSpeed rileva come Layout Shift */
        transition: none !important;
        
        /* Assicura che l'elemento non influenzi il flusso del body */
        contain: paint;
        
        /* Ottimizzazione per il rendering del browser */
        content-visibility: auto;
        contain-intrinsic-size: 0 218px;
    }
}
/* Selettore specifico: colpisce il div che contiene direttamente #w_5 */
