/* ==========================================
   OLIVE HEADER STYLES
   Two-section header with scroll behavior
   ========================================== */

:root {
  --olive-primary: #6C7D3C;
  --olive-primary-hover: #5a6832;
  --olive-primary-dark: #455727;
  --olive-gray: #666666;
  --olive-border: #E5E5E5;
  --olive-white: #FFFFFF;
  --olive-bg-light: #F8F8F8;
}

/* ==========================================
   HEADER CONTAINER
   ========================================== */
.olive-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--olive-white);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.olive-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   NAVIGATION SECTION
   ========================================== */
.olive-nav-section {
  background: var(--olive-white);
  padding: 0;
}

.olive-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  position: relative;
}

/* Logo */
.olive-logo {
  flex-shrink: 0;
}

.olive-logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.olive-logo-link:hover {
  opacity: 0.8;
}

.olive-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--olive-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive-white);
  font-size: 20px;
}

.olive-logo-text {
  font-size: 24px;
  font-weight: 700;
  color: #333333;
}

/* Mobile Actions Container */
.olive-mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

/* Mobile Toggle */
.olive-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #333333;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

/* Filter Toggle Button */
.olive-filter-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #333333;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.olive-filter-toggle:hover {
  color: var(--olive-primary);
}

.olive-filter-toggle.active {
  color: var(--olive-primary);
  transform: rotate(180deg);
}

.olive-mobile-close {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #333333;
  cursor: pointer;
  z-index: 1002;
}

/* Center Navigation Menu */
.olive-nav-menu {
  flex-grow: 1;
  display: flex !important;
  padding: 0 30px;
}

.olive-nav-menu.collapse:not(.show) {
  display: flex !important;
}

.olive-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.olive-nav-item {
  margin: 0;
}

.olive-nav-link {
  color: #333333;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
  display: block;
  padding: 8px 0;
  position: relative;
}

.olive-nav-link:hover {
  color: var(--olive-primary);
}

.olive-nav-link.active {
  color: var(--olive-primary);
  font-weight: 600;
}

.olive-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--olive-primary);
  border-radius: 2px 2px 0 0;
}

/* Right Side Links & Auth */
.olive-nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.olive-nav-text-link {
  color: var(--olive-gray);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.olive-nav-text-link:hover {
  color: var(--olive-primary);
}

/* Login Button */
.olive-btn-primary {
  background: var(--olive-primary);
  color: var(--olive-white);
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  display: inline-block;
}

.olive-btn-primary:hover {
  background: var(--olive-primary-hover);
  color: var(--olive-white);
  transform: translateY(-1px);
}

/* User Dropdown */
.olive-user-dropdown {
  position: relative;
}

.olive-user-toggle {
  display: flex;
  align-items: center;
  color: #333333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.olive-user-toggle:hover {
  background: var(--olive-bg-light);
  color: #333333;
}

.olive-dropdown-menu {
  border: 1px solid var(--olive-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  min-width: 200px;
  margin-top: 8px;
}

.olive-dropdown-menu .dropdown-item {
  padding: 10px 20px;
  font-size: 14px;
  color: #333333;
  transition: background 0.2s ease;
}

.olive-dropdown-menu .dropdown-item:hover {
  background: var(--olive-bg-light);
  color: var(--olive-primary);
}

.olive-dropdown-menu .dropdown-item i {
  width: 20px;
  text-align: center;
}

/* ==========================================
   SEARCH SECTION
   ========================================== */
.olive-search-section {
  background: var(--olive-white);
  padding: 0 0 20px 0;
  transition: all 0.3s ease;
  max-height: 200px;
  overflow: visible;
  opacity: 1;
}

.olive-search-section.hidden {
  max-height: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
}

.olive-search-form {
  width: 100%;
}

.olive-search-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.olive-search-field {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--olive-white);
  border: 1px solid var(--olive-border);
  border-radius: 8px;
  padding: 0 16px;
  flex-shrink: 0;
  min-width: 200px;
  transition: border-color 0.2s ease;
}

.olive-search-field:focus-within {
  border-color: var(--olive-primary);
}

.olive-search-field.flex-grow-1 {
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
}

.olive-search-icon {
  color: var(--olive-gray);
  margin-right: 12px;
  font-size: 16px;
  flex-shrink: 0;
}

.olive-search-input {
  border: none;
  outline: none;
  background: transparent;
  color: #333333;
  font-size: 15px;
  padding: 10px 0;
  width: 100%;
  flex-grow: 1;
}

.olive-search-input::placeholder {
  color: #999999;
}

.olive-search-btn {
  background: var(--olive-primary);
  color: var(--olive-white);
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.olive-search-btn:hover {
  background: var(--olive-primary-hover);
  transform: translateY(-1px);
}

/* ==========================================
   MOBILE OVERLAY
   ========================================== */
.olive-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.olive-mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

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

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
  .olive-nav-wrapper {
    padding: 16px 0;
  }

  .olive-nav-links {
    gap: 30px;
  }

  .olive-nav-text-link {
    font-size: 13px;
  }

  .olive-search-wrapper {
    flex-wrap: wrap;
  }

  .olive-search-field {
    min-width: 150px;
  }

  .olive-search-btn {
    padding: 14px 24px;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .olive-mobile-actions {
    display: flex;
  }

  .olive-mobile-toggle {
    display: block;
  }

  .olive-filter-toggle {
    display: block;
  }

  .olive-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--olive-white);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
    padding: 80px 30px 30px;
    transition: right 0.3s ease;
    z-index: 1001;
    display: block;
  }

  .olive-nav-menu.show {
    right: 0;
  }

  .olive-mobile-close {
    display: block;
  }

  .olive-mobile-overlay {
    display: block;
  }

  .olive-nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .olive-nav-item {
    width: 100%;
    border-bottom: 1px solid var(--olive-border);
  }

  .olive-nav-link {
    padding: 16px 0;
    font-size: 16px;
  }

  .olive-nav-right {
    gap: 12px;
  }

  .olive-nav-text-link {
    display: none !important;
  }

  .olive-user-toggle {
    padding: 8px 12px;
    font-size: 13px;
  }

  .olive-btn-primary {
    padding: 10px 20px;
    font-size: 13px;
  }

  /* Search Section Mobile */
  .olive-search-section {
    max-height: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
  }

  .olive-search-section.mobile-show {
    max-height: 500px;
    padding: 16px 0;
    opacity: 1;
    overflow: visible;
  }

  .olive-search-wrapper {
    flex-direction: column;
    gap: 12px;
  }

  .olive-search-field {
    min-width: 100%;
    width: 100%;
  }

  .olive-search-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }
}

/* Small Mobile (< 576px) */
@media (max-width: 575px) {
  .olive-logo-text {
    font-size: 20px;
  }

  .olive-logo-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .olive-btn-primary {
    padding: 8px 16px;
    font-size: 12px;
  }

  .olive-search-input {
    font-size: 14px;
  }

  .olive-search-btn {
    font-size: 14px;
  }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
body.olive-header-active {
  padding-top: 140px;
}

body.olive-header-compact {
  padding-top: 80px;
}

@media (max-width: 767px) {
  body.olive-header-active {
    padding-top: 75px;
  }

  body.olive-header-compact {
    padding-top: 70px;
  }
}
/* ==========================================
   SEARCH SUGGESTIONS AUTOCOMPLETE
   ========================================== */
.search-suggestions {
  max-height: 300px;
  overflow-y: auto;
  border-radius: 8px;
  margin-top: 4px;
  z-index: 9999 !important;
  background: white !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.suggestion-item {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.suggestion-item:hover {
  background-color: #f8f9fa;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-avatar {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.suggestion-content {
  flex: 1;
  min-width: 0;
}

.suggestion-content h6 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-content small {
  color: #6c757d;
  font-size: 0.8rem;
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   BREADCRUMB BANNER RESPONSIVE
   ========================================== */
/* Laptop and small desktop screens */
@media (min-width: 768px) and (max-width: 1440px) {
  .olive-breadcrumb-banner {
    padding: 250px 0 100px 0 !important;
  }
}
