/* ==========================================================================
   site-header.css — shared resale.de header (spec v2 + v2.1 rulings + owner
   round 1, approved 2026-10-19). Served from /site-header.css?v=<sha256[0:12]>.

   Opt-in: every rule is scoped under .rsh, a class the page adds to
   <header class="site-header rsh"> and <div class="category-bar … rsh">.
   A page without the class is unaffected even if it loads this file.
   Load order: after style.css (and after keyword-landing.css + the keyword
   inline blocks). Every selector matches or exceeds the rule it overrides
   (build/CSS-MIGRATION-MATRIX.md). No priority flags.
   ========================================================================== */

/* --- §3 fonts: scoped family, same self-hosted files and unicode ranges as
       the keyword page's inline 'Inter' faces (variable font; one file serves
       every weight). 4 weights x latin, latin-ext, cyrillic, cyrillic-ext
       = 16 faces (v2.1 ruling r2 #13: Русский, Українська). ------------- */
/* cyrillic-ext 400 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 400; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-ext-fccca918.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* cyrillic 400 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 400; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-aebf2ab4.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* latin-ext 400 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 400; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-ext-a28eb6d3.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin 400 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 400; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-c9407645.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* cyrillic-ext 500 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 500; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-ext-fccca918.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* cyrillic 500 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 500; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-aebf2ab4.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* latin-ext 500 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 500; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-ext-a28eb6d3.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin 500 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 500; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-c9407645.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* cyrillic-ext 600 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 600; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-ext-fccca918.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* cyrillic 600 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 600; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-aebf2ab4.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* latin-ext 600 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 600; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-ext-a28eb6d3.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin 600 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 600; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-c9407645.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* cyrillic-ext 700 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 700; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-ext-fccca918.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* cyrillic 700 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 700; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-cyrillic-aebf2ab4.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* latin-ext 700 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 700; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-ext-a28eb6d3.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* latin 700 */ @font-face { font-family: 'RS Header Inter'; font-style: normal; font-weight: 700; font-display: optional;
  src: url(/search-assets/fonts/inter-v20-android-latin-c9407645.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* --- §3 family. .rsh sits ON <header class="site-header"> and ON
       <div class="category-bar">, so the roots are compound selectors; nav,
       lang menu, catbar items and the fixed mega-dropdowns are descendants and
       inherit. Form controls inherit via style.css:131. -------------------- */
.site-header.rsh, .rsh.category-bar, .rsh .cat-dropdown, .rsh .cat-more-dropdown, .rsh .rsp-lang-menu {
  font-family: 'RS Header Inter', 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --- §3 category bar values ---------------------------------------------- */
.rsh .cat-item .cat-count { opacity: .9; }                       /* (0,3,0) = keyword inline, later in source */
.rsh .cat-more-btn { color: #fff; border-radius: 3px; }          /* (0,2,0) > style.css (0,1,0); = keyword (0,2,0), later */

/* Sub-category rows: one look on every page. Search rows are <div> inside
   <button.cat-item> (inherit 500 / line-height normal); product/keyword rows are
   <a> inside div.rsk-cat-wrap (inherit 400 / body line-height 1.6). Pin both. */
.rsh .cat-dropdown-item {
  font-size: 13px; font-weight: 500; line-height: 20px; padding: 6px 10px; min-height: 32px;
  box-sizing: border-box; border-radius: 3px; white-space: nowrap; letter-spacing: normal;   /* v2.1 r2 #7: 6+20+6 = 32 */
}
.rsh .cat-dropdown-item .sub-count {
  font-size: 11px; font-weight: 500; line-height: 16px; border-radius: 3px;
}

/* --- §6 B6 REVERTED (owner round 1, 2026-10-19): "Mehr" stays at the right
       edge of the content column, as live (inner keeps flex:1). Radius ≤ 3 on
       the panel bottom corners. ------------------------------------------- */
.rsh .cat-dropdown, .rsh .cat-more-dropdown { border-radius: 0 0 3px 3px; }

/* --- §5 bookmark badge (search's deliberate icon-corner anchor). v2.1 r2 #14:
       one selector for both regimes, (0,4,0); the page adds .bookmark-nav-btn
       to #rskMerkliste on product and keyword. ------------------------------ */
.rsh .main-nav .bookmark-nav-btn .bookmark-badge {
  position: absolute;
  top: -2px; right: -2px; left: auto;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  font-size: 11px; font-weight: 700;
}

/* --- §4 language control (engine rsk_render_lang_switch markup) ---------- */
.rsh .rsp-lang-details { position: relative; }
.rsh .rsp-lang-details > summary { list-style: none; }
.rsh .rsp-lang-details > summary::-webkit-details-marker { display: none; }

/* Trigger: (0,3,0) beats style.css `.lang-select-wrapper .lang-btn` (0,2,0)
   and product-detail.css `.rsp-lang .rsp-lang-btn` (0,2,0). */
.rsh .lang-select-wrapper .rsp-lang-btn {
  box-sizing: border-box; height: 36px; min-height: 36px; padding: 6px 10px; gap: 6px;
  display: flex; align-items: center; justify-content: flex-start;
  border: 1px solid var(--clr-border); border-radius: 3px; background: var(--clr-surface);
  font-size: 14px; font-weight: 600; line-height: 20px; color: var(--clr-text-2);
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.rsh .lang-select-wrapper .rsp-lang-btn:hover { background: var(--clr-bg); }
.rsh .lang-select-wrapper .rsp-lang-btn .fi { font-size: 16px; border-radius: 2px; }
.rsh .lang-select-wrapper .rsp-lang-btn:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 2px; }
.rsh .rsp-lang-chevron { flex: 0 0 auto; width: 14px; height: 14px; color: var(--clr-muted); transition: transform var(--transition); }
.rsh .rsp-lang-details[open] .rsp-lang-chevron { transform: rotate(180deg); }

/* Menu (≥ 601). z 300 inside the header's stacking context (z 100). */
.rsh .rsp-lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 300;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px;
  box-sizing: border-box; width: max-content; min-width: 340px; max-width: calc(100vw - 32px);
  margin: 0; padding: 8px; list-style: none;
  background: var(--clr-surface-raised); border: 1px solid var(--clr-border); border-radius: 3px;
  box-shadow: var(--shadow-lg);
}
.rsh .rsp-lang-menu li { margin: 0; padding: 0; list-style: none; }

/* Option */
.rsh .rsp-lang-option {
  display: grid; grid-template-columns: 1.333em minmax(0, 1fr) 2.2em; align-items: center; gap: 8px;
  box-sizing: border-box; min-height: 40px; padding: 0 12px; border-radius: 3px;
  font-size: 13.33px; font-weight: 400; line-height: normal; color: var(--clr-text);
  text-decoration: none; white-space: nowrap;
}
.rsh .rsp-lang-option .fi { border-radius: 2px; box-shadow: 0 0 0 1px oklch(18% 0.008 255 / .08); }
.rsh .rsp-lang-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsh .rsp-lang-code { justify-self: end; font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; color: var(--clr-muted); }
.rsh .rsp-lang-option:hover { background: var(--clr-bg); color: var(--clr-text); }
.rsh .rsp-lang-option[aria-current] { background: var(--clr-primary-light); font-weight: 600; }
.rsh .rsp-lang-option[aria-current]:hover { background: var(--clr-primary-light); }
.rsh .rsp-lang-option:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: -2px; }

/* --- §2 drawer regime (≤ 600) --------------------------------------------- */
@media (max-width: 600px) {
  /* Drawer is a fixed flex column (owner round 1 correction: no drawer scroll). */
  .rsh .main-nav {
    display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box;
    height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh;
  }

  /* Badge: same (0,4,0) selector; beats style.css `.main-nav .bookmark-nav-btn .bookmark-badge` (0,3,0). */
  .rsh .main-nav .bookmark-nav-btn .bookmark-badge { top: 8px; left: 14px; right: auto; }

  .rsh .rsp-lang-details { width: 100%; }
  .rsh .lang-select-wrapper .rsp-lang-btn {
    width: 100%; height: 44px; min-height: 44px; padding: 12px 16px;
    font-size: 16px; line-height: 18px; justify-content: flex-start;   /* B17; v2.1 r2 #2 line-height 18 */
  }
  .rsh .lang-select-wrapper .rsp-lang-chevron { margin-left: auto; }
  .rsh .rsp-lang-menu {
    position: static; grid-template-columns: minmax(0, 1fr);
    width: 100%; min-width: 0; max-width: none;
    margin-top: 8px; padding: 4px; box-shadow: none;
  }
  .rsh .rsp-lang-option { min-height: 44px; font-size: 16px; }

  /* Owner round 1 (correction): the drawer itself never scrolls; only the
     open language list does. Every row keeps its natural height (flex-shrink
     0); the language wrapper takes the remaining height and the open
     <details> fills it. The menu is then pinned inside the <details>
     (absolute, top = 44px summary + 8px gap, bottom 8px) and scrolls.
     Chosen over a flex chain through <details>: in current Chromium the
     menu sits in the ::details-content slot, so display:flex on <details>
     does not make the menu a flex item (measured: the menu stayed 606px and
     was cut off). Bottom spacing = 8px inside the details + the drawer's own
     24px padding. The cut-off last visible row is the "more follows" cue. */
  .rsh .main-nav > * { flex-shrink: 0; }
  .rsh .main-nav > .lang-select-wrapper {
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  }
  .rsh .rsp-lang-details[open] { flex: 1 1 auto; min-height: 0; position: relative; }
  .rsh .rsp-lang-details[open] .rsp-lang-menu {
    position: absolute; top: 52px; bottom: 8px; left: 0; right: 0; width: auto;
    margin-top: 0; overflow-y: auto; overscroll-behavior: contain;
    align-content: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rsh .rsp-lang-chevron { transition: none; }
}
