*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}


/* ================= NAVBAR ================= */
nav {
    position: relative; /* required for absolute dropdown */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 2em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: orange;
}

/* Desktop links layout */
nav ul {
    list-style: none;
    display: flex;
    gap: 8em;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: black;
    font-weight: 500;
}

/* Cart icon */
.carticon {
    position: relative;
    cursor: pointer;
}

.carticon::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -10px;
    padding: 0.2em 0.5em;
    background-color: orange;
    border-radius: 50%;
    font-size: 0.8em;
    color: white;
}

/* Button */
nav button {
    padding: 0.5em 1.5em;
    background-color: orange;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

/* Hamburger */
.menu-toggle {
    display: none;
    font-size: 1.8em;
    cursor: pointer;
}

/* ================= MOBILE VIEW ================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    /* make dropdown overlay under navbar and not affect layout */
    nav ul {
        position: absolute;
        top: 100%;         /* place right under the navbar */
        left: 0;
        right: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: white;
        margin: 0;
        padding: 0;        /* will set padding when open */
        overflow: hidden;
        transform-origin: top;
        transform: scaleY(0);   /* collapsed */
        opacity: 0;
        transition: transform 320ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        z-index: 999;
    }

    /* open state - expands downward because origin is top */
    nav ul.active {
        transform: scaleY(1);
        opacity: 1;
        padding: 1em 0;
    }

    /* give each item some spacing in dropdown */
    nav ul li {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0.6em 1em;
        box-sizing: border-box;
    }

    /* style cart & button inside dropdown */
    nav ul .carticon,
    nav ul li > a > button,
    nav ul li > button {
        margin: 0.4em auto;
    }

    /* hide the top-level cart/button (they are inside <ul> now) */
    nav  .carticon{
      display: block;
    }
    nav > a {
        display: none !important;
    }
}

/* optional: small accessibility focus style */
nav ul li a:focus,
nav ul li button:focus {
    outline: 2px solid rgba(255,165,0,0.25);
    outline-offset: 3px;
}


/*=====================hero section================*/
.hero {
      background-color: #ffffff; /* White background */
      color: #222;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4rem 8%;
      border-radius: 0 0 30px 30px;
      position: relative;
      overflow: hidden;
}
/* Background vegetable pattern (light grey for subtle effect) */
.hero::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 150px;
      background: url('veggie-pattern.svg') repeat-x;
      background-size: contain;
      opacity: 0.1; /* very subtle on white */
}
.hero-content {
      max-width: 550px;
      position: relative;
      z-index: 2;
}
.discount {
      display: inline-block;
      background: greenyellow;
      color: black;
      font-size: 0.9rem;
      font-weight: bold;
      padding: 0.5rem 1rem;
      border-radius: 20px;
      margin-bottom: 1rem;
}

.hero-content h1 {
      font-size: 4rem;
      font-weight: bold;
      line-height: 1.3;
      margin-bottom: 1rem;
      color: #111;
}

.hero-content h1 span {
      color: #32a852; /* Green accent for grocery */
}

.hero-content p {
      font-size: 1.1rem;
      margin-bottom: 2rem;
      color: #555;
}

.btn {
      display: inline-block;
      background: orange;
      color: white;
      padding: 1rem 2rem;
      border-radius: 12px;
      font-weight: bold;
      text-decoration: none;
      font-size: 1rem;
      transition: 0.3s;
}

.btn:hover {
      background: #ffda2f;
}
.hero-image {
      position: relative;
      z-index: 2;
}

.hero img {
      max-width: 400px;
      border-radius: 15px;
}

@media (max-width: 992px) {
      .hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 5%;
}
.hero img {
        margin-top: 2rem;
        max-width: 300px;
}
}


/*================================introduction banners================================*/    
.intro-content {
    display: flex;
    flex-wrap: wrap; /* allow wrapping */
    gap: 2em;
    margin: 2em;
    justify-content: center;
}
.intro-banner{
    background-image: url(/Assets/images/Groceries-banner.jpg);
}
.banner-intro{
    background-image: url(/Assets/images/fruits-banner7.jpg);
}
.banner1-cont{
    background-image: url(/Assets/images/fruits-banner5.jpg);
}
.banner2-cont{
    background-image: url(/Assets/images/fruits-banner2.jpg);
}
.banner3-cont{
    background-image: url(/Assets/images/vegetables-banner2.jpg);
}
/* General banner styling */
.intro-banner,
.banner-intro,
.banner1-cont,
.banner2-cont,
.banner3-cont {
    flex: 1 1 300px; /* flexible width, min 300px */
    max-width: 100%; /* prevent overflow */
    min-height: 20em;
    border-radius: 20px;
    text-align: center;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 1em;
}

/* Headings */
.intro-banner h2,
.banner-intro h2,
.banner1-cont h2,
.banner2-cont h2,
.banner3-cont h2 {
    font-size: 2.5em;
    padding-top: 2em;
    color: white;
}

/* Buttons */
.intro-banner button,
.banner-intro button,
.banner1-cont button,
.banner2-cont button,
.banner3-cont button {
    padding: 0.8em 2em;
    background-color: orange;
    border: none;
    color: white;
    margin-top: 1em;
    margin-left: 0; /* remove fixed left margin */
    border-radius: 8px;
    cursor: pointer;
}

/* MEDIA QUERIES */
@media (max-width: 1024px) {
    .intro-content {
        gap: 1.5em;
    }
    .intro-banner h2,
    .banner-intro h2,
    .banner1-cont h2,
    .banner2-cont h2,
    .banner3-cont h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .intro-content {
        flex-direction: column; /* stack vertically */
        margin: 1em;
    }
    .intro-banner h2,
    .banner-intro h2,
    .banner1-cont h2,
    .banner2-cont h2,
    .banner3-cont h2 {
        font-size: 1.8em;
        padding-top: 1.5em;
    }
    .intro-banner button,
    .banner-intro button,
    .banner1-cont button,
    .banner2-cont button,
    .banner3-cont button {
        width: 40%; /* full-width buttons on mobile */
    }
}

@media (max-width: 480px) {
    .intro-banner h2,
    .banner-intro h2,
    .banner1-cont h2,
    .banner2-cont h2,
    .banner3-cont h2 {
        font-size: 1.5em;
        padding-top: 1em;
    }
    .intro-banner button,
    .banner-intro button,
    .banner1-cont button,
    .banner2-cont button,
    .banner3-cont button {
        font-size: 0.9em;
        padding: 0.6em 1.5em;
    }
}




/*====================================products&shop section===========================*/
.products {
  margin: 2em;
}

.pro-content {
  display: flex;
  flex-wrap: wrap; /* allows items to move to the next line */
  justify-content: center; /* center products nicely */
  gap: 1.5em; /* space between cards */
}
.badge {
  float: left;
  background-color: greenyellow;
  padding: 0.4em;
  margin: 0.8em;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: bold;
}


/* -------- RESPONSIVE BREAKPOINTS -------- */
@media (max-width: 768px) {
  .badge {
    font-size: 0.8em;
    margin: 0.5em;
  }
}

.category-buttons {
  display: flex;
  justify-content: center; /* centers buttons */
  gap: 4em;
  padding: 1em;
  flex-wrap: wrap;
}

.category-buttons button {
  padding: 10px 20px;
  border: 1px solid #222;
  background-color: white;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.category-buttons button.active {
  background-color: orange;
  color: white;
}

  /* Products grid */
.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

.product-content {
  flex: 1 1 250px; /* responsive sizing */
  max-width: 300px;
  box-shadow: 1px 1px 5px gray;
  text-align: center;
  border-radius: 20px;
  margin-top: 2em;
  padding: 1em;
  background: #fff;
  }
.product-content img {
  max-width: 100%;
  height: auto;
}

.product-content button {
  padding: 0.6em 2em;
  background-color: orange;
  border: none;
  color: white;
  margin: 1em auto;
  display: block;
  border-radius: 8px;
  cursor: pointer;
}
.banner-veg {
  flex: 1 1 100%;
  background-image: url(/Assets/images/Groceries-banner.jpg);
  min-height: 25em;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  margin: 2em 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 1px 1px 8px rgba(0,0,0,0.2);
}
.banner-fruits{
    flex: 1 1 100%;
  background-image: url(/Assets/images/fruits-banner.jpg);
  min-height: 25em;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  margin: 2em 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 1px 1px 8px rgba(0,0,0,0.2);
}
.banner-foods{
    flex: 1 1 100%;
  background-image: url(/Assets/images/food.jpeg);
  min-height: 25em;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  margin: 2em 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 1px 1px 8px rgba(0,0,0,0.2);
}
.banner-beverages{
    flex: 1 1 100%;
  background-image: url(/Assets/images/beverages.jpg);
  min-height: 25em;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  margin: 2em 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 1px 1px 8px rgba(0,0,0,0.2);
}

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  background: rgba(0,0,0,0.4);
  padding: 1em 2em;
  border-radius: 10px;
}

.banner-text h2 {
  font-size: 1.8em;
  margin-bottom: 0.5em;
}

.banner-text p {
  font-size: 1em;
}


/*=============================================banners====================================*/
.banners {
  margin: 2em;
}
.banner4-cont{
    background-image: url(/Assets/images/fruits-banner3.jpg);
}
.banner5-cont{
    background-image: url(/Assets/images/cookingoil-banner2.jpg);
}
.banner6-cont{
    background-image: url(/Assets/images/candies-banner.jpg);
}

.banners-content {
  display: flex;
  flex-wrap: wrap; /* allow wrapping */
  margin: 1.2em;
  gap: 2em;
  justify-content: center; /* center on small screens */
}

.banner4-cont,
.banner5-cont,
.banner6-cont {
  flex: 1 1 300px; /* allow shrinking and growing */
  min-height: 20em;
  border-radius: 30px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  display: flex;
  align-items: flex-end; /* move text to bottom */
  justify-content: flex-end; /* move text to right */
}

.banner4-cont h2,
.banner5-cont h2,
.banner6-cont h2 {
  padding: 1em;
  font-size: 2em;
  color: white;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

/* ========== MEDIA QUERIES ========== */

/* Tablets */
@media (max-width: 992px) {
  .banner4-cont h2,
  .banner5-cont h2,
  .banner6-cont h2 {
    font-size: 1.8em;
  }
}

/* Mobile screens */
@media (max-width: 768px) {
  .banners-content {
    flex-direction: column;
    gap: 1.5em;
  }

  .banner4-cont,
  .banner5-cont,
  .banner6-cont {
    min-height: 18em;
  }

  .banner4-cont h2,
  .banner5-cont h2,
  .banner6-cont h2 {
    font-size: 1.5em;
    text-align: center;
    justify-content: center;
    width: 100%;
  }
}



/*======================================Avators=====================================*/
.Avators {
    text-align: center;
    margin: 2em;
}

.Avators h2 {
    font-size: 3em;
    margin-bottom: 1em;
}

/* Flex layout for avatars */
.Avator-content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* allows wrapping on small screens */
    gap: 1.5em; /* spacing between items */
}

.content-Avator {
    flex: 1 1 300px; /* each item takes at least 300px */
    max-width: 350px; /* prevents stretching too wide */
    text-align: center;
    margin: 1em;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .Avators h2 {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    .Avators h2 {
        font-size: 2em;
    }

    .content-Avator img {
        width: 80%; /* scale down images */
        height: auto;
    }
}

@media (max-width: 480px) {
    .Avators {
        margin: 1em;
    }

    .Avators h2 {
        font-size: 1.8em;
    }

    .content-Avator {
        flex: 1 1 100%; /* full width on very small screens */
        margin: 0.8em 0;
    }

    .content-Avator img {
        width: 70%;
    }
}




/*===========================Testimonials==============================*/
.testimonials {
  text-align: center;
  padding: 2em 1em;
}

.testimonials h2 {
  text-align: center;
  margin: 1.2em 0;
  font-size: 2em;
}

.testi-content {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* allows wrapping on smaller screens */
  gap: 1.5em; /* spacing between testimonial cards */
}

.content-testi {
  text-align: center;
  margin: 1em;
  padding: 1.5em;
  max-width: 300px;
  background: #f9f9f9; /* optional: subtle background */
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  flex: 1 1 250px; /* responsive growth/shrink */
}

.content-testi img {
  border-radius: 50%;
  margin-bottom: 1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .testi-content {
    flex-direction: column;
    align-items: center;
  }
  
  .content-testi {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .testimonials h2 {
    font-size: 1.5em;
  }

  .content-testi {
    padding: 1em;
  }

  .content-testi p {
    font-size: 0.9em;
  }
}



/* ================= NEWSLETTER ================= */
.newsletter {
  margin: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2em;
  flex-wrap: wrap; /* allow wrapping on small screens */
}

.newsletter img {
  max-width: 100%;
  height: auto;
  flex: 1 1 300px;
}

.newsletter-content {
  margin: 2em;
  flex: 1 1 400px;
}

.newsletter-content h2 {
  color: orange;
  font-size: 3em;
  line-height: 1.2;
}

.newsletter-content p {
  margin-bottom: 1em;
  line-height: 1.5;
}

.newsletter-content input {
  padding: 0.7em;
  width: 70%;
  max-width: 350px;
  margin-top: 1.5em;
  background-color: white;
  box-shadow: 1px 1px 5px gray;
  border: none;
  border-radius: 5px 0 0 5px;
}

.newsletter-content button {
  padding: 0.8em 2em;
  background-color: orange;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 0 5px 5px 0;
  transition: background 0.3s;
}

.newsletter-content button:hover {
  background-color: darkorange;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .newsletter {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-content {
    margin: 1em 0;
  }

  .newsletter-content h2 {
    font-size: 2em;
  }

  .newsletter-content input {
    width: 100%;
    max-width: 100%;
    border-radius: 5px;
    margin-bottom: 1em;
  }

  .newsletter-content button {
    width: 100%;
    border-radius: 5px;
  }
}

@media (max-width: 480px) {
  .newsletter-content h2 {
    font-size: 1.6em;
  }

  .newsletter-content p {
    font-size: 0.9em;
  }
}


/*==============================footer content=========================*/
.footer {
  text-align: center;
  padding: 3em 1.5em;
  background-color: orange;
  color: white;
  width: 100%;
  margin-bottom: -2em;

}

.footer-content {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;   /* wrap on smaller screens */
  gap: 3em;
  margin-bottom: 2em;
}

.content-footer {
  flex: 1 1 200px;   /* flexible width */
  max-width: 300px;
  min-width: 180px;
}

.content-footer h4 {
  margin-bottom: 1.2em;
  font-size: 1.2em;
}

.content-footer ul {
  list-style: none;
  padding: 0;
}

.content-footer ul li {
  margin-bottom: 0.5em;
}

.content-footer ul li a {
  text-decoration: none;
  color: white;
  transition: color 0.3s;
}

.content-footer ul li a:hover {
  color: #222; /* contrast hover */
}

.footer hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  margin: 1.5em 0;
}

.footer p {
  font-size: 0.9em;
}

/* ---------- RESPONSIVENESS ---------- */

/* Tablets */
@media (max-width: 768px) {
  .footer-content {
    justify-content: space-around;
    gap: 2em;
  }

  .content-footer {
    max-width: 45%;  /* two per row */
  }
}

/* Mobile */
@media (max-width: 480px) {
  .footer-content {
    flex-direction: column;  /* stack vertically */
    align-items: center;
  }

  .content-footer {
    max-width: 100%;
    text-align: center;
  }

  .content-footer h4 {
    font-size: 1.1em;
  }
}


/*==================================cart section========================*/
.cart-container{
  max-width: 800px;
  margin-top: 80px;
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}
.cart-item { 
      display: flex;
      justify-content: space-between; 
      margin: 10px 0;
      padding: 10px;
      border-bottom: 1px solid #ccc; 
}
.cart-item-details {
        flex: 1;
        min-width: 150px;
}
.cart-item button{
    background-color: orange;
    border: none;
    padding: 0.25em 1em;
    border-radius: 10px;
    color: white;
}
.cart-item img {
      width: 100px;
      height: 100px;
      object-fit: cover;
      margin-right: 15px; 
}
.cart-total{
      font-size: 20px;
      margin-top: 20px;
      text-align: right;
      font-weight: bold;
}
.submitBtn{
      padding: 1em 8em; 
      background: orange;
      color: #fff;
      border: none;
      cursor: pointer;
      margin-top: 20px;
      border-radius: 10px;
      margin: auto;
      display: block;
}


 .cart-container h1{
  margin-bottom: 20px;
  text-align: center;
  color: greenyellow;
  
}
.cartItems{
    display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}






/*==========================================popup style==============================*/
/* Overlay background */
#customAlert {
  display: none; /* hidden by default */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Alert box */
#customAlert .alert-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: center;
  max-width: 300px;
  animation: fadeIn 0.3s ease-in-out;
}

#customAlert .alert-box h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #333;
}

#customAlert .alert-box button {
  margin-top: 15px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: orange;
  color: #fff;
  cursor: pointer;
}

#customAlert .alert-box button:hover {
  background: orangered;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}