/* =================================================================
   GOLDENWOOD AGRO — Header (matches goldenwood-agro.com)
   ================================================================= */

/* ── Sticky wrapper ────────────────────────────────────────────── */
.gw-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

body.admin-bar .gw-site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .gw-site-header { top: 46px; }
}

/* ══════════════════════════════════════════════════════════
   ROW 1 — Search + Logo (center) + Icons
   ══════════════════════════════════════════════════════════ */
.gw-header-top {
  background: #ffffff;
  padding: 0;
}

.gw-header-top__inner {
  max-width: var(--gw-container-max);
  margin: 0 auto;
  padding: 0 var(--gw-container-pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 72px;
}

/* Search form */
.gw-header-search {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 420px;
}

.gw-header-search__input {
  flex: 1;
  height: 40px;
  border: 1.5px solid #e8e8e8;
  border-right: none;
  border-radius: 24px 0 0 24px;
  padding: 0 18px;
  font-family: var(--gw-font-body);
  font-size: 14px;
  color: var(--gw-text-primary);
  outline: none;
  background: #f8f8f8;
  transition: border-color 0.2s, background 0.2s;
}

.gw-header-search__input:focus {
  background: #fff;
  border-color: #c5c5c5;
}

.gw-header-search__input::placeholder { color: #aaa; }

.gw-header-search__btn {
  height: 40px;
  padding: 0 20px;
  background: #ffffff;
  border: 1.5px solid #e8e8e8;
  border-radius: 0 24px 24px 0;
  font-family: var(--gw-font-body);
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.gw-header-search__btn:hover {
  background: var(--gw-primary);
  color: #fff;
  border-color: var(--gw-primary);
}

/* ── Logo (center column) ──────────────────────────────────────── */
.gw-header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gw-header-logo .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 1;
}

.gw-header-logo .custom-logo {
  height: 56px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.gw-header-logo__text {
  font-family: var(--gw-font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gw-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* Icons row */
.gw-header-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.gw-header-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #444;
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}

.gw-header-icon:hover { color: var(--gw-primary); }
.gw-header-icon svg { flex-shrink: 0; }

.gw-header-icon__label {
  font-size: 10px;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
}

.gw-header-icon__badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  background: var(--gw-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════
   SEPARATOR (dotted line between rows)
   ══════════════════════════════════════════════════════════ */
.gw-header-sep {
  border: none;
  border-top: 1.5px dashed #e0e0e0;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════
   ROW 2 — Phone + Nav + Language
   ══════════════════════════════════════════════════════════ */
.gw-header-nav-row {
  background: #ffffff;
  padding: 0;
}

.gw-header-nav-row__inner {
  max-width: var(--gw-container-max);
  margin: 0 auto;
  padding: 0 var(--gw-container-pad);
  display: flex;
  align-items: center;
  height: 50px;
  gap: 24px;
}

/* Phone */
.gw-header-phone {
  font-family: var(--gw-font-body);
  font-size: 14px;
  font-weight: 600;
  color: #222;
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s;
  white-space: nowrap;
}
.gw-header-phone:hover { color: var(--gw-primary); }

/* ── Primary Navigation ────────────────────────────────────────── */
.gw-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.gw-nav__menu {
  display: flex !important;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gw-nav__menu > li > a,
.gw-nav__menu > li > .menu-link {
  font-family: var(--gw-font-body) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #111 !important;
  padding: 10px 12px !important;
  border-radius: 4px !important;
  transition: color 0.2s, background 0.2s !important;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  display: flex !important;
  align-items: center;
  gap: 4px;
}

.gw-nav__menu > li > a:hover,
.gw-nav__menu > li.current-menu-item > a,
.gw-nav__menu > li.current_page_item > a {
  color: var(--gw-primary) !important;
  background: rgba(26,61,32,0.06) !important;
}

/* Dropdown arrow */
.gw-nav__menu > li > a .dropdown-menu-toggle,
.gw-nav__menu > li > .menu-link .dropdown-menu-toggle {
  font-size: 10px !important;
  margin-left: 2px !important;
  opacity: 0.5;
}

/* ── Dropdown Menu ─────────────────────────────────────────────── */
.gw-nav__menu > li { position: relative; }

.gw-nav__menu .sub-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff !important;
  border: 1px solid #eee !important;
  border-top: 3px solid var(--gw-primary) !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10) !important;
  padding: 6px 0 !important;
  min-width: 200px !important;
  list-style: none;
  margin: 0;
  z-index: 100;
}

.gw-nav__menu > li:hover > .sub-menu,
.gw-nav__menu > li:focus-within > .sub-menu { display: block !important; }

.gw-nav__menu .sub-menu li a {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #333 !important;
  padding: 9px 18px !important;
  display: block;
  text-transform: uppercase !important;
  letter-spacing: 0.01em !important;
  transition: background 0.15s, color 0.15s !important;
  text-decoration: none !important;
}

.gw-nav__menu .sub-menu li a:hover {
  background: rgba(26,61,32,0.06) !important;
  color: var(--gw-primary) !important;
  padding-left: 22px !important;
}

/* ── Language Switcher ─────────────────────────────────────────── */
.gw-lang {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

/* Language switcher outputs <ul> inside .gw-lang */
.gw-lang ul {
  display: flex !important;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gw-lang li { list-style: none; margin: 0; padding: 0; }

.gw-lang a,
.gw-lang li a,
.gw-lang__item {
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  color: #999 !important;
  text-decoration: none !important;
  padding: 2px 4px !important;
  border: none !important;
  background: none !important;
  transition: color 0.2s;
  letter-spacing: 0.04em;
}

.gw-lang a:hover,
.gw-lang li.current-lang a,
.gw-lang__item.current-lang {
  color: var(--gw-primary) !important;
}

/* separator between language items */
.gw-lang li:not(:last-child)::after {
  content: '|';
  color: #ddd;
  font-size: 11px;
  padding: 0 2px;
}

/* ── Mobile Toggle ─────────────────────────────────────────────── */
.gw-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gw-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.3s;
}

/* ── Mobile Nav ────────────────────────────────────────────────── */
.gw-mobile-nav {
  background: #fff;
  border-top: 2px solid #eee;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.gw-mobile-nav__menu {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.gw-mobile-nav__menu li a {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s;
}

.gw-mobile-nav__menu li a:hover,
.gw-mobile-nav__menu li.current-menu-item > a {
  background: rgba(26,61,32,0.06);
  color: var(--gw-primary);
  padding-left: 26px;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gw-nav { display: none; }
  .gw-mobile-toggle { display: flex; }
}

@media (max-width: 900px) {
  .gw-header-search { max-width: 280px; }
  .gw-header-logo .custom-logo { height: 46px; }
}

@media (max-width: 768px) {
  .gw-header-top__inner { height: 62px; gap: 12px; }
  .gw-header-search { max-width: 200px; }
  .gw-header-logo .custom-logo { height: 40px; }
  .gw-header-icon__label { display: none; }
  .gw-header-nav-row__inner { height: 46px; }
  .gw-header-phone { font-size: 13px; }
}

@media (max-width: 520px) {
  /* On small screens: hide search, keep logo + icons */
  .gw-header-top__inner {
    grid-template-columns: auto 1fr auto;
  }
  .gw-header-search { display: none; }
  .gw-header-logo { justify-content: flex-start; }
  .gw-header-logo .custom-logo { height: 36px; }
  .gw-header-phone { display: none; }
  .gw-header-nav-row__inner { justify-content: space-between; }
}
