/* Cart Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #000;
}

.cart-items-container {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #333;
}

.cart-item-price {
    color: #666;
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.qty-control button {
    background: #f5f5f5;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    transition: background 0.2s;
}

.qty-control button:hover {
    background: #e0e0e0;
}

.qty-control span {
    padding: 0 10px;
    font-weight: 600;
    min-width: 25px;
    text-align: center;
}

.btn-remove {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.btn-remove:hover {
    color: #d32f2f;
}

.cart-modal-footer {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    border-radius: 0 0 12px 12px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.btn-checkout {
    width: 100%;
    padding: 12px;
    background: #c59d5f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-checkout:hover {
    background: #a9854d;
}

.empty-cart-msg {
    text-align: center;
    color: #888;
    padding: 20px 0;
    font-size: 1.1rem;
}