/* public/assets/css/cart.css */

/* ===== Cart Table Styles ===== */
.cart-table .product-image-wrapper {
    width: 80px;
    height: 80px;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.cart-table .product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-table .product-image-wrapper img:hover {
    transform: scale(1.05);
}

/* ===== Quantity Input Styles ===== */
.cart-quantity .input-group {
    max-width: 110px;
    margin: 0 auto;
}

.cart-quantity .form-control {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    border-left: none;
    border-right: none;
}

.cart-quantity .form-control:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.cart-quantity .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    background: white;
    border-color: #dee2e6;
}

.cart-quantity .btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.cart-quantity .btn i {
    font-size: 0.75rem;
}

/* ===== Cart Summary Card ===== */
.cart-summary-card {
    position: sticky;
    top: 90px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.cart-summary-card .card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 1.2rem 1.5rem;
}

.cart-summary-card .card-header h5 {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.cart-summary-card .card-body {
    padding: 1.5rem;
}

.cart-summary-card .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cart-summary-card .summary-row.total {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    border-top: 1px dashed #dee2e6;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

/* ===== Empty Cart Styles ===== */
.empty-cart {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-cart i {
    font-size: 1rem;
    color: #dee2e6;
    /* margin-bottom: 1.5rem; */
}

.empty-cart h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.empty-cart p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* ===== Cart Item Row ===== */
.cart-item {
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: rgba(var(--primary-color-rgb), 0.02);
}

.cart-item .product-name {
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.cart-item .product-name:hover {
    color: var(--primary-color);
}

.cart-item .item-total {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== Action Buttons ===== */
.btn-remove-item {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 1px solid #dee2e6;
    color: #6c757d;
    transition: all 0.2s;
}

.btn-remove-item:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* ===== Stock Warning ===== */
.stock-warning {
    font-size: 0.75rem;
    color: #ffc107;
    display: block;
    text-align: center;
    margin-top: 0.25rem;
}

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
    .cart-table .product-image-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .cart-quantity .input-group {
        max-width: 90px;
    }
    
    .cart-quantity .btn {
        padding: 0.25rem 0.35rem;
    }
    
    .cart-quantity .btn i {
        font-size: 0.7rem;
    }
    
    .cart-quantity .form-control {
        padding: 0.25rem;
        font-size: 0.8rem;
    }
    
    .cart-summary-card {
        position: static;
        margin-top: 1.5rem;
    }
    
    .btn-remove-item {
        width: 28px;
        height: 28px;
    }
    
    .btn-remove-item i {
        font-size: 0.8rem;
    }
    
    .cart-item .product-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .cart-table {
        font-size: 0.85rem;
    }
    
    .cart-table .product-image-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .cart-quantity .input-group {
        max-width: 80px;
    }
    
    .cart-quantity .btn {
        padding: 0.2rem 0.25rem;
    }
    
    .cart-quantity .form-control {
        padding: 0.2rem;
        font-size: 0.75rem;
    }
    
    .empty-cart {
        padding: 2rem 1rem;
    }
    
    .empty-cart i {
        font-size: 0.9rem;
    }
    
    .empty-cart h3 {
        font-size: 1rem !important;
    }
}