/* Styling Megamenu */

.ets_mm_megamenu {
    position: relative;
    background: transparent;
    font-family: inherit;
    z-index: 99;
    /**border-bottom: 1px solid #eee;**/
}

.mm_menus_ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
}

.mm_menus_li {
    position: static;
    /* Important for full-width dropdown */
    padding: 10px 10px;
    cursor: pointer;
}

.mm_menus_li>a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
}

.mm_menus_li:hover>a {
    color: #FF721E;
    /* Primary brand color */
}

.mm_menus_li .arrow {
    display: none;
    /* Can be styled if needed */
}

/* New Dropdown Wrapper */
.cilli-mm-dropdown-wrapper {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    display: flex;
    background: #f4f4f4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    pointer-events: none;
    border-top: 4px solid #FF721E;
    padding-bottom: 10px;
}

.mm_menus_li:hover .cilli-mm-dropdown-wrapper {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Dropdown Container */
.mm_columns_ul {
    position: static;
    width: 100%;
    background: transparent;
    padding: 0;
    list-style: none;
    margin: 0;
    box-shadow: none;
}

/* CSS Masonry Multi-column rules */
.mm_columns_ul.css-masonry {
    display: grid !important;
    /* Override flex */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-gap: 20px;
    align-items: start;
    /* Items start from top, ignoring row heights */
}

@media (min-width: 768px) and (max-width: 991px) {
    .mm_columns_ul.css-masonry {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Kept for compatibility if needed, but wrapper controls visibility */

/* Columns */
.mm_columns_li {
    list-style: none;
}

.css-masonry-item {
    display: block;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Remove explicit widths on grid items so they take the full width of their grid cell */
@media (min-width: 992px) {
    .mm_columns_li {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .mm_columns_li {
        width: 100%;
    }
}

.mm_blocks_ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ets_mm_block_title a {
    font-weight: bold;
    color: #333;
    text-decoration: none;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.ets_mm_block_title a:hover {
    color: #9aa400;
}

.ets_mm_categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ets_mm_categories li {
    margin-bottom: 8px;
}

.ets_mm_categories li a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.ets_mm_categories li a:hover {
    color: #9aa400;
}

/* Mobile Toggle */
.ybc-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 13px;
    padding: 10px;
}

.close_menu {
    display: none;
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

@media (max-width: 767px) {
    .ybc-menu-toggle {
        display: block;
    }

    .mm_menus_ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
    }

    .mm_menus_ul.open {
        display: flex;
    }

    .mm_columns_ul {
        position: static;
        box-shadow: none;
        padding: 10px;
        display: none;
        column-count: 1;
        /* reset masonry for mobile */
    }

    .mm_menus_li.open .mm_columns_ul {
        display: flex;
        flex-direction: column;
        opacity: 1;
        visibility: visible;
    }

    .mm_columns_li {
        width: 100% !important;
        margin-bottom: 20px;
    }

    .close_menu {
        display: flex;
    }
}


.mcb-section .mcb-wrap .mcb-item-3ojzgu2n .desc {
    text-align: left !important;
    text-transform: uppercase;
}

.ets_mm_categories {
    font-size: 13px !important;
}

.ets_mm_block_title {
    font-size: 13px !important;
}

/* Split Layout Specifics */
.cilli-mm-left-categories {
    flex: 1 1 50%;
    background: #f4f4f4;
    padding-left: 10px;
    padding-top: 10px;
    max-width: 65%;
    line-height: 20px;
}

.cilli-mm-left-categories_right {
    flex: 1 1 50%;
    background: #f4f4f4;
    padding-left: 10px;
    padding-top: 10px;
    max-width: 35%;
    line-height: 20px;
}

.cilli-mm-right-products {
    flex: 1 1 50%;
    background: #fff;
    padding: 30px;
}

.cilli-mm-featured-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
    display: inline-block;
}

.cilli-mm-featured-grid {
    display: flex;
    gap: 20px;
}

.cilli-mm-product-item {
    flex: 1;
    text-align: left;
}

.cilli-mm-product-item a {
    text-decoration: none;
    display: block;
}

.cilli-mm-product-img {
    margin-bottom: 10px;
}

.cilli-mm-product-img img {
    width: 100%;
    height: 150px;
    object-fit: contain;
}

.cilli-mm-product-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.cilli-mm-product-price {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

.cilli-mm-product-item:hover .cilli-mm-product-name {
    color: #FF721E;
}

.ets_mm_categories {
    font-size: 13px !important;
    line-height: 20px !important;
    font-weight: 500 !important;
}

/* Stili per cilli_info_cards */
.cilli-info-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.cilli-info-card {
    background: #edf5dd;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 5px;
}

.cilli-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cilli-info-card-title {
    font-size: 14px;
    color: #666;
    color: #333;
    margin-top: 0;
    margin-bottom: 0px;
    line-height: 10px;
    font-weight: 600;
}

.cilli-info-card-desc {
    font-size: 16px;

    line-height: 1.5;
    margin: 0;
}

@media (max-width: 767px) {
    .cilli-info-cards-container {
        grid-template-columns: 1fr;
    }
}

/* Stili per cilli_tech_specs */
.cilli-specs-card {
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 20px 0;
}

.cilli-specs-header {
    background: #1a5c1a;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cilli-specs-icon {
    font-size: 18px;
}

.cilli-specs-header-title {
    font-size: 16px;
    font-weight: 700;
}

.cilli-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.cilli-specs-table td {
    padding: 12px 20px;
    font-size: 14px;
    border-bottom: 1px solid #eaeaea;
}

.cilli-specs-row-even {
    background: #ffffff;
}

.cilli-specs-row-odd {
    background: #f4f4f4;
}

.cilli-specs-label {
    color: #555;
    font-weight: 600;
}

.cilli-specs-value {
    color: #222;
    font-weight: 400;
    text-align: right;
}

.cilli-specs-table tr:last-child td {
    border-bottom: none;
}

/* Stili per cilli_feature_cards (griglia 4x1 su desktop) */
.cilli-feature-cards-wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.cilli-feature-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 24px 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cilli-feature-icon-circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: #edf5dd;
    /* Verde chiaro */
    border-radius: 50%;
    margin-bottom: 15px;
}

.cilli-feature-icon {
    font-size: 20px;
    color: #1a5c1a;
    /* Verde scuro */
}

.cilli-feature-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.2;
}

.cilli-feature-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 991px) {
    .cilli-feature-cards-wrap {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .cilli-feature-cards-wrap {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   WOOCOMMERCE FILTERS CUSTOMIZATION (AJAX BLOCKS)
   ========================================================================== */

/* Contenitore e Tipografia Generale */
.wc-block-product-filters__overlay-content {
    font-family: "Inter", "Roboto", sans-serif;
    color: #333;
}

.wc-block-product-filters__overlay-content .wp-block-heading {
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
    color: #1a5c1a;
    /* Verde scuro */
    border-bottom: 2px solid #edf5dd;
    padding-bottom: 8px;
}

/* Fix per i testi troppo sottili/grandi dello screenshot */
.wc-block-product-filter-checkbox-list__text {
    font-size: 14px;
    font-weight: 400;
    color: #444;
    text-transform: capitalize;
    /* Evita il tutto maiuscolo fastidioso */
}

.wc-block-product-filter-checkbox-list__count {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
}

/* Spaziatura gerarchia categorie */
.wc-block-product-filter-checkbox-list__item {
    margin-bottom: 10px;
}

.wc-block-product-filter-checkbox-list__item.has-depth-1 {
    margin-left: 15px;
}

.wc-block-product-filter-checkbox-list__item.has-depth-2 {
    margin-left: 30px;
}

.wc-block-product-filter-checkbox-list__item.has-depth-3 {
    margin-left: 45px;
}

/* Custom Checkbox Design */
.wc-block-product-filter-checkbox-list__label {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.wc-block-product-filter-checkbox-list__label:hover .wc-block-product-filter-checkbox-list__text {
    color: #FF721E;
    /* Arancione al passaggio del mouse */
}

/* Wrapper del checkbox */
.wc-block-product-filter-checkbox-list__input-wrapper {
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}

/* Se il browser supporta :has, coloriamo il quadratino di verde quando checked */
.wc-block-product-filter-checkbox-list__input-wrapper:has(input:checked) {
    background-color: #1a5c1a;
    border-color: #1a5c1a;
}

/* Nascondi il checkbox nativo (ma lascialo cliccabile) */
.wc-block-product-filter-checkbox-list__input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

/* Mostra la spunta svg e colorala di bianco quando è checked */
.wc-block-product-filter-checkbox-list__mark {
    opacity: 0;
    width: 12px;
    height: 12px;
    color: #fff;
    transition: opacity 0.2s;
}

.wc-block-product-filter-checkbox-list__input:checked+.wc-block-product-filter-checkbox-list__mark {
    opacity: 1;
}

/* Fallback se :has non è supportato: la spunta diventa verde scuro sul quadratino bianco */
@supports not selector(:has(a)) {
    .wc-block-product-filter-checkbox-list__input:checked+.wc-block-product-filter-checkbox-list__mark {
        color: #1a5c1a;
    }
}


/* Stile Filtro STATO (Disponibile / Esaurito come "Pills") */
.wc-block-product-filter-chips__items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wc-block-product-filter-chips__item {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wc-block-product-filter-chips__item:hover {
    border-color: #1a5c1a;
    background: #edf5dd;
}

.wc-block-product-filter-chips__item[aria-checked="true"] {
    background: #1a5c1a !important;
    color: #fff !important;
    border-color: #1a5c1a !important;
}


/* Stile SLIDER PREZZO */
.wc-block-product-filter-price-slider {
    margin-top: 20px;
}

/* Colore traccia attiva dello slider (arancione) */
.wc-block-components-price-slider__range-bar,
.wc-block-product-filter-price-slider .range-bar {
    background-color: #FF721E !important;
}

/* Colore pallini dello slider (verde) */
.wc-block-product-filter-price-slider input[type="range"]::-webkit-slider-thumb {
    background-color: #1a5c1a !important;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.wc-block-product-filter-price-slider input[type="range"]::-moz-range-thumb {
    background-color: #1a5c1a !important;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

/* Input di testo del prezzo (min / max) */
.wc-block-product-filter-price-slider__left input,
.wc-block-product-filter-price-slider__right input {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #333;
    background: #fafafa;
}

/* Bottone "Cancella Filtri" */
.wc-block-product-filter-clear-button button {
    border: 1px solid #FF721E !important;
    color: #FF721E !important;
    border-radius: 6px !important;
    font-weight: 600;
    transition: all 0.2s;
    background: transparent !important;
}

.wc-block-product-filter-clear-button button:hover {
    background: #FF721E !important;
    color: #fff !important;
}

.button.add_to_cart_button.ajax_add_to_cart.product_type_simple {
    font-weight: bold !important;
    background-color: var(--mfn-button-shop-bg);
    border-color: var(--mfn-button-shop-border-color);
    color: var(--mfn-button-shop-color);
    box-shadow: var(--mfn-button-shop-box-shadow);
    font-size: 16px !important;
    border-radius: 15px;
    letter-spacing: 1px;
}

.mfn-product-li-item .title {
    font-size: 18px !important;
    line-height: 22px;
    font-family: 'Quicksand';
    font-weight: bold !important;
    text-align: left;
    color: #20331a;
}

/* ==========================================================================
   CILLI CATEGORY PRODUCTS CAROUSEL
   ========================================================================== */

.cilli-carousel-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    margin: 30px 0;
    font-family: 'Quicksand', 'Inter', sans-serif;
    box-sizing: border-box;
}

.cilli-carousel-cover {
    flex-shrink: 0;
    width: 240px;
    min-height: 280px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cilli-carousel-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.cilli-carousel-cover-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    z-index: 2;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cilli-carousel-track-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.cilli-carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    width: 100%;
    box-sizing: border-box;
    /* Hide scrollbars */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.cilli-carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.cilli-carousel-card {
    flex-shrink: 0;
    width: 190px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.cilli-carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #A67348;
    /* Arancione Cilli */
}

.cilli-carousel-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cilli-carousel-card-img-wrap {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    background: #fafafa;
    border-bottom: 1px solid #f5f5f5;
}

.cilli-carousel-card-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.cilli-carousel-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.cilli-carousel-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cilli-carousel-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a5c1a;
    /* Verde Cilli */
    margin: 0;
}

.cilli-carousel-card-price ins {
    text-decoration: none;
}

.cilli-carousel-card-price del {
    font-size: 12px;
    color: #999;
    margin-right: 5px;
    font-weight: 400;
}

/* Carousel Buttons */
.cilli-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #333333;
    font-size: 24px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    outline: none;
    display: block;
}

.cilli-carousel-btn:hover {
    background: #A67348;
    color: #ffffff;
    border-color: #A67348;
}

.cilli-carousel-prev {
    left: -20px;
}

.cilli-carousel-next {
    right: -20px;
}

/* Responsive */
@media (max-width: 991px) {
    .cilli-carousel-container {
        flex-direction: column;
        align-items: stretch;
    }

    .cilli-carousel-cover {
        width: 100%;
        min-height: 150px;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 20px;
    }

    .cilli-carousel-cover-title {
        font-size: 26px;
    }

    .cilli-carousel-prev,
    .cilli-carousel-next {
        display: none;
        /* Hide arrows on tablets/mobile, use touch swipe */
    }
}

/* Feature card custom image styling */
.cilli-feature-icon-circle img.cilli-feature-image {
    max-width: 80%;
    max-height: 80%;
    height: auto;
    object-fit: contain;
    display: block;
}