﻿/* Default styles for larger screens */
.container {
    max-width: 900px;
    margin: auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th {
        background-color: #007bff;
        color: white;
        text-align: center;
        padding: 10px;
    }

    .table td {
        vertical-align: middle;
        text-align: center;
        padding: 10px;
    }

/* Default button styles */
.btn {
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
}

/* 📱 Mobile View */
@media (max-width: 768px) {
    .table {
        display: block;
        width: 100%;
    }

        .table thead {
            display: none;
        }

        .table tbody {
            display: grid; /* Use grid layout for mobile */
            grid-template-columns: repeat(2, 1fr); /* Two items per row */
            gap: 15px;
        }

        .table tr {
            display: flex;
            flex-direction: column; /* Stack products vertically */
            width: 100%; /* Full width for each item */
            background: #fff;
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            text-align: center;
            position: relative;
        }

        .table td {
            border: none;
            text-align: center;
            padding: 8px 0;
            font-size: 16px;
        }

            /* 🖼️ Product Image - Full Image with Same Size */
            .table td img {
                display: block;
                margin: 10px auto;
                width: 90px; /* Fixed width */
                height: 90px; /* Fixed height */
                object-fit: contain; /* Ensures the full image is displayed without cropping */
                border-radius: 12px;
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            }

    /* ➖➕ Quantity Controls */
    .quantity-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        background: #f8f9fa;
        padding: 10px;
        border-radius: 10px;
        margin-top: 5px;
    }

        .quantity-controls button {
            font-size: 22px;
            padding: 12px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: #007bff;
            color: white;
            border: none;
            font-weight: bold;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: 0.3s;
        }

            .quantity-controls button:hover {
                background: #0056b3;
                transform: scale(1.1);
            }

    /* ❌ Floating Remove Button (Top-Right Aligned) */
    .remove-item {
        position: absolute;
        top: 5px;
        right: 5px;
        font-size: 24px;
        color: #ff3b30;
        background: none;
        border: none;
        cursor: pointer;
        transition: 0.3s;
        padding: 5px;
    }

        .remove-item:hover {
            color: darkred;
            transform: scale(1.2);
        }

    /* 🛒 Place Order Button */
    .btn-primary {
        width: 100%;
        font-size: 18px;
        padding: 14px;
        border-radius: 12px;
        background: linear-gradient(135deg, #007bff, #0056b3);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        margin-top: 15px;
    }

        .btn-primary:hover {
            background: linear-gradient(135deg, #0056b3, #004099);
        }
}
