.cart-page {
    padding: 80px 5% 40px;
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(244,244,244,0.8));
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    opacity: 1;
    animation: fadeIn 0.6s ease forwards;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}

.cart-items {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 0.8s ease;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.05), rgba(184, 134, 11, 0.05));
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.empty-cart::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(218, 165, 32, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

.empty-cart > * {
    position: relative;
    z-index: 1;
}

.empty-cart-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.empty-cart-icon > i {
    font-size: 5rem;
    color: var(--secondary-color);
    animation: bounce 2s ease-in-out infinite;
}

.empty-cart-sparkles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.empty-cart-sparkles i {
    position: absolute;
    font-size: 0.8rem;
    color: #FFD700;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle-1 {
    top: 10%;
    right: 20%;
    animation-delay: 0s;
}

.sparkle-2 {
    bottom: 15%;
    left: 15%;
    animation-delay: 0.7s;
}

.sparkle-3 {
    top: 60%;
    right: 10%;
    animation-delay: 1.4s;
}

.empty-cart h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.empty-cart p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.empty-cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    transform: translateY(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.continue-shopping.primary {
    background: linear-gradient(135deg, var(--secondary-color), #B8860B);
    color: white;
}

.continue-shopping.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
}

.continue-shopping.secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--secondary-color);
}

.continue-shopping.secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
}

.empty-cart-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.feature i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Animazioni */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SISTEMA SCONTI NEL CARRELLO ===== */

.cart-price-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.cart-original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
    font-weight: normal;
}

.cart-current-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1rem;
}

.cart-discount-badge {
    background: #e74c3c;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .empty-cart {
        padding: 3rem 1.5rem;
    }
    
    .empty-cart-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .continue-shopping {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .empty-cart-features {
        gap: 1.5rem;
    }
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease forwards;
    opacity: 1;
    position: relative;
    z-index: 1;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 1.5rem;
    transition: transform 0.3s ease;
    background: white;
    display: block;
    position: relative;
    z-index: 2;
}

.cart-item:hover img {
    transform: scale(1.05);
}

.item-details {
    flex: 1;
    position: relative;
    z-index: 2;
}

.item-details h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.item-price {
    font-size: 1.3rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: 2px solid var(--secondary-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.quantity-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

.quantity {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.remove-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(255,68,68,0.1);
    transform: scale(1.1);
}

.remove-btn i {
    font-size: 1.2rem;
}

.cart-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
    height: fit-content;
    animation: fadeInRight 0.6s ease forwards;
    opacity: 0;
}

.cart-summary h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.summary-details {
    margin: 1.5rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 600;
    border-top: 2px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.checkout-btn:hover:not(:disabled) {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.checkout-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.checkout-btn i {
    font-size: 1.2rem;
}

/* Stili per la sezione coupon */
.coupon-section {
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.coupon-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.coupon-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.coupon-input input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.coupon-btn {
    padding: 0.75rem 1.25rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.coupon-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.coupon-message {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.coupon-message.success {
    color: #28a745;
    display: block;
}

.coupon-message.error {
    color: #dc3545;
    display: block;
}

.coupon-message.info {
    color: #17a2b8;
    display: block;
    font-weight: 500;
}

.summary-row.discount-row {
    color: #28a745;
    font-weight: 500;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes swing {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 80px 1rem 40px !important;
    }

    .cart-container {
        grid-template-columns: 1fr;
        gap: 1.5rem !important;
        margin-top: 1rem !important;
    }

    .cart-items {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }

    .cart-summary {
        position: relative;
        top: 0;
        margin-top: 1rem !important;
        padding: 1.5rem !important;
        border-radius: 12px;
        background: white;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }

    .cart-summary h2 {
        margin-bottom: 1.5rem !important;
        font-size: 1.3rem !important;
        text-align: center;
    }

    /* Miglioramenti per Empty Cart */
    .empty-cart {
        padding: 2.5rem 1rem !important;
        margin-bottom: 1rem;
    }

    .empty-cart h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .empty-cart p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.5;
    }

    .empty-cart-icon > i {
        font-size: 4rem !important;
    }

    .empty-cart-actions {
        flex-direction: column !important;
        gap: 1rem !important;
        margin-top: 2rem !important;
    }

    .continue-shopping {
        width: 100% !important;
        max-width: 280px !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
    }

    .empty-cart-features {
        margin-top: 2rem !important;
        gap: 1rem !important;
    }

    .empty-cart-features .feature {
        padding: 0.8rem !important;
        font-size: 0.9rem !important;
    }

    /* Ottimizzazioni Cart Summary */
    .summary-details {
        margin-bottom: 1.5rem !important;
    }

    .summary-row {
        padding: 0.8rem 0 !important;
        font-size: 1rem !important;
        border-bottom: 1px solid #eee !important;
    }

    .summary-row.total {
        font-size: 1.2rem !important;
        font-weight: bold !important;
        padding: 1rem 0 0.5rem 0 !important;
        border-bottom: none !important;
        margin-top: 1rem !important;
    }

    /* Coupon Section Mobile */
    .coupon-section {
        margin: 1.5rem 0 !important;
        padding: 1rem !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
    }

    .coupon-input {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.8rem !important;
    }

    .coupon-input input {
        padding: 1rem !important;
        border: 2px solid #e0e0e0 !important;
        border-radius: 8px !important;
        font-size: 1rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .coupon-input input:focus {
        border-color: #c5a880 !important;
        outline: none !important;
    }

    .coupon-btn {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        width: 100% !important;
    }

    .checkout-btn {
        width: 100% !important;
        padding: 1.2rem !important;
        font-size: 1.1rem !important;
        font-weight: bold !important;
        border-radius: 8px !important;
        margin-top: 1rem !important;
    }

    /* Cart Items quando presenti */
    .cart-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem !important;
        margin-bottom: 1rem !important;
    }

    .cart-item img {
        margin: 0 0 1rem 0;
        width: 90px !important;
        height: 90px !important;
        object-fit: contain !important;
    }

    .item-details {
        margin-bottom: 1rem !important;
    }

    .item-details h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .item-price {
        font-size: 1.2rem !important;
        font-weight: bold !important;
        color: #c5a880 !important;
    }

    .quantity-controls {
        justify-content: center;
        margin: 1.5rem 0 !important;
        gap: 1rem !important;
    }

    .quantity-controls button {
        padding: 0.5rem 1rem !important;
        font-size: 1.1rem !important;
    }

    .quantity-controls span {
        padding: 0.5rem 1rem !important;
        font-size: 1.1rem !important;
        min-width: 50px !important;
    }

    .remove-btn {
        margin-top: 1rem !important;
        padding: 0.8rem 1.5rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .cart-page {
        padding: 70px 0.8rem 2rem !important;
    }

    .cart-container {
        gap: 1rem !important;
    }

    .cart-items, .cart-summary {
        padding: 1rem !important;
    }

    .empty-cart {
        padding: 2rem 0.8rem !important;
    }

    .empty-cart h2 {
        font-size: 1.3rem !important;
    }

    .empty-cart-icon > i {
        font-size: 3.5rem !important;
    }

    .continue-shopping {
        max-width: 100% !important;
        padding: 1rem !important;
        font-size: 0.95rem !important;
    }

    .cart-item {
        padding: 1rem !important;
    }

    .cart-item img {
        width: 80px !important;
        height: 80px !important;
        object-fit: contain !important;
    }

    .coupon-input input, .coupon-btn {
        padding: 0.9rem !important;
        font-size: 0.95rem !important;
    }

    .checkout-btn {
        padding: 1rem !important;
        font-size: 1rem !important;
    }
}

/* Messaggio spedizione gratuita */
.free-shipping-message {
    margin: 1.5rem 0;
}

.shipping-message {
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    border: 1px solid;
    animation: slideInDown 0.5s ease-out;
}

.shipping-message.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.shipping-message.success i {
    color: #28a745;
    font-size: 1.2rem;
}

.shipping-message.info {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #bbdefb;
}

.shipping-message.info i {
    color: #1976d2;
    font-size: 1.2rem;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive per messaggio spedizione */
@media (max-width: 768px) {
    .free-shipping-message {
        margin: 1rem 0;
    }
    
    .shipping-message {
        padding: 0.8rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }
    
    .shipping-message i {
        font-size: 1rem !important;
    }
}

/* Stili per pulsante checkout quando richiede autenticazione */
.checkout-btn.auth-required {
    background: linear-gradient(135deg, #2196f3, #1976d2) !important;
    color: white !important;
    border: none !important;
}

.checkout-btn.auth-required:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0) !important;
    transform: translateY(-2px) !important;
}

.checkout-btn.auth-required i {
    margin-right: 0.5rem;
} 