/* ===========================================================
   INCLUDE_HEADER.CSS
   FILE SOURCE:
   static/css/pages/test_pages_css/include_header.css

   PURPOSE:
   - Header system for test homepage.
   - Mobile header from 0px to 959px.
   - Desktop header + top bar from 960px.
   - Header width follows skeleton_base_test.css:
     --page-wide-width: 1280px

   TRACEBACK:
   - HTML:
     templates/pages/test_pages_html/include_header.html

   SKELETON WIDTH RULE:
   - Header inner max width: var(--page-wide-width, 1280px)
   - Never use 1500px / 1580px / 1600px here.

   BREAKPOINTS:
   - 0px - 320px: tiny phone
   - 321px - 359px: small phone
   - 360px - 490px: main mobile
   - 491px - 640px: large phone
   - 641px - 959px: tablet mobile header
   - 960px - 1025px: compact desktop header + compact top bar
   - 1026px - 1199px: small desktop
   - 1200px - 1679px: normal desktop
   - 1680px+: wide screen, still max 1280px
   =========================================================== */


/* ===========================================================
   01. ROOT VARIABLES
   =========================================================== */

:root {
  --header-container: var(--page-wide-width, 1280px);

  --header-mobile-height: 60px;
  --header-desktop-height: 72px;
  --header-topbar-height: 32px;

  --header-pad-x: 16px;
  --header-desktop-gutter: 32px;

  --header-icon-tap: 44px;
  --header-icon-visual: 24px;

  --header-mobile-logo-height: 38px;
  --header-desktop-logo-height: 44px;

  --header-topbar-text: 0.78rem;
  --header-nav-text: 0.86rem;
  --header-dropdown-text: 0.9rem;

  --header-radius-pill: 999px;
  --header-radius-card: 18px;

  --header-shadow-soft: 0 10px 30px rgba(30, 26, 22, 0.08);
  --header-shadow-dropdown: 0 20px 50px rgba(30, 26, 22, 0.14);
  --header-shadow-drawer: 20px 0 60px rgba(30, 26, 22, 0.18);
}


/* ===========================================================
   02. SHARED RESET
   =========================================================== */

.header-mobile,
.header-desktop,
.desktop-top-bar,
.mobile-search-panel,
.desktop-search-dropdown,
.mobile-nav-drawer,
.mobile-nav-overlay,
.header-mobile *,
.header-desktop *,
.desktop-top-bar *,
.mobile-search-panel *,
.desktop-search-dropdown *,
.mobile-nav-drawer * {
  box-sizing: border-box;
}

.header-mobile a,
.header-desktop a,
.desktop-top-bar a,
.mobile-nav-drawer a {
  text-decoration: none;
}

.header-mobile button,
.header-desktop button,
.mobile-search-panel button,
.desktop-search-dropdown button,
.mobile-nav-drawer button {
  font-family: inherit;
  cursor: pointer;
}


/* ===========================================================
   03. DEFAULT VISIBILITY
   Mobile first.
   =========================================================== */

.desktop-top-bar,
.header-desktop {
  display: none;
}


/* ===========================================================
   04. MOBILE HEADER
   0px - 959px
   =========================================================== */

.header-mobile {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;
  height: var(--header-mobile-height);

  display: grid;
  grid-template-columns: var(--header-icon-tap) minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 4px;

  padding-left: var(--header-pad-x);
  padding-right: var(--header-pad-x);

  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-icon-btn {
  width: var(--header-icon-tap);
  height: var(--header-icon-tap);

  display: inline-grid;
  place-items: center;

  padding: 0;
  margin: 0;

  border: 0;
  border-radius: var(--header-radius-pill);
  background: transparent;

  color: var(--color-primary);
  text-decoration: none;

  -webkit-tap-highlight-color: transparent;
}

.header-icon-btn:hover {
  background: var(--color-bg-soft);
}

.header-icon-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.header-icon-btn i {
  font-size: var(--header-icon-visual);
  line-height: 1;
}

.header-icon-btn img {
  width: var(--header-icon-visual);
  height: var(--header-icon-visual);
  object-fit: contain;
}

.header-logo {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo-link {
  max-width: 100%;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-logo img {
  width: auto;
  height: var(--header-mobile-logo-height);
  max-width: 160px;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}


/* ===========================================================
   05. MOBILE SEARCH PANEL
   =========================================================== */

.mobile-search-panel {
  position: sticky;
  top: var(--header-mobile-height);
  z-index: 999;

  width: 100%;
  padding: 10px var(--header-pad-x);

  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--header-shadow-soft);
}

.mobile-search-form {
  width: 100%;

  display: grid;
  grid-template-columns: minmax(0, 1fr) auto var(--header-icon-tap);
  align-items: center;
  gap: 8px;
}

.mobile-search-input {
  width: 100%;
  height: 44px;

  padding: 0 14px;

  border: 1px solid var(--color-border);
  border-radius: var(--header-radius-pill);
  background: var(--color-card);

  color: var(--color-text);
  font-size: 1rem;
  outline: none;
}

.mobile-search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(185, 130, 47, 0.16);
}

.mobile-search-submit {
  height: 44px;
  padding: 0 16px;

  border: 0;
  border-radius: var(--header-radius-pill);
  background: var(--color-primary);
  color: #fff;

  font-size: 0.94rem;
  font-weight: 700;
}

.mobile-search-close {
  width: var(--header-icon-tap);
  height: var(--header-icon-tap);

  display: grid;
  place-items: center;

  border: 0;
  border-radius: var(--header-radius-pill);
  background: transparent;
  color: var(--color-primary);
}

.mobile-search-close:hover {
  background: var(--color-bg-soft);
}


/* ===========================================================
   06. MOBILE DRAWER
   =========================================================== */

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;

  background: rgba(30, 26, 22, 0.42);
  opacity: 0;
  pointer-events: none;

  transition: opacity 0.2s ease;
}

.mobile-nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1100;

  width: 320px;
  max-width: 88vw;
  height: 100vh;
  height: 100dvh;

  display: flex;
  flex-direction: column;

  background: var(--color-card);
  border-right: 1px solid var(--color-border);
  box-shadow: var(--header-shadow-drawer);

  transform: translateX(-105%);
  transition: transform 0.24s ease;

  overflow: hidden;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

body.mobile-nav-open {
  overflow: hidden;
}

.mobile-nav-header {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 14px 16px;

  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-brand {
  min-width: 0;
}

.mobile-nav-brand strong {
  display: block;

  color: var(--color-primary);
  font-size: 1rem;
  line-height: 1.25;
}

.mobile-nav-brand span {
  display: block;

  margin-top: 2px;

  color: var(--color-muted);
  font-size: 0.86rem;
}

.mobile-nav-close {
  width: var(--header-icon-tap);
  height: var(--header-icon-tap);

  display: inline-grid;
  place-items: center;

  flex: 0 0 auto;

  border: 0;
  border-radius: var(--header-radius-pill);
  background: transparent;
  color: var(--color-primary);
}

.mobile-nav-close:hover {
  background: var(--color-bg-soft);
}

.mobile-nav-content {
  flex: 1;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  padding: 10px 0 24px;
}

.mobile-nav-list,
.mobile-nav-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-item,
.mobile-nav-section {
  border-bottom: 1px solid rgba(232, 222, 208, 0.7);
}

.mobile-nav-main-link {
  min-height: 52px;

  display: flex;
  align-items: center;

  padding: 12px 18px;

  color: var(--color-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.mobile-nav-main-link:hover {
  background: var(--color-bg-soft);
}

.mobile-nav-section-title {
  margin: 0;
  padding: 16px 18px 8px;

  color: var(--color-accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.mobile-nav-sub-list {
  padding-bottom: 10px;
}

.mobile-nav-sub-list a,
.mobile-nav-muted {
  min-height: 42px;

  display: flex;
  align-items: center;

  padding: 9px 18px 9px 34px;

  color: var(--color-primary);
  font-size: 0.96rem;
  line-height: 1.35;
}

.mobile-nav-sub-list a::before {
  content: "";

  width: 6px;
  height: 6px;
  margin-right: 10px;

  flex: 0 0 auto;

  border-radius: var(--header-radius-pill);
  background: var(--color-accent);
  opacity: 0.7;
}

.mobile-nav-sub-list a:hover {
  background: var(--color-bg-soft);
}

.mobile-nav-muted {
  color: var(--color-muted);
}


/* ===========================================================
   07. MOBILE BREAKPOINTS
   =========================================================== */

@media (max-width: 320px) {
  :root {
    --header-pad-x: 6px;
    --header-mobile-height: 52px;
    --header-icon-tap: 36px;
    --header-icon-visual: 21px;
    --header-mobile-logo-height: 30px;
  }

  .header-mobile {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    column-gap: 0;
  }

  .header-actions {
    gap: 0;
  }

  .header-logo img {
    max-width: 108px;
  }

  .mobile-search-form {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 5px;
  }

  .mobile-search-submit {
    display: none;
  }

  .mobile-nav-drawer {
    width: 276px;
    max-width: 92vw;
  }

  .mobile-nav-main-link {
    font-size: 0.95rem;
  }

  .mobile-nav-sub-list a,
  .mobile-nav-muted {
    padding-left: 28px;
    font-size: 0.9rem;
  }
}

@media (min-width: 321px) and (max-width: 359px) {
  :root {
    --header-pad-x: 8px;
    --header-mobile-height: 54px;
    --header-icon-tap: 40px;
    --header-icon-visual: 22px;
    --header-mobile-logo-height: 32px;
  }

  .header-mobile {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    column-gap: 2px;
  }

  .header-actions {
    gap: 0;
  }

  .header-logo img {
    max-width: 128px;
  }

  .mobile-search-form {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .mobile-search-submit {
    display: none;
  }

  .mobile-nav-drawer {
    width: 286px;
    max-width: 90vw;
  }
}

@media (min-width: 360px) and (max-width: 490px) {
  :root {
    --header-pad-x: clamp(10px, 3.8vw, 16px);
  }

  .header-logo img {
    max-width: clamp(140px, 42vw, 166px);
  }

  .mobile-nav-drawer {
    width: clamp(300px, 86vw, 320px);
  }
}

@media (min-width: 491px) and (max-width: 640px) {
  :root {
    --header-pad-x: clamp(18px, 4vw, 28px);
    --header-mobile-height: 64px;
    --header-mobile-logo-height: 42px;
  }

  .header-logo img {
    max-width: 190px;
  }

  .header-actions {
    gap: 4px;
  }

  .mobile-nav-drawer {
    width: 340px;
    max-width: 78vw;
  }
}

@media (min-width: 641px) and (max-width: 959px) {
  :root {
    --header-pad-x: clamp(22px, 4vw, 40px);
    --header-mobile-height: 68px;
    --header-mobile-logo-height: 46px;
  }

  .header-logo img {
    max-width: 220px;
  }

  .header-actions {
    gap: 6px;
  }

  .mobile-search-form {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  .mobile-nav-drawer {
    width: 380px;
    max-width: 64vw;
  }
}


/* ===========================================================
   08. DESKTOP VISIBILITY
   Desktop starts at 960px.
   Top bar also starts at 960px.
   =========================================================== */

@media (min-width: 960px) {
  .desktop-top-bar,
  .header-desktop {
    display: block;
  }

  .header-mobile,
  .mobile-search-panel,
  .mobile-nav-overlay,
  .mobile-nav-drawer {
    display: none;
  }
}


/* ===========================================================
   09. DESKTOP TOP BAR
   Width always follows --page-wide-width: 1280px.
   Small desktop: items centered, welcome hidden.
   Large desktop: welcome visible, still inside 1280px.
   =========================================================== */

@media (min-width: 960px) {
  :root {
    --header-topbar-height: clamp(30px, 2.2vw, 35px);
    --header-topbar-text: clamp(0.7rem, 0.58rem + 0.18vw, 0.86rem);
  }

  .desktop-top-bar {
    width: 100%;
    min-height: var(--header-topbar-height);

    background: var(--color-primary);
    color: var(--color-accent);
    border-bottom: 1px solid rgba(185, 130, 47, 0.25);
  }

  .desktop-top-bar-inner {
    width: min(calc(100% - var(--header-desktop-gutter)), var(--header-container));
    min-height: var(--header-topbar-height);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1vw, 20px);

    margin: 0 auto;
    overflow: hidden;
  }

  .desktop-top-welcome {
    display: none;
  }

  .desktop-top-bar-item {
    min-height: var(--header-topbar-height);

    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 0.45vw, 6px);

    color: var(--color-accent);
    font-size: var(--header-topbar-text);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
  }

  .desktop-top-bar-item strong {
    font-weight: 700;
  }

  .desktop-top-bar-item:hover {
    color: var(--color-bg-soft);
  }

  .desktop-top-language img {
    width: clamp(15px, 1.2vw, 18px);
    height: clamp(15px, 1.2vw, 18px);
    object-fit: contain;
  }
}

@media (min-width: 1200px) {
  .desktop-top-bar-inner {
    justify-content: center;
  }

  .desktop-top-welcome {
    display: inline-flex;

    max-width: 340px;
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* ===========================================================
   10. DESKTOP HEADER SHELL
   Header contents are a centered group, not pushed to edges.
   Width always follows --page-wide-width: 1280px.
   =========================================================== */

@media (min-width: 960px) {
  :root {
    --header-desktop-height: clamp(62px, 5vw, 82px);
    --header-desktop-logo-height: clamp(34px, 3.4vw, 58px);
    --header-logo-max-width: clamp(104px, 12vw, 205px);

    --header-nav-text: clamp(0.72rem, 0.58rem + 0.28vw, 1rem);
    --header-nav-height: clamp(32px, 2.8vw, 42px);
    --header-nav-pad-x: clamp(3px, 0.65vw, 13px);
    --header-nav-gap: clamp(0px, 0.35vw, 8px);

    --header-group-gap: clamp(7px, 1.1vw, 24px);

    --header-desktop-icon-size: clamp(32px, 2.8vw, 44px);
    --header-desktop-icon-font: clamp(0.86rem, 0.72rem + 0.28vw, 1.1rem);

    --header-dropdown-width: clamp(220px, 18vw, 280px);
    --header-dropdown-text: clamp(0.84rem, 0.72rem + 0.2vw, 0.98rem);
  }

  .header-desktop {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }

  .header-desktop-inner {
    width: min(calc(100% - var(--header-desktop-gutter)), var(--header-container));
    min-height: var(--header-desktop-height);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--header-group-gap);

    margin: 0 auto;
  }

  .desktop-header-logo {
    flex: 0 0 auto;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .desktop-header-logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    max-width: var(--header-logo-max-width);
  }

  .desktop-header-logo img {
    display: block;

    width: auto;
    height: var(--header-desktop-logo-height);
    max-width: var(--header-logo-max-width);

    object-fit: contain;
  }

  .desktop-main-nav {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;

    gap: var(--header-nav-gap);

    padding: 0;

    overflow: visible;
  }

  .desktop-nav-link,
  .desktop-nav-dropdown-toggle {
    min-height: var(--header-nav-height);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, 0.35vw, 6px);

    padding-left: var(--header-nav-pad-x);
    padding-right: var(--header-nav-pad-x);

    border: 0;
    border-radius: var(--header-radius-pill);
    background: transparent;

    color: var(--color-primary);
    font-size: var(--header-nav-text);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.015em;
    white-space: nowrap;
    text-decoration: none;

    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
  }

  .desktop-nav-link:hover,
  .desktop-nav-dropdown:hover .desktop-nav-dropdown-toggle,
  .desktop-nav-dropdown:focus-within .desktop-nav-dropdown-toggle {
    background: var(--color-bg-soft);
    color: var(--color-accent-dark);
  }

  .desktop-nav-link:focus-visible,
  .desktop-nav-dropdown-toggle:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }

  .desktop-nav-dropdown-toggle i {
    font-size: 0.78em;
    line-height: 1;
    transition: transform 0.18s ease;
  }

  .desktop-nav-dropdown:hover .desktop-nav-dropdown-toggle i,
  .desktop-nav-dropdown:focus-within .desktop-nav-dropdown-toggle i {
    transform: rotate(180deg);
  }

  .desktop-header-actions {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0px, 0.25vw, 4px);
  }

  .desktop-header-icon-btn {
    width: var(--header-desktop-icon-size);
    height: var(--header-desktop-icon-size);

    display: inline-grid;
    place-items: center;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: var(--header-radius-pill);
    background: transparent;

    color: var(--color-primary);
    font-size: var(--header-desktop-icon-font);
    text-decoration: none;

    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
  }

  .desktop-header-icon-btn:hover {
    background: var(--color-bg-soft);
    color: var(--color-accent-dark);
  }

  .desktop-header-icon-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }
}


/* ===========================================================
   11. DESKTOP DROPDOWN
   =========================================================== */

@media (min-width: 960px) {
  .desktop-nav-dropdown {
    position: relative;

    display: inline-flex;
    align-items: center;
  }

  .desktop-nav-dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;

    height: 14px;
  }

  .desktop-nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1050;

    min-width: var(--header-dropdown-width);
    padding: 8px;

    display: none;

    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--header-radius-card);
    box-shadow: var(--header-shadow-dropdown);
  }

  .desktop-nav-dropdown:hover .desktop-nav-dropdown-panel,
  .desktop-nav-dropdown:focus-within .desktop-nav-dropdown-panel {
    display: block;
  }

  .desktop-nav-dropdown-right .desktop-nav-dropdown-panel {
    left: auto;
    right: 0;
  }

  .desktop-nav-dropdown-link {
    min-height: clamp(38px, 3vw, 44px);

    display: flex;
    align-items: center;

    padding: 10px 12px;

    border-radius: 12px;

    color: var(--color-primary);
    font-size: var(--header-dropdown-text);
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
  }

  .desktop-nav-dropdown-link:hover {
    background: var(--color-bg-soft);
    color: var(--color-accent-dark);
  }
}


/* ===========================================================
   12. DESKTOP SEARCH DROPDOWN
   =========================================================== */

@media (min-width: 960px) {
  .desktop-search-dropdown {
    width: 100%;

    padding: clamp(10px, 1vw, 14px) clamp(14px, 2vw, 24px);

    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--header-shadow-soft);
  }

  .desktop-search-form {
    width: min(calc(100% - var(--header-desktop-gutter)), var(--header-container));

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto clamp(38px, 3vw, 42px);
    align-items: center;
    gap: clamp(8px, 1vw, 12px);

    margin: 0 auto;
  }

  .desktop-search-input {
    width: 100%;
    height: clamp(40px, 3.3vw, 44px);

    padding: 0 clamp(14px, 1.4vw, 18px);

    border: 1px solid var(--color-border);
    border-radius: var(--header-radius-pill);
    background: var(--color-card);

    color: var(--color-text);
    font-size: clamp(0.94rem, 0.86rem + 0.16vw, 1rem);
    outline: none;
  }

  .desktop-search-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(185, 130, 47, 0.16);
  }

  .desktop-search-submit {
    height: clamp(40px, 3.3vw, 44px);
    padding: 0 clamp(18px, 1.6vw, 24px);

    border: 0;
    border-radius: var(--header-radius-pill);
    background: var(--color-primary);
    color: #fff;

    font-size: clamp(0.9rem, 0.82rem + 0.14vw, 0.98rem);
    font-weight: 700;
  }

  .desktop-search-close {
    width: clamp(38px, 3vw, 42px);
    height: clamp(38px, 3vw, 42px);

    display: grid;
    place-items: center;

    border: 0;
    border-radius: var(--header-radius-pill);
    background: transparent;
    color: var(--color-primary);
  }

  .desktop-search-close:hover {
    background: var(--color-bg-soft);
  }
}


/* ===========================================================
   13. DESKTOP FINE TUNING
   =========================================================== */

@media (min-width: 960px) and (max-width: 1040px) {
  :root {
    --header-desktop-gutter: 20px;

    /* Make 960px-1040px feel closer to 1041px+ */
    --header-desktop-height: 68px;
    --header-desktop-logo-height: 38px;
    --header-logo-max-width: 132px;

    --header-nav-text: 0.76rem;
    --header-nav-height: 36px;
    --header-nav-pad-x: 5px;
    --header-nav-gap: 1px;

    --header-group-gap: 9px;

    --header-desktop-icon-size: 34px;
    --header-desktop-icon-font: 0.9rem;

    --header-dropdown-width: 240px;
    --header-dropdown-text: 0.88rem;
  }

  .desktop-top-bar-inner {
    gap: 12px;
  }

  .desktop-top-bar-item {
    font-size: 0.72rem;
  }

  .desktop-main-nav {
    gap: 1px;
  }
}

@media (min-width: 1680px) {
  :root {
    --header-desktop-gutter: 36px;
  }

  .desktop-top-bar-inner,
  .header-desktop-inner,
  .desktop-search-form {
    max-width: var(--header-container);
  }
}


/* ===========================================================
   14. CART BADGE
   PURPOSE:
   - Shows total item quantity on desktop and mobile cart icons.
   - Badge reads from [data-cart-count].
   - Header JS updates all badges at the same time.
=========================================================== */

.header-cart-link {
  position: relative;
  overflow: visible !important;
}

.header-cart-badge {
  position: absolute;
  top: -0.22rem;
  right: -0.22rem;
  z-index: 5;

  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.32rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 2px solid var(--color-bg);
  border-radius: 999px;
  background: var(--color-button, #6FA85A);
  color: var(--color-button-text, #fff);

  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;

  box-shadow: 0 0.25rem 0.65rem rgba(63, 90, 54, 0.28);
  pointer-events: none;
}

.header-cart-badge[hidden] {
  display: none !important;
}

@media (max-width: 959px) {
  .header-cart-badge {
    top: 0.08rem;
    right: 0.08rem;

    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.28rem;

    font-size: 0.62rem;
  }
}

/* ===========================================================
   ACCOUNT + STICKY LANGUAGE FIX
   FILE SOURCE:
   static/css/pages/include_header.css

   PURPOSE:
   - Add account dropdown to new desktop header.
   - Keep language switch visible after scroll by adding it to
     the sticky desktop header actions.
   - Keep old top-bar language link, but do not rely on it only.
=========================================================== */


/* ===========================================================
   01. DESKTOP STICKY LANGUAGE ICON
=========================================================== */

@media (min-width: 960px) {
  .desktop-header-language-btn img {
    display: block;

    width: clamp(18px, 1.45vw, 22px);
    height: clamp(18px, 1.45vw, 22px);

    object-fit: contain;
  }
}


/* ===========================================================
   02. DESKTOP ACCOUNT DROPDOWN
=========================================================== */

@media (min-width: 960px) {
  .desktop-account-menu {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /*
    Invisible hover bridge.
    This prevents dropdown from closing when moving mouse
    from icon to dropdown.
  */
  .desktop-account-menu::after {
    content: "";

    position: absolute;
    left: -8px;
    right: -8px;
    top: 100%;

    height: 12px;
  }

  .desktop-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1060;

    min-width: 190px;
    padding: 8px;

    display: none;

    border: 1px solid var(--color-border);
    border-radius: var(--header-radius-card, 18px);
    background: var(--color-card);

    box-shadow: var(--header-shadow-dropdown, 0 20px 50px rgba(30, 26, 22, 0.14));
  }

  .desktop-account-menu:hover .desktop-account-dropdown,
  .desktop-account-menu:focus-within .desktop-account-dropdown {
    display: grid;
    gap: 4px;
  }

  .desktop-account-dropdown a {
    min-height: 40px;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 9px 11px;

    border-radius: 12px;

    color: var(--color-primary);
    font-size: var(--header-dropdown-text, 0.9rem);
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
  }

  .desktop-account-dropdown a i {
    width: 1rem;

    flex: 0 0 1rem;

    color: var(--color-accent-dark);
    text-align: center;
  }

  .desktop-account-dropdown a:hover,
  .desktop-account-dropdown a:focus-visible {
    background: var(--color-bg-soft);
    color: var(--color-accent-dark);
  }

  .desktop-account-dropdown a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }
}


/* ===========================================================
   03. COMPACT DESKTOP TUNING
   960px - 1040px now has one extra language icon.
=========================================================== */

@media (min-width: 960px) and (max-width: 1040px) {
  .desktop-header-actions {
    gap: 0;
  }

  .desktop-header-language-btn img {
    width: 18px;
    height: 18px;
  }

  .desktop-account-dropdown {
    min-width: 172px;
  }

  .desktop-account-dropdown a {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
}


/* ===========================================================
   04. MOBILE ACCOUNT SECTION
=========================================================== */

.mobile-nav-account-section .mobile-nav-section-title {
  color: var(--color-accent-dark);
}

.mobile-nav-account-section .mobile-nav-sub-list a {
  font-weight: 700;
}


