/* ========================================
   MOBILE HEADER COMPONENT
   ======================================== */

/* ────────── Base Header ────────── */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #000000;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
}

.site-header {
  margin-bottom: 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 100%;
  position: relative;
}

.header-container {
  margin-bottom: 0;
}

/* ────────── Hamburger Button ────────── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 10;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: #43BDAB;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

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

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

/* ────────── Logo (Centered) ────────── */
.header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  padding: 0 8px; /* small breathing space around logo on mobile */
}

.header-logo img {
  height: 62px; /* increased ~30% from 48px */
  width: auto;
  display: block;
}

/* ────────── Cart Icon (Right) ────────── */
.header-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #FFFFFF;
  text-decoration: none;
}

.header-cart svg {
  width: 24px;
  height: 24px;
}

/* Cart Count Badge */
.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #43BDAB;
  color: #000000;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ────────── Mobile Menu ────────── */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: #000000;
  transition: left 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 2000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.open {
  left: 0;
}

/* Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(67, 189, 171, 0.2);
}

/* Auth area inside mobile menu header */
.mobile-auth-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-auth-button {
  background: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mobile-auth-button:hover {
  background: rgba(67, 189, 171, 0.06);
  color: #43BDAB;
  border-color: rgba(67, 189, 171, 0.25);
}

.mobile-profile-link {
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
}

.mobile-menu-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #43BDAB;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.mobile-menu-close:hover {
  transform: rotate(90deg);
}

.mobile-menu-close svg {
  width: 24px;
  height: 24px;
}

/* Centered auth area under menu title */
.mobile-auth-centered {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding-bottom: 8px;
}

/* Mobile auth button style */
#mobile-auth-button, .mobile-auth-button {
  background: transparent;
  color: #43BDAB;
  border: 1px solid rgba(67,189,171,0.95);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

#mobile-auth-button:hover {
  background: rgba(67,189,171,0.08);
  transform: translateY(-1px);
}

/* Menu List */
.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Menu Links */
.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus {
  background: rgba(67, 189, 171, 0.1);
  color: #43BDAB;
}

.mobile-menu-link.active {
  background: rgba(67, 189, 171, 0.15);
  color: #43BDAB;
  border-left: 3px solid #43BDAB;
  font-weight: 600;
}

.mobile-menu-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Highlighted Link (Cart) */
.mobile-menu-link-highlight {
  background: rgba(67, 189, 171, 0.1);
  color: #43BDAB;
  font-weight: 600;
}

.menu-cart-count {
  margin-left: auto;
  background: #43BDAB;
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

/* Submenu */
.submenu-trigger {
  justify-content: space-between;
}

.submenu-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.has-submenu.open .submenu-arrow {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(67, 189, 171, 0.05);
}

.has-submenu.open .mobile-submenu {
  display: block;
}

.mobile-submenu a {
  display: block;
  padding: 12px 20px 12px 52px;
  color: #CCCCCC;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.mobile-submenu a:hover {
  background: rgba(67, 189, 171, 0.1);
  color: #43BDAB;
}

/* Menu Divider */
.menu-divider {
  height: 1px;
  background: rgba(67, 189, 171, 0.2);
  margin: 8px 0;
  border: none;
}

/* ────────── Backdrop ────────── */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* ────────── Desktop: Hide Mobile Header ────────── */
@media (min-width: 769px) {
  .site-header {
    display: none;
  }
  
  .mobile-menu,
  .mobile-menu-backdrop {
    display: none !important;
  }
}

/* ────────── Mobile Optimization ────────── */
@media (max-width: 400px) {
  .header-container {
    padding: 10px 12px;
  }
  
  .header-logo img {
    height: 57px; /* ~30% increase for very small screens (from 44px) */
  }
  
  .mobile-menu {
    width: 260px;
  }
}


  /* ────────── User Menu (signed-in state) ────────── */
  .user-menu {
    position: relative;
  }

  .user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #2dd4bf;
    border-radius: 6px;
    color: #FFFFFF;
    cursor: pointer;
  }

  .user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #FFFFFF;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
  }

  .user-dropdown a,
  .user-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    border: none;
    background: none;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
  }

  .user-dropdown a:hover,
  .user-dropdown button:hover {
    background: #f3f4f6;
  }

  .logout-btn {
    border-top: 1px solid #e5e7eb;
    color: #dc2626;
  }
