/*
 * ===================================================================
 * CSS OTTIMIZZATO Amorebio - Carrello WooCommerce (NO TABELLE)
 * ===================================================================
*/

/* --- RESET E STILI BASE CARRELLO --- */

 #bannerSection {
  display: none !important;
 }
 
.woocommerce-cart .site-main {
    padding: 2rem 0;
}

.woocommerce-cart .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
}

/* Nascondi la tabella originale */
.woocommerce-cart table.shop_table {
    display: none !important;
}

/* Messaggi di sistema */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-info {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    position: relative;
    padding-left: 3.5rem;
}

.woocommerce-cart .woocommerce-message:before,
.woocommerce-cart .woocommerce-error:before,
.woocommerce-cart .woocommerce-info:before {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 1.2rem;
}

.woocommerce-cart .woocommerce-message {
    background: rgba(87,155,88,0.1);
    color: var(--colorePrimario);
    border-left: 4px solid var(--colorePrimario);
}

.woocommerce-cart .woocommerce-message:before {
    content: '\f058';
    color: var(--colorePrimario);
}

.woocommerce-cart .woocommerce-error {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.woocommerce-cart .woocommerce-error:before {
    content: '\f057';
    color: #dc3545;
}

.woocommerce-cart .woocommerce-info {
    background: rgba(247,213,101,0.1);
    color: #d4a017;
    border-left: 4px solid var(--coloreSecondario);
}

.woocommerce-cart .woocommerce-info:before {
    content: '\f05a';
    color: var(--coloreSecondario);
}

/* --- HEADER CARRELLO --- */

.amorebio-cart-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.amorebio-cart-header h1 {
    color: var(--colorePrimario);
    font-family: var(--font-titoli);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.amorebio-cart-header h1 i {
    background: linear-gradient(135deg, var(--colorePrimario) 0%, var(--coloreAccento) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.amorebio-cart-header .cart-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    gap: 2rem;
}

.amorebio-cart-header .step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #999;
    font-size: 0.9rem;
    position: relative;
}

.amorebio-cart-header .step.active {
    color: var(--colorePrimario);
    font-weight: 600;
}

.amorebio-cart-header .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.amorebio-cart-header .step.active .step-number {
    background: var(--colorePrimario);
}

.amorebio-cart-header .step:not(:last-child):after {
    content: '';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2px;
    background: #e0e0e0;
}

/* --- NUOVO LAYOUT CARRELLO A CARDS --- */

.amorebio-cart-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Container prodotti */
.amorebio-cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Card singolo prodotto */
.amorebio-cart-item {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.amorebio-cart-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.amorebio-cart-item.removing {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease-out;
}
@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Layout interno card prodotto */
.cart-item-content {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

/* Immagine prodotto */
.cart-item-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

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

.cart-item-image:hover img {
    transform: scale(1.05);
}

/* Badge sconto sull'immagine */
.cart-item-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--colore-rosa);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Info prodotto */
.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item-title a:hover {
    color: var(--colorePrimario);
}

.cart-item-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.cart-item-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.cart-item-meta-item i {
    color: var(--coloreAccento);
    font-size: 0.75rem;
}

.cart-item-variations {
    font-size: 0.85rem;
    color: #999;
}

.cart-item-variations dt {
    display: inline;
    font-weight: 600;
    color: #666;
}

.cart-item-variations dd {
    display: inline;
    margin: 0 0.5rem 0 0.25rem;
}

/* Controlli quantità e prezzo */
.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

/* Nuova quantità stilizzata */
.cart-item-quantity {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.cart-item-quantity button {
    background: transparent;
    border: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.cart-item-quantity button:hover {
    background: var(--colorePrimario);
    color: white;
}

.cart-item-quantity input {
    border: none;
    background: transparent;
    text-align: center;
    width: 50px;
    font-weight: 600;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.cart-item-quantity input::-webkit-outer-spin-button,
.cart-item-quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Prezzi */
.cart-item-price {
    text-align: right;
}

.cart-item-price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.cart-item-price-sale {
    color: var(--colore-rosa);
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-subtotal {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--colorePrimario);
}

/* Pulsante rimuovi */ 
.cart-item-remove {
    background: transparent;
    border: none !important;
    color: #e74c3c !important;
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 10px !important;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    transition: all 0.3s ease !important;
    padding: 5px 8px !important;
    text-align: center;
    height: auto !important;
    width: auto !important;
}
 
.cart-item-remove:hover {
    background: #c0392b !important;
    transform: scale(1.1);
}


.amorebio-cart-item:hover .cart-item-remove {
    opacity: 1;
}
 

/* --- SIDEBAR RIEPILOGO --- */

.amorebio-cart-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

/* Card riepilogo */
.cart-summary-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.cart-summary-title {
    color: var(--colorePrimario);
    font-family: var(--font-titoli);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-summary-title i {
    color: var(--coloreAccento);
}

/* Righe riepilogo */
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-summary-row:last-child {
    border-bottom: none;
}

.cart-summary-row.total {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--colorePrimario);
}

.cart-summary-label {
    color: #666;
}

.cart-summary-value {
    color: #333;
    font-weight: 500;
}

/* Coupon section */
.cart-coupon-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.cart-coupon-title {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-coupon-form {
    display: flex;
    gap: 0.75rem;
}

.cart-coupon-input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    background: white;
    transition: all 0.3s ease;
}

.cart-coupon-input:focus {
    border-color: var(--colorePrimario);
    box-shadow: 0 0 0 0.2rem rgba(87,155,88,0.15);
    outline: none;
}

.cart-coupon-button {
    background: var(--coloreAccento);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cart-coupon-button:hover {
    background: #a8c455;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(188,215,87,0.3);
}

/* Coupon applicati */
.cart-applied-coupons {
    margin-top: 1rem;
}

.applied-coupon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(87,155,88,0.1);
    color: var(--colorePrimario);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.applied-coupon .remove-coupon {
    background: none;
    border: none;
    color: var(--colorePrimario);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.applied-coupon .remove-coupon:hover {
    color: #dc3545;
    transform: scale(1.2);
}

/* Pulsanti azione */
.cart-actions {
    margin-top: 1.5rem;
}

.btn-checkout {
    display: block;
    width: 100%;
    background: var(--colorePrimario);
    color: white;
    padding: 1rem;
    border-radius: 30px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
}

.btn-checkout:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-checkout:hover {
    background: var(--coloreSecondario);
    color: #FFF !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(87,155,88,0.3);
}

.btn-checkout:hover:before {
    left: 100%;
}

.btn-continue-shopping {
    display: block;
    width: 100%;
    margin-top: 1rem;
    text-align: center;
    color: var(--colorePrimario);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-continue-shopping:hover {
    color: var(--coloreAccento);
    text-decoration: underline;
}

/* Info aggiuntive */
.cart-info-cards {
    margin-top: 1.5rem;
}

.info-mini-card {
    background: linear-gradient(135deg, rgba(247,213,101,0.1) 0%, rgba(247,213,101,0.05) 100%);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(247,213,101,0.2);
}

.info-mini-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-mini-card-title i {
    color: var(--coloreSecondario);
}

.info-mini-card-text {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

/* --- CARRELLO VUOTO --- */

.amorebio-empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}

.amorebio-empty-cart .empty-cart-icon {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
}

.amorebio-empty-cart h2 {
    color: #666;
    font-family: var(--font-titoli);
    margin-bottom: 1rem;
}

.amorebio-empty-cart p {
    color: #999;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.amorebio-empty-cart .empty-cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.amorebio-empty-cart .btn-shop {
    background: var(--colorePrimario);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.amorebio-empty-cart .btn-shop:hover {
    background: #4a8349;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(87,155,88,0.3);
}

.amorebio-empty-cart .btn-account {
    background: transparent;
    color: var(--colorePrimario);
    border: 2px solid var(--colorePrimario);
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.amorebio-empty-cart .btn-account:hover {
    background: var(--colorePrimario);
    color: white;
}

/* --- PRODOTTI CORRELATI --- */

.amorebio-related-products {
    margin-top: 3rem;
}

.related-products-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-products-header h2 {
    color: var(--colorePrimario);
    font-family: var(--font-titoli);
    position: relative;
    padding-bottom: 1rem;
    display: inline-block;
}

.related-products-header h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--coloreAccento);
    border-radius: 2px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    position: relative;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.related-product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.related-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.1);
}

.related-product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--colore-rosa);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.related-product-info {
    padding: 1.5rem;
}

.related-product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

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

.related-product-title a:hover {
    color: var(--colorePrimario);
}

.related-product-price {
    color: var(--colorePrimario);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.related-product-add {
    background: var(--coloreAccento);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.related-product-add:hover {
    background: #a8c455;
    transform: translateY(-2px);
}

/* --- FEATURES BANNER --- */

.amorebio-cart-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 20px;
}

.feature-card {
    text-align: center;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--colorePrimario) 0%, var(--coloreAccento) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-desc {
    color: #666;
    font-size: 0.9rem;
}

/* --- ANIMAZIONI --- */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.amorebio-cart-item {
    animation: slideInUp 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.cart-item-quantity button:active {
    animation: pulse 0.3s ease-out;
}

/* --- RESPONSIVE --- */

@media (max-width: 991px) {
    .amorebio-cart-wrapper {
        grid-template-columns: 1fr;
    }
    
    .amorebio-cart-sidebar {
        position: relative;
        top: 0;
    }
    
    .cart-summary-card {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .amorebio-cart-header {
        padding: 1.5rem;
    }
    
    .amorebio-cart-header .cart-steps {
        display: none;
    }
    
    .cart-item-content {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }
    
    .cart-item-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #f0f0f0;
    }
    
    .cart-item-image img {
        height: 80px;
    }
    
    .cart-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .amorebio-cart-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .amorebio-cart-header h1 {
        font-size: 1.5rem;
    }
    
    .amorebio-cart-item {
        padding: 1rem;
    }
    
    .cart-item-quantity {
        transform: scale(0.9);
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-coupon-form {
        flex-direction: column;
    }
    
    .cart-coupon-button {
        width: 100%;
    }
}

/* --- LOADING STATES --- */

.cart-updating {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.cart-updating:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--colorePrimario);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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