:root {
  --r32-global-search-bg: #09090a;
  --r32-global-search-panel: #101011;
  --r32-global-search-border: rgba(212, 175, 55, 0.34);
  --r32-global-search-border-focus: rgba(212, 175, 55, 0.82);
  --r32-global-search-gold: #d4af37;
  --r32-global-search-gold-soft: #c8ab4c;
  --r32-global-search-text: #f3ecd2;
  --r32-global-search-muted: #b3aa8c;
  --r32-global-search-font: "Cinzel", "Cormorant Garamond", Georgia, serif;
}

.r32-global-search {
  position: relative;
  flex: 0 0 auto;
  margin: 0 12px 0 0;
  z-index: 10002;
}

.r32-global-search-form {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}

/* ============================================================
   DESKTOP SEARCH — PREMIUM, VISIBLE, ROLL 32 BRANDED
   ============================================================ */
.r32-global-search-desktop .r32-global-search-form {
  width: clamp(280px, 22vw, 320px);
  height: 44px;
  border: 1px solid var(--r32-global-search-border);
  background: linear-gradient(180deg, rgba(18,18,19,0.98), rgba(8,8,9,0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.025),
    0 0 0 1px rgba(0,0,0,0.35);
  transition:
    width 180ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.r32-global-search-desktop .r32-global-search-form:hover {
  border-color: rgba(212,175,55,0.48);
}

.r32-global-search-desktop .r32-global-search-form:focus-within {
  border-color: var(--r32-global-search-border-focus);
  background: #0b0b0c;
  box-shadow:
    inset 0 0 0 1px rgba(212,175,55,0.10),
    0 0 12px rgba(212,175,55,0.06);
}

.r32-global-search-icon {
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 42px;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--r32-global-search-gold-soft) !important;
  cursor: text;
}

.r32-global-search-icon:hover,
.r32-global-search-icon:focus-visible {
  color: #efd56c !important;
}

.r32-global-search-icon:focus-visible {
  outline: 1px solid rgba(212,175,55,0.48) !important;
  outline-offset: -4px;
}

.r32-global-search-icon svg,
.r32-global-search-mobile-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.r32-global-search input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 1px 12px 0 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--r32-global-search-text) !important;
  font-family: var(--r32-global-search-font) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.025em;
  line-height: 1.2;
}

.r32-global-search input[type="search"]::placeholder,
.r32-global-search-mobile-panel input[type="search"]::placeholder {
  color: #c8bc91 !important;
  opacity: 0.82;
  font-family: var(--r32-global-search-font) !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.r32-global-search input[type="search"]::-webkit-search-cancel-button,
.r32-global-search-mobile-panel input[type="search"]::-webkit-search-cancel-button {
  filter: invert(1);
  opacity: 0.5;
}

.r32-global-search-submit {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Comfortable but not oversized on narrower desktop headers. */
@media (min-width: 1050px) and (max-width: 1199px) {
  .r32-global-search {
    margin-right: 8px;
  }

  .r32-global-search-desktop .r32-global-search-form {
    width: 240px;
  }

  .r32-global-search input[type="search"] {
    font-size: 13px !important;
  }
}

/* 922–1049px: compact control that expands left over header whitespace. */
@media (min-width: 922px) and (max-width: 1049px) {
  .r32-global-search {
    width: 44px;
    height: 44px;
    margin-right: 7px;
  }

  .r32-global-search-desktop .r32-global-search-form {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    overflow: hidden;
  }

  .r32-global-search-desktop .r32-global-search-icon {
    flex-basis: 42px;
    cursor: pointer;
  }

  .r32-global-search-desktop input[type="search"] {
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    padding-right: 0 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
  }

  .r32-global-search-desktop.is-expanded .r32-global-search-form {
    width: min(270px, calc(100vw - 28px));
    overflow: visible;
  }

  .r32-global-search-desktop.is-expanded input[type="search"] {
    flex: 1 1 auto;
    width: auto;
    padding-right: 12px !important;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ============================================================
   SUGGESTION PANEL
   ============================================================ */
.r32-global-search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  padding: 7px;
  background: #0d0d0e;
  border: 1px solid rgba(212,175,55,0.34);
  box-shadow: 0 14px 34px rgba(0,0,0,0.52);
  z-index: 10020;
}

.r32-global-search-suggestions[hidden] {
  display: none !important;
}

.r32-global-search-group {
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(212,175,55,0.12);
}

.r32-global-search-group-label {
  display: block;
  padding: 5px 9px 4px;
  color: #b9a866;
  font-family: var(--r32-global-search-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.r32-global-search-suggestion {
  display: flex !important;
  align-items: center;
  width: 100% !important;
  min-height: 46px;
  margin: 0 !important;
  padding: 8px 9px !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: var(--r32-global-search-text) !important;
  font-family: var(--r32-global-search-font) !important;
  text-align: left !important;
  cursor: pointer;
  box-shadow: none !important;
}

.r32-global-search-suggestion:hover,
.r32-global-search-suggestion:focus-visible {
  background: rgba(212,175,55,0.09) !important;
  color: #fff8dd !important;
  outline: 1px solid rgba(212,175,55,0.38) !important;
  outline-offset: -1px;
}

.r32-global-search-route-icon {
  width: 30px;
  flex: 0 0 30px;
  color: var(--r32-global-search-gold);
  font-size: 16px;
  text-align: center;
}

.r32-global-search-tal-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  margin-right: 8px;
  border: 1px solid rgba(212,175,55,0.52);
  border-radius: 50%;
  color: var(--r32-global-search-gold);
  font-family: var(--r32-global-search-font);
  font-size: 13px;
  font-weight: 700;
}

.r32-global-search-tal-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.r32-global-search-tal-copy strong {
  overflow: hidden;
  color: #f1e3a9;
  font-family: var(--r32-global-search-font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r32-global-search-tal-copy small {
  color: var(--r32-global-search-muted);
  font-family: inherit;
  font-size: 10px;
  line-height: 1.2;
}

.r32-global-search-mobile-trigger,
.r32-global-search-mobile-panel {
  display: none;
}

/* ============================================================
   MOBILE SEARCH
   ============================================================ */
@media (max-width: 921px) {
  .r32-global-search-desktop {
    display: none !important;
  }

  /* Shopping mode command strip already provides the primary navigation
     cluster on Vault / Collections / Forge. Hide the separate header-search
     trigger there so the mobile utility row does not become overcrowded. */
  body.r32-mode-command-active .r32-global-search-mobile-trigger {
    display: none !important;
  }

  .r32-global-search-mobile-trigger {
    position: relative !important;
    display: inline-grid !important;
    place-items: center;

    /* Keep a 42px touch target, but make the VISIBLE control 36px
       so it matches the Astra hamburger frame instead of looking oversized. */
    flex: 0 0 42px;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;

    /* Optical alignment: shift the full search control 5px right so the
       visible Search → Account gap matches Account → Menu. Positioning
       preserves the existing 42px flex footprint and touch target. */
    left: 5px;
    margin: 0 3px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #d9b83f !important;
    box-shadow: none !important;
    filter: none !important;
    transition: filter 0.22s ease !important;
  }

  /* 36x36 visual frame: same footprint as the mobile hamburger control. */
  .r32-global-search-mobile-trigger::before {
    content: "";
    position: absolute;
    inset: 3px;
    box-sizing: border-box;
    border: 2px solid #9a812c;
    border-radius: 1px;
    background: transparent;
    pointer-events: none;
  }

  .r32-global-search-mobile-trigger svg {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
  }

  /* Match the account control's interaction language: brighten the WHOLE
     rendered control (icon + frame) rather than swapping to flat yellow. */
  .r32-global-search-mobile-trigger:hover {
    filter:
      brightness(1.35)
      drop-shadow(0 0 3px rgba(255,255,255,0.07)) !important;
  }

  .r32-global-search-mobile-trigger[aria-expanded="true"],
  .r32-global-search-mobile-trigger:focus-visible {
    filter:
      brightness(2.2)
      drop-shadow(0 0 5px rgba(255,255,255,0.12))
      drop-shadow(0 0 8px rgba(255,255,255,0.06)) !important;
  }

  #masthead {
    position: relative;
  }

  .r32-global-search-mobile-panel {
    position: relative;
    display: block;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    z-index: 10030;
    padding: 10px 14px 12px;
    background: linear-gradient(180deg, #0b0b0c 0%, #080809 100%);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 0;
    box-shadow: 0 10px 22px rgba(0,0,0,0.38);
  }

  .r32-global-search-mobile-panel[hidden] {
    display: none !important;
  }

  .r32-global-search-mobile-inner {
    position: relative;
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .r32-global-search-mobile-panel .r32-global-search-form {
    height: 48px;
    border: 1px solid rgba(212,175,55,0.46);
    background: linear-gradient(180deg, #111112 0%, #0c0c0d 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
  }

  .r32-global-search-mobile-panel .r32-global-search-form:focus-within {
    border-color: rgba(212,175,55,0.86);
    box-shadow:
      inset 0 0 0 1px rgba(212,175,55,0.10),
      0 0 12px rgba(212,175,55,0.05);
  }

  .r32-global-search-mobile-panel input[type="search"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    margin: 0 !important;
    padding: 1px 8px 0 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--r32-global-search-text) !important;
    font-family: var(--r32-global-search-font) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.018em;
  }

  .r32-global-search-mobile-panel .r32-global-search-icon {
    width: 42px !important;
    height: 46px !important;
    min-height: 46px !important;
    flex-basis: 42px;
    color: #ccb14d !important;
  }

  .r32-global-search-mobile-go {
    flex: 0 0 auto;
    height: 38px !important;
    min-width: 78px;
    margin: 4px !important;
    padding: 1px 13px 0 !important;
    border: 1px solid rgba(212,175,55,0.72) !important;
    background: #0b0b0c !important;
    color: #d4af37 !important;
    font-family: var(--r32-global-search-font) !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.075em;
    line-height: 1 !important;
    text-transform: uppercase;
    box-shadow: none !important;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  }

  .r32-global-search-mobile-go:hover,
  .r32-global-search-mobile-go:focus-visible {
    background: rgba(212,175,55,0.10) !important;
    border-color: #d4af37 !important;
    color: #efd56c !important;
    outline: 1px solid rgba(212,175,55,0.32) !important;
    outline-offset: -3px;
  }

  .r32-global-search-mobile-panel .r32-global-search-suggestions {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 7px;
    box-shadow: none;
  }
}

.r32-global-search-tal-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
