/* ─── Panel-style menu (match BAYAR GG dashboard sidebar) ─── */
.sg-panel-menu-label {
    padding: 6px 12px 8px;
    color: #94a3b8;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 700;
}

.sg-panel-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sg-panel-menu-item,
.sg-nav-dropdown-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    font-family: inherit;
    font-weight: 500;
    font-size: .86rem;
    line-height: 1.2;
    cursor: pointer;
    color: #64748b;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.sg-panel-menu-item i,
.sg-nav-dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #64748b;
    transition: transform .2s ease, color .2s ease, filter .2s ease;
}

.sg-panel-menu-item:hover,
.sg-nav-dropdown-item:hover {
    background: #f5f8ff;
    color: #0f172a;
    border-color: #e2e9f5;
    transform: translateX(4px);
}

.sg-panel-menu-item:hover i,
.sg-nav-dropdown-item:hover i {
    transform: scale(1.12);
    color: #0052ff;
}

.sg-panel-menu-item.is-active,
.sg-nav-dropdown-item.is-active {
    background: linear-gradient(135deg, rgba(0, 82, 255, .10), rgba(0, 82, 255, .05));
    color: #0052ff;
    font-weight: 600;
    border-color: rgba(0, 82, 255, .18);
    box-shadow: 0 4px 16px rgba(0, 82, 255, .10);
}

.sg-panel-menu-item.is-active::before,
.sg-nav-dropdown-item.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #0052ff, #3385ff);
    box-shadow: 0 0 12px rgba(0, 82, 255, .28);
}

.sg-panel-menu-item.is-active i,
.sg-nav-dropdown-item.is-active i {
    color: #0052ff;
    filter: drop-shadow(0 0 8px rgba(0, 82, 255, .25));
}

/* ─── Desktop category dropdown ─── */
.sg-nav-dropdown { position: relative; }

.sg-nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.sg-nav-dropdown-toggle .bi-chevron-down {
    font-size: .72rem;
    transition: transform .2s ease;
}

.sg-nav-dropdown.is-open .sg-nav-dropdown-toggle .bi-chevron-down { transform: rotate(180deg); }

.sg-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 268px;
    padding: 10px;
    border-radius: 18px;
    z-index: 1200;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e2e9f5;
    box-shadow: 0 16px 40px -16px rgba(15, 23, 42, .18);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.sg-nav-dropdown-menu[hidden] { display: none !important; }

.sg-nav-menu-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

/* ─── Mobile menu panel ─── */
.sg-nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #e2e9f5;
}

.sg-nav-mobile[hidden] { display: none !important; }

.sg-nav-mobile-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f5f8ff;
    color: #475569;
    font-weight: 600;
    font-size: .86rem;
    text-decoration: none;
    font-family: inherit;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.sg-nav-mobile-link i {
    width: 20px;
    text-align: center;
    color: #0052ff;
    transition: transform .2s ease;
}

.sg-nav-mobile-link:hover {
    background: #eef3ff;
    color: #0f172a;
    border-color: #d0dcf0;
    transform: translateX(3px);
}

.sg-nav-mobile-link:hover i { transform: scale(1.1); }

.sg-nav-mobile-link.sg-nav-mobile-cta {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 24px -12px rgba(34, 197, 94, .65);
}

.sg-nav-mobile-link.sg-nav-mobile-cta i { color: #fff; }

.sg-nav-mobile-link.sg-nav-mobile-cta:hover {
    transform: translateY(-1px);
    color: #fff;
}

.sg-nav-mobile-group { display: flex; flex-direction: column; gap: 6px; }

.sg-nav-mobile-sub {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    border-radius: 16px;
    margin-top: 2px;
    background: #ffffff;
    border: 1px solid #e2e9f5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.sg-nav-mobile-sub[hidden] { display: none !important; }

.sg-nav-mobile-sub .sg-nav-mobile-link,
.sg-nav-mobile-sub .sg-panel-menu-item {
    font-size: .84rem;
    font-weight: 500;
    padding: 9px 12px;
    background: transparent;
    border-color: transparent;
}

.sg-nav-mobile-sub .sg-nav-mobile-link:hover,
.sg-nav-mobile-sub .sg-panel-menu-item:hover {
    background: #f5f8ff;
    border-color: #e2e9f5;
}

.sg-nav-mobile-toggle {
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.sg-nav-mobile-caret { margin-left: auto; transition: transform .2s ease; }

.sg-nav-mobile-group.is-open .sg-nav-mobile-caret { transform: rotate(180deg); }

/* ─── Footer category list (panel style) ─── */
.sg-footer-list-label {
    list-style: none;
    margin: 12px 0 4px;
    padding: 0 0 0 2px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(226, 239, 255, .52);
}

.sg-footer-list-btn,
.sg-footer-cat-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(226, 239, 255, .62);
    font-size: .86rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.sg-footer-list-btn i,
.sg-footer-cat-link i {
    width: 20px;
    text-align: center;
    color: #4d8aff;
}

.sg-footer-list-btn:hover,
.sg-footer-cat-link:hover {
    background: rgba(255, 255, 255, .06);
    color: #ffffff;
    transform: translateX(3px);
}

/* ─── Light theme ─── */
html[data-theme="light"] .sg-panel-menu-label { color: #94a3b8; }

html[data-theme="light"] .sg-panel-menu-item,
html[data-theme="light"] .sg-nav-dropdown-item { color: #5b616e; }

html[data-theme="light"] .sg-panel-menu-item i,
html[data-theme="light"] .sg-nav-dropdown-item i { color: #64748b; }

html[data-theme="light"] .sg-panel-menu-item:hover,
html[data-theme="light"] .sg-nav-dropdown-item:hover {
    background: #f5f8ff;
    color: #0f172a;
    border-color: #e2e9f5;
}

html[data-theme="light"] .sg-panel-menu-item.is-active,
html[data-theme="light"] .sg-nav-dropdown-item.is-active {
    background: #eef3ff;
    color: #0052ff;
    border-color: transparent;
    box-shadow: none;
}

html[data-theme="light"] .sg-panel-menu-item.is-active::before,
html[data-theme="light"] .sg-nav-dropdown-item.is-active::before {
    background: #0052ff;
    box-shadow: none;
}

html[data-theme="light"] .sg-panel-menu-item.is-active i,
html[data-theme="light"] .sg-nav-dropdown-item.is-active i {
    color: #0052ff;
    filter: none;
}

html[data-theme="light"] .sg-nav-dropdown-toggle,
html[data-theme="light"] .sg-nav-menu-btn { color: #64748b; }

html[data-theme="light"] .sg-nav-dropdown-toggle:hover,
html[data-theme="light"] .sg-nav-menu-btn:hover {
    color: #0f172a;
    background: #eef3ff;
}

html[data-theme="light"] .sg-nav-mobile { border-top-color: #e2e9f5; }

html[data-theme="light"] .sg-nav-mobile-link {
    background: #f5f8ff;
    color: #475569;
}

html[data-theme="light"] .sg-nav-mobile-link i { color: #0052ff; }

html[data-theme="light"] .sg-nav-mobile-sub {
    background: #ffffff;
    border-color: #e2e9f5;
}

html[data-theme="light"] .sg-footer-list-label { color: #94a3b8; }

html[data-theme="light"] .sg-footer-list-btn,
html[data-theme="light"] .sg-footer-cat-link { color: #64748b; }

html[data-theme="light"] .sg-footer-list-btn i,
html[data-theme="light"] .sg-footer-cat-link i { color: #0052ff; }

html[data-theme="light"] .sg-footer-list-btn:hover,
html[data-theme="light"] .sg-footer-cat-link:hover {
    background: #f5f8ff;
    color: #0f172a;
}

/* ─── Dark theme ─── */
html:not([data-theme="light"]) .sg-panel-menu-label { color: rgba(148, 163, 184, .82); }

html:not([data-theme="light"]) .sg-panel-menu-item,
html:not([data-theme="light"]) .sg-nav-dropdown-item { color: rgba(226, 239, 255, .72); }

html:not([data-theme="light"]) .sg-panel-menu-item i,
html:not([data-theme="light"]) .sg-nav-dropdown-item i { color: #6ea8ff; }

html:not([data-theme="light"]) .sg-panel-menu-item:hover,
html:not([data-theme="light"]) .sg-nav-dropdown-item:hover {
    background: rgba(255, 255, 255, .06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, .08);
}

html:not([data-theme="light"]) .sg-panel-menu-item.is-active,
html:not([data-theme="light"]) .sg-nav-dropdown-item.is-active {
    background: linear-gradient(135deg, rgba(0, 82, 255, .14), rgba(0, 82, 255, .07));
    color: #93c5fd;
    border-color: rgba(0, 82, 255, .22);
}

html:not([data-theme="light"]) .sg-panel-menu-item.is-active i,
html:not([data-theme="light"]) .sg-nav-dropdown-item.is-active i {
    color: #6ea8ff;
}

html:not([data-theme="light"]) .sg-nav-dropdown-menu {
    background: rgba(12, 20, 36, .97);
    border-color: rgba(0, 82, 255, .16);
    box-shadow: 0 20px 50px -16px rgba(0, 0, 0, .50);
}

html:not([data-theme="light"]) .sg-nav-dropdown-toggle,
html:not([data-theme="light"]) .sg-nav-menu-btn { color: rgba(226, 239, 255, .74); }

html:not([data-theme="light"]) .sg-nav-dropdown-toggle:hover,
html:not([data-theme="light"]) .sg-nav-menu-btn:hover {
    color: #ffffff;
    background: rgba(0, 82, 255, .14);
}

html:not([data-theme="light"]) .sg-nav-mobile { border-top-color: rgba(255, 255, 255, .08); }

html:not([data-theme="light"]) .sg-nav-mobile-link {
    background: rgba(255, 255, 255, .05);
    color: #dbe7ff;
}

html:not([data-theme="light"]) .sg-nav-mobile-link i { color: #6ea8ff; }

html:not([data-theme="light"]) .sg-nav-mobile-link:hover {
    background: rgba(0, 82, 255, .12);
    border-color: rgba(0, 82, 255, .2);
    color: #ffffff;
}

html:not([data-theme="light"]) .sg-nav-mobile-sub {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(0, 82, 255, .16);
}

html:not([data-theme="light"]) .sg-nav-mobile-sub .sg-nav-mobile-link,
html:not([data-theme="light"]) .sg-nav-mobile-sub .sg-panel-menu-item {
    background: transparent;
    color: #dbe7ff;
    border-color: transparent;
}

html:not([data-theme="light"]) .sg-nav-mobile-sub .sg-nav-mobile-link:hover,
html:not([data-theme="light"]) .sg-nav-mobile-sub .sg-panel-menu-item:hover {
    background: rgba(0, 82, 255, .12);
    border-color: rgba(0, 82, 255, .24);
    color: #ffffff;
}

/* ─── Navbar search ─── */
.sg-nav-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.sg-nav-search-toggle,
.sg-nav-search-close,
.sg-nav-search-clear,
.sg-nav-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #e2e9f5;
    border-radius: 12px;
    background: #f5f8ff;
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.sg-nav-search-toggle:hover,
.sg-nav-search-close:hover,
.sg-nav-search-clear:hover,
.sg-nav-search-submit:hover {
    background: #eef3ff;
    border-color: #c8d8f0;
    color: #0052ff;
}

.sg-nav-search-toggle:focus-visible,
.sg-nav-search-close:focus-visible,
.sg-nav-search-clear:focus-visible,
.sg-nav-search-submit:focus-visible {
    outline: 2px solid #0052ff;
    outline-offset: 2px;
}

.sg-nav-search-clear,
.sg-nav-search-submit {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: .9rem;
}

.sg-nav-search-clear[hidden],
.sg-nav-search-submit[hidden],
.sg-nav-search-close[hidden] { display: none !important; }

.sg-nav-search-clear:hover {
    background: rgba(0, 82, 255, .08);
    border-color: transparent;
}

.sg-nav-search-submit {
    background: linear-gradient(135deg, #0046dd, #0052ff);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(0, 82, 255, .45);
}

.sg-nav-search-submit:hover {
    background: linear-gradient(135deg, #0039b3, #0046dd);
    color: #fff;
    border-color: transparent;
}

.sg-nav-search-form {
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 40px;
    padding: 0 10px 0 12px;
    border: 1px solid #e2e9f5;
    border-radius: 12px;
    background: #f5f8ff;
}

.sg-nav-search-icon {
    flex-shrink: 0;
    font-size: .95rem;
    color: #64748b;
}

.sg-nav-search-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-family: inherit;
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0;
    outline: none;
}

.sg-nav-search-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.sg-nav-search-input::-webkit-search-cancel-button,
.sg-nav-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.sg-nav-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: min(420px, 92vw);
    max-height: min(420px, 58vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e9f5;
    box-shadow: 0 16px 40px -16px rgba(15, 23, 42, .18), 0 4px 16px -8px rgba(0, 82, 255, .08);
    z-index: 1250;
}

.sg-nav-search-dropdown[hidden] { display: none !important; }

.sg-nav-search-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sg-nav-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
}

.sg-nav-search-item:hover,
.sg-nav-search-item.is-active {
    background: #eef3ff;
}

.sg-nav-search-item.is-search-all {
    border-top: 1px solid #e2e9f5;
    margin-top: 4px;
    padding-top: 12px;
}

.sg-nav-search-item.is-search-all .sg-nav-search-name {
    color: #0052ff;
}

html:not([data-theme="light"]) .sg-nav-search-item.is-search-all {
    border-top-color: rgba(148, 197, 255, .14);
}

html:not([data-theme="light"]) .sg-nav-search-item.is-search-all .sg-nav-search-name {
    color: #5eb3ff;
}

.sg-nav-search-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f8ff;
    border: 1px solid #e2e9f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-nav-search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sg-nav-search-thumb .bi {
    font-size: 1.25rem;
    color: #0052ff;
}

.sg-nav-search-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sg-nav-search-name {
    font-size: .88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-nav-search-sub {
    font-size: .74rem;
    color: #64748b;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-nav-search-aside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-left: 4px;
}

.sg-nav-search-price {
    font-size: .82rem;
    font-weight: 800;
    color: #0052ff;
    white-space: nowrap;
}

.sg-nav-search-meta {
    font-size: .72rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.sg-nav-search-badge {
    font-size: .62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    line-height: 1.2;
}

.sg-nav-search-empty {
    margin: 0;
    padding: 18px 16px;
    text-align: center;
    font-size: .84rem;
    color: #64748b;
}

.sg-nav-search-empty[hidden] { display: none !important; }

@media (min-width: 761px) {
    .sg-nav-search-toggle,
    .sg-nav-search-close {
        display: none;
    }

    .sg-nav-search-form {
        display: flex;
        width: min(300px, 26vw);
    }

    .sg-nav-search-dropdown {
        left: auto;
        right: 0;
        width: min(420px, 92vw);
    }
}

@media (max-width: 760px) {
    .sg-nav-search:not(.is-open) .sg-nav-search-close {
        display: none !important;
    }

    .sg-nav-search.is-open .sg-nav-search-close:not([hidden]) {
        display: inline-flex;
    }

    .sg-nav-search.is-open .sg-nav-search-toggle {
        display: none;
    }

    .sg-nav-search.is-open .sg-nav-search-form {
        display: flex;
        flex: 1;
    }

    .sg-nav-search.is-open .sg-nav-search-dropdown {
        position: fixed;
        left: max(10px, env(safe-area-inset-left, 0px));
        right: max(10px, env(safe-area-inset-right, 0px));
        top: calc(56px + env(safe-area-inset-top, 0px));
        min-width: 0;
        max-height: min(50vh, 360px);
    }

    .sg-nav-row:has(.sg-nav-search.is-open) .sg-nav-actions {
        flex: 1;
        min-width: 0;
    }

    .sg-nav-row:has(.sg-nav-search.is-open) .sg-brand-text {
        opacity: 0;
        width: 0;
        overflow: hidden;
        pointer-events: none;
    }
}

html:not([data-theme="light"]) .sg-nav-search-toggle,
html:not([data-theme="light"]) .sg-nav-search-close {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
    color: #ffffff;
}

html:not([data-theme="light"]) .sg-nav-search-toggle:hover,
html:not([data-theme="light"]) .sg-nav-search-close:hover {
    background: rgba(0, 82, 255, .14);
    border-color: rgba(0, 82, 255, .28);
    color: #ffffff;
}

html:not([data-theme="light"]) .sg-nav-search-clear {
    color: rgba(226, 239, 255, .85);
}

html:not([data-theme="light"]) .sg-nav-search-clear:hover {
    background: rgba(0, 82, 255, .18);
    color: #ffffff;
}

html:not([data-theme="light"]) .sg-nav-search-submit {
    background: linear-gradient(135deg, #0046dd, #0052ff);
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(0, 82, 255, .55);
}

html:not([data-theme="light"]) .sg-nav-search-dropdown {
    background: rgba(12, 20, 36, .98);
    border-color: rgba(0, 82, 255, .16);
    box-shadow: 0 24px 56px -18px rgba(0, 0, 0, .50), 0 0 0 1px rgba(0, 82, 255, .06);
}

html:not([data-theme="light"]) .sg-nav-search-item:hover,
html:not([data-theme="light"]) .sg-nav-search-item.is-active {
    background: rgba(0, 82, 255, .14);
}

html:not([data-theme="light"]) .sg-nav-search-thumb {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(0, 82, 255, .2);
}

html:not([data-theme="light"]) .sg-nav-search-name { color: #f1f6ff; }
html:not([data-theme="light"]) .sg-nav-search-sub,
html:not([data-theme="light"]) .sg-nav-search-meta { color: rgba(226, 239, 255, .62); }
html:not([data-theme="light"]) .sg-nav-search-price { color: #6ea8ff; }
html:not([data-theme="light"]) .sg-nav-search-empty { color: rgba(226, 239, 255, .58); }

html:not([data-theme="light"]) .sg-nav-search-form {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
}

html:not([data-theme="light"]) .sg-nav-search-icon {
    color: rgba(226, 239, 255, .72);
}

html:not([data-theme="light"]) .sg-nav-search-input {
    color: #ffffff;
}

html:not([data-theme="light"]) .sg-nav-search-input::placeholder {
    color: rgba(226, 239, 255, .48);
}

/* ════════════════════════════════════════════════════════════════
   Mobile bottom navbar + side drawer (≤760px)
   Light = white card surface w/ #e4ecf9 border.
   Dark  = blue-black gradient (#0a1322 → #070d18) matching panels.
   ════════════════════════════════════════════════════════════════ */
:root {
    --sg-bottom-nav-clearance: 0px;
    --sg-sticky-cta-clearance: 0px;
}

/* Storefront chrome must stay out of document flow (wins over page body > * rules) */
body > #tgNav,
body > nav.tg-nav.sg-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 1200 !important;
}

body > .sg-drawer,
body > .sg-drawer-backdrop,
body > .sg-bottom-nav,
body > .tg-sticky-cta,
body > .tg-sticky-cta.tg-sticky-cta-portal {
    position: fixed !important;
}

body > .sg-drawer-backdrop {
    inset: 0;
    z-index: 1300;
}

body > .sg-drawer {
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1310;
}

body > .sg-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
}

body > .tg-sticky-cta,
body > .tg-sticky-cta.tg-sticky-cta-portal {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

/* Hidden on desktop — only rendered ≤760px */
.sg-bottom-nav,
.sg-drawer,
.sg-drawer-backdrop { display: none; }

.sg-bottom-nav-item { font-family: inherit; }

@media (max-width: 760px) {
    :root {
        --sg-bottom-nav-clearance: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    body.has-mobile-checkout-cta {
        --sg-sticky-cta-clearance: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    /* ─── Bottom navbar ─── */
    .sg-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        gap: 4px;
        padding: 8px max(6px, env(safe-area-inset-left, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-right, 0px));
        background: #ffffff;
        border-top: 1px solid #e2e9f5;
        box-shadow: 0 -8px 24px -16px rgba(15, 30, 60, .28);
    }

    .sg-bottom-nav-item {
        position: relative;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 7px 4px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: #64748b;
        font-size: .62rem;
        font-weight: 600;
        line-height: 1.15;
        letter-spacing: .01em;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    }

    .sg-bottom-nav-item i {
        font-size: 1.2rem;
        line-height: 1;
        transition: transform .18s ease, color .18s ease;
    }

    .sg-bottom-nav-item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sg-bottom-nav-item:active i { transform: scale(.92); }

    .sg-bottom-nav-item.is-active {
        color: #0052ff;
        background: #eef3ff;
        box-shadow: inset 0 0 0 1px rgba(0, 82, 255, .14);
    }

    .sg-bottom-nav-item.is-active::before {
        content: '';
        position: absolute;
        top: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 18px;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, #0052ff, #3385ff);
    }

    .sg-bottom-nav-item:focus-visible {
        outline: 2px solid #0052ff;
        outline-offset: 2px;
    }

    /* Avoid overlap with the floating "Buat Order" sticky CTA */
    body.has-mobile-checkout-cta .sg-bottom-nav:not(.sg-side-rail) { display: none !important; }

    /* ─── Product page: icon-only quick nav on the side ─── */
    body.sg-page-product {
        --sg-bottom-nav-clearance: 0px;
        --sg-side-rail-btn: 38px;
        --sg-side-rail-gap: 8px;
        --sg-side-rail-edge: max(8px, env(safe-area-inset-right, 0px));
        --sg-side-rail-clearance: 0px;
        --sg-side-rail-top: clamp(calc(218px + env(safe-area-inset-top, 0px)), 30dvh, calc(270px + env(safe-area-inset-top, 0px)));
        --sg-side-rail-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        --sg-product-top-nav-offset: 0px;
    }

    body.sg-page-product.has-mobile-checkout-cta {
        --sg-bottom-nav-clearance: 0px;
        --sg-side-rail-bottom: calc(var(--sg-sticky-cta-clearance, 80px) + 12px);
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--sg-side-rail-gap);
        width: auto;
        height: auto;
        max-height: calc(100dvh - var(--sg-side-rail-top) - var(--sg-side-rail-bottom));
        left: auto;
        right: var(--sg-side-rail-edge);
        top: var(--sg-side-rail-top);
        bottom: auto;
        transform: none;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        grid-template-columns: unset;
        z-index: 1150;
        pointer-events: none;
        overflow: visible;
    }

    body.sg-page-product.has-mobile-checkout-cta .sg-bottom-nav.sg-side-rail {
        transform: none;
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item {
        pointer-events: auto;
        flex: 0 0 auto;
        width: var(--sg-side-rail-btn);
        height: var(--sg-side-rail-btn);
        min-width: var(--sg-side-rail-btn);
        min-height: var(--sg-side-rail-btn);
        padding: 0;
        gap: 0;
        border-radius: 50%;
        background: rgba(14, 22, 39, .86);
        border: 1px solid rgba(148, 163, 184, .16);
        box-shadow:
            0 6px 18px -10px rgba(0, 0, 0, .45),
            inset 0 1px 0 rgba(255, 255, 255, .06);
        color: rgba(226, 239, 255, .82);
        font-size: 0;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item i {
        font-size: .95rem;
        line-height: 1;
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item:active {
        transform: scale(.94);
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item:active i {
        transform: none;
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item.is-active {
        color: #6ea8ff;
        background: rgba(8, 16, 32, .96);
        border-color: rgba(0, 82, 255, .55);
        box-shadow:
            0 0 0 2px rgba(0, 82, 255, .85),
            0 0 18px -2px rgba(0, 82, 255, .55),
            0 4px 14px -4px rgba(0, 0, 0, .5);
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item.is-active::before {
        display: none;
    }

    body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item:focus-visible {
        outline: 2px solid #0052ff;
        outline-offset: 3px;
    }

    html[data-theme="light"] body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item {
        background: rgba(255, 255, 255, .94);
        border-color: #dbe6f6;
        color: #475569 !important;
        box-shadow:
            0 8px 18px -13px rgba(15, 30, 60, .28),
            inset 0 1px 0 rgba(255, 255, 255, .9);
    }

    html[data-theme="light"] body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item.is-active {
        color: #0052ff !important;
        background: #eef4ff;
        border-color: rgba(0, 82, 255, .42);
        box-shadow:
            0 0 0 2px rgba(0, 82, 255, .18),
            0 10px 22px -14px rgba(0, 82, 255, .34),
            inset 0 1px 0 rgba(255, 255, 255, .94);
    }

    html:not([data-theme="light"]) body.sg-page-product .sg-bottom-nav.sg-side-rail .sg-bottom-nav-item.is-active {
        color: #93c5fd;
    }

    body.sg-page-product.has-mobile-checkout-cta main.wrap {
        padding-bottom: calc(16px + var(--sg-sticky-cta-clearance, 80px)) !important;
    }

    body.sg-page-product.has-mobile-checkout-cta .sg-footer,
    body.sg-page-product.has-mobile-checkout-cta .tg-footer {
        padding-bottom: calc(20px + var(--sg-sticky-cta-clearance, 80px)) !important;
    }

    /* ─── Side drawer ─── */
    .sg-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1300;
        background: rgba(8, 16, 32, .55);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .sg-drawer-backdrop[hidden] { display: block; }
    .sg-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

    .sg-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(84vw, 320px);
        z-index: 1310;
        background: #ffffff;
        border-right: 1px solid #e2e9f5;
        box-shadow: 16px 0 40px -22px rgba(15, 30, 60, .45);
        transform: translateX(-102%);
        transition: transform .28s cubic-bezier(.4, 0, .2, 1);
        overflow: hidden;
        visibility: hidden;
    }

    .sg-drawer.is-open { transform: none; visibility: visible; }

    .sg-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 56px;
        padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px;
        border-bottom: 1px solid #e2e9f5;
        flex-shrink: 0;
    }

    .sg-drawer-title {
        flex: 1;
        min-width: 0;
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: .2px;
        color: #0a0b0d;
    }
    .sg-drawer-title strong { color: #0052ff; }

    .sg-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        border: 1px solid #e2e9f5;
        border-radius: 12px;
        background: #f5f8ff;
        color: #475569;
        font-size: 1.05rem;
        cursor: pointer;
        transition: background .18s ease, color .18s ease, border-color .18s ease;
    }

    .sg-drawer-close:hover { background: #eef3ff; color: #0052ff; }

    .sg-drawer-close:focus-visible {
        outline: 2px solid #0052ff;
        outline-offset: 2px;
    }

    .sg-drawer-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px 14px calc(20px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .sg-drawer-section {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-bottom: 4px;
    }

    .sg-drawer-section + .sg-drawer-section {
        margin-top: 0;
        padding-top: 14px;
        border-top: 1px solid #e2e9f5;
    }

    .sg-drawer-body .sg-panel-menu-label {
        padding: 2px 10px 6px;
        margin: 0;
    }

    .sg-drawer-cats-label {
        padding-top: 6px !important;
    }

    .sg-drawer-cats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 0 2px 4px;
    }

    @media (max-width: 360px) {
        .sg-drawer-cats { grid-template-columns: 1fr; }
    }

    .sg-drawer-cats .sg-drawer-link {
        min-height: 42px;
        padding: 9px 10px;
        font-size: .82rem;
        font-weight: 600;
        gap: 8px;
        background: #f5f8ff;
        border-color: #e2e9f5;
    }

    .sg-drawer-cats .sg-drawer-link i {
        font-size: .98rem;
        width: 18px;
    }

    .sg-drawer-link {
        position: relative;
        display: flex;
        align-items: center;
        gap: 11px;
        width: 100%;
        min-height: 46px;
        padding: 11px 12px;
        border: 1px solid transparent;
        border-radius: 12px;
        background: transparent;
        color: #475569;
        font-family: inherit;
        font-size: .9rem;
        font-weight: 600;
        line-height: 1.2;
        text-align: left;
        text-decoration: none;
        cursor: pointer;
        transition: background .18s ease, color .18s ease, border-color .18s ease;
    }

    .sg-drawer-link:focus-visible {
        outline: 2px solid #0052ff;
        outline-offset: 2px;
    }

    .sg-drawer-link i {
        width: 20px;
        text-align: center;
        font-size: 1.05rem;
        flex-shrink: 0;
        color: #0052ff;
    }

    .sg-drawer-link:hover,
    .sg-drawer-link:active {
        background: #f5f8ff;
        color: #0f172a;
        border-color: #e2e9f5;
    }

    .sg-drawer-link.is-active {
        background: #eef3ff;
        color: #0052ff;
        border-color: rgba(0, 82, 255, .16);
    }

    .sg-drawer-link.sg-drawer-link-wa {
        background: linear-gradient(135deg, #16a34a, #22c55e);
        color: #fff;
        border-color: transparent;
        box-shadow: 0 12px 24px -14px rgba(34, 197, 94, .7);
    }

    .sg-drawer-link.sg-drawer-link-wa i { color: #fff; }
    .sg-drawer-link.sg-drawer-link-wa:hover { color: #fff; filter: brightness(1.03); }

    /* Lock background scroll while drawer is open */
    body.sg-drawer-open { overflow: hidden; }

    /* ─── Dark theme ─── */
    html:not([data-theme="light"]) .sg-bottom-nav {
        background: linear-gradient(180deg, #0a1220 0%, #060b14 100%);
        border-top: 1px solid rgba(0, 82, 255, .16);
        box-shadow: 0 -10px 28px -18px rgba(0, 82, 255, .40);
    }
    html:not([data-theme="light"]) .sg-bottom-nav-item { color: rgba(226, 239, 255, .62); }
    html:not([data-theme="light"]) .sg-bottom-nav-item.is-active {
        color: #6ea8ff;
        background: rgba(0, 82, 255, .14);
        box-shadow: inset 0 0 0 1px rgba(0, 82, 255, .22);
    }

    html:not([data-theme="light"]) .sg-bottom-nav-item.is-active::before {
        background: linear-gradient(90deg, #0052ff, #3385ff);
    }

    html:not([data-theme="light"]) .sg-bottom-nav-item:focus-visible {
        outline-color: #6ea8ff;
    }

    html:not([data-theme="light"]) .sg-drawer {
        background: linear-gradient(180deg, #0a1220 0%, #060b14 100%);
        border-right: 1px solid rgba(0, 82, 255, .16);
        box-shadow: 16px 0 40px -22px rgba(0, 0, 0, .60);
    }
    html:not([data-theme="light"]) .sg-drawer-head { border-bottom-color: rgba(0, 82, 255, .16); }
    html:not([data-theme="light"]) .sg-drawer-title { color: #f1f6ff; }
    html:not([data-theme="light"]) .sg-drawer-title strong { color: #6ea8ff; }
    html:not([data-theme="light"]) .sg-drawer-close {
        background: rgba(255, 255, 255, .05);
        border-color: rgba(0, 82, 255, .2);
        color: #dbe7ff;
    }
    html:not([data-theme="light"]) .sg-drawer-close:hover {
        background: rgba(0, 82, 255, .14);
        color: #ffffff;
    }
    html:not([data-theme="light"]) .sg-drawer-link { color: #dbe7ff; }
    html:not([data-theme="light"]) .sg-drawer-link i { color: #6ea8ff; }
    html:not([data-theme="light"]) .sg-drawer-link:hover,
    html:not([data-theme="light"]) .sg-drawer-link:active {
        background: rgba(0, 82, 255, .12);
        border-color: rgba(0, 82, 255, .24);
        color: #ffffff;
    }
    html:not([data-theme="light"]) .sg-drawer-link.is-active {
        background: linear-gradient(135deg, rgba(0, 82, 255, .14), rgba(0, 82, 255, .07));
        color: #93c5fd;
        border-color: rgba(0, 82, 255, .22);
    }

    html:not([data-theme="light"]) .sg-drawer-section + .sg-drawer-section {
        border-top-color: rgba(0, 82, 255, .16);
    }

    html:not([data-theme="light"]) .sg-drawer-cats .sg-drawer-link {
        background: rgba(255, 255, 255, .04);
        border-color: rgba(0, 82, 255, .14);
    }

    html:not([data-theme="light"]) .sg-drawer-cats .sg-drawer-link:hover,
    html:not([data-theme="light"]) .sg-drawer-cats .sg-drawer-link:active {
        background: rgba(0, 82, 255, .14);
        border-color: rgba(0, 82, 255, .28);
    }

    html:not([data-theme="light"]) .sg-drawer-link:focus-visible,
    html:not([data-theme="light"]) .sg-drawer-close:focus-visible {
        outline-color: #6ea8ff;
    }

    /* ─── Content clearance so nothing hides behind bottom nav ─── */
    .tg-main { padding-bottom: calc(12px + var(--sg-bottom-nav-clearance)) !important; }
    .tg-footer,
    .sg-footer { padding-bottom: calc(20px + var(--sg-bottom-nav-clearance)) !important; }

    /* Floating checkout CTA replaces bottom nav — reserve scroll space instead */
    body.has-mobile-checkout-cta .tg-main,
    body.has-mobile-checkout-cta main.wrap {
        padding-bottom: calc(16px + var(--sg-sticky-cta-clearance, 80px)) !important;
    }
    body.has-mobile-checkout-cta .checkout-shell,
    body.has-mobile-checkout-cta .checkout-direct .tg-embed-body .tg-main {
        padding-bottom: calc(16px + var(--sg-sticky-cta-clearance, 80px)) !important;
    }
    body.has-mobile-checkout-cta .checkout-direct .tg-embed-body .tg-card-products {
        padding-bottom: calc(20px + var(--sg-sticky-cta-clearance, 80px)) !important;
    }
    body.has-mobile-checkout-cta .checkout-direct .tg-embed-body .tg-product-pager {
        margin-bottom: 0 !important;
    }
    body.has-mobile-checkout-cta {
        scroll-padding-bottom: calc(20px + var(--sg-sticky-cta-clearance, 80px));
    }
    body.has-mobile-checkout-cta .checkout-direct .tg-embed-body .tg-list {
        margin-bottom: 4px;
    }
    body.has-mobile-checkout-cta .tg-footer,
    body.has-mobile-checkout-cta .sg-footer {
        padding-bottom: calc(20px + var(--sg-sticky-cta-clearance, 80px)) !important;
    }
}

@media (min-width: 761px) {
    :root { --sg-sticky-cta-clearance: calc(84px + env(safe-area-inset-bottom, 0px)); }

    .checkout-direct .tg-embed-body .tg-main,
    main.wrap:has(.checkout-shell) {
        padding-bottom: calc(24px + var(--sg-sticky-cta-clearance, 84px)) !important;
    }

    .checkout-direct .tg-embed-body .tg-card-products {
        padding-bottom: calc(12px + var(--sg-sticky-cta-clearance, 84px)) !important;
    }

    .checkout-direct .tg-embed-body .tg-product-pager {
        margin-bottom: 12px;
    }
}

/* Disabled sticky CTA — readable in light theme */
html[data-theme="light"] .tg-sticky-cta .tg-sticky-cta-btn:disabled,
html[data-theme="light"] .checkout-direct .tg-embed-body .tg-sticky-cta-btn:disabled {
    background: #e2e8f0 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
}

/* ════════════════════════════════════════════════════════════════
   Desktop polish (≥761px) — navbar search, dropdown, menu rhythm
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 761px) {
    .sg-nav-row {
        align-items: center;
        gap: 16px;
    }

    .sg-nav-search-form {
        width: min(340px, 28vw);
        height: 42px;
        padding: 0 10px 0 14px;
        border-radius: 11px;
        transition: border-color .2s ease, box-shadow .2s ease;
    }

    .sg-nav-search-form:focus-within {
        border-color: #0052ff;
        box-shadow: 0 0 0 3px rgba(0, 82, 255, .14);
    }

    html[data-theme="light"] .sg-nav-search-form:focus-within {
        background: #ffffff;
    }

    html:not([data-theme="light"]) .sg-nav-search-form:focus-within {
        border-color: rgba(0, 82, 255, .45);
        box-shadow: 0 0 0 3px rgba(0, 82, 255, .18);
    }

    .sg-nav-search-input {
        font-size: .88rem;
    }

    .sg-nav-search-dropdown {
        border-radius: 14px;
        box-shadow:
            0 24px 56px -20px rgba(15, 23, 42, .24),
            0 0 0 1px rgba(0, 82, 255, .08);
    }

    .sg-nav-search-item {
        padding: 11px 12px;
        border-radius: 10px;
    }

    .sg-nav-search-name {
        font-size: .9rem;
    }

    .sg-nav-dropdown-menu {
        min-width: 280px;
        border-radius: 16px;
        padding: 8px;
        box-shadow: 0 20px 48px -16px rgba(15, 23, 42, .22);
    }

    html:not([data-theme="light"]) .sg-nav-dropdown-menu {
        box-shadow: 0 24px 56px -18px rgba(0, 0, 0, .55);
    }
}
