/**
 * WooCommerce Custom Loop - Styles
 * Version: 2.1.0
 */

/* === WRAPPER PRINCIPALE === */
.woo-custom-loop-wrapper {
    width: 100%;
    margin: 20px 0;
}

/* === GRIGLIA PRODOTTI === */
.woo-custom-loop-grid {
    display: grid;
    gap: 30px;
    width: 100%;
}

/* Colonne responsive */
.woo-custom-loop-grid.columns-1 {
    grid-template-columns: 1fr;
}

.woo-custom-loop-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.woo-custom-loop-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.woo-custom-loop-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.woo-custom-loop-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.woo-custom-loop-grid.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* === SINGOLO PRODOTTO === */
.woo-custom-product-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.woo-custom-product-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
    border-color: #ccc;
}

.woo-custom-product-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* === IMMAGINE === */
.woo-custom-product-image {
    margin-bottom: 5px;
    text-align: center;
    overflow: hidden;
    border-radius: 5px;
    background: #f9f9f9;
    position: relative;
    cursor: zoom-in;
}

.woo-custom-product-image img {
    max-width: 100%;
    height: auto;
    transition: none; /* Rimosso transition per lo zoom interattivo */
    display: block;
}

/* Zoom interattivo attivo */
.woo-custom-product-image.zooming img {
    transform-origin: 0 0;
    will-change: transform;
}

/* === BOTTONE ZOOM IMMAGINE === */
.woo-custom-image-zoom {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 0px;
}

.woo-zoom-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #53AF31 !important;
    border: 1px solid #53AF31 !important;
    color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.woo-zoom-button:hover {
    background: #53AF31 !important;
    color: #fff !important;
    border-color: #53AF31 !important;
    transform: scale(1.15) !important;
}

.woo-zoom-button svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

/* === TITOLO === */
.woo-custom-product-title {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
    min-height: 50px;
    line-height: 1.4;
}

.woo-custom-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.woo-custom-product-title a:hover {
    color: #0073aa;
}

/* === PREZZO === */
.woo-custom-product-price {
    font-size: 22px;
    font-weight: bold;
    color: #0073aa;
    margin: 15px 0;
}

.woo-custom-product-price del {
    font-size: 16px;
    color: #999;
    margin-right: 8px;
}

.woo-custom-product-price ins {
    text-decoration: none;
}

/* === SPECIFICHE TECNICHE === */
.woo-custom-product-specs {
    background: #f9f9f9;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    font-size: 14px;
    flex-grow: 1;
}

.woo-custom-spec-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    line-height: 1.6;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.woo-custom-spec-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.woo-custom-spec-item .spec-label {
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
    margin-right: 10px;
}

.woo-custom-spec-item .spec-value {
    color: #333;
    text-align: right;
}

/* === BOTTONE === */
.woo-custom-product-button {
    margin-top: 15px;
}

.woo-custom-product-button .button,
.woo-custom-product-button .added_to_cart {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    background: #53af31;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.woo-custom-product-button .button:hover,
.woo-custom-product-button .added_to_cart:hover {
    background: #eae44c;
}

/* === MESSAGGIO VUOTO === */
.woo-custom-loop-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.woo-custom-loop-empty p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* ========================================= */
/* === LIGHTBOX IMMAGINI === */
/* ========================================= */

.woo-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.woo-lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.woo-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.woo-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 4px;
}

.woo-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease;
}

.woo-lightbox-close:hover {
    transform: scale(1.2);
}

.woo-lightbox-title {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    color: #fff;
    text-align: center;
    font-size: 16px;
    padding: 10px;
}

/* ========================================= */
/* === STILI LAYOUT DETTAGLIO PRODOTTO === */
/* ========================================= */

.woo-product-detail-layout {
    width: 100%;
    max-width: 100%;
    margin: 40px 0;
    display: grid;
    grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
    gap: 20px 25px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Layout senza upsell - immagine più larga, specifiche più strette */
.woo-product-detail-layout.woo-no-upsells {
    grid-template-columns: minmax(350px, 45%) 1fr;
}

/* === HEADER CON TITOLO E PULSANTE === */
.woo-product-detail-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 30px;
}

.woo-product-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    max-width: 450px;
}

.woo-product-detail-title {
    color: #53AF31;
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

/* Pulsante nell'header */
.woo-product-detail-header .woo-product-detail-button {
    flex-shrink: 0;
    margin: 0;
}

.woo-product-detail-container {
    display: contents;
}

/* === COLONNA SINISTRA === */
.woo-product-detail-left {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woo-product-detail-image {
    border: 1px solid #EAE44C;
    border-radius: 15px;
    padding: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.woo-product-detail-image img {
    max-width: 100%;
    height: auto;
    transition: none;
}

.woo-product-detail-image.zooming img {
    transform-origin: 0 0;
    will-change: transform;
}

/* === BOTTONE ZOOM LAYOUT DETTAGLIO === */
.woo-detail-zoom-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #53AF31 !important;
    border: 1px solid #53AF31 !important;
    color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: auto !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.woo-detail-zoom-button:hover {
    background: #53AF31 !important;
    color: #fff !important;
    border-color: #53AF31 !important;
    transform: scale(1.15) !important;
}

.woo-detail-zoom-button svg {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
}

.woo-detail-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #EAE44C;
    color: #000;
    padding: 18px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.woo-detail-button:hover {
    background: #53AF31;
    color: #000;
}

.woo-detail-button-text {
    flex: 1;
    text-align: left;
    color: #000;
}

.woo-detail-button:hover .woo-detail-button-text {
    color: #000;
}

.woo-detail-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 15px;
}

.woo-detail-button-icon svg {
    display: block;
}

/* === COLONNA DESTRA === */
.woo-product-detail-right {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.woo-product-specs-box {
    background: #f5f5f5;
    padding: 30px 35px;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.woo-specs-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 35px;
    color: #333;
    letter-spacing: 0.5px;
}

.woo-specs-table {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

/* === DESCRIZIONE NOVITÀ === */
.woo-product-description {
    text-align: center;
    margin: 0 0 25px 0;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.woo-spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.woo-spec-label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.woo-spec-value {
    color: #333;
    font-size: 16px;
    text-align: left;
}

/* ========================================= */
/* === LISTA PRODOTTI DETTAGLIO (MODIFICATO) === */
/* ========================================= */
.woo-products-detail-list-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Margine tra i prodotti - NESSUN BORDO */
.woo-products-detail-list-wrapper .woo-product-detail-item {
    margin-bottom: 150px !important;
}

/* Layout per la lista: ogni prodotto usa il grid layout normale */
.woo-products-detail-list-wrapper .woo-product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
    gap: 20px 25px;
}

/* Layout lista senza upsell - immagine più larga, specifiche più strette */
.woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
    grid-template-columns: minmax(350px, 45%) 1fr;
}

.woo-products-detail-list-wrapper .woo-product-detail-container {
    display: contents;
}

/* Rimuovi margine dall'ultimo blocco */
.woo-products-detail-list-wrapper .woo-product-detail-item:last-child {
    margin-bottom: 0 !important;
}

/* Reset margini upsell dentro la lista */
.woo-products-detail-list-wrapper .woo-upsell-products-box {
    margin-bottom: 0 !important;
    padding-bottom: 30px !important;
    margin-top: 0 !important;
}

/* ========================================= */
/* === PRODOTTI UP-SELL (MODIFICATO) === */
/* ========================================= */

.woo-upsell-products-box {
    margin-top: 0;
    padding: 15px 18px;
    border-radius: 10px;
    background: #f5f5f5;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.woo-upsell-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.woo-upsell-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
    padding-right: 10px;
    flex-grow: 1;
    align-content: start;
    max-height: 520px;
}

/* Stile scrollbar per accessori */
.woo-upsell-products-grid::-webkit-scrollbar {
    width: 6px;
}

.woo-upsell-products-grid::-webkit-scrollbar-track {
    background: #e5e5e5;
    border-radius: 10px;
}

.woo-upsell-products-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.woo-upsell-products-grid::-webkit-scrollbar-thumb:hover {
    background: #53AF31;
}

.woo-upsell-product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.woo-upsell-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.woo-upsell-product-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.woo-upsell-product-image {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
    cursor: zoom-in;
}
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woo-upsell-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: none;
}

.woo-upsell-product-image.zooming img {
    transform-origin: 0 0;
    will-change: transform;
}

.woo-upsell-product-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
    line-height: 1.4;
    flex: 1;
}

.woo-upsell-product-link:hover .woo-upsell-product-title {
    color: #53AF31;
}

/* === RESPONSIVE === */
/* ========================================= */
/* === RESPONSIVE: LARGE DESKTOP === */
/* ========================================= */

@media (max-width: 1600px) {
    .woo-product-detail-layout {
        grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
        gap: 18px 22px;
    }
    
    .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(320px, 42%) 1fr;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout {
        grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
        gap: 18px 22px;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(320px, 42%) 1fr;
    }
}

@media (max-width: 1440px) {
    .woo-product-detail-layout {
        grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
        gap: 15px 18px;
    }
    
    .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(300px, 40%) 1fr;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout {
        grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
        gap: 15px 18px;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(300px, 40%) 1fr;
    }
    
    .woo-product-specs-box {
        padding: 20px 25px;
    }
    
    .woo-upsell-products-box {
        padding: 18px 22px;
        min-height: 450px;
    }
}

@media (max-width: 1366px) {
    .woo-product-detail-layout {
        grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
        gap: 12px 15px;
    }
    
    .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(280px, 38%) 1fr;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout {
        grid-template-columns: minmax(0, 33.333%) minmax(0, 33.333%) minmax(0, 33.333%);
        gap: 12px 15px;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(280px, 38%) 1fr;
    }
    
    .woo-product-specs-box {
        padding: 18px 20px;
    }
    
    .woo-upsell-products-box {
        padding: 16px 18px;
        min-height: 400px;
    }
    
    .woo-upsell-product-image {
        width: 80px;
        height: 80px;
    }
    
    .woo-upsell-product-title {
        font-size: 12px;
    }
}

@media (max-width: 1280px) {
    .woo-product-detail-layout {
        grid-template-columns: minmax(200px, 26%) minmax(220px, 28%) 1fr;
        gap: 12px 15px;
    }
    
    .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(260px, 36%) 1fr;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout {
        grid-template-columns: minmax(200px, 26%) minmax(220px, 28%) 1fr;
        gap: 12px 15px;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(260px, 36%) 1fr;
    }
    
    .woo-product-specs-box {
        padding: 15px 18px;
    }
    
    .woo-upsell-products-box {
        padding: 15px 16px;
        min-height: 360px;
    }
    
    .woo-upsell-products-grid {
        gap: 10px;
    }
    
    .woo-upsell-product-image {
        width: 70px;
        height: 70px;
    }
    
    .woo-upsell-product-title {
        font-size: 11px;
    }
    
    .woo-specs-title {
        font-size: 15px;
    }
    
    .woo-upsell-title {
        font-size: 15px;
    }
    
    .woo-spec-label,
    .woo-spec-value {
        font-size: 12px;
    }
}

@media (max-width: 1200px) {
    .woo-product-detail-layout {
        grid-template-columns: minmax(180px, 25%) minmax(200px, 27%) 1fr;
        gap: 10px 12px;
    }
    
    .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(240px, 35%) 1fr;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout {
        grid-template-columns: minmax(180px, 25%) minmax(200px, 27%) 1fr;
        gap: 10px 12px;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: minmax(240px, 35%) 1fr;
    }
    
    .woo-product-specs-box {
        padding: 15px;
    }
    
    .woo-upsell-products-box {
        padding: 14px 15px;
        min-height: 320px;
    }
    
    .woo-upsell-products-grid {
        gap: 8px;
    }
    
    .woo-upsell-product-image {
        width: 65px;
        height: 65px;
    }
    
    .woo-upsell-product-item {
        padding: 8px;
    }
    
    .woo-upsell-product-title {
        font-size: 10px;
    }
    
    .woo-specs-title {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .woo-upsell-title {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .woo-spec-label,
    .woo-spec-value {
        font-size: 11px;
    }
}

/* ========================================= */
/* === RESPONSIVE: TABLET === */
/* ========================================= */

@media (max-width: 1024px) {
    .woo-custom-loop-grid.columns-5,
    .woo-custom-loop-grid.columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .woo-custom-loop-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .woo-product-detail-layout {
        grid-template-columns: 400px 1fr;
        gap: 30px;
    }
    
    .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: 500px 1fr;
    }
    
    .woo-product-detail-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .woo-upsell-products-box {
        margin-top: 30px;
        grid-column: 1 / -1;
    }
    
    .woo-product-specs-box {
        padding: 30px 40px;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout {
        grid-template-columns: 400px 1fr;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: 500px 1fr;
    }
}

@media (max-width: 768px) {
    .woo-custom-loop-grid {
        gap: 20px;
    }
    
    .woo-custom-loop-grid.columns-3,
    .woo-custom-loop-grid.columns-4,
    .woo-custom-loop-grid.columns-5,
    .woo-custom-loop-grid.columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .woo-custom-product-title {
        font-size: 16px;
        min-height: 40px;
    }
    
    .woo-custom-product-price {
        font-size: 18px;
    }
    
    .woo-product-detail-layout,
    .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .woo-product-detail-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .woo-product-detail-left {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .woo-product-detail-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .woo-product-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        max-width: 400px;
    }
    
    .woo-product-detail-title {
        font-size: 36px;
        text-align: left;
    }
    
    .woo-product-detail-header .woo-product-detail-button {
        width: 100%;
    }
    
    .woo-detail-button {
        width: 100%;
    }
    
    .woo-upsell-products-box {
        margin-top: 30px;
        padding: 25px 20px;
    }
    
    .woo-upsell-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .woo-upsell-title {
        font-size: 18px;
        margin-bottom: 25px;
    }
    
    .woo-upsell-product-image {
        width: 100px;
        height: 100px;
    }
    
    .woo-upsell-product-title {
        font-size: 13px;
    }

    .woo-products-detail-list-wrapper .woo-product-detail-item {
        margin-bottom: 150px !important;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout,
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: 1fr;
    }

    /* === ACCORDION SPECIFICHE TECNICHE === */
    .woo-product-specs-box .woo-specs-title {
        cursor: pointer;
        position: relative;
        padding-right: 30px;
        transition: margin-bottom 0.4s ease;
    }

    .woo-product-specs-box:not(.active) .woo-specs-title {
        margin-bottom: 0;
    }

    .woo-product-specs-box .woo-specs-title::after {
        content: '+';
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 32px;
        font-weight: 300;
        color: #53AF31;
        transition: transform 0.3s ease;
    }

    .woo-product-specs-box.active .woo-specs-title::after {
        content: '−';
    }

    .woo-product-specs-box .woo-specs-table {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
    }

    .woo-product-specs-box.active .woo-specs-table {
        max-height: 1000px;
    }
}

@media (max-width: 480px) {
    .woo-custom-loop-grid {
        gap: 15px;
        grid-template-columns: 1fr !important;
    }
    
    .woo-custom-product-inner {
        padding: 15px;
    }
    
    .woo-custom-product-specs {
        padding: 12px;
    }
    
    .woo-custom-spec-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .woo-custom-spec-item .spec-value {
        text-align: left;
        margin-top: 3px;
    }
    
    .woo-product-detail-layout,
    .woo-product-detail-layout.woo-no-upsells {
        margin: 20px 0;
        grid-template-columns: 1fr;
    }
    
    .woo-product-detail-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .woo-product-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        max-width: 100%;
    }
    
    .woo-product-detail-title {
        font-size: 24px;
        margin-bottom: 0;
    }
    
    .woo-product-specs-box {
        padding: 20px;
    }
    
    .woo-specs-title {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .woo-spec-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .woo-spec-label,
    .woo-spec-value {
        font-size: 14px;
    }
    
    .woo-spec-value {
        text-align: left;
    }
    
    .woo-detail-button {
        padding: 15px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: space-between;
    }
    
    .woo-product-detail-header .woo-product-detail-button {
        width: 100%;
    }
    
    .woo-detail-button-icon {
        width: 35px;
        height: 35px;
        margin-left: 10px;
    }
    
    .woo-upsell-products-box {
        padding: 20px 15px;
        margin-top: 25px;
    }
    
    .woo-upsell-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .woo-upsell-title {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .woo-upsell-product-item {
        padding: 12px;
        gap: 8px;
    }
    
    .woo-upsell-product-image {
        width: 80px;
        height: 80px;
    }
    
    .woo-upsell-product-title {
        font-size: 12px;
    }

    .woo-products-detail-list-wrapper .woo-product-detail-item {
        margin-bottom: 150px !important;
    }
    
    .woo-products-detail-list-wrapper .woo-product-detail-layout,
    .woo-products-detail-list-wrapper .woo-product-detail-layout.woo-no-upsells {
        grid-template-columns: 1fr;
    }

    .woo-lightbox-title {
        font-size: 14px;
        bottom: -45px;
    }
}
/* ============================================
   WISHLIST STYLES

/* ============================================
   WISHLIST STYLES
   ============================================ */

/* === WISHLIST BUTTON === */
.woo-wishlist-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border: 1px solid #53AF31 !important;
    color: #53AF31 !important;
    padding: 0 !important;
    margin: 0 0 0 8px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

.woo-wishlist-button:hover {
    background: #53AF31 !important;
    color: #fff !important;
    transform: scale(1.1) !important;
}

.woo-wishlist-button.active {
    background: #53AF31 !important;
    color: #fff !important;
}

.woo-wishlist-button.active svg path {
    fill: #fff !important;
    stroke: #fff !important;
}

.woo-wishlist-button svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    pointer-events: none !important;
}

/* Wishlist button nella vista dettaglio */
.woo-wishlist-detail {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

.woo-wishlist-detail svg {
    width: 20px !important;
    height: 20px !important;
}

/* === WISHLIST BADGE FLOTTANTE === */
.woo-wishlist-badge {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.woo-wishlist-badge.has-items {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.woo-wishlist-badge-btn {
    position: relative;
    background: #53AF31;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(83, 175, 49, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.woo-wishlist-badge-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(83, 175, 49, 0.5);
}

.woo-wishlist-badge-btn svg {
    width: 28px;
    height: 28px;
}

.woo-wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: #53AF31;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #53AF31;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .woo-wishlist-badge {
        bottom: 20px;
        right: 20px;
    }
    
    .woo-wishlist-badge-btn {
        width: 50px;
        height: 50px;
    }
    
    .woo-wishlist-badge-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .woo-wishlist-count {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .woo-wishlist-button {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        margin-left: 5px !important;
    }
    
    .woo-wishlist-button svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .woo-wishlist-detail {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    .woo-wishlist-detail svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ============================================
   WISHLIST UI DENTRO POPUP ELEMENTOR
   ============================================ */

/* Contenitore lista prodotti nel popup */
.woo-wishlist-popup-container {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.woo-wishlist-popup-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #53AF31;
}

.woo-wishlist-popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.woo-wishlist-popup-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar personalizzata */
.woo-wishlist-popup-items::-webkit-scrollbar {
    width: 6px;
}

.woo-wishlist-popup-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.woo-wishlist-popup-items::-webkit-scrollbar-thumb {
    background: #53AF31;
    border-radius: 3px;
}

.woo-wishlist-popup-items::-webkit-scrollbar-thumb:hover {
    background: #469028;
}

/* Singolo prodotto */
.woo-wishlist-popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    position: relative;
}

.woo-wishlist-popup-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #53AF31;
}

.woo-wishlist-popup-item-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woo-wishlist-popup-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.woo-wishlist-popup-item-info {
    flex: 1;
    min-width: 0;
}

.woo-wishlist-popup-item-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.woo-wishlist-popup-item-sku {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.woo-wishlist-popup-item-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px;
    height: 28px;
    line-height: 1;
    box-sizing: border-box;
}

.woo-wishlist-popup-item-remove:hover {
    background: #ff4444;
    color: #fff;
}

.woo-wishlist-popup-item-remove svg {
    display: block;
    width: 14px;
    height: 14px;
}

/* Responsive per popup */
@media (max-width: 768px) {
    .woo-wishlist-popup-container {
        padding: 15px;
    }
    
    .woo-wishlist-popup-header h3 {
        font-size: 16px;
    }
    
    .woo-wishlist-popup-items {
        max-height: 250px;
    }
    
    .woo-wishlist-popup-item {
        padding: 10px;
    }
    
    .woo-wishlist-popup-item-image {
        width: 50px;
        height: 50px;
    }
    
    .woo-wishlist-popup-item-info h4 {
        font-size: 13px;
    }
    
    .woo-wishlist-popup-item-sku {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .woo-wishlist-popup-container {
        padding: 12px;
    }
    
    .woo-wishlist-popup-items {
        max-height: 200px;
    }
}

/* ============================================
   FIX: ICONE SUBITO DOPO IL TESTO NEL DETTAGLIO PRODOTTO
   ============================================ */

/* 1) Niente space-between: allinea tutto a sinistra */
.woo-product-detail-header {
  justify-content: flex-start !important;
  gap: 18px !important; /* spazi tra i blocchi dell'header */
}

/* 2) Il bottone giallo resta a destra da solo */
.woo-product-detail-header .woo-product-detail-button {
  margin-left: auto !important;  /* spinge SOLO il bottone a destra */
}

/* 3) Titolo + icone nello stesso blocco, senza wrap */
.woo-product-title-wrapper {
  max-width: none !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 14px !important;          /* spazio tra testo e prima icona */
}

/* 4) Rimuovi la spinta a destra sulle icone */
.woo-product-title-wrapper .woo-detail-zoom-button {
  margin-left: 0 !important;     /* sovrascrive il margin-left:auto del file */
}

/* distanza piccola tra lente e cuore */
.woo-product-title-wrapper .woo-wishlist-button {
  margin-left: 8px !important;
}

/* 5) Titolo in una riga (come da richiesta precedente) */
.woo-product-detail-title {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ============================================
   RESPONSIVE: MOBILE E TABLET
   ============================================ */

/* Tablet e schermi medi */
@media (max-width: 1024px) {
  .woo-product-detail-header {
    gap: 12px !important;
  }
  
  .woo-product-title-wrapper {
    gap: 10px !important;
  }
  
  .woo-product-detail-title {
    font-size: 36px !important; /* riduco un po' il font */
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Header va in colonna su mobile */
  .woo-product-detail-header {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  
  /* Wrapper: torno a flex ma con controllo preciso */
  .woo-product-title-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-content: flex-start !important;
    width: 100% !important;
    gap: 0 !important;
    max-width: none !important;
  }
  
  /* Titolo: occupa tutta la larghezza, quindi va su una riga */
  .woo-product-detail-title {
    white-space: normal !important;
    font-size: 28px !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 15px !important;
    flex: 0 0 100% !important;
  }
  
  /* Le icone NON hanno width/flex-basis 100%, quindi stanno sulla stessa riga */
  .woo-product-title-wrapper .woo-detail-zoom-button {
    flex: 0 0 auto !important;
    width: 50px !important;
    margin: 0 !important;
    display: inline-flex !important;
  }
  
  .woo-product-title-wrapper .woo-wishlist-button {
    flex: 0 0 auto !important;
    width: 32px !important;
    margin: 0 0 0 12px !important;
    display: inline-flex !important;
  }
  
  /* Bottone */
  .woo-product-detail-header .woo-product-detail-button {
    margin-left: 0 !important;
    width: 100%;
  }
}

/* Mobile piccolo */
@media (max-width: 480px) {
  .woo-product-detail-title {
    font-size: 22px !important;
  }
  
  .woo-product-title-wrapper {
    gap: 8px !important;
  }
}

/* ===========================
   RICERCA AVANZATA PRODOTTI
   =========================== */

.wcl-search-wrapper {
    margin: 30px 0;
}

.wcl-search-form {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.wcl-search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.wcl-search-row:last-of-type {
    margin-bottom: 0;
}

.wcl-search-field {
    display: flex;
    flex-direction: column;
}

.wcl-search-field label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.wcl-search-field input[type="text"],
.wcl-search-field input[type="number"],
.wcl-search-field select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.wcl-search-field input:focus,
.wcl-search-field select:focus {
    outline: none;
    border-color: #666;
}

.wcl-price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcl-price-inputs input {
    flex: 1;
}

.wcl-price-separator {
    font-weight: 600;
    color: #666;
}

.wcl-attributes-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.wcl-search-attributes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.wcl-search-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.wcl-search-submit,
.wcl-search-reset {
    padding: 12px 30px;
    border: none !important;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.wcl-search-submit {
    background: #53af31 !important;
    color: #fff !important;
    flex: 1;
}

.wcl-search-submit:hover {
    background: #eae44c !important;
    color: #fff !important;
}

.wcl-search-reset {
    background: #53af31 !important;
    color: #fff !important;
    border: 2px solid #53af31 !important;
}

.wcl-search-reset:hover {
    background: #eae44c !important;
    color: #fff !important;
    border-color: #eae44c !important;
}

.wcl-search-loading {
    text-align: center;
    padding: 60px 20px;
}

.wcl-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: wcl-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.wcl-search-loading p {
    font-size: 16px;
    color: #666;
}

.wcl-search-results-count {
    background: #e8f5e9;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #2e7d32;
}

.wcl-search-results-count strong {
    font-weight: 700;
}

.wcl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.wcl-page-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.wcl-page-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.wcl-page-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.wcl-page-dots {
    padding: 0 5px;
    color: #999;
}

/* Responsive */
@media (max-width: 1200px) {
    .wcl-search-attributes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .wcl-search-form {
        padding: 20px;
    }
    
    .wcl-search-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wcl-search-attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wcl-search-actions {
        flex-direction: column;
    }
    
    .wcl-search-submit,
    .wcl-search-reset {
        width: 100%;
    }
    
    .wcl-pagination {
        gap: 5px;
    }
    
    .wcl-page-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .wcl-search-form {
        padding: 15px;
    }
    
    .wcl-search-attributes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wcl-price-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wcl-price-separator {
        text-align: center;
    }
}
