/* Header styles */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 80px;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: sans-serif;
  flex-wrap: nowrap;
  overflow: visible;
  position: relative;
  z-index: 100;
}

/* Logo and title container */
.title-container {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-wrap: nowrap;
  width: -webkit-fill-available;
}

/* Logo styles */
.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  max-width: 100%;
  vertical-align: middle;
}

/* Store name styles */
.title {
  font-size: 20px;
  font-weight: 700;
  margin-left: 10px;
  color: black;
  text-decoration: none;
  letter-spacing: 1px;
  line-height: 80px;
  /* Aligns with nav and header height */
  white-space: nowrap;
}

/* Navigation */
.main-nav {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links>li {
  display: flex;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  line-height: 80px;
  /* Vertically centers text in header */
  padding: 0 5px;
  position: relative;
  display: inline-block;
}

.nav-links a:hover {
  color: #ff6b00;
}

/* Header actions (right side) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  /* important for absolute positioning inside */
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropdown>a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  margin-left: 5px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  background: white;
  min-width: 200px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  border-radius: 4px;
  transform: translateY(10px);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  left: 0;
}

.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 8px 20px;
  color: #333;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  color: #ff6b00;
  background: rgba(0, 0, 0, 0.03);
}

/* Icon link styles */
.icon-link {
  color: black;
  text-decoration: none;
  position: relative;
  padding: 10px;
  display: inline-block;
  transition: color 0.3s ease;
}

.icon-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: orange;
  transform: scaleX(0);
  transform-origin: bottom center;
  transition: transform 0.3s ease;
}

.icon-link:hover::after {
  transform: scaleX(1);
}


/* Cart icon */
.cart-icon-container {
  position: relative;
  display: inline-block;
}

.cart-counter {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--secondary-color, #ff6b00);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Hamburger toggle */
.toggle {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toggle>i {
  pointer-events: none;
}

.toggle i.hidden {
  display: none;
}

/* Misc */
#me {
  margin-left: 40%;
}

/* Search container styling - Clean, rounded and animated */
.search-container {
  position: absolute;
  top: 150%;
  right: 25%;
  transform: translateY(-50%) scale(0.9);
  background: #fff;
  border-radius: 25px;
  width: 200px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  /* subtle soft shadow */
  border: none;
  /* remove gray border */
}

/* Show state with animation */
.search-container.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

/* Optional hide animation */
.search-container.hide {
  opacity: 0;
  transform: translateY(-50%) scale(0.9);
  pointer-events: none;
}

/* Search input - clean, no border */
#searchInput {
  width: 100%;
  padding: 8px 14px;
  border: none;
  /* no border */
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  background: #f4f4f4;
  color: #333;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  /* subtle inner depth */
  transition: background 0.2s ease;
}

#searchInput:focus {
  background: #fff;
}

/* Search results dropdown */
#searchResults {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: none;
  width: 100%;
  z-index: 999;
  max-height: 250px;
  overflow-y: auto;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
}
.cart-item {
  margin-bottom: 12px;
  padding: 8px;
  background: #f9f9f9;
  border-radius: 4px;
}


@media screen and (max-width: 426px) {
  .title-container .title {
    display: none !important;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh !important;
    background: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    justify-content: start;
  }
  
  .main-nav.active {
    left: 0;
  }
  
  .nav-links {
    flex-direction: column;
    height: -webkit-fill-available;
    margin-top: 0 !important;
    gap: 0 !important;
  }

  .nav-links a {
    font-size: 18px;
    line-height: 1.5;
    padding: 10px 20px;
    width: 100%;
    text-align: left;
  }
  
  .nav-links li {
    margin: 0;
    margin-left: 0 !important;
    padding: 10px 5px !important;
  }
  
  .dropdown-menu {
    position: absolute;
    display: none;
    box-shadow: none;
    padding-left: 20px;
  }
  
  .dropdown:hover .dropdown-menu {
    display: block;
  }
  
  /* Position close button properly */
  #menuToggle {
    position: relative;
    z-index: 1001;
  }
  
  #menuToggle .fa-x {
    position: fixed;
    top: 20px;
    left: 20px;
  }
}