/* --- Import Google Font --- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* --- Theme Variables --- */
:root {
  --color-primary: #e85a57;
  --color-dark: #3b2a2c;
  --color-white: #ffffff;
  --color-light-gray: #f8f9fa;
  --color-medium-gray: #6c757d;
  --font-body: "Poppins", sans-serif;
}

/* --- Base Styles --- */
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-white);
  color: var(--color-dark);
  /* --- FIX: Safety net to prevent any horizontal scroll --- */
  overflow-x: hidden;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- TOP BAR --- */
.top-bar {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 8px 0;
  font-size: 14px;
}
.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.top-bar-phone:hover {
  opacity: 1;
}
.top-bar-phone .lucide {
  width: 16px;
  height: 16px;
}

/* --- MAIN HEADER & NAVBAR --- */
.main-header {
  background-color: var(--color-white);
  transition: all 0.3s ease-in-out;
  /* --- FIX: Add position relative for sticky positioning context --- */
  position: relative;
  z-index: 999;
  box-shadow: -1px -7px 15px 0px rgb(0 0 0 / 25%);
}
.main-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  animation: slideDown 0.35s ease-out;
}
@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
}

.logo-link {
  width: 76px;
  height: 76px;
  overflow: hidden;
}

.logo-image {
  width: 100%;
  height: 100%;
  scale: calc(1.2);
}

/* --- Desktop Navigation --- */
.nav-desktop {
  display: none;
  gap: 40px;
}
@media (min-width: 992px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-dark);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: all 0.3s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
  left: 0;
}
.dropdown-arrow {
  width: 16px;
  transition: transform 0.3s ease;
}
.dropdown-container:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* --- VISUALLY RICH MEGA-MENU --- */
.mega-menu {
  position: absolute;
  top: 86%; /* Position it right below the padded navbar */
  left: 50%;
  /* --- FIX: Responsive width to prevent horizontal overflow --- */
  max-width: 700px;
  width: max-content;
  min-width: 600px; /* Optional: maintain a minimum width */

  background-color: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
}
.dropdown-container:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.mega-menu-content {
  display: flex;
  gap: 2rem;
}
.category-list {
  flex: 1;
}

/* .category-list ul{
      display: flex;
    flex-wrap: wrap;
    gap: 1rem;
} */
.mega-menu-title {
  font-size: 14px;
  text-transform: uppercase;
  color: var(--color-medium-gray);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}
.category-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mega-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 500;
  transition: all 0.2s ease;
}
.mega-menu-item .lucide {
  color: var(--color-primary);
  width: 20px;
}
.mega-menu-item:hover,
.mega-menu-item.active {
  background-color: var(--color-light-gray);
  color: var(--color-primary);
}

.featured-product {
  flex-basis: 250px;
  text-align: center;
  background-color: var(--color-light-gray);
  padding: 1.5rem;
  border-radius: 10px;
}
.featured-product img {
  max-width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.featured-product h4 {
  margin: 0 0 0.5rem 0;
  font-size: 16px;
}
.featured-product p {
  font-size: 14px;
  color: var(--color-medium-gray);
  margin: 0 0 1rem 0;
}

/* --- HEADER CONTACT & BUTTONS --- */
.header-contact {
  display: none;
}
@media (min-width: 992px) {
  .header-contact {
    display: block;
  }
}

.btn-primary,
.btn-secondary {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  display: inline-block;
}
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 1px solid var(--color-primary);
}
.btn-primary:hover {
  background-color: #d64a47;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(232, 90, 87, 0.3);
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-dark);
  border: 1px solid #ddd;
}
.btn-secondary:hover {
  background-color: var(--color-dark);
  color: var(--color-white);
  border-color: var(--color-dark);
}

/* --- MOBILE MENU --- */
.menu-toggle {
  display: none;
}
@media (max-width: 991px) {
  .menu-toggle {
    display: block;
  }
}
.menu-toggle button {
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle .lucide {
  width: 28px;
  height: 28px;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1002;
  width: 85%;
  max-width: 320px;
  background-color: var(--color-white);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}
.logo-link-mobile{
  height: 76px;
  width: 76px;
  overflow: hidden;
}
.logo-link-mobile img {
  height: 100%;
    width: 100%;
    scale: 1.1;
    object-fit: cover;
}
#close-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
}
.nav-mobile {
  margin-top: 24px;
  flex-grow: 1;
}
.nav-link-mobile,
.dropdown-toggle-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.dropdown-menu-mobile {
  padding-left: 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.dropdown-menu-mobile li {
  list-style: none;
}
.dropdown-menu-mobile.open {
  max-height: 500px;
}
.dropdown-item-mobile {
  
  display: flex;
  padding: 0.5rem;
  color: var(--color-medium-gray);
  font-size: 16px;
  text-decoration: none;
  justify-content: start;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
}
.dropdown-item-mobile:hover{
 background-color: var(--color-light-gray);
}

.mega-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 500;
  transition: all 0.2s ease;
}
.mega-menu-item:hover,
.mega-menu-item.active {
  background-color: var(--color-light-gray);
  color: var(--color-primary);
}

/* This is the new wrapper for the image */
.mega-menu-image-wrapper {
  flex-shrink: 0; /* Prevents the image from shrinking */
  width: 3rem;
  height: 3rem;
 border-radius: 8px;
  overflow: hidden;
  background-color: var(--color-light-gray); /* Fallback color */
  border: 1px solid var(--border-color);
}
.mega-menu-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image fills the circle */
}
