/* cart_styles.css */

/* --- General & Body --- */
body, html {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

/* --- Top Cart Bar --- */
.top-cart-bar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
}

/* --- Filter Section --- */
.filter-container {
    padding: 16px;
    background-color: #ffffff;
    margin: 70px 8px 8px 8px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.filter-container .w3-select, .filter-container .w3-input {
    border: 1px solid #ccc;
}

/* --- Product Grid & Cards --- */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 8px;
}
.product-card-container {
    width: 50%; /* 2 cards per row on mobile */
    padding: 8px;
}
.product-card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100%; /* This is key for same-height cards */
    overflow: hidden;
}
.product-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.product-card-content {
    padding: 12px;
    flex-grow: 1; /* Allows this section to grow */
    display: flex;
    flex-direction: column;
}
.product-card-content h5 {
    font-size: 1em;
    font-weight: bold;
    margin: 0 0 8px 0;
}
.product-card-content .price {
    font-size: 1.1em;
    font-weight: bold;
    color: #007bff;
}
.product-card-footer {
    padding: 12px;
    border-top: 1px solid #eee;
}
.qty-input {
    width: 60px !important;
    text-align: center;
}

/* --- Modal Styles --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #fff;
    padding: 24px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* --- Checkout List --- */
.checkout-list img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

/* --- Media Queries for larger screens --- */
@media (min-width: 600px) {
    .product-card-container {
        width: 33.33%; /* 3 cards per row */
    }
}
@media (min-width: 992px) {
    .product-card-container {
        width: 25%; /* 4 cards per row */
    }
}