/* ===== osuz-mobile-v7-header-final ===== */
/* V7 FINAL MOBILE HEADER OVERRIDE — keep one compact header on every page. */
@media (max-width: 767px) {
  .site-header-top > .max-w-\[1400px\],
  .site-header-top > .max-w-\[1200px\],
  .auth-site-header > div {
    display: grid !important;
    grid-template-columns: auto auto minmax(86px, 1fr) !important;
    grid-template-rows: 42px 44px !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 8px !important;
    width: 100% !important;
    min-height: 102px !important;
    height: 102px !important;
    padding: 6px 12px 8px !important;
    margin: 0 auto !important;
    flex-wrap: nowrap !important;
  }

  .site-header-top .header-brand,
  .site-header-top > div > a:first-child,
  .auth-site-header > div > a:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  .site-header-top .site-logo-icon,
  .auth-site-header .auth-site-logo,
  .site-header-top img[alt="OSUZ"],
  .auth-site-header img[alt="OSUZ"] {
    height: 27px !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }

  .site-header-top .site-logo-text,
  .site-header-top > div > a:first-child span,
  .auth-site-header .auth-site-title {
    font-size: 16px !important;
    line-height: 1 !important;
    letter-spacing: .03em !important;
    white-space: nowrap !important;
  }

  .osuz-catalog-button {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 78px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    gap: 5px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }
  .osuz-catalog-button svg { width: 16px !important; height: 16px !important; }

  .osuz-mobile-header-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    justify-self: end !important;
    gap: 4px !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Bottom navigation is the ONLY mobile location for these actions. */
  .osuz-mobile-header-actions > a,
  .osuz-mobile-header-actions > button#mobileMenuBtn,
  .osuz-mobile-header-actions > [data-customer-account-link],
  .auth-site-header .osuz-mobile-header-actions > a {
    display: none !important;
  }

  /* Keep only language + theme in the top-right. */
  .osuz-mobile-header-actions .osuz-language-select-wrap,
  .osuz-mobile-header-actions .osuz-language-wrap,
  .osuz-mobile-header-actions #languageToggle,
  .osuz-mobile-header-actions #languageButton,
  .osuz-mobile-header-actions #categoryLanguageToggle,
  .osuz-mobile-header-actions #themeToggle,
  .osuz-mobile-header-actions #categoryThemeToggle {
    display: inline-flex !important;
  }

  .osuz-mobile-header-actions .header-action,
  .osuz-mobile-header-actions .auth-header-action {
    min-width: 38px !important;
    width: 38px !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 10px !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    font-size: 0 !important;
    transform: none !important;
  }

  .osuz-mobile-header-actions .osuz-language-select-wrap,
  .osuz-mobile-header-actions .osuz-language-wrap,
  .osuz-mobile-header-actions #languageToggle,
  .osuz-mobile-header-actions #languageButton,
  .osuz-mobile-header-actions #categoryLanguageToggle {
    position: relative !important;
    width: 54px !important;
    min-width: 54px !important;
    padding: 0 5px !important;
    gap: 4px !important;
    font-size: 10px !important;
  }

  .osuz-mobile-header-actions .osuz-language-select-wrap select {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    z-index: 5 !important;
    cursor: pointer !important;
    font-size: 16px !important;
  }

  .osuz-mobile-header-actions .osuz-lang-code,
  .osuz-mobile-header-actions .osuz-lang-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 9px !important;
    line-height: 1 !important;
    margin: 0 !important;
    transform: none !important;
  }
  .osuz-mobile-header-actions .osuz-lang-flag-only::before,
  .osuz-mobile-header-actions .osuz-lang-label::before {
    width: 22px !important;
    height: 14px !important;
    border-radius: 3px !important;
    margin: 0 !important;
  }

  .osuz-mobile-header-actions .header-action > svg,
  .osuz-mobile-header-actions .header-action > i,
  .osuz-mobile-header-actions .auth-header-action > svg,
  .osuz-mobile-header-actions .auth-header-action > i {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    transform: none !important;
  }

  .osuz-header-search {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }
  .osuz-header-search input {
    min-width: 0 !important;
    height: 44px !important;
    font-size: 13px !important;
    padding: 0 8px !important;
  }
  .osuz-header-search > svg,
  .osuz-header-search > i {
    width: 17px !important;
    height: 17px !important;
    margin-left: 11px !important;
    flex: 0 0 auto !important;
  }
  .osuz-header-search button {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 13px !important;
    font-size: 13px !important;
    border-radius: 0 9px 9px 0 !important;
  }

  .site-header-nav { display: none !important; }

  /* The catalog starts immediately under the 102px mobile header. */
  .osuz-catalog-panel {
    top: 102px !important;
  }

  /* Content starts below header on fixed-header pages. */
  header.fixed + main,
  .site-header.fixed + main {
    padding-top: 118px !important;
  }

  /* Auth header is in normal flow, so don't add a fake gap. */
  .auth-site-header + main {
    padding-top: 20px !important;
  }
}

@media (max-width: 350px) {
  .site-header-top > .max-w-\[1400px\],
  .site-header-top > .max-w-\[1200px\],
  .auth-site-header > div { padding-left: 8px !important; padding-right: 8px !important; column-gap: 5px !important; }
  .site-header-top .site-logo-text,
  .site-header-top > div > a:first-child span,
  .auth-site-header .auth-site-title { font-size: 14px !important; }
  .osuz-catalog-button { min-width: 72px !important; padding: 0 8px !important; }
  .osuz-mobile-header-actions .osuz-language-select-wrap,
  .osuz-mobile-header-actions .osuz-language-wrap,
  .osuz-mobile-header-actions #languageToggle,
  .osuz-mobile-header-actions #languageButton,
  .osuz-mobile-header-actions #categoryLanguageToggle { width: 50px !important; min-width: 50px !important; }
}

/* ===== osuz-mobile-v8-header-final ===== */
/* V8 — mobile header: no top Catalog button and no duplicated account/order/cart actions. */
@media (max-width: 767px) {
  .site-header-top > .max-w-\[1400px\],
  .site-header-top > .max-w-\[1200px\],
  .auth-site-header > div {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: 42px 44px !important;
    align-items: center !important;
    column-gap: 10px !important;
    row-gap: 8px !important;
    min-height: 102px !important;
    height: 102px !important;
    padding: 6px 12px 8px !important;
  }

  /* User requested the top Catalog button removed. Catalog remains in bottom navigation. */
  .osuz-catalog-button,
  [data-osuz-catalog-toggle] {
    display: none !important;
  }

  .site-header-top .header-brand,
  .site-header-top > div > a:first-child,
  .auth-site-header > div > a:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    display: inline-flex !important;
  }

  .osuz-mobile-header-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* These actions already exist in the fixed bottom nav; never duplicate them in mobile header. */
  .site-header-top .osuz-mobile-header-actions > a,
  .site-header-top .osuz-mobile-header-actions > [data-customer-account-link],
  .site-header-top .osuz-mobile-header-actions > [data-open-cart],
  .auth-site-header .osuz-mobile-header-actions > a,
  .auth-site-header .osuz-mobile-header-actions > [data-customer-account-link],
  .auth-site-header .osuz-mobile-header-actions > [data-open-cart],
  .osuz-mobile-header-actions > #mobileMenuBtn {
    display: none !important;
  }

  /* Only language and theme stay in the mobile header. */
  .osuz-mobile-header-actions .osuz-language-select-wrap,
  .osuz-mobile-header-actions .osuz-language-wrap,
  .osuz-mobile-header-actions #languageToggle,
  .osuz-mobile-header-actions #languageButton,
  .osuz-mobile-header-actions #categoryLanguageToggle,
  .osuz-mobile-header-actions #themeToggle,
  .osuz-mobile-header-actions #categoryThemeToggle {
    display: inline-flex !important;
  }

  .osuz-header-search {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 44px !important;
    margin: 0 !important;
  }

  .site-header-nav { display: none !important; }
  .osuz-catalog-panel { top: 102px !important; }
}

@media (max-width: 350px) {
  .site-header-top > .max-w-\[1400px\],
  .site-header-top > .max-w-\[1200px\],
  .auth-site-header > div { padding-left: 9px !important; padding-right: 9px !important; }
}

