/* Amazon-style store header: search first, no logo */

.store-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 60px;
  background: var(--header-bg, #fff);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-search-wrap {
  flex: 1 1 280px;
  max-width: 560px;
  position: relative;
  min-width: 0;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 4px 0 12px;
  background: var(--bg-secondary, #fff);
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search:focus-within {
  border-color: var(--purple-500, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.header-search-icon {
  width: 18px;
  height: 18px;
  color: var(--gray-500, #6b7280);
  flex-shrink: 0;
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-primary, #111);
  outline: none;
}

.header-search-btn {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  background: var(--purple-600, #6d28d9);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
}

.header-search-btn svg {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.header-search-btn:hover {
  background: var(--purple-500, #7c3aed);
}

.header-search-wrap .search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  height: 100%;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.header-links a {
  color: var(--gray-600, #4b5563);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 0 12px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  white-space: nowrap;
}

.header-links a:hover,
.header-links a.active {
  color: var(--purple-600, #6d28d9);
  background: var(--purple-50, #f5f3ff);
}

.store-header .btn-login {
  padding: 0 14px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--gray-700, #374151);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}

.store-header .btn-login:hover {
  color: var(--purple-600, #6d28d9);
  background: var(--purple-50, #f5f3ff);
}

.store-header .btn-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  text-decoration: none;
  color: var(--gray-700, #374151);
  border-radius: 8px;
  position: relative;
  white-space: nowrap;
}

.store-header .btn-cart:hover,
.store-header .btn-cart.active {
  background: var(--purple-50, #f5f3ff);
  color: var(--purple-600, #6d28d9);
}

.store-header .btn-cart svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.store-header .cart-label {
  font-size: 14px;
  font-weight: 600;
}

.store-header .cart-badge {
  position: absolute;
  top: 2px;
  left: 22px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--purple-600, #6d28d9);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

.store-header .cart-badge.visible {
  display: flex;
}

.store-header .mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.store-header .mobile-menu-toggle svg {
  width: 26px;
  height: 26px;
}

body.has-store-header {
  padding-top: 64px;
}

/* Language switcher in header */
.lang-switcher-header {
  position: relative;
  flex-shrink: 0;
}

.lang-btn-header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 40px;
  background: var(--bg-secondary, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-primary, #111);
  line-height: 1;
}

.lang-btn-header svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: none;
  min-width: 130px;
  z-index: 1001;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lang-switcher-header .lang-dropdown.open {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary, #111);
}

.lang-option:hover,
.lang-option.active {
  background: var(--purple-50, #f5f3ff);
  color: var(--purple-600, #6d28d9);
}

/* Override legacy header rules on store pages */
header.store-header {
  padding: 0 24px !important;
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
}

.trust-item {
  gap: 0 !important;
}

.trust-icon {
  display: none !important;
}

.hero-minimal {
  background: var(--bg-primary) !important;
  min-height: auto !important;
}

.hero-minimal .hero-bg {
  display: none !important;
}

.hero-minimal .hero-badge {
  display: none;
}

.hero-minimal .btn-secondary {
  display: none;
}

@media (max-width: 768px) {
  .header-brand {
    display: none !important;
  }

  .header-links,
  .store-header .btn-login {
    display: none !important;
  }

  .store-header .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .store-header .cart-label {
    display: none;
  }

  .header-search-btn span {
    display: none;
  }

  .header-search-btn svg {
    display: block;
  }

  .lang-switcher-header {
    display: none !important;
  }
}
