/* ===== osuz-mobile-v6-css ===== */
/* V6: compact mobile header. Desktop layout is intentionally untouched. */
@media (max-width: 767px) {
  html, body { overflow-x: hidden; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important; }

  .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(0,1fr) auto !important;
    grid-template-rows: 44px auto !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 8px !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 8px 12px 10px !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;
    min-width: 0 !important;
    gap: 7px !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: 28px !important;
    width: auto !important;
  }

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

  .osuz-catalog-button {
    grid-column: 2 !important;
    grid-row: 1 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 11px !important;
    gap: 6px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    box-shadow: none !important;
  }
  .osuz-catalog-button svg { width: 17px !important; height: 17px !important; }

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

  /* Account/cart/orders are already in the bottom bar, so don't duplicate them in the top bar. */
  .osuz-mobile-header-actions [data-customer-account-link],
  .osuz-mobile-header-actions a[href="orders.html"],
  .osuz-mobile-header-actions a[data-open-cart],
  .osuz-mobile-header-actions #mobileMenuBtn,
  .auth-site-header .osuz-mobile-header-actions > a[href="index.html"] {
    display: none !important;
  }

  .osuz-language-wrap { display: block !important; }
  .osuz-mobile-header-actions .header-action,
  .osuz-mobile-header-actions .auth-header-action {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    gap: 0 !important;
    font-size: 0 !important;
    flex-direction: row !important;
    transform: none !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: 19px !important;
    height: 19px !important;
    transform: none !important;
    margin: 0 !important;
  }

  .osuz-mobile-header-actions .osuz-language-wrap .header-action,
  .osuz-mobile-header-actions .osuz-language-select-wrap {
    width: 56px !important;
    min-width: 56px !important;
    padding: 0 5px !important;
    gap: 4px !important;
  }
  .osuz-mobile-header-actions .osuz-lang-label::before,
  .osuz-mobile-header-actions .osuz-lang-flag-only::before {
    width: 23px !important;
    height: 15px !important;
    border-radius: 3px !important;
  }
  .osuz-mobile-header-actions .osuz-lang-label,
  .osuz-mobile-header-actions .osuz-lang-code {
    font-size: 9px !important;
    line-height: 1 !important;
  }
  .osuz-mobile-header-actions .osuz-language-wrap .header-action > svg {
    width: 12px !important;
    height: 12px !important;
  }

  /* Search is the only second row in the mobile header. */
  .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: 11px !important;
    box-shadow: none !important;
  }
  .osuz-header-search svg { width: 18px !important; height: 18px !important; margin-left: 12px !important; }
  .osuz-header-search input { font-size: 14px !important; padding: 0 10px !important; }
  .osuz-header-search button { height: 44px !important; padding: 0 16px !important; font-size: 14px !important; }

  .mobile-top-search-wrap,
  .osuz-mobile-search-row {
    display: block !important;
    width: 100% !important;
    background: #067890 !important;
    padding: 0 12px 10px !important;
    margin: 0 !important;
  }
  .mobile-top-search-shell,
  .osuz-mobile-search-row > .relative > div:first-child {
    height: 44px !important;
    border-radius: 11px !important;
    box-shadow: none !important;
  }
  .mobile-top-search-btn,
  #mobileCategorySearchButton {
    height: 44px !important;
    padding: 0 16px !important;
    border-radius: 0 10px 10px 0 !important;
  }

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

  /* Fullscreen catalog sits below the complete two-row mobile header. */
  .osuz-catalog-panel {
    top: 106px !important;
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-height: none !important;
    transform: none !important;
    grid-template-columns: 1fr !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }
  .osuz-catalog-left { max-height: 46% !important; }
  .osuz-catalog-right { min-height: 0 !important; padding: 16px !important; }
  .osuz-catalog-subs { grid-template-columns: 1fr 1fr !important; gap: 6px !important; }

  /* Cleaner bottom navigation, with safe-area support. */
  .osuz-mobile-bottom-final {
    height: calc(62px + env(safe-area-inset-bottom)) !important;
    padding: 4px 4px env(safe-area-inset-bottom) !important;
    background: rgba(255,255,255,.96) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    backdrop-filter: blur(16px) !important;
    border-top: 1px solid #dbe4ee !important;
    box-shadow: 0 -6px 22px rgba(15,23,42,.08) !important;
  }
  .osuz-mobile-bottom-final a {
    gap: 2px !important;
    min-height: 54px !important;
    border-radius: 10px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    padding: 4px 1px !important;
  }
  .osuz-mobile-bottom-final a svg { width: 21px !important; height: 21px !important; }
  .osuz-mobile-bottom-final a.active {
    background: transparent !important;
    color: #067890 !important;
  }
  .osuz-mobile-bottom-final a.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 24px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: #067890;
    transform: translateX(-50%);
  }
  body.dark-mode .osuz-mobile-bottom-final {
    background: rgba(15,23,34,.96) !important;
    border-color: #344256 !important;
  }
}

