html, body {
    margin: 0;
    padding: 0;
    background-color: rgb(253, 250, 241);
}
body, .menuPopUpContainer a {
    font-family: Arial, Helvetica, sans-serif;
    color: rgb(52, 63, 30);
}
.pageWrapper, 
.menuBanner, 
.homeHeader, 
.homeFooter {
    width: 100%;
}

.menuBanner {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 0;
    width: 100%;
    padding-bottom: 100px;
    margin: 0 20px;
    overflow-x: hidden; /* prevent spill */
}
.menuBanner h2 {
    font-size: 40px;
    padding: 50px;
}
.menuBanner form {
    display: flex;              /* put input + button in one row */
    justify-content: center;    /* center them */
    align-items: center;
    width: 100%;
    max-width: 1100px;
    text-align: center;
    gap: 10px;   
}
.searchBox input {
    flex: 1;                    /* take remaining space */
    max-width: 900px;
    height: 40px;
    padding-left: 20px;
    border-radius: 20px;
    border: 1px solid rgb(186, 192, 171);
    box-sizing: border-box;
}
.searchButton {
    height: 40px;
    padding: 0 20px;             /* make it flexible */
    background-color: rgb(92, 134, 7);
    border: none;
    border-radius: 20px;
    color: rgb(253, 250, 241);
    font-weight: bold;
    white-space: nowrap;        /* prevent text wrapping */
    cursor: pointer;
}
.searchButton:hover {
    background-color: rgb(112, 163, 9);
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    .menuBanner h2 {
        font-size: 28px;
        padding: 20px;
    }

    .menuBanner form {
        flex-direction: row;     /* stay side by side */
        max-width: 100%;
    }

    .searchBox input {
        max-width: 100%;
    }

    .searchButton {
        flex-shrink: 0;
    }
    .menuTilesContainer {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}


.menuContainer {
    background-color: rgb(227, 233, 216);
    min-height: 100vh;
    flex: 1;
    border-top: 1px rgb(186, 192, 171) solid;
    border-bottom: 1px rgb(186, 192, 171) solid;
}
.menuContainer h3 {
    font-size: 30px;
    text-align: center;
    padding: 80px 0;
}
.menuFilterContainer {
    margin: 20px 35px;
    width: fit-content;
    margin-right: 90px;
}
.filterItems {
    margin-right: 10px;
    font-weight: bold;
}
.filterSelect {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #5c8607;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.filterSelect:focus {
    border-color: #5c8607;
    outline: none;
}
.filterSelect option {
    padding: 10px;
}
.clearFilters {
    color: rgb(52, 63, 30);
    text-decoration: underline;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}
.clearFilters:hover {
    color: rgb(112, 163, 9);
}
.menuTilesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.menuTile {
    height: 550px;
    width: 400px;
    background-color: rgb(253, 250, 241);
    margin: 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    border-radius: 5px;
}
.menuTile h4 {
    text-align: center;
    font-weight: bold;
    font-size: 20px;
}
.menuTile:hover{
    background-color: rgb(239, 229, 201);
    box-shadow: 3px 3px 10px;
    transition: 0.5s;
}
.menuImageContainer {
    height: 50%;
    width: 80%;
    margin-top: 30px;
    margin-bottom: 20px;
    /*background-image: url("../images/baked_goods/spanish_bread.jpg");*/
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center -30px;
    border-radius: 5px;
}
.menuTextContainer {
    margin: 0 40px;
}
.product_name, .product_price {
    margin-bottom: 3px;
}
.product_desc {
    margin: 15px;
}
.menuPopUpContainer {
    margin-left: auto;
    margin-right: 40px;
    margin-top: 3px;
}
.menuPopUpContainer i {
    margin-left: 5px;
}
.menuPopUpContainer a:hover {
    background-color: rgb(253, 250, 241);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 3px 3px 10px;
    transition: 0.3s;
}

/* Modal background */
.modal {
  display: none; 
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}
/* Modal content box */
.productModalContent {
  background-color: white;
  width: 80%;           
  max-width: 1000px;    
  height: 80vh;         
  padding: 30px;
  border-radius: 10px;
  position: relative;
  display: flex;
  gap: 30px;
  box-sizing: border-box;
}
/* Image section */
.modalProductImage {
  width: 50%;
  background-size: cover;
  background-position: center;
  height: 100%;
  border-radius: 10px;
  box-shadow: 2px 2px 8px;
}
/* Details section */
.modalDetails {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* margin-bottom: 10px; */
  padding-left: 10px;
  justify-content: space-between;
}
.modalDetails h3 {
    margin: 0;
    padding: 20px 0;
    text-align: left;
}
.modalDetails p {
    margin: 0;
}
.closeBttn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 25px;
  cursor: pointer;
  color: rgb(92, 134, 7);
}
.closeBttn:hover {
    color: rgb(112, 163, 9);
}
.addToCartBttnContainer {
    padding-bottom: 30px;
}
.addToCartBttn {
  background-color: rgb(92, 134, 7);
  border: none;
  padding: 12px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  float: bottom;
}
.addToCartBttn:hover {
  background-color: rgb(112, 163, 9);
}
.modalOptions {
    padding-top: 10px;
    gap: 10px;
}

/* Hide native radio */
.custom_radio input[type="radio"] {
  display: none;
}

/* Style custom radio button */
.radio_custom {
  display: inline-block;
  width: 120px;
  text-align: center;
  padding: 8px 16px;
  margin-right: 10px;
  border: 2px solid rgb(186, 192, 171); 
  border-radius: 20px;
  cursor: pointer;
  color: rgb(52, 63, 30);
  transition: 0.3s;
}

/* Change color when selected */
.custom_radio input[type="radio"]:checked + .radio_custom {
  background-color: rgb(92, 134, 7);
  border-color: rgb(92, 134, 7);
  color: white;
}

.modalQty {
    display: flex;
    flex-direction: row;
    gap: 25px;
    font-size: 20px;
}
.qtyButton {
    color: rgb(92, 134, 7);
    border: none;
    background: none;
}
.qtyButton:hover {
    color: rgb(112, 163, 9);
}

/* Mobile view adjustments */
@media (max-width: 768px) {
    /* Modal content box */
    .productModalContent {
        width: 95%;           /* Almost full width */
        max-width: 95%;       /* No restriction on small screens */
        height: auto;         /* Let content decide height */
        max-height: 90vh;     /* Keep it within the screen */
        flex-direction: column; /* Stack image and details */
        padding: 20px;
        overflow-y: auto;     /* Scroll if content overflows */
    }
    /* Image section */
    .modalProductImage {
        width: 100%;          /* Full width */
        height: 200px;        /* Fixed height for mobile */
        margin-bottom: 20px;  /* Space below image */
    }
    /* Details section */
    .modalDetails {
        padding-left: 0;      /* Remove left padding */
        gap: 15px;            /* Smaller gaps */
    }
    .modalDetails h3 {
        padding: 10px 0;
        text-align: center;   /* Center the title */
    }
    .modalQty {
        flex-direction: row;
        gap: 15px;           /* Reduce gap */
        font-size: 18px;     /* Slightly smaller */
    }
    .addToCartBttn {
        width: 100%;         /* Full width button */
        padding: 12px 0;
        font-size: 16px;
    }
    .modalOptions {
        flex-wrap: wrap;     /* Allow options to wrap */
        gap: 8px;
    }
    .radio_custom {
        width: calc(50% - 10px); /* Two options per row */
        margin-bottom: 10px;
    }
}

/* Dark semi-transparent background */
#atcPopUpContainer {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* <-- dark background */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* The white popup box */
.atcPopUpContent {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.atcBttnWrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.popUpBttn {
    background-color: rgb(92, 134, 7);
    border: none;
    padding: 12px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
}
.popUpBttn:hover {
    background-color: rgb(112, 163, 9);
}



/* Make sure containers scale properly */
.menuContainer {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    overflow-x: hidden; /* prevents sideways scrolling */
}

.menuTile {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}


/* Mobile view adjustments */
@media (max-width: 768px) {
  .homeHeader {
    padding: 20px;
  }

  .contactBttn {
    width: 100%;
    max-width: 250px;
  }

  .search-container input,
  .search-container button {
    width: 100%;
  }
}

@media (max-width: 767px) {
    .menuContainer {
        display: flex;
        flex-direction: column;
        gap: 15px; /* space between cards */
    }

    .menuTile {
        width: 100%;
    }
}



