/* Add product link styling for clickable elements in cart */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-link:hover h3 {
    color: #0d80f2;
    text-decoration: underline;
}

.product-link:hover .item-image {
    opacity: 0.9;
    transform: scale(1.03);
    transition: all 0.3s ease;
}

/* Cart Page Specific Styles */

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8fafc;
    min-height: 100vh;
}

.cart-header {
    background: linear-gradient(135deg, #0d80f2, #1e40af);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(13, 128, 242, 0.3);
}

.cart-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-header .cart-stats {
    margin-top: 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.cart-stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.cart-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.cart-items {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.cart-items-header {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.cart-items-header h2 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item {
    padding: 25px 30px;
    border-bottom: 1px solid #f1f5f9;
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #f8fafc;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.item-details p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 12px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #0d80f2;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #1e40af;
    transform: scale(1.05);
}

.quantity-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #1e293b;
}

.item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0d80f2;
}

.remove-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.05);
}

.cart-summary {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.summary-header {
    margin-bottom: 25px;
}

.summary-header h2 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-row.total {
    border-top: 2px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d80f2;
}

.promo-section {
    margin: 25px 0;
}

.promo-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.promo-input:focus {
    outline: none;
    border-color: #0d80f2;
    box-shadow: 0 0 0 3px rgba(13, 128, 242, 0.1);
}

.promo-btn {
    width: 100%;
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.checkout-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.continue-shopping {
    background: transparent;
    color: #0d80f2;
    border: 2px solid #0d80f2;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.continue-shopping:hover {
    background: #0d80f2;
    color: white;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.empty-cart-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-cart h2 {
    margin: 0 0 15px 0;
    color: #64748b;
    font-weight: 600;
}

.empty-cart p {
    color: #9ca3af;
    margin-bottom: 30px;
}

.shop-now-btn {
    background: linear-gradient(135deg, #0d80f2, #1e40af);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.shop-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 128, 242, 0.3);
}

/* Mobile price - only visible on small screens */
.mobile-price {
    display: none;
    font-size: 1rem;
    font-weight: 600;
    color: #0d80f2;
    margin-top: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-container {
        padding: 15px;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Cart Header Mobile */
    .cart-header {
        padding: 20px;
    }
    
    .cart-header h1 {
        font-size: 1.5rem;
        gap: 10px;
    }
    
    .cart-header .cart-stats {
        flex-direction: column;
        gap: 8px;
        margin-top: 12px;
    }
    
    .cart-stat {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    /* Cart Items Mobile */
    .cart-items-header {
        padding: 15px 20px;
    }
    
    .cart-items-header h2 {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .cart-item {
        grid-template-columns: 50px 1fr;
        gap: 12px;
        padding: 15px;
        position: relative;
    }
    
    .item-image {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }
    
    /* Product Name Mobile */
    .item-details h3 {
        font-size: 0.9rem;
        margin: 0 0 6px 0;
        line-height: 1.3;
    }
    
    /* Show mobile price and hide desktop price */
    .mobile-price {
        display: block;
        font-size: 0.8rem;
        margin-top: 4px;
    }
    
    .item-price {
        display: none;
    }
    
    /* Quantity controls mobile */
    .quantity-controls {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 10px;
        width: fit-content;
        padding: 6px;
        gap: 8px;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .quantity-display {
        min-width: 30px;
        font-size: 0.85rem;
    }
    
    /* Remove button mobile */
    .remove-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        margin-top: 0;
        padding: 6px;
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }
    
    .remove-btn i {
        font-size: 0.8rem;
    }
    
    /* Cart Summary Mobile */
    .cart-summary {
        position: static;
        padding: 20px;
    }
    
    .summary-header h2 {
        font-size: 1.1rem;
        gap: 8px;
    }
    
    .summary-row {
        font-size: 0.9rem;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .summary-row.total {
        font-size: 1.1rem;
        padding-top: 15px;
        margin-top: 15px;
    }
    
    /* Promo Section Mobile */
    .promo-input {
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .promo-btn {
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    /* Checkout Actions Mobile */
    .checkout-btn {
        padding: 12px;
        font-size: 0.95rem;
        border-radius: 10px;
        gap: 8px;
    }
    
    .continue-shopping {
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 10px;
        gap: 6px;
    }
    
    /* Empty Cart Mobile */
    .empty-cart {
        padding: 40px 15px;
    }
    
    .empty-cart-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .empty-cart h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .empty-cart p {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .shop-now-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth transitions */
.cart-item {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}