/* ===== HEADER BASE ===== */
.simple-header {
  background: #fff;
  height: 80px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  position: relative;
  z-index: 9999;
  width: 90%;
  margin-right: auto;
  margin-left: auto;
  border-radius: 0 0 30px 30px;
}

/* Responsive Header */
@media (max-width: 1024px) {
  .simple-header {
    width: 95%;
    height: 75px;
    border-radius: 0 0 25px 25px;
  }
}

@media (max-width: 768px) {
  .simple-header {
    width: 95%;
    height: 75px;
    border-radius: 25px;
    margin-top: 15px;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .simple-header {
    width: 90%;
    height: 65px;
    border-radius: 30px;
    margin-top: 20px;
  }
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

/* Responsive header inner */
@media (max-width: 1024px) {
  .header-inner {
    max-width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    max-width: 100%;
    padding: 0 18px;
    justify-content: space-between;
    height: 100%;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 10px;
  }
}

/* ===== RIGHT GROUP ===== */
.header-right-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ===== LOGO ===== */
.header-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1d322d;
}

.site-logo-image {
  height: 50px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

/* Responsive logo */
@media (max-width: 1024px) {
  .site-logo-image {
    height: 45px;
    max-width: 140px;
  }
}

@media (max-width: 768px) {
  .site-logo-image {
    height: 45px;
    max-width: 130px;
  }
}

@media (max-width: 480px) {
  .site-logo-image {
    height: 35px;
    max-width: 100px;
  }
}

.logo-text {
  font-size: 15px;
}

.logo-icon {
  width: 26px;
  height: 26px;
  background: #1d322d;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

/* ===== CTA ===== */
.cta-btn {
  background: #ffd66b;
  color: #333;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 12.5px;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: 0.5s;
}

.cta-btn:hover {
  background: #ffd66b;
  color: #333;
  box-shadow: 0 2px 5px #00000043;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 12.5px;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: 0.5s;
}

/* Responsive CTA button */
@media (max-width: 1024px) {
  .cta-btn {
    padding: 8px 16px;
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .cta-btn {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  .cta-btn {
    padding: 5px 10px;
    font-size: 9px;
  }
}

/* ===== NAV (ABSOLUTE CENTER) ===== */
.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

/* Hide desktop navigation on mobile and tablets up to 768px */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
}

/* Hide desktop navigation on mobile and tablets up to 768px */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
}

/* =========================
   NAV ITEM BASE
========================= */
.nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 12px;
  position: relative;
  transition: color 0.25s ease;
  overflow: visible;
}

/* Responsive navigation items */
@media (max-width: 1024px) {
  .nav-item {
    padding: 7px 12px;
    font-size: 11px;
    gap: 5px;
  }

  .nav-item i {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .nav-item {
    padding: 8px 14px;
    font-size: 12px;
    gap: 6px;
  }

  .nav-item i {
    font-size: 17px;
  }
}

.nav-item i {
  font-size: 18px;
  transition: color 0.25s ease;
}

/* text & icon color */
.nav-item:hover,
.nav-item.active {
  color: #1d322d;
}

.nav-item:hover i,
.nav-item.active i {
  color: #1d322d;
}

/* =========================
   INDICATOR (BASE)
   half-pill / tab shape
========================= */
.nav-item::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 8px;
  background-color: #1e2f45;
  border-top-left-radius: 50px;
  border-top-right-radius: 50px;
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
  opacity: 0;
  transition:
    width 0.25s ease,
    opacity 0.25s ease;
}

/* =========================
   HOVER STATE
========================= */
.nav-item:hover::after {
  width: 50%;
  opacity: 0.45;
}

/* =========================
   ACTIVE STATE
========================= */
.nav-item.active::after {
  width: 50%;
  opacity: 1;
}



/* ===== DROPDOWN MENU ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .nav-item {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 10000;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-category {
  margin-bottom: 12px;
}

.dropdown-category:last-child {
  margin-bottom: 0;
}

.category-link {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

.category-link:hover {
  background: rgba(31, 169, 113, 0.1);
  color: #1d322d;
}


/* Products submenu */
.products-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  z-index: 10001;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
}

.dropdown-category:hover .products-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.product-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #333;
  margin-bottom: 4px;
}

.product-item:hover {
  background: rgba(31, 169, 113, 0.1);
  color: #1d322d;
}

.product-item img {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 6px;
}

.product-item span {
  font-size: 13px;
  line-height: 1.3;
}

.product-item-title {
  font-weight: 500;
  color: #1d322d;
  margin-bottom: 4px;
  font-size: 14px;
}

/* ===== MOBILE MENU ===== */

/* Mobile Menu Toggle Button - Hidden by default */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

/* Show hamburger menu on mobile and tablets up to 768px */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex !important;
  }
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: #212121;
  margin: 2px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay - Only active on mobile */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* Show mobile menu overlay on mobile and tablets up to 768px */
@media (max-width: 768px) {
  .mobile-menu-overlay {
    display: block;
  }
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Panel - Hidden by default */
.mobile-menu {
  display: none;
  position: fixed;
  top: 2rem;
  right: 0;
  width: 280px;
  height: 90vh;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  margin-right: 20px;
  border-radius: 30px;
  flex-direction: column;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
}

/* Show mobile menu panel on mobile and tablets up to 768px */
@media (max-width: 768px) {
  .mobile-menu {
    display: flex;
  }
}

.mobile-menu-overlay.active .mobile-menu {
  transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-radius: 30px;
}

.mobile-logo img {
  height: 40px;
  width: auto;
}

.mobile-logo span {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

/* Mobile Navigation */
.mobile-nav {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.3s ease;
  margin-bottom: 4px;
  font-size: 16px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: #1d322d;
  border-left: 5px solid #1d322d;
  border-radius: 10px;
}

.mobile-nav-item i {
  font-size: 18px;
  min-width: 20px;
}

/* Mobile Dropdown */
.mobile-nav-dropdown {
  margin-bottom: 8px;
}

.mobile-nav-item[data-toggle] {
  cursor: pointer;
  justify-content: space-between;
}

.dropdown-arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.mobile-nav-item[data-toggle].active .dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(31, 169, 113, 0.05);
  border-radius: 8px;
  margin-top: 4px;
}

.mobile-submenu.active {
  max-height: 500px;
}

.mobile-submenu-item {
  display: block;
  padding: 10px 16px 10px 44px;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  border-radius: 6px;
  margin: 2px 8px;
}

.mobile-submenu-item:hover {
  background: rgba(31, 169, 113, 0.1);
  color: #1d322d;
}

/* Mobile Auth Section */
.mobile-auth-section {
  border-top: 1px solid #e0e0e0;
  padding-top: 16px;
  margin-top: 16px;
}

.mobile-auth-section .mobile-nav-item {
  padding: 10px 16px;
  font-size: 14px;
}

/* Mobile Cart Item */
.cart-item {
  background: rgba(31, 169, 113, 0.1);
  color: #1d322d;
  font-weight: 500;
}

/* Mobile CTA Section */
.mobile-cta-section {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  background: #fff8ee;
}

.mobile-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffd66b;
  color: #333;
  padding: 14px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  width: 80%;
  margin-bottom: 5px;
  margin-right: auto;
  margin-left: auto;
  transition: all 0.3s ease;
}

.mobile-cta-btn:hover {
  background: #f8e098;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 214, 107, 0.3);
}

/* Mobile Site Name - Hidden on desktop, shown on mobile */
.mobile-site-name {
  display: none;
}

/* Show mobile site name on mobile and tablets up to 768px */
@media (max-width: 768px) {
  .mobile-site-name {
    display: block;
  }
}

/* ===== MOBILE MENU TOGGLE ===== */
/* Show mobile menu toggle on mobile and tablets up to 768px */

/* ===== LEFT SECTION: ICONS + CTA ===== */
.header-left-section {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Hide header icons on mobile and tablets up to 768px */
@media (max-width: 768px) {
  .header-left-section {
    display: none;
  }
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background-color: #1d322d;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.header-icon i{
  margin-top: 2px;
  margin-left: 1px;
}

/* Responsive header icons */
@media (max-width: 1024px) {
  .header-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .header-icon {
    width: 35px;
    height: 35px;
    font-size: 15px;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }

  .hamburger-line {
    width: 22px;
    height: 2.5px;
  }
}

.header-icon:hover {
  color: #1d322d;
  background: rgba(27, 37, 33, 0.905);
}

/* ===== LEFT EMPTY SPACE ===== */
.header-left-spacer {
  margin-right: auto;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
  .header-inner {
    padding: 0 16px;
  }

  .header-nav {
    gap: 5px;
  }

  .nav-item {
    padding: 6px 10px;
  }

  .nav-item i {
    font-size: 16px;
  }

  .nav-item span {
    font-size: 11px;
  }

  .header-left-section {
    gap: 12px;
  }

  .header-icons {
    gap: 8px;
  }

  .header-icon {
    padding: 6px;
    font-size: 16px;
  }

  .cta-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
}

/* Mobile and Tablet Styles (480px - 768px) */
@media (max-width: 768px) {
  .simple-header {
    height: auto;
    min-height: 60px;
  }

  .header-inner {
    padding: 12px 16px;
    gap: 12px;
  }

  /* Mobile header layout: Hamburger | Site Name | Logo */
  .header-inner {
    position: relative;
    height: 60px;
    padding: 0;
    width: 100vw; /* Ensure full viewport width */
  }

  /* Position hamburger menu on the left */
  .mobile-menu-toggle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  /* Position logo on the right */
  .header-right-group {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  .header-logo {
    flex-shrink: 0;
  }

  .site-logo-image {
    max-height: 32px;
    width: auto;
  }

  .logo-text {
    font-size: 16px;
    font-weight: 600;
  }

  /* Hide desktop navigation on mobile */
  .header-nav {
    display: none;
  }

  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Hide left section on mobile */
  .header-left-section {
    display: none;
  }

  .site-logo-image {
    max-height: 50px;
    width: auto;
  }

  .logo-text {
    font-size: 16px;
    font-weight: 600;
  }

  .cta-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
}

/* Small Mobile (320px - 479px) */
@media (max-width: 479px) {
  .simple-header {
    height: auto;
    min-height: 56px;
  }

  .header-inner {
    position: relative;
    height: 56px;
    padding: 0;
    width: 100vw; /* Ensure full viewport width */
  }

  /* Mobile site name - PERFECT CENTER for small screens */
  .mobile-site-name {
    position: absolute;
    left: 60px; /* Start after hamburger menu */
    right: 60px; /* End before logo */
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    z-index: 2;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }

  /* Position hamburger menu on the left for small screens */
  .mobile-menu-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  /* Position logo on the right for small screens */
  .header-right-group {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  /* Position hamburger menu on the left for small screens */
  .mobile-menu-toggle {
    left: 12px;
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .hamburger-line {
    width: 18px;
    height: 1.5px;
  }

  /* Position logo on the right for small screens */
  .header-right-group {
    right: 12px;
  }

  .site-logo-image {
    max-height: 50px;
  }

  .logo-text {
    font-size: 14px;
    font-weight: 600;
  }

  .cta-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Mobile menu adjustments for small screens */
  .mobile-menu {
    width: 260px;
  }

  .mobile-menu-header {
    padding: 16px;
  }

  .mobile-nav {
    padding: 16px;
  }

  .mobile-nav-item {
    padding: 10px 12px;
    font-size: 15px;
  }

  .mobile-submenu-item {
    padding: 8px 12px 8px 40px;
    font-size: 13px;
  }

  .mobile-cta-section {
    padding: 16px;
  }

  .mobile-cta-btn {
    padding: 12px 16px;
    font-size: 15px;
  }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
  .header-inner {
    max-width: 1400px;
  }

  .header-nav {
    gap: 5px;
  }

  .nav-item {
    padding: 10px 14px;
  }

  .nav-item span {
    font-size: 13px;
  }
}

/* Desktop and Tablet (769px+) - Ensure desktop navigation is visible */
@media (min-width: 769px) {
  .header-nav {
    display: flex !important;
  }

  .mobile-menu-toggle,
  .mobile-menu-overlay,
  .mobile-menu,
  .mobile-site-name {
    display: none !important;
  }

  /* Reset mobile header layout for desktop */
  .header-inner {
    position: static !important;
  }

  .header-right-group {
    display: flex !important;
    justify-content: flex-start !important;
    position: static !important;
    transform: none !important;
    right: auto !important;
    top: auto !important;
  }

  .header-logo {
    position: static !important;
    transform: none !important;
  }

  .mobile-menu-toggle {
    position: static !important;
    left: auto !important;
    transform: none !important;
  }

  .mobile-site-name {
    position: static !important;
    left: auto !important;
    transform: none !important;
  }
}

/* Touch devices - larger touch targets */
@media (hover: none) and (pointer: coarse) {
  .nav-item {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 8px;
  }

  .header-icon {
    min-height: 44px;
    min-width: 44px;
    padding: 10px;
  }

  .cta-btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  .category-link {
    min-height: 44px;
    padding: 12px 16px;
  }

  .product-item {
    min-height: 44px;
    padding: 10px 12px;
  }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .dropdown-menu,
  .products-submenu {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .header-icon,
  .cta-btn,
  .dropdown-menu,
  .products-submenu {
    transition: none;
  }

  .nav-item::after {
    transition: none;
  }
}
