/* Rama Rudraksha — Desktop header spacing repair 1.0.
 * Scoped exclusively to the existing custom #rrch-header.
 * The existing mobile/tablet header (<=1050px) is NOT modified.
 */
@media (min-width:1051px) {
  #rrch-header .rrch-inner {
    /* max-content prevents CSS Grid from shrinking the brand under translated menus. */
    display: grid !important;
    grid-template-columns: max-content minmax(0,1fr) max-content !important;
    column-gap: clamp(12px,1.1vw,21px) !important;
    max-width: 1600px;
    padding-inline: clamp(19px,2.4vw,40px) !important;
  }
  #rrch-header .rrch-left {
    width: max-content !important;
    min-width: max-content !important;
    flex-shrink: 0 !important;
  }
  #rrch-header .rrch-brand {
    white-space: nowrap !important;
    font-size: clamp(23px,1.86vw,28px) !important;
    letter-spacing: -.052em !important;
  }
  body.rrch-scrolled #rrch-header .rrch-brand {
    font-size: 23px !important;
  }
  #rrch-header .rrch-nav {
    min-width: 0 !important;
    justify-content: center !important;
  }
  #rrch-header .rrch-nav-list {
    gap: 0 !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
  }
  #rrch-header .rrch-nav .rrch-nav-list > li > a {
    white-space: nowrap !important;
    padding-inline: clamp(5px,.63vw,10px) !important;
    font-size: clamp(12px,.91vw,14px) !important;
  }
  #rrch-header .rrch-right {
    width: max-content !important;
    min-width: max-content !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    flex-shrink: 0 !important;
  }
  #rrch-header .rrch-right .rrch-icon {
    width: clamp(34px,2.5vw,39px) !important;
    height: clamp(34px,2.5vw,39px) !important;
    flex-shrink: 0 !important;
  }
  #rrch-header .rrch-right #rrji-lang-pill {
    margin: 0 clamp(3px,.5vw,8px) 0 0 !important;
    flex-shrink: 0 !important;
  }
  /* Only if real measurements detect insufficient space after the base fix. */
  body.rrhf-condensed #rrch-header .rrch-inner {
    column-gap: 10px !important;
    padding-inline: 16px !important;
  }
  body.rrhf-condensed #rrch-header .rrch-brand {
    font-size: 22px !important;
  }
  body.rrhf-condensed.rrch-scrolled #rrch-header .rrch-brand {
    font-size: 21px !important;
  }
  body.rrhf-condensed #rrch-header .rrch-nav .rrch-nav-list > li > a {
    padding-inline: 5px !important;
    font-size: 12px !important;
  }
  body.rrhf-condensed #rrch-header .rrch-right .rrch-icon {
    width: 32px !important;
    height: 36px !important;
  }
  body.rrhf-condensed #rrch-header .rrch-right #rrji-lang-pill {
    margin-right: 2px !important;
  }
  /* Last resort on intermediate desktop widths: use the site's EXISTING drawer.
   * We never create a new menu, alter routes, or interfere with the cart.
   */
  body.rrhf-drawer #rrch-header .rrch-inner {
    grid-template-columns: minmax(0,1fr) max-content !important;
  }
  body.rrhf-drawer #rrch-header .rrch-nav { display:none !important; }
  body.rrhf-drawer #rrch-header .rrch-menu-toggle { display:inline-flex !important; }
  body.rrhf-drawer #rrch-header .rrch-left { min-width:0 !important; }
}
