/* ==========================================================================
   Sonokinetic site header (header-portal.php) and footer (footer.php), sitewide.
   Header scoped under #skh (skh-), footer under #sk-portal-footer (skf-),
   so style.css and Bootstrap don't leak in.
   Desktop >= 1024px: inline menu and dropdowns.
   Instruments opens a full-screen copy of the instrument grid (#skm, bottom of this file).
   Below 1024px: slide-in drawer with accordions.
   ========================================================================== */

#skh {
    --skh-bg: #f5f4f1;
    --skh-panel: #ffffff;
    --skh-text: #17150f;
    --skh-muted: #5f5b53;
    --skh-line: rgba(0, 0, 0, 0.1);
    --skh-hover: rgba(0, 0, 0, 0.05);
    --skh-accent: #f56c26;
    --skh-dark: #24272b;
    --skh-bar-h: 72px;
    position: relative;
    z-index: 1000;
    background: var(--skh-bg);
    color: var(--skh-text);
    border-bottom: 1px solid var(--skh-line);
    font-family: "Mulish", "muli", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}
#skh.skh-flush { border-bottom: 0; }
/* While the cart sidebar (z-index 200) is open, the header drops under it and its
   overlay. js/header-portal.js sets this class and removes it after the slide-out. */
#skh.skh-under { z-index: 0; }
#skh *, #skh *::before, #skh *::after { box-sizing: border-box; }

/* Resets against style.css / Bootstrap globals (orange buttons, list margins, link colour) */
#skh ul { list-style: none; margin: 0; padding: 0; }
#skh h3 { margin: 0; padding: 0; font: inherit; color: inherit; text-transform: none; letter-spacing: 0; }
#skh a { color: inherit; text-decoration: none; }
#skh button {
    -webkit-appearance: none; appearance: none;
    background: none; border: 0; border-radius: 0; margin: 0; padding: 0;
    color: inherit; font: inherit; line-height: inherit; cursor: pointer; box-shadow: none;
}
#skh button:disabled { cursor: default; color: inherit; opacity: 1; }
#skh em { font-style: normal; }
#skh :focus-visible { outline: 2px solid var(--skh-accent); outline-offset: 2px; border-radius: 4px; }
#skh .skh-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Promo strip */
.skh-promo {
    background: #f56c26; color: #fff; text-align: center;
    font: 600 13px/1.4 "Mulish", "muli", system-ui, sans-serif; padding: 8px 16px;
}
.skh-promo a, .skh-promo a:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Bar ---------- */
#skh .skh-bar {
    max-width: 1330px; margin: 0 auto; padding: 0 20px;
    height: var(--skh-bar-h);
    display: flex; align-items: stretch; gap: 28px;
}
#skh .skh-logo { display: flex; align-items: center; flex: none; line-height: 0; }
#skh .skh-logo img { height: 26px; width: auto; display: block; filter: invert(1); }

#skh .skh-nav { flex: 1; display: flex; align-items: stretch; min-width: 0; }
#skh .skh-nav-head { display: none; }
#skh .skh-menu { display: flex; align-items: stretch; gap: 2px; }
#skh .skh-item { position: relative; display: flex; align-items: center; }

#skh .skh-toggle, #skh .skh-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 12px; border-radius: 4px;
    font-size: 14px; font-weight: 600; color: var(--skh-muted);
    white-space: nowrap; transition: color 0.15s ease, background 0.15s ease;
}
#skh .skh-toggle:hover, #skh .skh-link:hover,
#skh .skh-open > .skh-toggle { color: var(--skh-text); background: var(--skh-hover); }
#skh .skh-chev { width: 12px; height: 12px; flex: none; transition: transform 0.2s ease; }
#skh .skh-open > .skh-toggle .skh-chev { transform: rotate(180deg); }

#skh .skh-utils { margin-left: auto; display: flex; align-items: stretch; gap: 6px; }
#skh .skh-currency { display: flex; align-items: center; margin: 0; }
#skh .skh-currency select {
    -webkit-appearance: none; appearance: none;
    height: 34px; padding: 0 28px 0 10px; margin: 0;
    border: 1px solid var(--skh-line); border-radius: 4px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235f5b53' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 9px center / 11px;
    color: var(--skh-text); font: 600 13px/1 "Mulish", "muli", system-ui, sans-serif; cursor: pointer;
}
#skh .skh-currency select:hover { border-color: rgba(0, 0, 0, 0.3); }

/* Cart button */
#skh .skh-cart { display: flex; align-items: center; flex: none; }
#skh .skh-cart a {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 16px; border-radius: 4px;
    background: var(--skh-accent); color: #fff; font-weight: 700; font-size: 14px;
    transition: filter 0.15s ease;
}
#skh .skh-cart a:hover { filter: brightness(1.08); color: #fff; }
#skh .skh-cart svg { width: 18px; height: 18px; }
#skh #cart_badge {
    display: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: #fff; color: var(--skh-accent);
    font: 800 12px/20px "Mulish", "muli", system-ui, sans-serif; text-align: center;
}
#skh #cart_badge.hascontent { display: inline-block; }

#skh .skh-burger { display: none; }
#skh .skh-scrim { display: none; }

/* Badges ("New", "Free") */
#skh .skh-badge {
    display: inline-block; vertical-align: 1px; margin-left: 4px;
    padding: 1px 6px; border-radius: 999px;
    background: var(--skh-accent); color: #fff;
    font-size: 10px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.5;
}

/* ---------- Panels (shared) ---------- */
#skh .skh-panel { display: none; }
#skh .skh-open > .skh-panel { display: block; }

/* Small dropdowns: Learn, Support, Account */
#skh .skh-drop {
    position: absolute; top: 100%; left: 0; min-width: 230px;
    margin-top: -8px; padding: 8px;
    background: var(--skh-panel); border: 1px solid var(--skh-line); border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}
#skh .skh-drop-end { left: auto; right: 0; }
#skh .skh-drop a {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 9px 12px; border-radius: 4px; color: var(--skh-text); font-weight: 500;
}
#skh .skh-drop a:hover { background: var(--skh-hover); color: var(--skh-text); }
#skh .skh-meta { color: var(--skh-muted); font-size: 12px; font-weight: 600; }
#skh #wishlist_badge { display: none; }
#skh #wishlist_badge.hascontent {
    display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--skh-hover); font: 700 12px/20px "Mulish", "muli", system-ui, sans-serif; text-align: center;
}

/* Instruments (opens the full-screen grid), wish list, wide Bundles dropdown */
#skh .skh-grid-ico { width: 12px; height: 12px; fill: currentColor; opacity: 0.75; flex: none; }
#skh .skh-instruments[aria-expanded="true"] { color: var(--skh-text); background: var(--skh-hover); }
#skh .skh-wish { position: relative; gap: 4px; }
#skh .skh-wish svg { width: 19px; height: 19px; flex: none; }
#skh .skh-wish-label {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
#skh .skh-wish #wishlist_badge.hascontent {
    background: var(--skh-accent); color: #fff; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 5px;
}
#skh .skh-drop-wide { min-width: 320px; }
#skh .skh-drop-wide li:first-child a { font-weight: 700; }
#skh .skh-drop-wide .skh-meta { color: var(--skh-accent); font-weight: 700; }
#skh .skh-drop-wide li:nth-last-child(2) { border-top: 1px solid var(--skh-line); margin-top: 6px; padding-top: 6px; }

/* Narrower desktops: tighter spacing */
@media (min-width: 1024px) and (max-width: 1180px) {
    #skh .skh-bar { gap: 16px; }
    #skh .skh-toggle, #skh .skh-link { padding: 9px 9px; }
}

/* ==========================================================================
   Mobile / tablet: drawer
   ========================================================================== */
@media (max-width: 1023.98px) {
    #skh { --skh-bar-h: 60px; }
    #skh .skh-bar { gap: 10px; padding: 0 16px; align-items: center; }
    #skh .skh-logo { margin-right: auto; }
    #skh .skh-logo img { height: 22px; }

    /* Cart: icon + count */
    #skh .skh-cart a { height: 40px; padding: 0 12px; gap: 6px; }
    #skh .skh-cart-label { display: none; }

    #skh .skh-burger {
        display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
        width: 44px; height: 44px; margin-right: -8px; border-radius: 4px;
    }
    #skh .skh-burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--skh-text); }

    /* Drawer */
    #skh .skh-nav {
        position: fixed; top: 0; right: 0; bottom: 0; z-index: 1002;
        width: min(400px, 100%);
        display: block; overflow-y: auto; overscroll-behavior: contain;
        background: var(--skh-bg);
        box-shadow: -24px 0 48px rgba(0, 0, 0, 0.18);
        transform: translateX(100%); visibility: hidden;
        transition: transform 0.25s ease, visibility 0s linear 0.25s;
        padding-bottom: 32px;
    }
    #skh.skh-drawer-open .skh-nav { transform: none; visibility: visible; transition: transform 0.25s ease; }
    /* Above the cookie bar (1010) while open, below the login modal (1060) */
    #skh.skh-drawer-open { z-index: 1050; }
    #skh .skh-scrim {
        display: block; position: fixed; inset: 0; z-index: 1001;
        background: rgba(0, 0, 0, 0.45);
    }
    #skh .skh-scrim[hidden] { display: none; }

    #skh .skh-nav-head {
        position: sticky; top: 0; z-index: 1;
        display: flex; align-items: center; justify-content: space-between;
        height: 60px; padding: 0 8px 0 16px;
        background: var(--skh-bg); border-bottom: 1px solid var(--skh-line);
        font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--skh-muted);
    }
    #skh .skh-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 4px; }
    #skh .skh-close svg { width: 18px; height: 18px; }

    #skh .skh-menu { display: block; }
    #skh .skh-item { display: block; border-bottom: 1px solid var(--skh-line); }
    #skh .skh-toggle, #skh .skh-link {
        display: flex; justify-content: space-between; width: 100%;
        min-height: 54px; padding: 0 16px; border-radius: 0;
        font-size: 17px; font-weight: 700; color: var(--skh-text);
    }
    #skh .skh-toggle:hover, #skh .skh-link:hover, #skh .skh-open > .skh-toggle { background: transparent; }
    #skh .skh-chev { width: 14px; height: 14px; }

    /* Panels become inline accordions */
    #skh .skh-drop {
        position: static; margin: 0; min-width: 0; max-height: none; overflow: visible;
        background: transparent; border: 0; border-radius: 0; box-shadow: none;
        padding: 0 16px 14px;
    }
    #skh .skh-drop a { padding: 11px 0; font-size: 15px; color: var(--skh-muted); }
    #skh .skh-drop a:hover { background: transparent; }

    /* Wish list as a full row in the drawer */
    #skh .skh-utils > .skh-wish { border-bottom: 1px solid var(--skh-line); justify-content: flex-start; gap: 10px; }
    #skh .skh-wish-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
    #skh .skh-wish #wishlist_badge.hascontent { margin-left: auto; }
    #skh .skh-drop-wide { min-width: 0; }

    /* Account, login and currency at the bottom of the drawer */
    #skh .skh-utils { display: block; margin: 0; }
    #skh .skh-utils > .skh-login { border-bottom: 1px solid var(--skh-line); }
    #skh .skh-currency { justify-content: space-between; padding: 16px; }
    #skh .skh-currency .skh-sr {
        position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto;
        font-size: 15px; font-weight: 600; color: var(--skh-muted);
    }
    #skh .skh-currency select { height: 40px; font-size: 15px; }
}

/* ==========================================================================
   Footer (footer.php): light band with the orange contrast bar on top
   ========================================================================== */
#sk-portal-footer {
    --skf-text: #17150f;
    --skf-muted: #5f5b53;
    --skf-faint: #8a857b;
    --skf-line: rgba(0, 0, 0, 0.08);
    position: relative; clear: both;
    margin: 0; padding: 0 20px;
    background: #f5f4f1; color: var(--skf-text);
    font-family: "Mulish", "muli", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    text-align: left; -webkit-font-smoothing: antialiased;
}
#sk-portal-footer *, #sk-portal-footer *::before, #sk-portal-footer *::after { box-sizing: border-box; }
#sk-portal-footer::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
    background: linear-gradient(to bottom, #f56c26 0 2px, #24272b 2px 4px, #f56c26 4px 10px);
}
#sk-portal-footer .skf-inner {
    max-width: 1290px; margin: 0 auto; padding: 64px 0 32px;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
#sk-portal-footer .skf-wordmark { display: inline-block; line-height: 0; }
#sk-portal-footer .skf-wordmark img { height: 46px; width: auto; display: block; filter: invert(1); }
#sk-portal-footer .skf-inner p { color: var(--skf-muted); font-size: 14px; line-height: 1.6; margin: 14px 0 0; max-width: 360px; }
#sk-portal-footer h4 {
    font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--skf-text); margin: 4px 0 14px; padding: 0;
}
#sk-portal-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
#sk-portal-footer li { margin: 0; padding: 0; background: none; }
#sk-portal-footer a { color: var(--skf-muted); text-decoration: none; font-size: 14px; }
#sk-portal-footer a:hover { color: var(--skf-text); }
#sk-portal-footer .skf-base {
    max-width: 1290px; margin: 0 auto; padding: 20px 0 40px;
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
    color: var(--skf-faint); font-size: 13px; border-top: 1px solid var(--skf-line);
}
#sk-portal-footer .skf-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
#sk-portal-footer .skf-legal a { color: inherit; font-size: 13px; }
#sk-portal-footer .skf-legal a:hover { color: var(--skf-text); }
@media (max-width: 900px) {
    #sk-portal-footer .skf-inner { grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 52px; }
    #sk-portal-footer .skf-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    #sk-portal-footer { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 480px) {
    #sk-portal-footer .skf-inner { grid-template-columns: 1fr; gap: 28px; }
    #sk-portal-footer .skf-base { flex-direction: column; }
}

/* Lock page scroll while the drawer or the instruments menu is open */
html.skh-lock, html.skh-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    #skh .skh-nav, #skh .skh-chev, .skm { transition: none !important; }
}

/* ==========================================================================
   Instruments menu: full-screen copy of the homepage grid (#skm)
   The grid inside (#skm-portal) is styled by css/home-portal.css, which
   js/header-portal.js loads the first time the menu opens.
   ========================================================================== */
.skm {
    position: fixed; inset: 0; z-index: 1040;
    display: flex; flex-direction: column;
    background: #24272b; color: #f3f1ec;
    font-family: "Mulish", "muli", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    text-align: left; -webkit-font-smoothing: antialiased;
    animation: skm-in 0.2s ease;
}
.skm[hidden] { display: none; }
@keyframes skm-in { from { opacity: 0; transform: translateY(10px); } }
.skm *, .skm *::before, .skm *::after { box-sizing: border-box; }

/* Light band on top, with the portal's orange contrast bar under it */
.skm-head {
    position: relative; flex: none;
    display: flex; align-items: center; gap: 28px;
    padding: 18px max(20px, calc((100% - 1290px) / 2)) 26px;
    background: #f5f4f1; color: #17150f;
}
.skm-head::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
    background: linear-gradient(to bottom, #f56c26 0 6px, #24272b 6px 8px, #f56c26 8px 10px);
}
.skm-titles { min-width: 0; }
.skm-eyebrow {
    display: block; margin-bottom: 4px;
    font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #f56c26;
}
.skm h2 {
    margin: 0; padding: 0; color: #17150f; text-transform: none; letter-spacing: -0.02em;
    font: 800 28px/1.1 "Montserrat Alternates", "Mulish", system-ui, sans-serif;
}
.skm-hint { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: #5f5b53; }
.skm-hint-touch { display: none; }
@media (hover: none) {
    .skm-hint-pointer { display: none; }
    .skm-hint-touch { display: block; }
}
.skm-links { margin-left: auto; display: flex; gap: 6px; }
.skm-links a {
    padding: 9px 12px; border-radius: 4px;
    color: #5f5b53; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.skm-links a:hover { color: #17150f; background: rgba(0, 0, 0, 0.05); }
.skm .skm-close {
    -webkit-appearance: none; appearance: none; flex: none;
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; margin: 0; padding: 0 14px;
    background: #17150f; color: #fff; border: 0; border-radius: 4px; box-shadow: none;
    font: 700 14px/1 "Mulish", "muli", system-ui, sans-serif; cursor: pointer;
}
.skm .skm-close:hover { background: #000; }
.skm .skm-close svg { width: 14px; height: 14px; }
.skm :focus-visible { outline: 2px solid #f56c26; outline-offset: 2px; }

/* Scrolling area: the sticky filter bar sticks to its top */
.skm-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.skm:not(.skm-ready) #skm-portal { visibility: hidden; height: 0; overflow: hidden; }
#skm-portal .skp-wrap { padding-top: 24px; }

.skm-loading {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin: 0; padding: 80px 20px; color: #a8acb2; font-size: 15px;
}
.skm.skm-ready .skm-loading { display: none; }
.skm-loading span {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: #f56c26;
    animation: skm-spin 0.8s linear infinite;
}
@keyframes skm-spin { to { transform: rotate(360deg); } }

/* The cart sidebar opens on top of the menu (Buy now inside it) */
html.skm-open #cart-overlay { z-index: 1099; }
html.skm-open #cart-sidebar { z-index: 1100; }

@media (max-width: 1023.98px) {
    .skm-links { display: none; }
}
@media (max-width: 720px) {
    .skm-head { gap: 12px; padding: 12px 16px 20px; align-items: flex-start; }
    .skm h2 { font-size: 21px; }
    .skm-hint { font-size: 13px; }
    .skm .skm-close { margin-left: auto; height: 38px; padding: 0 12px; }
}
