/* =======================================
   HEADER CATEGORY SELECT – VENDYL PREMIUM
   ======================================= */

/* 1) Native select fallback (if Select2 isn't loaded) */
select[name="product_cat"] {
  height: 44px;
  box-sizing: border-box;
  width: 100%;
  max-width: 360px;
  padding: 0 40px 0 16px;          /* space for arrow */
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  color: #0f172a;
  line-height: 44px;
  box-shadow: 0 0 0 1px rgba(148,163,184,0.12);
  transition: border-color .18s ease, box-shadow .18s ease;
}

/* Placeholder / empty option a touch softer */
select[name="product_cat"] option[value=""],
select[name="product_cat"] option[disabled] {
  color: #94a3b8;
}

/* Focus state */
select[name="product_cat"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.3);
}

/* 2) Select2 wrapper (what you actually see on Vendyl) */
.select2-container--default .select2-selection--single {
  height: 44px !important;
  border-radius: 999px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(148,163,184,0.12) !important;
  padding: 0 !important;
  transition: border-color .18s ease, box-shadow .18s ease;
}

/* Text inside ("Select a category") */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0 40px 0 16px !important;   /* left padding + room for arrow */
  line-height: 44px !important;        /* vertical centering */
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: .02em !important;
  color: #0f172a !important;
}

/* Placeholder tone */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8 !important;
}

/* Arrow alignment */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px !important;
  right: 14px !important;
}

/* Focus state when Select2 is active */
.select2-container--default.select2-container--focus
.select2-selection--single {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 1px rgba(37,99,235,0.3) !important;
}

/* 3) Header-specific tweaks (spacing + width) */

/* Give the control a sensible width in the header */
.site-header .select2-container--default .select2-selection--single {
  min-width: 260px;
  max-width: 360px;
}

/* Nudge the whole Select2 pill slightly left
   to create breathing room before the avatar */
.site-header .select2-container--default {
  transform: translateX(-10px);
}

/* Allow dropdown options to wrap nicely */
.site-header .select2-container--default .select2-results__option {
  white-space: normal;
  line-height: 1.35;
}

/* 4) Dropdown search styling + tidy top spacing */

/* Layout of the search row inside the dropdown */
.select2-container--default .select2-search--dropdown {
  padding: 0 10px 4px;
  margin-top: 0;
}

/* Search input styling */
.select2-container--default .select2-search--dropdown .select2-search__field {
  height: 36px;
  padding: 6px 10px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Remove any extra padding/margin before first option */
.select2-container--default .select2-results {
  padding-top: 0;
}
.select2-container--default .select2-results__options {
  margin-top: 0;
}

/* =======================================
   HEADER CATEGORY DROPDOWN – CLOSE GAP
   ======================================= */

/* Pull the dropdown up so it touches the pill */
.select2-container--open .select2-dropdown.select2-dropdown--below {
  margin-top: +4px !important;   /* adjust between -8 and -12 if needed */
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

/* Remove extra spacing above the search box inside the dropdown */
.select2-dropdown .select2-search--dropdown {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Make sure the search input itself isn't adding a top gap */
.select2-dropdown .select2-search--dropdown .select2-search__field {
  margin-top: 0 !important;
}
