/* /louis-ecommerce/assets/css/cart.css */

.cart-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.cart-items-card,
.cart-summary-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.cart-items-card:hover,
.cart-summary-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h5 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.cart-item-row {
    padding: 1.25rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-row:hover {
    background-color: #f8f9fa;
}

.cart-item-row img {
    width: 100%;
    max-width: 100px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-row h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.old-price {
    font-size: 0.85rem;
    color: #999;
}

.current-price {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 600;
}

.quantity-controls input[type="number"] {
    -moz-appearance: textfield;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

.quantity-controls input[type="number"]::-webkit-outer-spin-button,
.quantity-controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.item-total {
    font-size: 1.15rem;
    color: #2c3e50;
    font-weight: 700;
}

.empty-cart {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-cart i {
    color: #95a5a6;
    margin-bottom: 1.5rem;
}

.empty-cart h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.empty-cart p {
    color: #7f8c8d;
    font-size: 1.05rem;
}

.cart-summary-card {
    position: sticky;
    top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: #555;
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.25rem;
    color: #2c3e50;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.summary-row.total span {
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #95a5a6;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline-danger {
    border: 1px solid #e74c3c;
    color: #e74c3c;
    background-color: transparent;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background-color: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.btn-link {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-link:hover {
    color: #c0392b;
    text-decoration: underline;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

@media (max-width: 991.98px) {
    .cart-summary-card {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .cart-item-row {
        padding: 1rem;
    }
    
    .cart-item-row img {
        max-width: 80px;
    }
    
    .cart-item-row h6 {
        font-size: 0.9rem;
    }
    
    .quantity-controls {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .quantity-controls input {
        width: 50px !important;
    }
    
    .btn-primary,
    .btn-outline-secondary {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 575.98px) {
    .cart-item-row .row {
        gap: 1rem;
    }
    
    .cart-item-row .col-3,
    .cart-item-row .col-9,
    .cart-item-row .col-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .quantity-controls {
        justify-content: center;
        margin: 0.5rem 0;
    }
    
    .item-total {
        text-align: center;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.cart-message.show {
    opacity: 1;
    transform: translateX(0);
}

.cart-message-success {
    background-color: #27ae60;
    color: #fff;
}

.cart-message-error {
    background-color: #e74c3c;
    color: #fff;
}

.cart-message-info {
    background-color: #3498db;
    color: #fff;
}