﻿/* ============================================================================
   header-2026.css  —  ksport  ·  Header + Menu  (rebuilt from reference)
   Consumes tokens from base-2026.css. Presentation only.
   The top announcement bar is intentionally left untouched.
   ========================================================================== */

/* ─── TOP ANNOUNCEMENT TICKER (kept as-is, structure only) ─────────────────── */
.topbar-divider { width: 1px; height: 16px; background: rgba(255,255,255,.35); flex-shrink: 0; }
.ann-ticker { position: relative; display: flex; align-items: center; overflow: hidden; min-width: 0; }
.ann-ticker .ann-item {
    display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; opacity: 0; transition: opacity .4s ease;
}
.ann-ticker .ann-item.active { display: inline-block; opacity: 1; }
.ann-ticker a.ann-link:hover { text-decoration: underline; }

/* ═══════════════════════  HEADER SHELL  ═══════════════════════════════════ */
.site-header {
    position: sticky; top: 0; z-index: 99999; width: 100%;   /* above overlay(99000) & announcement bar(99998) so the nested fixed drawer paints on top; search panel(100000) stays above */
    background: var(--surface);
    box-shadow: 0 1px 0 var(--border);
}
.site-header.tm-scrolled { box-shadow: var(--sh-sm); }

.site-header,
.site-header.active {
    height: auto;
    transition: box-shadow var(--dur) var(--ease);
}

/* ═══════════════════════  ROW 1 · MAIN  ═══════════════════════════════════ */
.hdr-main { background: var(--surface); }
.hdr-main .container {
    display: flex; align-items: center; gap: 24px;
    height: 8rem;
}

/* Logo */
.hdr-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.hdr-logo img { width: 100%; height: auto; max-height: 4.6rem; object-fit: contain; }
.hdr-logo.logo-des { width: 130px; }
.hdr-logo.logo-mob { width: 92px; }

/* Search — compact pill, right after the logo; actions pushed to the far (left) end */
.hdr-search-box { flex: 0 1 460px; min-width: 0; display: flex; justify-content: flex-start; }
.hdr-actions { margin-inline-start: auto; }
.hdr-search {
    display: flex; align-items: center; gap: 12px;
    width: 100%; max-width: 460px;
    height: 4.6rem;
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    padding: 0 1rem 0 1.8rem;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hdr-search:focus-within {
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(132, 174, 167, .14);
}
/* input first (right), magnifier pushed to the left end.
   Higher specificity than base-2026 input styles → kills the inner box/border. */
.hdr-search .hdr-search-input {
    order: 1; flex: 1; min-width: 0;
    border: 0 !important; outline: 0; background: transparent !important;
    box-shadow: none !important; height: auto;
    font-size: 1.4rem; color: var(--text); padding: 0;
}
.hdr-search .hdr-search-input::placeholder { color: var(--muted); }
.hdr-search-clear { order: 2; color: var(--muted); font-size: 1.7rem; cursor: pointer; flex-shrink: 0; }
.hdr-search-clear:hover { color: var(--accent); }
.hdr-search-icon {
    order: 3; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.4rem; height: 3.4rem; border-radius: 50%;
    color: var(--muted); font-size: 1.8rem;
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hdr-search:focus-within .hdr-search-icon { color: #fff; background: var(--accent-600); }

/* Theme toggle — matches the account icon buttons */
.tm-theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 4.4rem; height: 4.4rem; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--primary); font-size: 1.8rem; cursor: pointer; padding: 0;
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.tm-theme-toggle:hover { border-color: var(--accent); color: var(--accent-600); background: var(--accent-50); }

/* Actions cluster */
.hdr-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* Cart — pill widget */
.hdr-cart {
    display: inline-flex; align-items: center; gap: 10px; position: relative;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-pill); padding: .85rem 1.4rem;
    color: var(--text); font-size: 1.3rem; font-weight: var(--fw-medium);
    box-shadow: var(--sh-xs);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.hdr-cart:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.hdr-cart-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.4rem; height: 3.4rem; border-radius: 50%;
    background: var(--accent-50); color: var(--accent-600); font-size: 1.9rem;
}
.hdr-cart-text { color: var(--accent-600); font-weight: var(--fw-semi); white-space: nowrap; }
.hdr-cart .cart-count-badge {
    position: absolute; top: -4px; left: -4px;
    min-width: 2rem; height: 2rem; padding: 0 .5rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-600) !important; color: #fff !important;
    border-radius: var(--r-pill); font-size: 1.1rem; font-weight: var(--fw-bold);
    box-shadow: var(--sh-accent);
}

/* Account — icon circle */
.hdr-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 4.4rem; height: 4.4rem; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--primary); font-size: 1.9rem;
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hdr-icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* Account dropdown (authenticated user) */
.hdr-account { position: relative; }
.hdr-account > .hdr-icon-btn { cursor: pointer; }

/* Signed in: the circle alone looked identical to the signed-out state, so the
   button carries the name. The green dot is what survives on mobile, where the
   name is hidden for width. */
.hdr-account-btn {
    display: inline-flex; align-items: center; gap: .8rem;
    padding: .5rem 1.4rem .5rem .6rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-pill); cursor: pointer; color: var(--text);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hdr-account-btn:hover { border-color: var(--primary); background: var(--primary-50); }

.hdr-account-ic {
    position: relative; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.4rem; height: 3.4rem; border-radius: 50%;
    background: var(--primary-50); color: var(--primary); font-size: 1.7rem;
}
.hdr-account-ic::after {
    content: ""; position: absolute; inset-block-end: 0; inset-inline-end: 0;
    width: 1rem; height: 1rem; border-radius: 50%;
    background: #16a34a; border: 2px solid var(--surface);
}

.hdr-account-name {
    display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2;
    font-size: 1.3rem; font-weight: var(--fw-semi); white-space: nowrap;
    max-width: 12rem; overflow: hidden; text-overflow: ellipsis;
}
.hdr-account-name small { font-size: 1.1rem; font-weight: 400; color: var(--muted); }
.hdr-account-menu {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 90;
    min-width: 210px; padding: .8rem; list-style: none;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); box-shadow: var(--sh-lg);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.hdr-account:hover .hdr-account-menu,
.hdr-account.open .hdr-account-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hdr-account-menu::before {
    content: ""; position: absolute; top: -6px; inset-inline-end: 1.4rem;
    width: 12px; height: 12px; background: var(--surface);
    border-inline-start: 1px solid var(--border); border-top: 1px solid var(--border);
    transform: rotate(45deg);
}
.hdr-account-menu a {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.2rem; border-radius: var(--r-sm);
    color: var(--text); font-size: 1.35rem; font-weight: var(--fw-medium);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hdr-account-menu a i { font-size: 1.7rem; color: var(--primary); flex-shrink: 0; }
.hdr-account-menu a:hover { background: var(--primary-50); color: var(--primary); }
.hdr-account-menu a:hover i { color: var(--primary); }
.hdr-account-menu a.is-logout { margin-top: .4rem; border-top: 1px solid var(--border); border-radius: 0 0 var(--r-sm) var(--r-sm); color: var(--danger); }
.hdr-account-menu a.is-logout i { color: var(--danger); }
.hdr-account-menu a.is-logout:hover { background: rgba(220, 53, 69, .08); color: var(--danger); }

/* Login solid button (authenticated / guest) */
.hdr-login {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary); color: #fff; font-size: 1.3rem; font-weight: var(--fw-semi);
    padding: 1.05rem 1.8rem; border-radius: var(--r-pill);
    transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
    white-space: nowrap;
}
.hdr-login:hover { background: var(--primary-600); color: #fff; transform: translateY(-1px); }
.hdr-login.is-accent { background: var(--accent-600); box-shadow: var(--sh-accent); }
.hdr-login.is-accent:hover { background: var(--accent-600); }
.hdr-logout {
    display: inline-flex; align-items: center; gap:6px;
    border: 1px solid var(--border-2); color: var(--text-2); background: var(--surface);
    font-size: 1.3rem; padding: 1.05rem 1.6rem; border-radius: var(--r-pill);
    transition: all var(--dur) var(--ease);
}
.hdr-logout:hover { border-color: var(--danger); color: var(--danger); }

/* ═══════════════════════  ROW 2 · NAV BAR  ════════════════════════════════ */
.hdr-nav {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(23, 59, 108, .06);
}
.hdr-nav .container {
    position: relative;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    height: 5.4rem;
}
.hdr-nav-right { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* Categories launcher */
.hdr-cats-wrap { position: static; }   /* mega-panel resolves to .container */
.hdr-cats {
    display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
    background: var(--primary-50); color: var(--primary);
    font-size: 1.4rem; font-weight: var(--fw-bold);
    padding: 1rem 1.8rem; border-radius: var(--r-md);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
    margin-inline-end: 8px;
}
.hdr-cats-wrap:hover .hdr-cats { background: var(--primary); color: #fff; }
.hdr-cats > i { font-size: 1.9rem; color: var(--accent); transition: color var(--dur) var(--ease); }
.hdr-cats-wrap:hover .hdr-cats > i { color: #fff; }
.hdr-cats-caret { font-size: 1.4rem !important; transition: transform var(--dur) var(--ease); }
.hdr-cats-wrap:hover .hdr-cats-caret { transform: rotate(180deg); }

/* ═══════════════════════  MEGA MENU  ══════════════════════════════════════ */
.megamenu {
    position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 70;
    display: flex; gap: 0; min-height: 420px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.hdr-cats-wrap:hover .megamenu { opacity: 1; visibility: visible; transform: translateY(0); }

/* Right rail — top-level categories (order:1 → right side in RTL) */
.mega-rail {
    flex: 0 0 250px; padding: 1.4rem; background: var(--surface);
    border-inline-end: 1px solid var(--border); order: 1;
    display: flex; flex-direction: column; gap: 2px;
}
.mega-rail-item {
    display: flex; align-items: center; gap: 12px;
    padding: 1.15rem 1.4rem; border-radius: var(--r-md);
    color: var(--text); font-size: 1.4rem; font-weight: var(--fw-medium);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.mega-rail-item > i:first-child { font-size: 2rem; color: var(--muted); flex-shrink: 0; transition: color var(--dur) var(--ease); }
.mega-rail-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-rail-arrow { font-size: 1.5rem; color: var(--border-2); opacity: 0; transition: opacity var(--dur) var(--ease); }
.mega-rail-item:hover, .mega-rail-item.active {
    background: var(--primary-50); color: var(--primary);
}
.mega-rail-item:hover > i:first-child, .mega-rail-item.active > i:first-child { color: var(--primary); }
.mega-rail-item:hover .mega-rail-arrow, .mega-rail-item.active .mega-rail-arrow { opacity: 1; color: var(--accent); }

/* Body — subcategory columns (order:2 → left side in RTL) */
.mega-body { flex: 1; min-width: 0; padding: 3rem 3.4rem; order: 2; position: relative; }
.mega-panel { display: none; }
.mega-panel.active { display: block; animation: megaFade .25s var(--ease); }
@keyframes megaFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mega-cols { column-count: 3; column-gap: 3rem; }
@media (max-width: 1200px) { .mega-cols { column-count: 2; } }
.mega-group { break-inside: avoid; margin-bottom: 2.4rem; display: inline-block; width: 100%; }
.mega-group-title {
    display: flex; align-items: center; gap: 8px; margin-bottom: 1rem;
    color: var(--ink); font-size: 1.45rem; font-weight: var(--fw-bold);
    padding-bottom: .9rem; border-bottom: 1px solid var(--border);
}
.mega-group-title:hover { color: var(--accent); }
.mega-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.mega-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.mega-links a {
    display: block; padding: .55rem 0 .55rem 1.5rem;
    color: var(--text-2); font-size: 1.35rem;
    transition: color var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.mega-links a:hover { color: var(--primary); padding-inline-start: 2.2rem; }
.mega-empty { display: flex; align-items: center; height: 100%; }
.mega-empty a { color: var(--primary); font-size: 1.5rem; font-weight: var(--fw-semi); }

/* Main menu (nod-1 horizontal) */
.hdr-nav .nod-1 {
    display: flex; align-items: center; gap: 4px;
    list-style: none; margin: 0; padding: 0; min-width: 0;
}
.hdr-nav .nod-1 > li { position: relative; }
.hdr-nav .nod-1 > li > a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 1rem 1.4rem; border-radius: var(--r-sm);
    color: var(--text); font-size: 1.4rem; font-weight: var(--fw-medium);
    position: relative; white-space: nowrap;
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hdr-nav .nod-1 > li > a::after {
    content: ""; position: absolute; inset-inline: 1.4rem; bottom: .4rem; height: 2px;
    background: var(--accent); border-radius: 2px;
    transform: scaleX(0); transform-origin: center; transition: transform var(--dur) var(--ease);
}
.hdr-nav .nod-1 > li:hover > a,
.hdr-nav .nod-1 > li.active > a { color: var(--primary); }
.hdr-nav .nod-1 > li:hover > a::after,
.hdr-nav .nod-1 > li.active > a::after { transform: scaleX(1); }
/* chevron for items with children */
.hdr-nav .nod-1 > li:has(.nod-2) > a::before {
    content: "\203A"; display: inline-block; transform: rotate(90deg);
    font-size: 1.6rem; line-height: 0; color: var(--muted); margin-inline-start: 2px;
}

/* Dropdowns */
.hdr-nav .nod-2, .hdr-nav .nod-3 {
    position: absolute; top: 100%; inset-inline-start: 0; z-index: 60;
    min-width: 210px; list-style: none; margin: 8px 0 0; padding: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); box-shadow: var(--sh-lg);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.hdr-nav .nod-1 > li:hover > .nod-2 { opacity: 1; visibility: visible; transform: translateY(0); }
.hdr-nav .nod-2 > li { position: relative; }
.hdr-nav .nod-2 a, .hdr-nav .nod-3 a {
    display: flex; align-items: center; gap: 8px;
    padding: .95rem 1.2rem; border-radius: var(--r-sm);
    color: var(--text); font-size: 1.35rem; white-space: nowrap;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hdr-nav .nod-2 a:hover, .hdr-nav .nod-3 a:hover { background: var(--primary-50); color: var(--primary); }
.hdr-nav .nod-3 { top: 0; inset-inline-start: 100%; margin: 0 8px 0 0; }
.hdr-nav .nod-2 > li:hover > .nod-3 { opacity: 1; visibility: visible; transform: translateY(0); }
.hdr-nav .nod-1 i, .hdr-nav .nod-2 i { color: var(--primary); }

/* Quick links (left secondary — DB TopMenu → ul.top-menu-list) */
.hdr-quicklinks { flex-shrink: 0; }
.hdr-quicklinks .top-menu-list {
    display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0;
}
.hdr-quicklinks .top-menu-list > li { position: relative; }
.hdr-quicklinks .top-menu-list > li:not(:last-child)::after {
    content: ""; position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%);
    width: 1px; height: 1.4rem; background: var(--border-2);
}
.hdr-quicklinks .top-menu-list a {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted); font-size: 1.3rem; padding: 0 1.4rem;
    transition: color var(--dur) var(--ease);
}
.hdr-quicklinks .top-menu-list a:hover { color: var(--primary); }
.hdr-quicklinks .top-menu-list i { color: var(--primary); }

/* ═══════════════════════  LIVE SEARCH RESULTS PANEL  ══════════════════════ */
.site-search-results {
    position: fixed; max-height: 70vh; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); box-shadow: var(--sh-lg);
    z-index: 100000; padding: 6px 0; text-align: right; direction: rtl;
}
.ssr-section-title { font-size: 1.15rem; color: var(--primary); font-weight: var(--fw-bold); padding: 8px 14px 4px; margin: 0; }
.ssr-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--text); transition: background .12s; }
.ssr-item:hover, .ssr-item.active { background: var(--primary-50); color: var(--primary); }
.ssr-item img { width: 42px; height: 42px; object-fit: cover; border-radius: var(--r-xs); background: var(--surface-2); flex-shrink: 0; }
.ssr-item .ssr-ph { width: 42px; height: 42px; border-radius: var(--r-xs); flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); font-size: 18px; }
.ssr-item .ssr-texts { min-width: 0; }
.ssr-item .ssr-title { font-size: 1.3rem; font-weight: var(--fw-semi); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ssr-item .ssr-sub { font-size: 1.1rem; color: var(--muted); }
.ssr-footer { border-top: 1px solid var(--border); margin-top: 4px; padding: 4px 6px 2px; }
.ssr-footer a { display: block; text-align: center; padding: 9px; border-radius: var(--r-sm); background: var(--accent-600); color: #fff; font-size: 1.3rem; font-weight: var(--fw-semi); }
.ssr-footer a:hover { background: var(--accent-600); }
.ssr-empty { padding: 18px 14px; text-align: center; color: var(--muted); font-size: 1.3rem; }
.ssr-loading { padding: 18px 14px; text-align: center; color: var(--muted); font-size: 1.3rem; }

/* ═══════════════════════  MOBILE HAMBURGER  ═══════════════════════════════ */
.mobile__nav--bar { cursor: pointer; padding: 6px; }
.mobile__nav--bar-items { width: 26px; display: flex; flex-direction: column; gap: 5px; }
.mobile__nav--bar-items .line { display: block; height: 2px; width: 100%; background: var(--primary); border-radius: 2px; transition: all var(--dur) var(--ease); }

/* ═══════════════════════  RESPONSIVE  ═════════════════════════════════════ */
.hide-des { display: none !important; }
@media (max-width: 991px) {
    .hide-mob { display: none !important; }
    .hide-des { display: inline-flex !important; }

    /* Row 1 wraps: [☰ hamburger  logo … cart · account · theme] then full-width search */
    .hdr-main .container {
        height: auto; flex-wrap: wrap; gap: 10px;
        padding-top: 1rem; padding-bottom: 1rem;
    }
    .mobile__nav--bar  { order: 1; }                              /* hamburger pinned right (RTL start) */
    .hdr-logo.logo-mob { order: 2; }
    .hdr-actions       { order: 3; margin-inline-start: auto; gap: 8px; }  /* actions pushed to left end */
    .hdr-search-box    { order: 10; flex: 1 0 100%; max-width: none; }
    .hdr-search        { max-width: none; height: 4.4rem; }

    /* compact action chrome on mobile */
    .hdr-cart-text { display: none; }
    .hdr-cart { padding: .7rem; }
    .tm-theme-toggle, .hdr-icon-btn { width: 4rem; height: 4rem; }
    .hdr-account-name { display: none; }
    .hdr-account-btn { padding: .4rem; gap: 0; }
    .hdr-account-ic { width: 3.2rem; height: 3.2rem; }
    .hdr-login span, .hdr-login .hdr-login-text { display: none; }

    /* keep hdr-nav in DOM (holds the mobile slide-in menu) but strip its bar chrome */
    .hdr-nav { border: 0; background: transparent; box-shadow: none; }
    .hdr-nav .container { height: auto; min-height: 0; padding-block: 0; }
    .hdr-cats, .hdr-quicklinks { display: none; }
}
@media (min-width: 992px) {
    .hide-des { display: none !important; }
}

/* ══════════════════════  MOBILE CATEGORY DRAWER  ═════════════════════════ */

.kmob-root { position: static; }

.kmob-drawer {
    position: fixed; top: 0; right: -34rem;                 /* closed (physical) */
    width: 34rem; max-width: 92vw; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column;
    background: var(--surface); z-index: 100001;
    border-inline-start: 1px solid var(--border);
    box-shadow: -1rem 0 3rem rgba(12, 31, 63, .12);
    transition: right .3s var(--ease);
}
.kmob-drawer.is-open { right: 0; }

/* full-screen dim behind the drawer (override legacy .overlay{top:140px}) */
.overlay {
    top: 0; right: 0; width: 100%; height: 100vh; height: 100dvh;
    background: rgba(12, 31, 63, .5); opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.overlay.show { opacity: 1; visibility: visible; z-index: 99000; }  /* below header context (99500) → drawer stays on top; above page */

.kmob-head {
    flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 1.2rem 1.6rem; border-bottom: 1px solid var(--border);
}
.kmob-logo { margin-inline: auto; display: inline-flex; }
.kmob-logo img { max-height: 4.4rem; width: auto; }
.kmob-close {
    flex-shrink: 0; border: 0; background: transparent; cursor: pointer;
    width: 3.4rem; height: 3.4rem; border-radius: 50%; color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.kmob-close:hover { background: var(--surface-2); color: var(--ink); }

.kmob-body { flex: 1 1 auto; min-height: 0; display: flex; }

.kmob-tabs {
    flex: 0 0 8rem; overflow-y: auto; -webkit-overflow-scrolling: touch;
    border-inline-start: 1px solid var(--border); background: var(--surface-2);
}
.kmob-tab {
    width: 100%; border: 0; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .7rem; padding: 1.4rem .4rem; font-family: inherit;
    font-size: 1.1rem; line-height: 1.5; color: var(--text);
    border-bottom: 1px solid var(--border);
}
.kmob-tab-ic {
    width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--surface);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 1.6rem;
}
.kmob-tab.is-active { background: var(--surface); color: var(--primary); font-weight: var(--fw-bold); }
.kmob-tab.is-active .kmob-tab-ic { background: var(--primary-50); color: var(--primary); }

.kmob-panes { flex: 1 1 auto; min-width: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 1.4rem 1.2rem 4rem; }
.kmob-pane[hidden] { display: none; }
.kmob-pane-all {
    display: flex; align-items: center; gap: .5rem; margin-bottom: 1.2rem;
    color: var(--primary); font-size: 1.25rem; font-weight: var(--fw-semi);
}

.kmob-acc { background: var(--primary-50); border-radius: var(--r-md, 1.2rem); margin-bottom: 1rem; overflow: hidden; }
.kmob-acc-btn,
.kmob-acc-link {
    width: 100%; border: 0; background: transparent; cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: 1.25rem 1.4rem; text-align: start;
    font-size: 1.25rem; font-weight: var(--fw-medium); color: var(--ink);
}
.kmob-acc-caret { flex-shrink: 0; color: var(--muted); font-size: 1.4rem; transition: transform var(--dur) var(--ease); }
.kmob-acc.is-open .kmob-acc-caret { transform: rotate(180deg); }
.kmob-acc-body { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.kmob-acc-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem;
    padding: .4rem .8rem 1.2rem; border-top: 1px solid var(--border);
}
.kmob-acc-grid a {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    gap: .6rem; padding: 1rem .2rem; text-align: center;
    font-size: 1.05rem; line-height: 1.6; color: var(--text);
}
.kmob-acc-grid a i {
    width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--surface);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 1.4rem;
}
.kmob-acc-grid a:active, .kmob-acc-grid a:hover { color: var(--primary); }

/* ══════════════════════  MOBILE BOTTOM TAB BAR  ══════════════════════════ */

.s2-hd-tabs {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(23, 59, 108, .08);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
@media (min-width: 992px) { .s2-hd-tabs { display: none; } }

.s2-hd-tab {
    position: relative;
    border: 0; background: transparent; cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .3rem; min-height: 5.6rem;
    color: var(--muted); font-size: 1.05rem; text-decoration: none;
}
.s2-hd-tab i { font-size: 2rem; }
.s2-hd-tab.is-active { color: var(--primary); }
.s2-hd-tab .s2-hd-badge {
    position: absolute; top: .6rem; inset-inline-start: 22%;
    min-width: 1.8rem; height: 1.8rem; padding-inline: .4rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill, 999px);
    background: var(--accent-600); color: #fff;
    font-size: 1.05rem; font-weight: var(--fw-bold);
}

@media (max-width: 991px) {
    body { padding-bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px)); }
}
