:root {
  --color-primary: #EDEDED;     /* Default to gray */
  --color-secondary: #EDEDED;
  --color-background: #EDEDED;
  --color-text: #EDEDED;
}

#index {
  transition: 
  background-color 0.3s ease-out,
  color 0.3s ease-out;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  padding: 0px; 
  margin: 0px;
} 

.dropdown-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.dropdown {
  position: relative; 
  width: 300px; 
  max-height: 200px; 
  margin: 0 auto; 
}

.header {
  padding: 10px 50px 120px 50px; 
  margin: 0px 10px 10px 10px;
  background-color: var(--color-primary);
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px; /* Height of scallop */
  background-color: var(--color-background);
  mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  -webkit-mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  z-index: 0; 
}



.scalloped-bottom::after {
  content: '';
  position: absolute;
  bottom: -130px;
  left: 0;
  right: 0;
  background: 
  radial-gradient(circle at 50% 0%, var(--color-primary) 25%, var(--color-primary) 26%, rgba(255, 0, 0, 0) 0%);
  background-color: rgba(255, 0, 0, 0);
  background-size: 125px 280px;
  height:150px;
  background-repeat: repeat-x;
  transition: transform 1s ease-in-out; 

}

.header-details {
  background-color: var(--color-primary);
  margin: 0px 10px 10px 10px;
  padding: 10px 150px 100px 150px;
  position: relative;
  display: flex; 
  justify-content: center;
  align-items: center;
}

.header-details::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px; /* Height of scallop */
  background-color: var(--color-background);
  mask: radial-gradient(75px at 50% 0, #0000 25%, #000) calc(50% - 69.375px) 0/130px 100%;
  -webkit-mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  z-index: 0; 
}

.nav-container{
  margin: 10px 10px 0px 10px; 
  background-color: var(--color-primary);
  position: sticky;
  top: 10px;
  z-index: 100;
  overflow: visible;
  transition: background-color 0.3s ease-out, color 0.3s ease-out;


}



.nav-container::before {
  content: '';
  position: absolute;
  top: -10px; /* Negative margin height */
  left: -10px; /* Match left margin */
  right: -10px; /* Match right margin */
  height: 10px;
  background-color: var(--color-background); /* Same as nav background */
  z-index: -1; /* Behind the nav content but still blocks page content */
}

.nav-container::after {

}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-primary);
  padding: 40px 20px 20px 20px; /* Remove bottom padding */
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}



#header-title-mobile {
  margin: 0;
}

.nav h3 {
  margin: 0;
}



.nav,
.mobile-nav-bar {
  transition: all 0.3s ease-out;
}


.nav-left {
  display: flex;
  align-items: center;
  margin-right: auto; 
  border-radius: 8px;
  padding: 8px 12px;
}

.nav a {
  text-decoration: none;
  color: var(--color-background);
  transition: color 0.3s ease-out;
  border-radius: 8px;
  padding: 8px 12px;
}

.nav-left h3 a {
  padding-left: 0px;
}

.nav-left h3 a:hover {
  padding-left: 0px;
}

.nav h3 {
  margin: 0; /* Removes default margin from h2 elements */
  font-family: "Libre Caslon Text", serif;
  font-weight: 700; 
  font-style: normal;
  font-size: 18px;
  text-decoration: none;
  color: var(--color-secondary);
    transition: color 0.3s ease-out;
}

/* nav h2:hover {
  background-color: var(--color-primary);
  color: var(--color-primary);
} */

.nav a:hover {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  transition: color 0.3s ease-out;
  border-radius: 8px;
  padding: 8px 12px;
}

.nav-left:hover{
  background-color: var(--color-secondary);
  color: var(--color-primary);
  transition: color 0.3s ease;
  border-radius: 8px;
  padding: 8px 12px;
}

.nav-left:hover a {
  color: var(--color-primary);
}

/* Style for the Home link (left side) */
.nav h3:first-child {
  margin-right: auto;
}

/* Container for the right-side links */
.nav h3:nth-child(3),
.nav h3:nth-child(4) {
  margin-left: 32px; /* Adds space between About and All Items */
}


.header-content {
  display: grid; 
  grid-template-columns: 1fr auto 1fr; 
}

.header-container {
  grid-column: 2; 
  margin: 0px 75px 0px 75px; 
  text-align: center;
}

.header-details nav {
  grid-column: 1; /* Place nav in the first column */
  justify-self: start; /* Align to the left */
  z-index: 1;
}

.back-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--color-background);
  box-sizing: border-box;
  text-decoration: none;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.back-button:hover {
  color: var(--color-primary);
  background-color: var(--color-secondary);
}

.arrow-icon {
  font-size: 30px;
  line-height: 1;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 600,
  'GRAD' 0,
  'opsz' 24
}

.filter-button {
  border-radius: 16px; 
  color: var(--color-primary);
  background-color: var(--color-background);
  border-color: var(--color-primary);
  border-width: 0.1rem;
  box-sizing: border-box;
  font-family: "Libre Caslon Text", serif;
  display: inline-block; 
  margin: 4px; 
  cursor: pointer; 
  padding: 7px 15px 7px 15px;
  flex: 0 0 auto; /* Don't shrink, don't grow, auto width */
  white-space: nowrap; /* Prevent text wrapping */
  border: 2px solid var(--color-primary);
  background-color: transparent;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: fit-content;
}

.filter-button:hover{
  background-color: var(--color-secondary);
}

.filter-button.button-active,
.button-active {
  background-color: var(--color-primary);
  color: var(--color-background);
  border-width: 2px;
}

.button-container {
  padding: 20px 0px 20px 0px;
  max-width: 1000px;
}

.button-container::-webkit-scrollbar {
  display: none;
}


#header-title, #datetime {
  margin: 20px 0;
  text-align: center;
  z-index: 1;
  position: relative;
  white-space: normal;
}

.footer {
  background-color: var(--color-secondary); 
  color: var(--color-text); 

  text-align: left; 
  margin: 10px; 
  padding: 50px; 
  position: relative; 

}

.footer-container {
  margin: 0 auto;
  display: flex;
  gap: 5rem; 
  flex-wrap: wrap;
  width: 900px;
 
}

.footer-left {
  flex: 2;

}

.footer-right {
  flex: 1.5;

}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 75px; /* Height of scallop */
  background-color: var(--color-secondary); /* This should match your page background */
  mask: radial-gradient(75px at 50% 0%, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  -webkit-mask: radial-gradient(75px at 50% 0%, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  z-index: 0;
  transform: translateY(-100%); /* Move it up to position at the top edge */
}

.footer a {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 14px;
  color: var(--color-primary);
  transition: color 0.3s ease-out;
}

a:hover {
  background-color: var(--color-primary);
  color: var(--color-secondary);
  transition: color 0.3s ease-out;
}

h1 {
  color: var(--color-background); 
  font-family: "Libre Caslon Text", serif; 
  font-weight: 700; 
  font-style: normal;
  font-size: 48px;
}

h2 {
  color: var(--color-secondary);
  font-family: "Libre Caslon Text", serif; 
  font-weight: 700; 
  font-style: normal;
  font-size: 24px;
}

.date-link {
  color: var(--color-secondary);
  text-decoration: none;
  position: relative;
}

/* .date-link:hover {
  color: var(--color-primary);
} */

p {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 16px; 
  color: var(--color-primary);
}

ul li {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 16px 
}


  li {
    font-size: 14px; 
    margin: 5px
  }
  
  li a {
    color: var(--color-primary);

  }

  li a:hover{
    background-color: var(--color-secondary);
  }

p.small {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  font-size: 14px;
}
p.small-link {
  font-family: "Libre Caslon Text", serif;
  font-weight: 400;
  font-style: normal; 
  margin: 5px 10px;
}

.container {
  display: flex; 
  flex-wrap: wrap; 
  column-gap: 100px; 
  row-gap: 75px;
  padding: 50px 0px 125px 0px; 
  margin: auto; /* Auto margins for horizontal centering */
  justify-content: left; 
  width: fit-content; /* Make container only as wide as needed */
  width: 900px;

}

.container.no-padding {
    padding: 0;
}

.container-wrapper {
  display: flex;
  flex-direction: column; 
  justify-content: start; 
  position: relative;
  width: fit-content;
  margin-right: auto; 
  margin-left: auto;
  padding: 0px;
  opacity: 0;
  transition: opacity .3s ease-out;
  min-height: 400px;
  
}

.button-wrapper{
  display: flex;
  flex-direction: column; 
  justify-content: center; 
  position: relative;
  /* width: fit-content; */
  max-width: 900px;
  margin-right: auto; 
  margin-left: auto;
  overflow: hidden; 
}

.button-wrapper::-webkit-scrollbar {
  display: none;
}

.container-wrapper.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.card {
  width: 100px;
  text-align: center;
  transition: opacity .1s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;    
}

.card.hidden {
  opacity: 0;
  transform: scale(0);
  transition: opacity .1s ease-out; 
  display: none;
  pointer-events: none;
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}

.card.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity .1s ease-out; 
  pointer-events: auto;
}

.card.fade-in {
  opacity: 1;
}

.card.fade-out {
  opacity: 0;
}

.card img {
  width: 100%;  /* Fill the width of the card */
  height: 80px;  /* Fixed height for consistency */
  object-fit: contain;
  margin-bottom: 5px;
}

#all-items {
  width: 60px;
}

#container-all-items {
  grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  padding: 10px 10px 60px 10px;
  column-gap: 80px;
  row-gap: 25px;
  width: 900px;
  margin: 5px;

}

img {
  object-fit: contain;
}

.container-empty-state {
  display: flex; 
  flex-wrap: wrap; 
  column-gap: 100px; 
  row-gap: 75px;
  padding: 0px;
  margin: auto; /* Auto margins for horizontal centering */
  justify-content: left;
  width: fit-content; /* Make container only as wide as needed */
  width: 900px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: left;
    padding: 20px 20px 120px 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.empty-state.hidden {
    opacity: 0;
    display: none;
    pointer-events: none;
}

.empty-state-image {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state-text {
    color: var(--color-primary);
    margin: 0;
    text-align: center;
   
}


.select {
  background: var(--color-background); 
  color: var(--color-primary); 
  display: flex; 
  justify-content: space-between;
  align-items: center; 
  border: 2px var(--color-primary) solid; 
  border-radius: 0.7em; 
  padding: 1em 1.5em; 
  width: 100%; 
  box-sizing: border-box;
  transform: translateY(20%);
  transition: 
    background-color 0.3s ease-in,
    border 0.3s ease-in,
    color 0.3s ease-in;
}

.select:hover {
  background: var(--color-secondary);
}

.select-clicked {
  border: 2px var(--color-primary) solid;
}

.menu {
  list-style: none; 
  padding: .5em .5em; 
  background: var(--color-background);
  border-radius: 0.5em;
  border-width: 3px;
  border-style: solid;
  text-align: left;
  color: var(--color-primary);
  position: absolute; 
  top: 3.5em; 
  left: 50%; 
  width: 100%; 
  box-sizing: border-box;
  transform: translateX(-50%); 
  opacity: 0; 
  display: none;
  transition: .2s; 
  z-index: 1; 
  max-height: 300px;
  overflow-y: scroll;
}

.menu-open {
  display: block; 
  opacity: 1; 
}

.menu li {
  padding: .75em;
  width: 100%; 
  display: flex; 
  justify-content: flex-start;
  align-items: center; 
  box-sizing: border-box; 
}

.menu li:hover {
  background: var(--color-secondary);
  color: var(--color-primary); 
  border-radius: 0.5em; 
}

.menu::-webkit-scrollbar {
  width: 1em; 
}

.menu::-webkit-scrollbar-track {
  border-radius: 2em;
}

.menu::-webkit-scrollbar-thumb {
  background: var(--color-secondary); 
  border-radius: 2em;
}

.list li {
  color: var(--color-primary);
  margin: 10px; 
}

.recipe-list li {
  margin: 5px; 
}

.caret {
  width: 0; 
  height: 0; 
  border-left: 6px solid transparent; 
  border-right: 6px solid transparent; 
  border-top: 7px solid var(--color-primary); 
  transition: 0.3s
}

.caret-rotate {
  transform: rotate(180deg); 
}

.active {
  background: var(--color-primary); 
  color: var(--color-background);
  width: 100%; 
  box-sizing: border-box; 
  margin: 0em, 0.75em; 
  padding: 0.75em;
  border-radius: 0.7em;
}



.about-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.mission-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 equal-width columns */
  gap: 2rem; 
  /* justify-items: center; */
}

.mission-section{
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-section {
  padding: 0px;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Styles for produce detail page */
.produce-detail {
  display: block;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--color-background);
  border-radius: 8px;
}

.produce-detail h1 {
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 2rem;
}

.produce-image img {
  text-align: center;
  margin: 0;
  width: 225px;
  height: 225px;
}

#about-image {
  text-align: center;
  margin: 0;
  width: 400px;
  height: 400px;
  opacity: 1;
}
#mission-image {
  text-align: center;
  margin: 0;
  width: 700px;
  height: 700px;
  opacity: 1;
}

#mission-bullet {
  text-align: center;
  margin: 0;
  width: 50px;
  height: 50px;
  margin-right: 20px;
  margin-left: 20px;
  opacity: 1;
}

#favicon {
  margin: 0;
  width: 20px;
  height: 20px;
  opacity: 1;
  margin-right: 10px;
}

.produce-about-image {
  text-align: center;
  margin: 0;
  width: 300px;
  height: 300px;
}

.produce-info {
  max-width: 600px; 
}

.info-section {
  margin: 40px 40px
}

.about-text {
  margin: 20px 40px
}
.produce-card{
  text-align: center;


}
.produce-content {
  display: flex;
  margin: auto; 
  padding: 75px 100px; 
  max-width: 1000px; 
  flex-wrap: wrap; 
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  transition: opacity .3s ease-out;
}

.produce-content.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.produce-content h2 {
  color: var(--color-primary);
  font-size: 24px;
}

.produce-content h3 {
  color: var(--color-primary);
  font-family: "Libre Caslon Text", serif; 
  font-weight: 700; 
  font-style: normal;
  font-size: 16px
}

.produce-content p {
  color: var(--color-primary);
}

.about-content {
  display: flex;
  margin: auto; 
  padding: 25px 100px 100px 100px; 
  max-width: 1000px; 
  flex-wrap: wrap; 
  justify-content: center;
  gap: 1.5rem;
  opacity: 0;
  transition: opacity .3s ease-out;
}

.about-content.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.about-content h2 {
  color: var(--color-primary);
  font-size: 18px;
}

.about-content h3 {
  color: var(--color-primary);
  font-family: "Libre Caslon Text", serif; 
  font-weight: 700; 
  font-style: normal;
  font-size: 16px
}

.about-content p {
  color: var(--color-primary);
}

nav {
  text-align: left;
  display: flex; 
  align-items: center;
  padding: 0.5rem 1rem;
}

/* Mobile menu toggle button */
        /* .mobile-menu-toggle {
            display: none;
            position: absolute;
            top: 15px;
            left: 20px;
            background: none;
            color: var(--color-background);
            border: none;
            font-size: 24px;
            cursor: pointer;
            z-index: 1001;
        } */

        .mobile-menu-toggle {
            background: none;
            border: none;
            font-size: 2rem;
            cursor: pointer;
            padding: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 44px; /* Minimum touch target size */
            height: 54px;
            z-index: 1001;
             color: var(--color-background);
        }


        /* Mobile Navigation Overlay */
        .mobile-nav-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 999;
            opacity: 0;
            visibility: hidden; 
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .mobile-nav-overlay.active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto; 
       
        }

        /* Mobile Navigation Menu */
        .mobile-nav {
     
            position: fixed;
            top: 0;
            left: -100vw;
            width: 80vw;
            min-width: 300px;
            height: 100%;
            background-color: var(--color-background);
            z-index: 1000;
            transition: left .3s ease;
            padding: 20px;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
            border-top-right-radius: 1rem;   
            border-bottom-right-radius: 1rem;
        }
         

        .mobile-nav.active {
            left: 0;
            width: 80vw;
             min-width: 300px;
             padding: 20px;
             height: 100%; 
        }

        /* Close button in mobile nav */
        .mobile-nav-close {
            position: absolute;
            top: 15px;
            right: 20px;
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: var(--color-primary);
        }

        /* Mobile nav links */
        .mobile-nav-links {
           margin-top: 60px;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }

        .mobile-nav-links h2 {
            margin-bottom: 20px;
            margin-left: 0px;
         
            margin-top: 20px; 
            padding-bottom: 0px;
    
        }

      



        .mobile-nav-links a  {
            text-decoration: none;
            color: var(--color-primary);
            font-size: 18px;
            padding: 8px 8px;

       
        }


        .nav-container-mobile{
          display: none;
        }
       




/* .mobile-nav-bar::after {
  content: '';
  position: absolute;
  bottom: -75px; 
  left: 0;
  right: 0;
  height: 75px;
  background-color: var(--color-primary);
  mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  -webkit-mask: radial-gradient(75px at 50% 0, #0000 98%, #000) calc(50% - 69.375px) 0/130px 100%;
  z-index: -1;
  pointer-events: none;
} */





/* MEDIA QUERIES */





/* Mobile styles */
@media screen and (max-width: 767px) {

  #header-title-h2{
    padding: 0px;
    padding-bottom: 20px;
    margin: 0px;
  }

   .footer-container {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-left,
  .footer-right {
    flex: unset; /* remove flex ratios */
    width: 100%; /* full width when stacked */
  }
 

    .mission-container {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }
  .nav-container{
    display: none;
  }

  .nav-left{
    margin-bottom: 48px;
    margin-left: 0px;

  }

  .nav-left h2{
    margin: 0px;
    padding-left: 0px;
  }

  .nav-left a{
    padding-left: 0px;
  }

  .nav a:hover {
     background-color: var(--color-background);
   }

  .nav-left:hover{
   background-color: var(--color-background);
  }

  .mobile-nav-links a:hover{
    background-color: var(--color-background);

  }


    .nav-active {
      background-color: var(--color-primary);
      color: var(--color-background) !important;
      border-radius: 8px;
      padding: 8px 12px;
  
    
    }

    .nav-left .nav-active{
      padding: 0px;
    }


 

  .nav-container-mobile{
    margin: 0px 5px 0px 5px;
    background-color: var(--color-primary);
    position: sticky;
    top: 5px;
    z-index: 100;
    overflow: visible;
    display: block;
  
  }

 



  .scalloped-bottom::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  background: 
  radial-gradient(circle at 50% 0%, var(--color-primary) 25%, var(--color-primary) 26%, rgba(255, 0, 0, 0) 0%);
  background-color: rgba(255, 0, 0, 0);
  background-size: 75px 180px;
  height:50px;
  background-repeat: repeat-x;
  transition: all 1s ease-in-out; 

}

  .mobile-nav-bar{ 
    display: flex;
    align-items: center;
    position: sticky;
    top: 0px;
    z-index: 100;
    background-color: var(--color-primary);
    padding: 20px 20px 0px 20px;
 
  }

  .nav-container-mobile::before {
  content: '';
  position: absolute;
  top: -5px; /* Negative margin height */
  left: -5px; /* Match left margin */
  right: -5px; /* Match right margin */
  height: 5px;
  background-color: var(--color-background); /* Same as nav background */
  z-index: -1; /* Behind the nav content but still blocks page content */
}

  /* .mobile-nav-bar::after {
    height: 65px;
    bottom: -65px;
    mask: radial-gradient(45px at 50% 0%, #0000 98%, #000) calc(50% - 43px) 0/75px 100%;
    -webkit-mask: radial-gradient(45px at 50% 0%, #0000 98%, #000) calc(50% - 43px) 0/75px 100%;
  } */


  
/* 
  .mobile-menu-toggle{
    display: flex;
    align-items: center;
    justify-content: center;

  } */

  /* Show mobile elements */
  .mobile-menu-toggle,
   .mobile-nav-overlay,
   .mobile-nav {
      display: block;
   
    }


  .mobile-menu-toggle{
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0rem;
    
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    z-index: 1001;
    color: var(--color-background);
    
  }

  #header-title-mobile{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    margin: 0;
   
  }

  
  /* Fix for container-all-items - reduce gaps for small screens */
  #container-all-items {
    column-gap: 20px; /* Reduced from 40px */
    row-gap: 20px;    /* Reduced from 25px */
    padding: 10px 5px 60px 5px; /* Reduced side padding */
    margin: 0px; /* Reduced margin */
  }

  .container-wrapper{
    min-height: 0px;
  }
  
  .button-container {
    padding: 0px 10px 0px 10px;  
    padding-left: 3px;
    padding-right: 0px;
        display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  
    margin: 5px;



  
  }

  
  .button-wrapper{

    justify-content: center;
    margin-left: auto; 
    margin-right: auto;
    position: relative; 
    width: fit-content; 
  }

  .filter-button{
    margin: 3px;
  }
  
  .header {
    padding: 10px 15px 80px 15px; /* Remove top padding */
    margin: 0px 5px 5px 5px;
    
  }

  .header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background-color: var(--color-background);
    mask: radial-gradient(43px at 50% 0%, #0000 98%, #000) calc(50% - 43px) 0/75px 100%;
    mask: radial-gradient(45px at 50% 30%, #0000 100%, #000) calc(50% - 43px) 0/75px 100%;
    z-index: 0; 
  }

  .footer::before{
    mask: radial-gradient(45px at 50% 30%, #0000 100%, #000) calc(50% - 43px) 0/75px 100%;
  }

  .filter-button:hover {
    
    background-color: var(--color-background);
    color: var(--color-primary);


  }

  .filter-button.button-active, .button-active {
    background-color: var(--color-primary);
    color: var(--color-background);
  }

  #header-title {
    margin: 10px 0;
    text-align: center;
    z-index: 1;
    position: relative;
    white-space: normal;
    display: none;
  }

  #mobile-nav-h2{
    padding-bottom: 12px; 
    z-index: 99; 
    margin: 0px;
  }

  #datetime {
    margin: 0px 10px 10px 10px;
    text-align: center;
    z-index: 1;
    position: relative;
    white-space: normal;
  }
  
  
  h1 {
    font-size: 24px;
    text-wrap: wrap; 
  }
  
  h2 {
    font-size: 16px;
    text-wrap: wrap;
  }

  h3 {
    font-size: 16px;
  }

  p {
    font-size: 14px; 
  }

  .mission-section p{
      font-size: 16px;
  }

  
  li a:hover{
    background-color: var(--color-secondary);
  }
  
  .card {
    width: 65px;
  }

  /* for the dropdown */
 .active {
  margin: 5px;
  padding-left: 50px;
 }


  
  .card p {
    font-size: 14px; 
  }

  img {
    width: 100%; 
    height: auto;
    max-height: 450px;
    object-fit: contain;
    display: block;
  }
  
  .dropdown {
    width: 90%;
  }
  
  .footer {
    padding: 30px 20px;
    margin: 5px;
  }

  .menu {
    top: 3em;
    max-height: 350px;
  }
  
  .select {
    padding: 0.8em 1.5em;
  }
  
  .menu li {
    padding: 0.75em;
  }

  .footer p {
    font-size: 14px; 
  }

  .footer a {
    font-size: 14px;
  }

  .back-button {
    width: 50px;
    height: 50px;
  }

  /* Produce Details page  */
  .header-details {
    grid-gap: 15px; /* Add some spacing between elements */
    padding: 5px 20px 50px 20px;
    margin: 0px 5px 5px 5px;
  }

  .header-details::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px; /* Height of scallop */
    background-color: var(--color-background);
    mask: radial-gradient(43px at 50% 0, #0000 98%, #000) calc(50% - 43px) 0/75px 100%;
    z-index: 0; 
  }

  .header-details nav {
    grid-column: 1;
    grid-row: 1;
    display: none;
  }

  .header-container {
    width: 100%; /* Ensure full width */
    margin: 0px;
    padding: 5px 5px 0px 5px;
    box-sizing: border-box;
  }
  
  .header-content { 
    margin: 0px; 
    padding: 0px;
    box-sizing: border-box;

  }

  .produce-detail {
    padding: 1rem; 
    margin: 1rem;
  }
  
  .produce-content {
    display: flex;
    margin: 5px; 
    padding: 20px 15px 80px 15px;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 1.5rem;
  }

  .about-content {
    display: flex;
    margin: 5px; 
    padding: 0px 15px 80px 15px;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 1.5rem;
  }

  #about-image {
    width: 350px;
    height: 350px
  }


  .about-text {
    margin: 0px 0px
  }
  
  .info-section {
    margin: 40px 0px
  }
  
  .produce-detail h1 {
    font-size: 32px;
  }
  .produce-image{
    justify-content: center;
  }

  .produce-image img {
    margin: auto;
    max-width: 150px;
    max-height: 150px;
  }

  .info-section h2 {
    font-size: 18px;
  }
  
  .info-section p {
    font-size: 16px;
  }

  #container-reverse #about-image {
    order: 1; 
  }
  
  #container-reverse .about-section {
    order: 2; 
  }
}

/* Additional fix for very small screens */


/* Mobile styles */
@media screen and (max-width: 349px) {
 /* very small screens  */

    .container {
    /* grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); */
    grid-gap: 1.5rem 1.5rem;
    padding: 3px 10px 60px 10px;
    width: 306px;
    justify-content: center;
    margin: 5px;

    .container-empty-state{
        width: 306px;
     }
  }
  .footer-container{
    width: 306px;
  }


}

@media screen and (min-width: 350px) and (max-width: 499px) {
  .footer-container{
    width: 315px;
  }
   .container {
    /* grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); */
    grid-gap: 36px 60px;
    padding: 20px 10px 60px 10px;
    width: 315px;
    justify-content: left;
    margin: 5px;
  }

  .container-empty-state{
        width: 315px;
  }

  .empty-state-image{
    height: 250px; 
    width: 250px;
  }

  #container-all-items {
    column-gap: 38px; 
    row-gap: 15px;
    width: 315px;
    padding: 10px 2px 60px 2px;
 
  }

  #about-image{
    width: 315px; 
    height: 315px;
  }

  #all-items.card{
    width: 50px; 
   
  }

  .button-container{
    width: 306px; 
  }

   #mission-image {
    max-height: 350px;
  }




}

@media screen and (min-width: 500px) and (max-width: 767px) {
  .footer-container{
    width: 440px;
  }
   .container {
    grid-gap: 36px 60px;
    padding: 20px 10px 60px 10px;
    width: 440px;
    justify-content: left;
    margin: 5px;
  }

    .container-empty-state{
        width: 440px;
  }

   .button-container{
    width: 424px; 
  }


  #container-all-items {
    column-gap: 36px; 
    row-gap: 15px;
    width: 440px;
    padding: 10px 2px 60px 2px;
    justify-content: center;
  }




  #all-items.card{
   width: 50px; 
  }

    .dropdown{
    max-width: 424px;
  }

  .footer {
    padding: 30px 60px;
  }

    #mission-image {
    max-height: 450px;
  }

    #about-image{
    width: 424px; 
  }



}


/* Tablet styles */
@media screen and (min-width: 768px) and (max-width: 1025px) {
  .footer-container{
    width: 600px;
  }
  .container {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    grid-gap: 66px;
    padding: 50px  0px 125px 0px;
    justify-content: left;
    width: 600px;
  }

  .container-empty-state{
        width: 600px;
  }
   #container-all-items{
     width: 600px;
   }

  .nav{
    width: 600px;
  }

  #container-all-items{
    column-gap: 87px;
  }


  .header-container {
    margin: 0px 25px 0px 25px;
  }

  h1{
    font-size: 36px;
  }

  #all-items {
    width: 50px; 
  }


  .button-container {
    padding: 20px 10px 20px 10px;  
    padding-left: 7px;
    padding-right: 16px;
        display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  
    margin: 0px;
    width: 600px;



  
  }


  .filter-button:hover {
    
    background-color: var(--color-background);
    color: var(--color-primary);


  }

  .filter-button.button-active, .button-active {
    background-color: var(--color-primary);
    color: var(--color-background);
  }

  .button-wrapper{

    justify-content: center;
    margin-left: auto; 
    margin-right: auto;
    position: relative; 
    width: fit-content; 
  }

  /* Container for the right-side links */
.nav h3:nth-child(3),
.nav h3:nth-child(4) {
  margin-left: 12px; /* Adds space between About and All Items */
}


  #container-reverse #about-image {
    order: 1; 
  }
  
  #container-reverse .about-section {
    order: 2; 
  }


}

/* For screens that are not long */
@media only screen and (max-height: 600px) {
    .menu {
    top: 3em;
    max-height: 250px;
  }
  
  
}
