/* --- Cart Page Specific Styles --- */

.cart-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.cart-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
    position: relative;
}

.cart-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

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

.cart-item-title {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.cart-item-title:hover {
    color: var(--primary-color);
}

.cart-item-type {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 5px;
}

.type-package {
    background-color: #fff3cd; /* Light Yellow */
    color: #856404;
    border: 1px solid #ffeeba;
}

.type-product {
    background-color: #d1e7dd; /* Light Green */
    color: #0f5132;
    border: 1px solid #badbcc;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    width: 100px;
}

.qty-btn {
    background: #f8f9fa;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    color: #555;
}

.qty-btn:hover {
    background: #e9ecef;
}

.qty-input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.remove-btn {
    color: #dc3545;
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

.remove-btn:hover {
    color: #a71d2a;
    text-decoration: underline;
}

/* Order Summary */
.order-summary-card {
    background: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 100px; /* Sticky below navbar */
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #666;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #eee;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.checkout-btn {
    background: linear-gradient(45deg, var(--primary-color), #ffad33);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    margin-top: 20px;
    transition: transform 0.2s;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 153, 51, 0.3);
    color: white;
}

/* Mobile Specifics */
@media (max-width: 767px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-item-details {
        width: 100%;
        margin-bottom: 10px;
    }
    .cart-item-actions {
        display: flex;
        justify-content: flex-start; /* Changed from space-between */
        width: 100%;
        align-items: center;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #f0f0f0;
        flex-wrap: wrap; /* Allow wrapping if needed */
        gap: 15px; /* Add gap between elements */
    }
    .qty-control {
        width: 110px; /* Slightly wider for better touch targets */
        flex-shrink: 0;
    }
    .product-line-total {
        font-size: 0.95rem;
        color: var(--primary-color);
        margin: 0 !important; /* Reset margin */
        flex-grow: 1; /* Allow it to take available space */
    }
    .remove-btn {
        margin-left: auto; /* Push to right */
    }
    .order-summary-card {
        margin-top: 20px;
        position: static;
    }
}
