.h-60px {
    height: 60px;
}
.h-80px {
    height: 80px;
}
.h-100px {
    height: 100px;
}
.h-400px {
    height: 400px;
}
.header-icon {
    position: relative;
}
.cart-counter {
    position: absolute;
    top: -9px;
    right: -15px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
}
.label-input-field input,
.label-input-field textarea,
.label-input-field select {
    width: 100%;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid var(--in-secondary-6);
    outline: 0;
}
.label-input-field select{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10" fill="none" stroke="gray" stroke-width="1.5" stroke-linecap="round"><path d="M1 3l4 4l4-4"/></svg>') no-repeat right 12px center; /* Aggiunge un'icona freccia minimalista con 2 linee */
    background-size: 12px;
}
.label-input-field label {
    z-index: 1;
}
.label-input-field input:focus {
    border: 3px solid var(--in-primary-3) /* Cambia il colore del bordo */
}
/* select 2 css */
.select2-container {
    width: auto;
    display: block;
    padding: 14px 24px;
    border-radius: 4px;
    border: 1px solid #e4e4e4;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: 60px;
    right: 10px;
}
.select2-dropdown {
    top: -4px;
    border-color: #e4e4e4;
}
.select2-container--open .select2-dropdown {
    left: -1px;
}
.select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0;
}
.select2-container--default .select2-selection--single {
    border: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: #e4e4e4;
}

/* toastr */

#toast-container {
    z-index: 999999;
}

#toast-container > div {
    padding: 15px 25px 15px 50px !important;
    opacity: 1;
    margin-bottom: 1.25rem;
    border-color: transparent;
    -webkit-box-shadow: 0 0.25rem 0.5625rem -0.0625rem rgba(0, 0, 0, 0.2),
        0 0.275rem 1.25rem -0.0625rem rgba(249, 250, 251, 0.05) !important;
    box-shadow: 0 0.25rem 0.5625rem -0.0625rem rgba(0, 0, 0, 0.2),
        0 0.275rem 1.25rem -0.0625rem rgba(249, 250, 251, 0.05) !important;
    border-radius: 0.3125rem;
}

[dir="rtl"] #toast-container > div {
    direction: rtl;
    background-position: center right 0.9375rem;
    padding: 15px 50px 15px 25px !important;
}

[dir="rtl"] #toast-container.toast-top-left {
    right: 12px;
    left: auto;
}

[dir="rtl"] #toast-container.toast-top-right {
    left: 12px;
    right: auto;
}

[dir="rtl"] #toast-container.toast-bottom-left {
    right: 12px;
    left: auto;
}

[dir="rtl"] #toast-container.toast-bottom-right {
    left: 12px;
    right: auto;
}

[dir="rtl"] #toast-container.toast-top-full-width#toast-container > div,
[dir="rtl"] #toast-container.toast-bottom-full-width#toast-container > div {
    left: 0;
    right: 0;
}

#toast-container > .toast {
    max-width: 100%;
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: 15px 16px;
    overflow: visible;
}

#toast-container.toast-bottom-full-width > div,
#toast-container.toast-top-full-width > div {
    padding: 15px 50px 15px 50px !important;
    width: 100%;
    margin-bottom: 0;
    border-radius: 0 !important;
}

#toast-container.toast-bottom-full-width > div .toast-close-button,
#toast-container.toast-top-full-width > div .toast-close-button {
    top: 12px !important;
}

html:not([dir="rtl"])
    #toast-container.toast-bottom-full-width
    > div
    .toast-close-button,
html:not([dir="rtl"])
    #toast-container.toast-top-full-width
    > div
    .toast-close-button {
    right: 12px !important;
}

[dir="rtl"] #toast-container.toast-bottom-full-width > div .toast-close-button,
[dir="rtl"] #toast-container.toast-top-full-width > div .toast-close-button {
    left: 12px !important;
}

#toast-container > .toast-info {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='%2303c3ec' d='M256 90c44.3 0 86 17.3 117.4 48.6C404.7 170 422 211.7 422 256s-17.3 86-48.6 117.4C342 404.7 300.3 422 256 422s-86-17.3-117.4-48.6C107.3 342 90 300.3 90 256s17.3-86 48.6-117.4C170 107.3 211.7 90 256 90m0-42C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z'/%3E%3Cpath fill='%2303c3ec' d='M277 360h-42V235h42v125zm0-166h-42v-42h42v42z'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-info .toast-close-button {
    background-color: #0d5abf !important;
    -webkit-box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
    box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
}

#toast-container > .toast-error {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='%23ff3e1d' d='M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-error .toast-close-button {
    background-color: #e03a1d !important;
    -webkit-box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
    box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
}

#toast-container > .toast-success {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='%2371dd37' d='M186.301 339.893L96 249.461l-32 30.507L186.301 402 448 140.506 416 110z'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-success .toast-close-button {
    background-color: #20b250 !important;
    -webkit-box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
    box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
}

#toast-container [dir="rtl"] > .toast-success {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='%2371dd37' d='M96 110l-32 30.5L325.7 402L448 280l-32-30.5l-90.3 90.4L96 110z'/%3E%3C/svg%3E") !important;
}

#toast-container > .toast-warning {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='%23ffab00' d='M32 464h448L256 48 32 464zm248-64h-48v-48h48v48zm0-80h-48v-96h48v96z'/%3E%3C/svg%3E") !important;
    background-size: 24px;
}

#toast-container > .toast-warning .toast-close-button {
    background-color: #fcac00 !important;
    -webkit-box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
    box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06) !important;
}

#toast-container:not(.toast-bottom-full-width, .toast-top-full-width) > div {
    width: 25rem !important;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    top: auto;
    opacity: 0.2;
    height: 0.1875rem;
    background-color: #212b36;
    border-bottom-right-radius: 0.3125rem;
    border-bottom-left-radius: 0.3125rem;
}

[dir="rtl"] .toast-progress {
    left: auto;
    right: 0;
}

.toast-close-button {
    position: absolute;
    top: 0;
    text-shadow: none;
    border-top-right-radius: 0.25rem;
    padding: 0.2rem 0.45rem !important;
    -webkit-transition: all 0.23s ease 0.1s;
    transition: all 0.23s ease 0.1s;
    opacity: 1 !important;
    line-height: 0.98;
}

html:not([dir="rtl"]) .toast-close-button {
    right: 0 !important;
}

[dir="rtl"] .toast-close-button {
    left: -7px !important;
    right: auto !important;
}

@media (max-width: 419.98px) {
    .toast {
        width: 300px !important;
    }
}
#toast-container .toast-close-button {
    font-weight: 300;
    color: #f4f6f8 !important;
    background-color: #ffffff;
    -webkit-box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06);
    box-shadow: 0 0.125rem 0.3rem -0.0625rem rgba(0, 0, 0, 0.1),
        0 0.275rem 0.75rem -0.0625rem rgba(249, 250, 251, 0.06);
}

#toast-container > .toast-success,
#toast-container > .toast-success .toast-message a,
#toast-container > .toast-success .toast-message label {
    background-color: #ffffff !important;
    color: #20b250;
}
#toast-container > .toast-error,
#toast-container > .toast-error .toast-message a,
#toast-container > .toast-error .toast-message label {
    background-color: #ffffff !important;
    color: #e03a1d;
}
#toast-container > .toast-info,
#toast-container > .toast-info .toast-message a,
#toast-container > .toast-info .toast-message label {
    background-color: #ffffff !important;
    color: #0d5abf;
}
#toast-container > .toast-warning,
#toast-container > .toast-warning .toast-message a,
#toast-container > .toast-warning .toast-message label {
    background-color: #ffffff !important;
    color: #fcac00;
}
#toast-container > .toast-success .toast-close-button,
#toast-container > .toast-error .toast-close-button,
#toast-container > .toast-info .toast-close-button,
#toast-container > .toast-warning .toast-close-button {
    color: #ffffff !important;
}
/* toastr */

.address-delete-modal {
    max-width: 700px !important;
}

.min-h-400 {
    min-height: 400px !important;
}

.avatar-icon {
    width: 1.75rem;
    height: 1.75rem;
    line-height: 1.75rem;
}

.vertical-product-card .card-btn {
    z-index: 1;
}

/* ===================================
   PRODUCT CARD - CLICKABLE IMAGE
   =================================== */

/* Card prodotto cliccabile */
.product-card-clickable {
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Hover effect sulla card */
.product-card-clickable:hover {
    transform: translateY(-2px);
}

/* Gestione immagine secondaria con hover desktop */
.vertical-product-card .image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.vertical-product-card .image-wrapper .main-image {
    transition: opacity 0.3s ease;
    width: 100%;
    display: block;
}

.vertical-product-card .image-wrapper .secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Desktop: hover mostra immagine secondaria */
@media (hover: hover) and (pointer: fine) {
    .product-card-clickable:hover .image-wrapper .secondary-image {
        opacity: 1;
    }

    .product-card-clickable:hover .image-wrapper .main-image {
        opacity: 0;
    }
}

/* Mobile: gestione touch per mostrare immagine secondaria */
@media (hover: none) and (pointer: coarse) {
    .vertical-product-card .image-wrapper.touch-active .secondary-image {
        opacity: 1;
    }

    .vertical-product-card .image-wrapper.touch-active .main-image {
        opacity: 0;
    }
}

/* I pulsanti wishlist e quick view devono rimanere cliccabili */
.vertical-product-card .product-btns {
    position: relative;
    z-index: 10;
}

.vertical-product-card .product-btns .rounded-btn {
    pointer-events: auto;
    position: relative;
    z-index: 11;
}

/* Il titolo del prodotto è un link */
.vertical-product-card .card-title {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

/* Hover sul titolo per feedback visivo */
.vertical-product-card .card-title:hover,
.horizontal-product-card .title:hover,
.hr-product .card-title:hover {
    color: var(--bs-primary, #289BB1);
    text-decoration: none;
}

/* Vista lista: stili specifici */
.hr-product .thumbnail {
    min-width: 200px;
}

.hr-product .thumbnail .image-wrapper {
    position: relative;
    width: 100%;
}

.hr-product .thumbnail .image-wrapper .main-image {
    transition: opacity 0.3s ease;
}

.hr-product .thumbnail .image-wrapper .secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Desktop hover per vista lista */
@media (hover: hover) and (pointer: fine) {
    .product-card-link:hover .hr-product .thumbnail .image-wrapper .secondary-image {
        opacity: 1;
    }

    .product-card-link:hover .hr-product .thumbnail .image-wrapper .main-image {
        opacity: 0;
    }
}

/* Mobile touch per vista lista */
@media (hover: none) and (pointer: coarse) {
    .hr-product .thumbnail .image-wrapper.touch-active .secondary-image {
        opacity: 1;
    }

    .hr-product .thumbnail .image-wrapper.touch-active .main-image {
        opacity: 0;
    }
}

/* Horizontal Product Card */
.horizontal-product-card .thumbnail .image-wrapper {
    position: relative;
    width: 100%;
}

.horizontal-product-card .thumbnail .image-wrapper .main-image {
    transition: opacity 0.3s ease;
}

.horizontal-product-card .thumbnail .image-wrapper .secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Desktop hover per horizontal card */
@media (hover: hover) and (pointer: fine) {
    .product-card-link:hover .horizontal-product-card .thumbnail .image-wrapper .secondary-image {
        opacity: 1;
    }

    .product-card-link:hover .horizontal-product-card .thumbnail .image-wrapper .main-image {
        opacity: 0;
    }
}

/* Mobile touch per horizontal card */
@media (hover: none) and (pointer: coarse) {
    .horizontal-product-card .thumbnail .image-wrapper.touch-active .secondary-image {
        opacity: 1;
    }

    .horizontal-product-card .thumbnail .image-wrapper.touch-active .main-image {
        opacity: 0;
    }
}

/* Product overlay deve rimanere sopra */
.horizontal-product-card .product-overlay {
    z-index: 10;
}

.horizontal-product-card .product-overlay .rounded-btn {
    position: relative;
    z-index: 11;
}

@media (min-width: 1199px) and (max-width: 1399.98px) {
    .d-none-1399 {
        display: none !important;
    }
}

.checkout-sidebar {
    position: sticky;
    top: 100px;
}

/* Previene la selezione del testo sui contenitori delle varianti */
.variant-block {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Specifico per gli slider Swiper */
.swiper-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Per i singoli elementi gallery */
.gallery-item-block {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Per la griglia di varianti */
.grid-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Per i bottoni di toggle */
.toggle-buttons {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Alternativa più generale - applica a tutti gli elementi interattivi */
.variant-block * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Eccezione: permetti selezione negli input di testo personalizzati */
.custom-dimension-input {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Opzionale: migliora l'esperienza touch su mobile */
.swiper-slide {
    -webkit-tap-highlight-color: transparent;
}

.gallery-item-block {
    -webkit-tap-highlight-color: transparent;
}

/* Forza il pulsante a rimanere grigio quando disabilitato, anche al hover */
.add-to-cart-btn.disabled,
.add-to-cart-btn:disabled,
.add-to-cart-btn.disabled:hover,
.add-to-cart-btn:disabled:hover,
.add-to-cart-btn.disabled:focus,
.add-to-cart-btn:disabled:focus,
.add-to-cart-btn.disabled:active,
.add-to-cart-btn:disabled:active {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    /* RIMOSSO: pointer-events: none !important; */
}

/* Tooltip con bg-warning */
.tooltip.bg-warning .tooltip-inner {
    background-color: var(--bs-warning) !important;
    color: var(--bs-dark) !important;
    border-radius: 8px !important; /* Bordi arrotondati */
}

.tooltip.bg-warning.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bg-warning.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: var(--bs-warning) !important;
}

.tooltip.bg-warning.bs-tooltip-end .tooltip-arrow::before,
.tooltip.bg-warning.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
    border-right-color: var(--bs-warning) !important;
}

.tooltip.bg-warning.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bg-warning.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
    border-bottom-color: var(--bs-warning) !important;
}

.tooltip.bg-warning.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bg-warning.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
    border-left-color: var(--bs-warning) !important;
}

/* ===================================
   🔍 PREMIUM LIVE SEARCH STYLES - DESKTOP OPTIMIZED
   =================================== */

.search-wrapper {
    position: relative;
    width: 100%;
}

/* Search Form */
.search-form {
    position: relative;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-form:focus-within {
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(209, 213, 219, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Search Input */
.search-input {
    border: none !important;
    outline: none !important;
    padding: 8px 40px 8px 8px;
    font-size: 15px;
    color: #1f2937;
    background: transparent;
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Submit Button */
.submit-icon-btn-secondary {
    background: #801854;
    border: none;
    padding: 12px 16px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border-radius: 50px;
    margin: -8px -16px -8px -12px;
}

.submit-icon-btn-secondary:hover {
    background: #a01f6b;
    transform: scale(1.02);
}

.submit-icon-btn-secondary.searching {
    background: #801854;
}

.submit-icon-btn-secondary.searching i {
    color: #fff;
}

.submit-icon-btn-secondary i {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* Clear Button */
.clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    font-size: 14px;
}

.clear-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: translateY(-50%) scale(1.1);
}

/* Dropdown - Wide & Premium */
.search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12),
                0 10px 20px -5px rgba(0, 0, 0, 0.08);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid #e5e7eb;
}

/* Dropdown Animations */
.dropdown-enter {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-enter-start {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
}

.dropdown-enter-end {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-leave {
    transition: all 0.2s cubic-bezier(0.4, 0, 1, 1);
}

.dropdown-leave-start {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dropdown-leave-end {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
}

/* Custom Scrollbar */
.search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 0 16px 16px 0;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Search Section */
.search-section {
    padding: 6px 0;
}

.search-section + .search-section {
    border-top: 1px solid #f3f4f6;
    margin-top: 6px;
    padding-top: 8px;
}

.search-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.search-section-title i {
    font-size: 14px;
    opacity: 0.7;
}

/* === GRID LAYOUT RESPONSIVE (3-6 COLONNE) === */

/* Di default: layout a lista singola */
.search-section {
    padding: 8px 16px 12px;
}

/* Layout Grid Multi-Column per Desktop - MASSIMO 3 COLONNE */
@media (min-width: 1024px) {
    /* Grid a 2 colonne da 1024px */
    .search-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 6px 20px 12px;
    }

    .search-section-title {
        grid-column: 1 / -1;
        padding: 6px 0 8px;
    }

    /* Ogni search-item occupa 1 cella */
    .search-item {
        grid-column: span 1;
    }
}

@media (min-width: 1280px) {
    /* Grid a 3 colonne da 1280px - MASSIMO */
    .search-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        padding: 6px 24px 12px;
    }
}

/* Su schermi grandi manteniamo sempre 3 colonne massimo */
@media (min-width: 1600px) {
    .search-section {
        gap: 20px;
        padding: 6px 32px 12px;
    }
}

@media (min-width: 1920px) {
    .search-section {
        gap: 22px;
        padding: 6px 40px 12px;
    }
}

/* === SEARCH ITEM CARD - E-commerce Style === */

.search-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 12px;
    background: #fff;
    border: 1px solid transparent;
    position: relative;
}

/* Desktop: layout verticale con immagine sopra */
@media (min-width: 1024px) {
    .search-item:hover {
        background: #fafbfc;
        border-color: #e5e7eb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

    .search-item.active {
        background: #f8f9fa;
        border-color: #289BB1;
        box-shadow: 0 0 0 2px rgba(40, 155, 177, 0.1);
    }
}

/* Focus State (accessibilità) */
.search-item:focus-visible {
    outline: 2px solid #289BB1;
    outline-offset: 2px;
}

/* Search Item Image - Grande e leggibile */
.search-item-image {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Su desktop: immagine quadrata ben visibile */
@media (min-width: 1024px) {
    .search-item-image {
        min-height: 140px;
    }
}

.search-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

@media (min-width: 1024px) {
    .search-item:hover .search-item-image img {
        transform: scale(1.08);
    }
}

/* Fallback per immagini mancanti */
.search-item-image:not(:has(img)),
.search-item-image img[src=""],
.search-item-image img[alt=""]:not([src]) {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.search-item-image:not(:has(img))::after {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 32px;
    color: #d1d5db;
}

/* === Gestione risultati senza immagine === */

/* Classe speciale per item senza immagine - layout alternativo */
.search-item.no-image {
    flex-direction: column;
    justify-content: flex-start;
    background: #f9fafb;
    border-left: 4px solid #289BB1;
    padding: 20px 16px;
}

.search-item.no-image .search-item-image {
    display: none;
}

.search-item.no-image .search-item-content {
    text-align: left;
}

.search-item.no-image .search-item-title {
    font-size: 16px;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Search Item Content */
.search-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.search-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* Nessun troncamento - mostra tutto il titolo */
}

.search-item-title mark {
    background: rgba(201, 172, 32, 0.25);
    color: #1f2937;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.search-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}

/* Badges */
.badge-category,
.badge-product,
.badge-starting-point {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-category {
    background: rgba(40, 155, 177, 0.12);
    color: #289BB1;
}

.badge-product {
    background: rgba(201, 172, 32, 0.15);
    color: #C9AC20;
}

.badge-starting-point {
    background: rgba(255, 152, 0, 0.15);
    color: #f57c00;
}

/* Price */
.search-item-price {
    color: #289BB1;
    font-weight: 700;
    font-size: 15px;
    margin-top: auto;
}

/* Empty State */
.search-empty {
    padding: 60px 24px;
    text-align: center;
    color: #6b7280;
    grid-column: 1 / -1;
}

.search-empty i {
    font-size: 56px;
    color: #d1d5db;
    margin-bottom: 20px;
    opacity: 0.5;
}

.search-empty p {
    font-size: 16px;
    margin: 12px 0;
    color: #4b5563;
    font-weight: 500;
}

.search-empty strong {
    color: #1f2937;
}

.search-empty small {
    font-size: 14px;
    color: #9ca3af;
    display: block;
    margin-top: 8px;
}

/* Footer */
.search-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
    grid-column: 1 / -1;
}

.view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: #289BB1;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-all-btn:hover {
    background: #1f7a8f;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 155, 177, 0.35);
}

.view-all-btn i {
    transition: transform 0.25s;
}

.view-all-btn:hover i {
    transform: translateX(4px);
}

/* === RESPONSIVE - TABLET E MOBILE === */

@media (max-width: 1023px) {
    .search-dropdown {
        max-height: 60vh;
    }

    .search-section {
        display: block;
        padding: 8px 0;
    }

    .search-item {
        flex-direction: row;
        gap: 10px;
        padding: 10px 12px;
        margin-bottom: 6px;
        border-radius: 10px;
    }

    .search-item-image {
        width: 100px;
        height: 100px;
        min-width: 100px;
        min-height: 100px;
    }

    .search-item-title {
        font-size: 13px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .search-item-meta {
        font-size: 10px;
    }

    .search-item-price {
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .search-dropdown {
        border-radius: 12px;
        max-height: 50vh;
    }

    .search-section-title {
        padding: 8px 12px 4px;
        font-size: 10px;
    }

    .search-item {
        padding: 8px 10px;
        gap: 8px;
    }

    .search-item-image {
        width: 90px;
        height: 90px;
        min-width: 90px;
        min-height: 90px;
    }

    .search-item-title {
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .search-footer {
        padding: 10px 12px;
    }

    .view-all-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}
/**
 * Stili per il contenitore unificato delle info varianti
 */

/* Contenitore principale info */
.variation-info-container {
    position: relative;
    width: 100%;
    display: none;
    margin-top: 1rem;
    margin-bottom: 1rem;
    opacity: 0;
    overflow: hidden;
    max-height: 0;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.variation-info-container.visible {
    display: block;
}

/* Contenuto interno con padding */
.variation-info-container > div {
    padding: 1.5rem;
}

#info-description-content {
    padding-top: 0.5rem;
}


/* Assicurati che le immagini non creino scatti */
.variation-info-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Gestione iframe (video YouTube) */
.variation-info-container iframe {
    max-width: 100%;
    border: none;
    border-radius: 8px;
}



/* ===== STILI ICONA INFO ===== */

/* Icona info - mantieni stili originali */
.info-icon {
    display: inline-block;
    cursor: pointer;
    width: 24px;
    height: 24px;
    margin-top: 4px;
    position: relative;
}

.info-icon svg,
.info-icon .info-svg {
    width: 100%;
    height: 100%;
}

/* Mini-spinner che appare accanto all'icona info durante il caricamento */
.info-icon.loading::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -20px;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--in-primary-3);
    border-radius: 50%;
    animation: info-spinner 0.6s linear infinite;
    background: white;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

@keyframes info-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Icona info in stato loading - riduci leggermente l'opacità */
.info-icon.loading {
    opacity: 0.7;
    pointer-events: none; /* Previeni click multipli durante il caricamento */
}

/* Non modificare i colori - mantieni quelli originali dell'SVG */

/* ===== FIX ICONE TAGLIATE NELLO SLIDER ===== */



/* Assicurati che la gallery-item-block non tagli contenuti */
.gallery-item-block {
    overflow: visible;
}

.swiper-wrapper {
    padding-bottom: 10px;
}

/* ===== GRIGLIA ===== */

/* Layout per griglia */
.grid-container {
    display: grid;
    gap: 1rem;
    position: relative;
}

.grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Contenitore info nella griglia - occupa tutta la larghezza della riga */
.grid-container .variation-info-container {
    grid-column: 1 / -1;
    margin: 0.5rem 0;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .variation-info-container > div {
        padding: 1rem;
    }

    #info-description-content .row {
        margin: 0;
    }

    #info-description-content .col-md-6 {
        padding: 0.5rem;
    }
}

/* ===================================
   FILTER GRID V2 - MODERN STYLE
   =================================== */

/* Sezione filtri moderna */
.filters-bar-section-v2 {
    width: 100%;
}

/* Container tab centrati */
.filter-tabs-v2 {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
}

/* Stile bottoni tab moderni */
.filter-tab-btn {
    background: #f3f4f6;
    color: #4b5563;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* Effetto hover sui tab */
.filter-tab-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Tab attivo con colore primario */
.filter-tab-btn.active {
    background: var(--in-primary-4);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.filter-tab-btn.active:hover {
    background: var(--in-primary-4);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Card items stile V2 - minimalista */
.item-filter-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 12px;
    background: transparent;
}

/* Hover effect sugli items */
.item-filter-v2:hover {
    background: #f9fafb;
    transform: translateY(-4px);
}

/* Contenitore immagine */
.filter-image-wrapper {
    width: 100%;
    max-width: 150px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 8px;
}

.filter-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.item-filter-v2:hover .filter-image-wrapper img {
    transform: scale(1.05);
}

/* Titolo pulito e centrato */
.filter-title-v2 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.item-filter-v2:hover .filter-title-v2 {
    color: var(--in-primary-4);
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .filter-tabs-v2 {
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .filter-tab-btn {
        padding: 0.5rem 1.25rem;
        font-size: 14px;
    }

    .item-filter-v2 {
        padding: 1rem 0.5rem;
    }

    .filter-title-v2 {
        font-size: 14px;
    }

    .filter-image-wrapper {
        max-width: 100px;
    }
}

/* ===================================
   FILTERGRID MODERNO V2 - FLIP ANIMATIONS
   Stile Apple Gallery con transizioni fluide
   =================================== */

/* Container principale con Flexbox centrato */
.filters-bar-section-v2 .filter_group {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 0.75rem 1.5rem; /* Ridotto row-gap da 1.5rem a 0.75rem */
    margin: 0 auto !important;
    padding: 2rem 0;
    max-width: 100%;
    position: relative;
    /* Opacità 0 invece di visibility hidden per permettere al flexbox di calcolare il layout */
    opacity: 0;
    transition: opacity 0.2s ease;
    min-height: auto !important; /* Rimosso min-height fisso */
    height: auto !important; /* Forza altezza automatica anche con stili inline */
}

/* Ogni elemento del filtro */
.filters-bar-section-v2 .filter_item {
    flex: 0 0 auto;
    /* IMPORTANTE: Non usare transition qui, viene gestito da JS */
    will-change: transform, opacity;
    /* Abilita accelerazione GPU */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Elementi visibili - stato normale */
.filters-bar-section-v2 .filter_item.filter-visible {
    display: block;
    opacity: 1;
}

/* Elementi nascosti - COMPLETAMENTE rimossi dal layout */
.filters-bar-section-v2 .filter_item.filter-hidden,
.filters-bar-section-v2 .filter_item[style*="display: none"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Card items con dimensioni compatte */
.filters-bar-section-v2 .item-filter-v2 {
    padding: 1rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Smooth transitions per hover effects */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Effetto hover sui card (separato dalle animazioni filtro) */
.filters-bar-section-v2 .filter_item:not([style*="display: none"]) .item-filter-v2:hover {
    background: #f9fafb;
    transform: translateY(-4px);
}

/* Prevent layout shift durante animazioni */
.filters-bar-section-v2 .filter_item img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Large Desktop (xxl) - fino a 6 elementi per riga */
@media (min-width: 1400px) {
    .filters-bar-section-v2 .filter_item {
        width: 160px;
        min-width: 160px;
    }
}

/* Desktop (xl) - fino a 5 elementi per riga */
@media (min-width: 1200px) and (max-width: 1399px) {
    .filters-bar-section-v2 .filter_item {
        width: 180px;
        min-width: 180px;
    }
}

/* Tablet (md) - fino a 4 elementi per riga */
@media (min-width: 768px) and (max-width: 1199px) {
    .filters-bar-section-v2 .filter_item {
        width: 200px;
        min-width: 200px;
    }
    .filters-bar-section-v2 .filter_group {
        gap: 0.75rem 1.25rem; /* Ridotto row-gap */
        min-height: auto !important; /* Rimosso min-height fisso */
    }
}

/* Mobile (sm) - 2 elementi per riga */
@media (min-width: 576px) and (max-width: 767px) {
    .filters-bar-section-v2 .filter_item {
        width: calc(50% - 0.5rem);
        min-width: auto;
    }
    .filters-bar-section-v2 .filter_group {
        gap: 0.5rem 1rem; /* row-gap column-gap: ridotto spazio verticale */
        min-height: auto !important; /* Rimosso min-height fisso */
        padding: 1rem 0.5rem;
    }
}

/* Extra Small Mobile - 2 elementi per riga più grandi */
@media (max-width: 575px) {
    .filters-bar-section-v2 .filter_item {
        width: calc(50% - 0.5rem);
        min-width: auto;
    }
    .filters-bar-section-v2 .filter_group {
        gap: 0.5rem 1rem; /* row-gap column-gap: ridotto spazio verticale tra le righe */
        padding: 1rem 0.5rem;
        min-height: auto !important; /* Rimosso min-height fisso */
    }
    .filters-bar-section-v2 .item-filter-v2 {
        padding: 1rem 0.5rem;
    }
    .filter-image-wrapper {
        max-width: 120px;
        margin-bottom: 0.75rem;
    }
    .filter-title-v2 {
        font-size: 15px;
    }
}

/* === PERFORMANCE OPTIMIZATIONS === */

/* Riduci repaints durante le animazioni */
@media (prefers-reduced-motion: no-preference) {
    .filters-bar-section-v2 .filter_item {
        /* GPU acceleration per smooth animations */
        transform: translate3d(0, 0, 0);
    }
}

/* Supporto per utenti che preferiscono animazioni ridotte */
@media (prefers-reduced-motion: reduce) {
    .filters-bar-section-v2 .filter_item {
        transition: opacity 0.1s ease !important;
        transform: none !important;
    }
}

/* ===== Category Nav Banner (prodotti + personalizzabili) ===== */
.category-nav-banner {
    background-color: #801854;
    padding: 40px 20px;
    text-align: center;
    width: 100%;
}

.category-nav-banner__title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}

.category-nav-banner__buttons {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}

.category-nav-banner__btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.category-nav-banner__btn:hover,
.category-nav-banner__btn:focus {
    color: #fff;
    text-decoration: none;
    outline: none;
}

.category-nav-banner__btn:hover .category-nav-banner__btn-pill,
.category-nav-banner__btn:focus .category-nav-banner__btn-pill {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

.category-nav-banner__btn.active .category-nav-banner__btn-pill {
    background: #fff;
    border-color: #fff;
}

.category-nav-banner__btn.active .category-nav-banner__btn-icon svg {
    stroke: #801854;
}

.category-nav-banner__btn.active .category-nav-banner__btn-label {
    color: #801854;
}

/* Pill contenitore (icona + label) */
.category-nav-banner__btn-pill {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 50px;
    padding:  5px 28px 5px 5px;
    min-width: 220px;
    transition: background 0.2s, border-color 0.2s;
}

.category-nav-banner__btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255,255,255,0.85);
    border-radius: 50%;
}

.category-nav-banner__btn-icon svg {
    stroke: #fff;
}

.category-nav-banner__btn-icon img {
    /* Inverte l'SVG (fill #742352) in bianco */
    filter: brightness(0) invert(1);
}

.category-nav-banner__btn.active .category-nav-banner__btn-icon img {
    /* Stato attivo: ripristina il colore originale dell'SVG */
    filter: none;
}

.category-nav-banner__btn-label {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    color: #fff;
}

.category-nav-banner__btn-sub {
    font-size: 0.8rem;
    opacity: 0.85;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 575px) {
    .category-nav-banner {
        padding: 28px 16px;
    }

    .category-nav-banner__title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .category-nav-banner__buttons {
        gap: 18px;
    }

    .category-nav-banner__btn-pill {
        min-width: 0;
        padding: 11px 20px 11px 11px;
        gap: 10px;
    }

    .category-nav-banner__btn-icon {
        width: 38px;
        height: 38px;
    }

    .category-nav-banner__btn-label {
        font-size: 0.95rem;
    }
}
/* ===== /Category Nav Banner ===== */