.cart-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


button:hover {
    opacity: 0.9;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2px;
    line-height: 1;
}

.add-to-cart {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; 
    flex: 1;
    background: var(--primary);
    color: #ffffff;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    gap: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    border: none;
    border-radius: 5px;
}

.in_cart {
    background-color: #ECF9F2;
    color: #036834;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    border: none;
    border-radius: 5px;
}


.cart-container {
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 992px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .add-to-cart {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; 
    flex: 1;
    background: var(--primary);
    color: #ffffff;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    gap: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    border: none;
    border-radius: 5px;
}
    
}


/* Cart Header */
.cart-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #333;
}

/* Select All */
.select-all-wrapper {
    font-size: 1rem;
    display: flex;
    margin-bottom: 10px;
    padding: 5px;
}

.select-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    cursor: pointer;
}

/* Cart Items */
.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    background: white;
    position: relative;
    transition: box-shadow 0.3s;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Checkbox */
.item-checkbox-wrapper {
    flex-shrink: 0;
}

.cart-item-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Product Image */
.cart-item-image {
    flex-shrink: 0;
}

.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

/* Product Details */
.cart-item-details {
    flex-grow: 1;
}

.item-name {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.product_link{
    color: #3088d0;
}

.item-code {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.item-price {
    font-size: 1.1rem;
    color: #CA9956;
    font-weight: bold;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

.qty-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 50px;
    height: 26px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: #fafafa;
}

/* Item Total */
.item-total {
    flex-shrink: 0;
    min-width: 120px;
    text-align: right;
    padding-right: 30px;
}

.total-label {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 4px;
}

.item-total-price {
    font-size: 1.1rem;
    color: #333;
}

/* Remove Button */
.cart-remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 1.2rem;
    padding: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.cart-remove-item:hover {
    color: #e91e63;
}

/* Cart Summary */
.cart-summary {
    padding: 25px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.summary-label {
    font-size: 0.95rem;
    color: #666;
}

.summary-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* Checkout Button */
.checkout-btn {
    width: 100%;
    padding: 18px;
    background: #CA9956;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:not(:disabled):hover {
    background: #e9b163;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 159, 30, 0.3);
}

.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart i {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 30px;
}

.empty-cart h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.empty-cart p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.continue-shopping-btn {
    display: inline-block;
    padding: 15px 40px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1rem;
    transition: background 0.3s;
}

.continue-shopping-btn:hover {
    background: #0056b3;
}

.continue-shopping-btn i {
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item {
        display: block;
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .cart-item-image img, .cart-item-details{
        margin: 10px;
    }

    
    .item-total {
        width: 100%;
        text-align: left;
        margin-top: 10px;
        padding-top: 10px;
        padding-right: 0;
        border-top: 1px solid #eee;
    }
    
    .quantity-controls {
        margin-left: auto;
    }
    
    .cart-remove-item {
        top: 5px;
        right: 5px;
    }
}