/**
 * Shared Header Styles
 * This file contains all styles for the site header and navigation
 */

/* ========== CSS VARIABLES ========== */
:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #e94560;
  --accent-hover: #ff6b6b;
  --gold: #d4a574;
  --gold-light: #e8c9a0;
  --text-dark: #1a1a2e;
  --text-light: #6b7280;
  --text-white: #f8f8f8;
  --bg-cream: #faf8f5;
  --bg-white: #ffffff;
  --border: #e5e5e5;
  --shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
  --shadow-hover: 0 8px 30px rgba(26, 26, 46, 0.15);
}

/* ========== STICKY NAV WRAPPER ========== */
.sticky-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ========== HEADER ========== */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 1px;
}

.logo-text span { color: var(--gold); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ========== PROMINENT HEADER SEARCH (CENTERPIECE) ========== */
.header-search-center {
  flex: 1;
  max-width: 560px;
  margin: 0 32px;
  position: relative;
}

.search-bar-main {
  position: relative;
  width: 100%;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-cream);
  border-radius: 50px;
  padding: 4px 4px 4px 20px;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input-wrapper:focus-within {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(212, 165, 116, 0.25);
  background: var(--bg-white);
}

.search-input-wrapper .search-icon {
  color: var(--text-light);
  flex-shrink: 0;
}

.search-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-dark);
  font-size: 15px;
  padding: 12px 16px;
  font-family: 'Source Sans 3', sans-serif;
}

.search-input-wrapper input::placeholder {
  color: var(--text-light);
}

.search-type-selector {
  position: relative;
}

.search-type-selector select {
  appearance: none;
  background: rgba(212, 165, 116, 0.15);
  border: none;
  border-radius: 20px;
  padding: 8px 30px 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  font-family: 'Source Sans 3', sans-serif;
  transition: all 0.2s ease;
  min-width: 110px;
}

.search-type-selector select:hover {
  background: rgba(212, 165, 116, 0.25);
}

.search-type-selector::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-dark);
  pointer-events: none;
}

.search-btn {
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.search-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* Search Suggestions Dropdown */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  padding: 16px 0;
  z-index: 1001;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.search-suggestions.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.suggestion-section {
  padding: 0 16px;
  margin-bottom: 12px;
}

.suggestion-section:last-child {
  margin-bottom: 0;
}

.suggestion-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 8px 4px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.suggestion-item:hover {
  background: var(--bg-cream);
  color: var(--accent);
}

.suggestion-icon {
  font-size: 16px;
  opacity: 0.8;
}

/* Two-column layout for suggestions on larger screens */
@media (min-width: 900px) {
  .search-suggestions {
    padding: 20px;
  }

  .search-suggestions.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
  }

  .suggestion-section {
    padding: 0;
  }
}

/* ========== NAV ICONS ========== */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-icon {
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-icon:hover { color: var(--gold); }
.nav-icon.active { color: var(--gold); }
.nav-icon svg { width: 20px; height: 20px; }

/* ========== SELL BUTTON ========== */
.btn-sell {
  background: var(--accent);
  color: white;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: 'Source Sans 3', sans-serif;
}

.btn-sell:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ========== SECONDARY NAV ========== */
.secondary-nav {
  background: var(--bg-white);
  padding: 0 48px;
}

.secondary-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links { display: flex; gap: 8px; }

.nav-link {
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 14px;
  position: relative;
  transition: all 0.2s ease;
  font-family: 'Source Sans 3', sans-serif;
}

.nav-link:hover, .nav-link.active { color: var(--accent); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after { width: 80%; }

.nav-categories { display: flex; gap: 24px; }

.nav-category {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: 'Source Sans 3', sans-serif;
}

.nav-category:hover { color: var(--gold); }
.nav-category span { font-size: 14px; }

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 1200px) {
  .header-search-center { max-width: 440px; margin: 0 24px; }
  .nav-link { padding: 16px 14px; }
}

@media (max-width: 1024px) {
  .header-top { padding: 16px 24px; }
  .secondary-nav { padding: 0 24px; }
  .header-search-center { max-width: 360px; margin: 0 16px; }
  .nav-categories { display: none; }
  .search-type-selector { display: none; }
}

@media (max-width: 768px) {
  .header-top { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .logo-text { font-size: 20px; }
  .header-search-center {
    order: 3;
    width: 100%;
    max-width: none;
    margin: 8px 0 0 0;
  }
  .search-input-wrapper { border-radius: 12px; }
  .search-btn { border-radius: 8px; width: 40px; height: 40px; }
  .nav-icons span { display: none; }
  .secondary-nav { padding: 0 16px; }
  .nav-link { padding: 12px 10px; font-size: 13px; }
  .btn-sell { padding: 8px 16px; font-size: 13px; }
  .search-suggestions { border-radius: 12px; }
}

@media (max-width: 480px) {
  .nav-links { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; }
  .search-input-wrapper input { padding: 10px 12px; font-size: 14px; }
}
