* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: 60px; /* Space for fixed header */
}
header {
    background-color: #333;
    /* color: #fff; */
    text-align: center;
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}
.container {
    margin: 0 auto;
    /* padding: 1rem; */
    padding-top:4em;
    background-color: #f2f4e9;
}
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
/* .product-card {
    background-color: #f4f4f4;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
} */
.product-card {
    background-color: #f4f4f4;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem;
    width: calc(50% - 0.5rem); /* 50% width minus half of the gap */
    max-width: none; /* Remove max-width constraint */
    display: flex;
    flex-direction: column;
}
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}
.product-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.product-price {
    font-size: 1.1rem;
    color: #007bff;
    margin-bottom: 0.5rem;
}
.product-description {
    font-size: 0.9rem;
    color: #666;
    flex-grow: 1;
}

/* For screens smaller than iPhone (e.g., older phones) */
@media (max-width: 359px) {
    .product-card {
        width: 100%;
    }
}

/* For iPhone SE and similar sized devices */
@media (min-width: 360px) and (max-width: 389px) {
    .product-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: space-between;
    }
    .product-card {
        width: calc(50% - 0.5rem);
    }
}

/* For iPhone 12, 13, 14 (non-Pro) */
@media (min-width: 390px) and (max-width: 428px) {
    .product-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: space-between;
    }
    .product-card {
        width: calc(50% - 0.5rem);
    }
}

/* For larger screens */
@media (min-width: 429px) {
    .product-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: flex-start;
    }
    .product-card {
        width: calc(33.333% - 0.667rem);
    }
}
@media (min-width: 768px) {
    .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}
@media (min-width: 768px) {
    .product-card {
        /* width: calc(25% - 0.75rem); */
        width: 100%; /* Full width within its grid cell */
    }
}

/* @media (min-width: 1024px) {
    .product-card {
        width: calc(20% - 0.8rem);
    }
} */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1440px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (min-width: 1920px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}


.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#product-quantity, #product-size {
    margin: 10px 0;
    padding: 5px;
    width: 100%;
}

#confirm-add-to-cart {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

#confirm-add-to-cart:hover {
    background-color: #45a049;
}

.delete-btn {
    background-color: #ff4136;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}
.delete-btn:hover {
    background-color: #d50000;
}

/* for checkout */
.button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}
.button:hover {
    background-color: #45a049;
}
.button.secondary {
    background-color: #008CBA;
}
.button.secondary:hover {
    background-color: #007B9A;
}

/* This for checkout */
h1 {
    color: #e1ecf8;
}
form {
    max-width: 500px;
    margin: 0 auto;
}
label {
    display: block;
    margin-top: 10px;
}
input[type="text"], input[type="email"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
}
.order-summary {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}


table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}
th {
    background-color: #f2f2f2;
}
.total {
    font-weight: bold;
    text-align: right;
    margin-top: 20px;
}


#cancel-add-to-cart {
    background-color: #f44336;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    width: 48%;
    margin-top: 10px;
    margin-right: 0;
}

#cancel-add-to-cart:hover {
    background-color: #d32f2f;
}

#confirm-add-to-cart {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    width: 48%;
    margin-top: 10px;
    margin-left: 0;
}

#confirm-add-to-cart:hover {
    background-color: #45a049;
}

/* header {
    background-color: #333;
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
} */

.menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.menu li {
    display: inline-block;
    margin: 0 15px;
}

.menu li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.menu li a:hover {
    color: #ffd700;
}


/* below is for cart icon and cart count */

.cart-count {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    position: absolute;
    top: -10px;
    right: -10px;
}
/* sr-only class is typically used to hide text visually while keeping it available for screen readers */
sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}


