﻿.cart-container {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    color: #222; /* Default text color */
   
}

    .cart-container h2 {
        text-align: center;
        margin-bottom: 20px;
        color: #222; /* Ensure heading is dark */
    }

.empty-cart {
    text-align: center;
    color: #888;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    color: #222; /* Force text color for table */
}

    .cart-table th {
        background: #f8b400;
        padding: 12px;
        text-align: left;
        color: white; /* Header text stays white */
    }

    .cart-table td {
        padding: 12px;
        border-bottom: 1px solid #ddd;
        color: #222; /* Ensure table cell text is dark */
    }

.cart-item {
    display: flex;
    align-items: center;
}

    .cart-item img {
        width: 60px;
        height: 60px;
        border-radius: 6px;
        margin-right: 10px;
        object-fit: cover;
       
    }

.remove-btn {
    color: red;
    text-decoration: none;
    font-size: 18px;
}

.cart-summary {
    margin-top: 20px;
    text-align: right;
    color: #222; /* Ensure total text is dark */
}

.checkout-btn {
    background: #f8b400;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

    .checkout-btn:hover {
        background: #e09c00;
    }
.qty-btn {
    background-color: #f8b400;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .qty-btn:hover {
        background-color: #e09c00;
    }

.qty-value {
    display: inline-block;
    min-width: 25px;
    text-align: center;
    font-weight: bold;
}
/* === MOBILE VIEW: CART PAGE === */
@media (max-width: 768px) {
    .cart-container {
        padding: 15px;
        margin: 20px auto;
    }

        .cart-container h2 {
            font-size: 20px;
        }

    /* Make table scrollable on small screens */
    .cart-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

        /* Adjust table header */
        .cart-table th,
        .cart-table td {
            font-size: 14px;
            padding: 8px;
        }

    /* Smaller cart images */
    .cart-item img {
        width: 45px;
        height: 45px;
        margin-right: 6px;
    }

    /* Quantity buttons smaller */
    .qty-btn {
        padding: 4px 8px;
        font-size: 14px;
    }

    .qty-value {
        min-width: 20px;
        font-size: 14px;
    }

    /* Cart summary */
    .cart-summary {
        font-size: 16px;
        text-align: center; /* Center total on mobile */
    }

    /* Checkout button */
    .checkout-btn {
        display: block;
        width: 100%;
        padding: 10px;
        font-size: 14px;
        text-align: center;
    }
}

/* === VERY SMALL DEVICES (Phones under 480px) === */
@media (max-width: 480px) {
    .cart-container h2 {
        font-size: 18px;
    }

    .cart-table th,
    .cart-table td {
        font-size: 12px;
        padding: 6px;
    }

    .cart-item img {
        width: 40px;
        height: 40px;
    }

    .qty-btn {
        padding: 3px 6px;
        font-size: 12px;
    }

    .checkout-btn {
        font-size: 13px;
        padding: 8px;
    }
}


/* === Checkout Form Modal === */
/*.checkout-form {
    display: none;*/ /* Hidden by default */
    /*position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.checkout-content {
    background: #fff;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
}

    .checkout-content h3 {
        text-align: center;
        margin-bottom: 15px;
    }

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

    .form-row input {
        flex: 1;
    }

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

textarea {
    resize: none;
    height: 70px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
}

button {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

    button:hover {
        background: #1ebe5d;
    }

.close-btn {
    background: #ccc;
}

    .close-btn:hover {
        background: #999;
    }*/

/* Mobile */
/*@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}*/


/* === Checkout Form Modal Base === */
.checkout-form {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* Dark overlay */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

    .checkout-form.active {
        display: flex;
    }

.checkout-content {
    background: #fff;
    padding: 20px 25px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%; /* Ensures it fits smaller screens */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

    .checkout-content h3 {
        margin-bottom: 15px;
        text-align: center;
        color: #ff7300;
    }

    /* === Input Fields === */
    .checkout-content input,
    .checkout-content textarea {
        width: 100%;
        padding: 10px;
        margin-bottom: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
    }

textarea {
    resize: none;
}

/* === Row Layout for Desktop === */
.form-row {
    display: flex;
    gap: 10px;
}

    .form-row input {
        flex: 1;
    }

/* === Buttons === */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

    .form-actions button {
        flex: 1;
        padding: 10px;
        font-size: 15px;
        font-weight: bold;
        border: none;
        border-radius: 6px;
        cursor: pointer;
    }

        .form-actions button:first-child {
            background-color: #28a745; /* Green */
            color: white;
        }

            .form-actions button:first-child:hover {
                background-color: #218838;
            }

    .form-actions .close-btn {
        background-color: #ccc;
        color: black;
    }

        .form-actions .close-btn:hover {
            background-color: #aaa;
        }

/* === MOBILE RESPONSIVE === */
@media (max-width: 600px) {
    .checkout-content {
        padding: 15px;
        width: 95%;
    }

    .form-row {
        flex-direction: column; /* Stack inputs vertically */
    }

    .form-actions {
        flex-direction: column;
    }

        .form-actions button {
            width: 100%;
        }
}
