/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #E8E8E8;
}

/* Navbar Styles 1st */
/* NAVBAR BASE */
/* NAVBAR BASE */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #ffffff;
  color: #242422;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.6rem 1.2rem;
  z-index: 1000;
}

/* LOGO SECTION */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 150px;
}

.logo img {
  height: 3.1rem;
  border: 0.1rem solid #eabb1f;
  border-radius: 0.3rem;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(0.9);
}

nav h2{
  font-family: 'Playfair Display', serif;
  font-weight: 600;
 font-size: 2.4vw; 
  color: #333;

}

/* SEARCH BOX */
.search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 2;
  width: 100%;
  max-width: 600px;
  margin: 0.6rem;
}

.search-input {
  padding: 0.3rem 0.6rem;
  border: 0.1rem solid #ccc;
  border-radius: 1.2rem;
  height: 2.5rem;
  width: 100%;
}

.search-icon {
  margin-left: -1.5rem;
  color: #333;
}
/*first nave links*/
.nav-links1{
  display: flex;
  list-style: none;
  gap: 0.8rem;
  flex: 1;
  min-width: 150px;
  justify-content: flex-end;
}
.nav-links1 li{
  list-style-type: none;
  position: relative;
}
.nav-links1 li a {
  text-decoration: none;
  color: #3e3939;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 0.3rem;
  transition: 0.3s;
}
.nav-links1 li a:hover {
  color: #000000;
  border: 1px solid #6b6a62;
}
/* NAV LINKS */


/* NAV LINKS */
.nav-links2 {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 1.2rem;
  align-items: center;
  padding: 0;
  margin: 0;
}

.nav-links2 li {
  list-style-type: none;
  position: relative;
}

.nav-links2 a {
  text-decoration: none;
  color: #FFD700;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 0.3rem;
  transition: 0.3s;
  overflow: hidden;
  transition: letter-spacing 0.6s ease-in-out;
}

.nav-links2 a:hover {
  color: white;
  transition: ease-in-out 0.3s;
  border: 0.3px solid #fff;
  background-color: rgba(143, 138, 132, 0.7);
  letter-spacing: 1px;
}


/* RESPONSIVE STYLES */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .nav-links1 {
    flex-direction: row;
    width: 90%;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
  }
   
  .nav-links1 li {
    padding-left: 0.5rem;
    width: 100%;
    text-align: center;

  }
  .nav-links1 li i{
    margin-right: 10px;
    margin-right: 10px;
  }

  .search-container {
    flex: 2;
    width: 100%;
    margin: 0.5rem auto;
    display: flex;
    justify-content: center;
  }

  .search-container input[type="text"] {
    width: 100%;
    /* Make the input itself expand */
    padding: 0.4rem;
    font-size: 0.8rem;
    border-radius: 20px;
  }

  .logo {
    flex: 1;
    min-width: 50px;
    padding: 1px;
    justify-content: flex-start;
  }
  .logo img {
    height: 2.5rem;
    /* Adjust logo size for smaller screens */
  }
}

/* 2ND NAVBAR STYLES */
.navbar2 {
  position: fixed;
  margin-top: 2px;
  top: 4rem;
  width: 100%;
  background-color: rgb(45, 43, 43);
  color: #302f2e;
  padding: 0.6rem 1.2rem;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  
}
.navbar2 ul li{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  margin: 0;
}
.navbar2 a{
  color: rgb(255, 251, 251);

}

/* TOGGLE BUTTON */
.menu-toggle2 {
  display: none;
  font-size: 1.3rem;
  color: #ffe866;
  background-color: transparent;
  border: none;
  cursor: pointer;
  margin-bottom: 0.5rem;
}


/* DROPDOWN */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: rgba(71, 70, 69, 0.9);
  min-width: 11rem;
  padding: 0.6rem 0;
  border-radius: 0.25rem;
  box-shadow: 0 0.25rem 0.35rem rgba(0, 0, 0, 0.1);
}

.dropdown li {
  position: relative;
}

.dropdown a {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.5rem 0.9rem;
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.25rem;
  overflow: hidden;
  border: 0.3px solid transparent;
  transition: border-color 0.3s ease-in-out;
  z-index: 1;
}

/* Fill Animation */
.dropdown a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0;
  background-color: rgba(143, 138, 132, 0.7);
  border-radius: 0.25rem;
  z-index: -1;
  transition: width 0.3s ease-in-out;
}

.dropdown a:hover {
   border: 0.3px solid #fff;
}

.dropdown a:hover::before {
  width: 100%;
}

/* SUB-DROPDOWN */
.sub-dropdown {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background-color: rgba(71, 70, 69, 0.85);
  min-width: 11rem;
  padding: 0.6rem 0;
  border-radius: 0.25rem;
}

.sub-dropdown a {
  position: relative;
  display: block;
  padding: 0.5rem 0.9rem;
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.25rem;
  overflow: hidden;
  border: 0.9px solid transparent;
  transition: border-color 0.9s ease-in-out;
  z-index: 1;
}

.sub-dropdown a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0;
  background-color: rgba(143, 138, 132, 0.7);
  border-radius: 0.25rem;
  z-index: -1;
  transition: width 0.3s ease-in-out;
}

.sub-dropdown a:hover {
  border-color: #fff;
}

.sub-dropdown a:hover::before {
  width: 100%;
}

/* HOVER ACTIVATION ON DESKTOP */
.nav-links2 li:hover>.dropdown {
  display: block;
}

.dropdown li:hover>.sub-dropdown {
  display: block;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .menu-toggle2 {
    display: block;
  }

  .navbar2 {
    margin-top: 0px;
  }

  .nav-links2 {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-1.2rem);
    transition: all 0.4s ease-in-out;
    background-color: rgba(68, 65, 62, 0.95);
  }

  .nav-links2.active {
    max-height: 100rem;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links2 li {
    width: 100%;
  }

  /* ❌ Disable hover behavior on mobile */
  .nav-links2 li:hover > .dropdown,
  .dropdown li:hover > .sub-dropdown {
    display: none;
  }

  /* ✅ Enable dropdown via active class (JS will toggle these) */
  .dropdown-parent.active > .dropdown {
    display: block;
  }

  .sub-parent.active > .sub-dropdown {
    display: block;
  }

  /* ✅ Mobile layout adjustments */
  .dropdown,
  .sub-dropdown {
    position: static;
    background-color: rgba(143, 138, 132, 0.95);
    box-shadow: none;
    border-radius: 0;
    display: none;
  }

  .dropdown a,
  .sub-dropdown a {
    padding-left: 1.5rem;
  }

  /* ✅ Prevent <a> from stealing clicks on mobile (toggle only) */
  .dropdown-parent > a,
  .sub-parent > a {
    pointer-events: none;
  }

  /* ✅ Rotate caret icon when dropdown is open */
  .dropdown-parent.active > a .caret-icon,
  .sub-parent.active > a .caret-icon {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
  }
}

/*main content*/
.main-content {
  padding-top: 7.5rem;
}

/* ========================= */
/* Slider Offers - Top Banner */
/* ========================= */
.carousel-container {
  border: 1px solid rgb(198, 176, 247);
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  max-height: 500px;
}

.carousel-slide {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
}

.discount {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(0, 0, 0, 0.7);
  color: #FFD700;
  padding: 10px 20px;
  font-size: 25px;
  font-weight: bold;
  border-radius: 5px;
}

/* Arrows for top banner */
.prev,
.next {
  height: 50px;
  width: 50px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 30px;
  cursor: pointer;
  border: none;
  z-index: 10;
  border-radius: 50%;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* ========================= */
/* Category Section Heading */
/* ========================= */
.category {
  margin-left: 2px;
  padding: 20px;
  position: relative;
}

.category h2 {
  margin-bottom: 15px;
  color: #222;
  font-size: 24px;
}

/* ========================= */
/* Horizontal Product Slider */
/* ========================= */
.product-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.product-container::-webkit-scrollbar {
  display: none;
}

/* Product Card */
.product-card {
  flex: 0 0 auto;
  width: 200px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: fadeZoomIn 1.5s ease forwards;
  animation-delay: 0.5s;
}

.product-card:hover {
  box-shadow: 0 0 25px #1c1e1d;
  transform: translateY(-5px);
  background: #f9f9f9;
  cursor: pointer;
}

.product-card img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 5px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.product-card img:hover {
  transform: scale(1.05);
}

.product-card h3 {
  margin: 10px 0 5px;
  font-size: 16px;
  color: #007bff;
}

.product-card .price {
  color: green;
  font-weight: bold;
  margin-bottom: 10px;
}

.product-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

.buy-now {
  background-color: #28a745;
}

.buy-now:hover {
  background-color: #218838;
}

.add-cart {
  background-color: #007bff;
}

.add-cart:hover {
  background-color: #0069d9;
}

/* Slider Arrow Buttons (legacy) */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 20px;
  padding: 8px;
  cursor: pointer;
  z-index: 5;
  border-radius: 50%;
}

.slider-arrow.left {
  left: 10px;
}

.slider-arrow.right {
  right: 10px;
}

/* === NEW ADDITIONS FOR HORIZONTAL SCROLL === */
.category {
  position: relative;
  margin: 40px 0;
}

.product-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 10px 30px;
  position: relative;
}

.product-container::-webkit-scrollbar {
  display: none; /* Optional: hides scrollbar */
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  z-index: 10;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-btn.left {
  left: 5px;
}

.scroll-btn.right {
  right: 5px;
}

/* ========================= */
/* Responsive Media Queries  */
/* ========================= */
@media (max-width: 768px) {
  .carousel-container {
    max-height: 250px;
  }

  .slide img {
    max-height: 250px;
  }

  .discount {
    bottom: 20px;
    left: 15px;
    font-size: 16px;
    padding: 6px 12px;
  }

  .prev,
  .next {
    display: none;
  }

  .product-card {
    width: 160px;
  }

  .slider-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .product-card {
    width: 140px;
  }
}


/* Back to Top */
#backToTop {
  position: fixed;
  bottom: 30px;
  z-index: 999;
  background-color: rgba(33, 136, 56, 0.7);
  color: white;
  border: none;
  padding: 12px 18px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

/* Default: Large screens – place slightly right */
@media (min-width: 768px) {
  #backToTop {
    left: auto;
    right: 40px; /* Slightly right */
  }
}

/* Small screens – stick to left */
@media (max-width: 767px) {
  #backToTop {
    left: 20px;  /* Slightly left */
    right: auto;
  }
}

#backToTop:hover {
  background-color: rgba(0, 86, 179, 0.9);
  transition: ease-in-out 0.4s;
}

#backToTop .show {
  opacity: 1;
  visibility: visible;
}

/* Footer */


/* Footer */
/* FOOTER STYLES */
footer {
  background-color: #1f1f1f;
  color: #FFD700;
  padding: 50px 20px;
  text-align: center;
}

.up-footer {
  display: flex;
  justify-content: space-between;
  background-color: #1f1f1f;
  color: #ffffff;
  padding: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer h3 {
  margin-bottom: 15px;
  font-size: 18px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.footer p,
.footer a,
.footer li {
  color: #ccc;
  text-decoration: none;
  list-style: none;
  margin-bottom: 8px;
  display: block;
}

.footer a:hover {
  color: #fff;
}

.footer button {
  padding: 10px 20px;
  background-color: #00b894;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.footer button:hover {
  background-color: #019875;
}

/* FOOTER RESPONSIVE - MOBILE STYLES */
@media (max-width: 768px) {
  .up-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-section {
    width: 100%;
    margin-bottom: 20px;
  }
}