/* REWAA 39.4 — fluid header sizing only. The announcement ticker is intentionally untouched. */

@media (min-width: 1101px) {
  .ref33-header .header-row {
    height: clamp(64px, 4.8vw, 76px);
    min-height: clamp(64px, 4.8vw, 76px);
    gap: clamp(5px, .55vw, 10px);
    flex-wrap: nowrap;
    padding-block: 0;
  }
  .ref33-header .brand { gap: clamp(5px, .5vw, 9px); }
  .ref33-header .logo-mark {
    width: clamp(36px, 2.8vw, 44px);
    height: clamp(36px, 2.8vw, 44px);
  }
  .ref33-header .brand-words strong { font-size: clamp(16px, 1.05vw, 19px); }
  .ref33-header .brand-words small { font-size: clamp(7px, .45vw, 8px); }
  .ref33-header .desktop-nav {
    flex: 1 1 auto;
    min-width: 0;
    gap: clamp(0px, .14vw, 2px);
    justify-content: center;
  }
  .ref33-header .desktop-nav > a {
    font-size: clamp(11.25px, .82vw, 13px);
    line-height: 1.5;
    padding-block: 8px;
    padding-inline: clamp(4px, .36vw, 7px);
  }
  .ref33-header .header-actions { gap: clamp(2px, .28vw, 6px); }
  .ref33-header .header-actions > .icon-btn {
    width: clamp(34px, 2.5vw, 40px);
    height: clamp(36px, 2.5vw, 42px);
    flex: 0 0 auto;
  }
  .ref33-header .cart-btn {
    min-height: clamp(40px, 2.7vw, 44px);
    height: auto;
    padding-inline: clamp(8px, .75vw, 13px);
    gap: clamp(5px, .45vw, 8px);
    font-size: clamp(10.5px, .8vw, 12px);
  }
  .ref33-header .tech-btn {
    min-height: clamp(36px, 2.5vw, 42px);
    padding: 7px clamp(7px, .62vw, 11px);
    gap: clamp(4px, .35vw, 7px);
    font-size: clamp(10.5px, .78vw, 12px);
  }
  .ref33-header .ref33-search-trigger {
    height: clamp(36px, 2.5vw, 42px);
    gap: clamp(4px, .38vw, 8px);
    font-size: clamp(10.5px, .75vw, 12px);
    padding-inline: clamp(7px, .62vw, 11px);
  }
  .ref33-header .rw3-more { min-width: 0; }
  .ref33-header .rw3-more > summary {
    width: clamp(34px, 2.5vw, 40px);
    height: clamp(36px, 2.5vw, 42px);
    border-radius: 8px;
  }
  .ref33-header .rw3-more > summary svg {
    width: clamp(18px, 1.25vw, 21px);
    height: clamp(18px, 1.25vw, 21px);
  }
}

/* On compact desktop widths, keep the existing one-row layout and preserve readable link text. */
@media (min-width: 1101px) and (max-width: 1350px) {
  .ref33-header .desktop-nav > a {
    font-size: clamp(11.25px, .9vw, 12.15px);
    padding-inline: clamp(3px, .3vw, 5px);
  }
  .ref33-header .brand-words small { letter-spacing: .18em; }
  .ref33-header .ref33-search-trigger {
    width: clamp(36px, 3.2vw, 40px) !important;
    min-width: clamp(36px, 3.2vw, 40px) !important;
    max-width: clamp(36px, 3.2vw, 40px) !important;
    flex-basis: clamp(36px, 3.2vw, 40px) !important;
    justify-content: center;
    padding-inline: 0 !important;
  }
  .ref33-header .ref33-search-placeholder,
  .ref33-header .ref33-search-trigger kbd { display: none !important; }
  .ref33-header .tech-btn {
    width: clamp(36px, 3.2vw, 40px) !important;
    min-width: clamp(36px, 3.2vw, 40px) !important;
    height: clamp(36px, 3.2vw, 40px) !important;
    padding: 0 !important;
    justify-content: center;
    gap: 0 !important;
    font-size: 0 !important;
  }
  .ref33-header .tech-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
}

@media (min-width: 1351px) and (max-width: 1550px) {
  .ref33-header .ref33-search-trigger {
    width: clamp(128px, 10vw, 150px);
    max-width: clamp(128px, 10vw, 150px);
  }
  .ref33-header .ref33-search-placeholder { max-width: clamp(68px, 5.8vw, 92px); }
  .ref33-header .ref33-search-trigger kbd { display: none; }
}

/* Mobile/tablet: preserve the existing mobile-menu behavior and use fluid control sizes. */
@media (max-width: 1100px) {
  .ref33-header .header-row {
    height: auto;
    min-height: clamp(58px, 8.5vw, 70px);
    gap: clamp(3px, .85vw, 8px);
    flex-wrap: nowrap;
  }
  .ref33-header .brand { gap: clamp(4px, 1vw, 9px); }
  .ref33-header .logo-mark {
    width: clamp(31px, 3.8vw, 40px);
    height: clamp(31px, 3.8vw, 40px);
  }
  .ref33-header .brand-words strong { font-size: clamp(14px, 1.55vw, 17px); }
  .ref33-header .brand-words small { font-size: clamp(6px, .72vw, 8px); }
  .ref33-header .header-actions { gap: clamp(0px, .45vw, 5px); }
  .ref33-header .header-actions > .icon-btn,
  .ref33-header .menu-toggle {
    width: clamp(31px, 3.8vw, 39px);
    height: clamp(34px, 4vw, 41px);
  }
  .ref33-header .menu-toggle { flex: 0 0 clamp(31px, 3.8vw, 39px); }
  .ref33-header .cart-btn {
    min-height: clamp(35px, 4.2vw, 42px);
    height: auto;
    padding-inline: clamp(6px, .95vw, 12px);
    gap: clamp(4px, .65vw, 7px);
    font-size: clamp(10px, 1.1vw, 12px);
  }
  .ref33-header .ref33-search-trigger {
    width: clamp(32px, 4vw, 40px);
    min-width: clamp(32px, 4vw, 40px);
    height: clamp(34px, 4vw, 41px);
    padding-inline: 0;
    justify-content: center;
  }
  .ref33-header .rw3-more > summary { min-width: 36px; min-height: 36px; }
}

@media (max-width: 680px) {
  .ref33-header .header-row { min-height: 58px; gap: clamp(2px, .8vw, 5px); }
  .ref33-header .header-actions { gap: 0; }
  .ref33-header .header-actions > .icon-btn,
  .ref33-header .menu-toggle { width: 32px; height: 35px; }
  .ref33-header .menu-toggle { flex-basis: 32px; }
  .ref33-header .logo-mark { width: 32px; height: 32px; }
  .ref33-header .ref33-search-trigger { width: 33px; min-width: 33px; height: 35px; }
  .ref33-header .cart-btn { min-height: 35px; padding-inline: 7px; }
}

@media (max-width: 380px) {
  .ref33-header .brand-words { display: none; }
  .ref33-header .header-row { gap: 2px; }
  .ref33-header .header-actions > .icon-btn,
  .ref33-header .menu-toggle { width: 30px; height: 34px; }
  .ref33-header .menu-toggle { flex-basis: 30px; }
  .ref33-header .logo-mark { width: 30px; height: 30px; }
  .ref33-header .cart-btn { padding-inline: 6px; }
}
