:root {
    --fb-primary: #7c3aed;
    --fb-primary-light: #a855f7;
    --fb-accent: #f97316;
    --fb-body: #f3f1fb;
    --fb-card: #fff;
    --fb-card-hover: #faf7ff;
    --fb-input: #f5f1ff;
    --fb-border: #ddd2f3;
    --fb-border-soft: #ebeef4;
    --fb-text: #16223a;
    --fb-text-secondary: #4c3c66;
    --fb-muted: #796895;
    --fb-shadow: 0 10px 24px rgba(52, 16, 95, .08);
}

html[data-theme="dark"] {
    --fb-body: #0a0a0f;
    --fb-card: #0f172a;
    --fb-card-hover: #111b31;
    --fb-input: #111c31;
    --fb-border: #26354f;
    --fb-border-soft: #2f4565;
    --fb-text: #e8eefb;
    --fb-text-secondary: #b3c0d9;
    --fb-muted: #7f8da9;
    --fb-shadow: 0 10px 26px rgba(0, 0, 0, .28);
}

html,
body.fb-store-v1 {
    min-height: 100%;
}

body.fb-store-v1 {
    margin: 0;
    background: var(--fb-body) !important;
    background-image: none !important;
    color: var(--fb-text);
    font-family: "Space Grotesk", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 14px;
    transition: background .25s, color .25s;
}

.fb-store-v1 *,
.fb-store-v1 *::before,
.fb-store-v1 *::after {
    box-sizing: border-box;
}

.fb-store-v1 a {
    text-decoration: none;
}

.fb-store-v1 button,
.fb-store-v1 input {
    font: inherit;
}

.fb-store-shell {
    min-height: 100vh;
    display: flex;
    background:
        radial-gradient(circle at 0 0, rgba(124, 58, 237, .08), transparent 34%),
        radial-gradient(circle at 100% 10%, rgba(219, 39, 119, .06), transparent 32%),
        var(--fb-body);
}

.fb-store-sidebar {
    position: sticky;
    top: 0;
    z-index: 60;
    width: 244px;
    height: 100vh;
    flex: 0 0 244px;
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, .2);
    background: linear-gradient(180deg, #5b21b6 0%, #7c3aed 55%, #a21caf 100%);
    box-shadow: 6px 0 28px rgba(74, 24, 121, .28);
    transition: width .2s ease, flex-basis .2s ease, transform .24s ease;
}

.fb-sidebar-brand {
    min-height: 72px;
    padding: 4px 8px 14px;
    display: flex;
    align-items: stretch;
    border-bottom: 1px dashed rgba(255, 255, 255, .35);
}

.fb-brand-banner {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 3px 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08));
    color: #fff;
}

.fb-brand-banner img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    border-radius: 10px;
}

.fb-brand-banner span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.04em;
    white-space: nowrap;
}

.fb-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding-right: 2px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .3) transparent;
}

.fb-sidebar-stats {
    width: 100%;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    color: rgba(255, 255, 255, .95);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.fb-sidebar-stats span {
    color: #f87171;
}

.fb-sidebar-stats strong {
    color: #facc15;
    font-size: 11px;
    font-weight: 800;
}

.fb-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.fb-sidebar-title {
    margin: 0;
    padding: 0 10px;
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fb-sidebar-item {
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    transition: color .2s, background-color .2s;
}

.fb-sidebar-item > i:first-child,
.fb-sidebar-item .fb-nav-emoji,
.fb-sidebar-item .fb-item-spacer {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.fb-sidebar-item .fb-nav-emoji {
    font-size: 14px;
    line-height: 1;
}

.fb-sidebar-item .fb-item-spacer {
    opacity: 0;
}

.fb-sidebar-item:hover,
.fb-sidebar-item:focus-visible {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.fb-sidebar-item.active {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.fb-sidebar-item.active::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
}

.fb-store-shell.sidebar-collapsed .fb-store-sidebar {
    width: 76px;
    flex-basis: 76px;
}

.fb-store-shell.sidebar-collapsed .fb-sidebar-brand {
    padding-inline: 2px;
}

.fb-store-shell.sidebar-collapsed .fb-brand-banner {
    width: 44px;
    height: 44px;
    margin: auto;
    padding: 2px;
    border-radius: 10px;
}

.fb-store-shell.sidebar-collapsed .fb-brand-banner img {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.fb-store-shell.sidebar-collapsed .fb-brand-banner span,
.fb-store-shell.sidebar-collapsed .fb-sidebar-stats,
.fb-store-shell.sidebar-collapsed .fb-sidebar-title,
.fb-store-shell.sidebar-collapsed .fb-sidebar-item span,
.fb-store-shell.sidebar-collapsed .fb-sidebar-item .fb-item-spacer,
.fb-store-shell.sidebar-collapsed .fb-sidebar-item.active::after {
    display: none;
}

.fb-store-shell.sidebar-collapsed .fb-sidebar-item {
    padding-inline: 0;
}

.fb-sidebar-mask {
    display: none;
}

.fb-content-shell {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--fb-body);
}

.fb-content-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    border-bottom: 1px solid var(--fb-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(252, 247, 255, .96));
    backdrop-filter: blur(8px);
}

.fb-header-left,
.fb-header-actions,
.fb-header-tools {
    display: flex;
    align-items: center;
}

.fb-header-left {
    min-width: 0;
    min-height: 46px;
    gap: 10px;
}

.fb-header-actions {
    position: relative;
    min-height: 46px;
    gap: 8px;
}

.fb-header-tools {
    gap: 8px;
}

.fb-icon-button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--fb-border);
    border-radius: 10px;
    background: linear-gradient(145deg, #fff, #f6eeff);
    color: var(--fb-text-secondary);
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}

.fb-icon-button:hover,
.fb-icon-button:focus-visible {
    border-color: var(--fb-primary);
    color: var(--fb-primary);
}

.fb-menu-lines {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.fb-menu-lines i {
    width: 14px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: currentColor;
}

.fb-balance-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid var(--fb-border);
    border-radius: 999px;
    background: linear-gradient(135deg, #fff, #f8f2ff);
    color: var(--fb-muted);
    font-size: 12px;
}

.fb-balance-chip strong {
    color: #7c3aed;
    font-size: 13px;
    font-weight: 700;
}

.fb-mobile-brand {
    display: none;
}

.fb-header-search {
    width: min(236px, 28vw);
    min-width: 112px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--fb-border);
    border-radius: 10px;
    background: linear-gradient(135deg, #fff, #f8f2ff);
}

.fb-header-search input {
    min-width: 0;
    height: 100%;
    flex: 1;
    padding: 0 10px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fb-text);
    font-size: 12px;
}

.fb-header-search button {
    width: 32px;
    height: 30px;
    flex: 0 0 32px;
    border: 0;
    background: transparent;
    color: var(--fb-text-secondary);
}

.fb-header-search button:hover {
    background: rgba(124, 58, 237, .12);
    color: var(--fb-primary);
}

.fb-header-search button svg {
    width: 16px;
    height: 16px;
}

.fb-segmented {
    height: 32px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    background: linear-gradient(135deg, #fff, #f6efff);
}

.fb-segmented button {
    height: 100%;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--fb-muted);
    font-size: 11px;
    font-weight: 600;
}

.fb-segmented button.active,
.fb-segmented button:hover {
    color: var(--fb-primary);
}

.fb-segmented span {
    color: var(--fb-border);
    font-size: 10px;
}

.fb-theme-toggle .ico-sun,
html[data-theme="dark"] .fb-theme-toggle .ico-moon {
    display: none;
}

html[data-theme="dark"] .fb-theme-toggle .ico-sun {
    display: inline-block;
}

.fb-mobile-tools-toggle {
    display: none;
}

.fb-profile-chip {
    max-width: 150px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px 3px 4px;
    border: 1px solid var(--fb-border);
    border-radius: 999px;
    background: #fff;
    color: var(--fb-text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.fb-profile-chip img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    object-fit: cover;
}

.fb-profile-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-login-link,
.fb-logout-link {
    padding: 6px 9px;
    color: var(--fb-text-secondary);
    font-size: 12px;
    font-weight: 700;
}

.fb-register-button {
    padding: 7px 13px;
    border-radius: 9px;
    background: linear-gradient(95deg, #6d28d9, #a855f7 60%, #db2777);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(109, 40, 217, .22);
}

.fb-pjax-container {
    min-width: 0;
    flex: 1;
}

.fb-main {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 16px 18px 28px;
}

.fb-notice-wrap {
    padding-bottom: 14px;
}

.fb-notice-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid #e3daf5;
    border-radius: 16px;
    background: var(--fb-card);
    box-shadow: 0 12px 26px rgba(67, 25, 112, .07), 0 0 0 1px rgba(191, 152, 241, .12);
    text-align: center;
}

.fb-notice-title {
    position: relative;
    isolation: isolate;
    min-width: min(620px, 100%);
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background:
        linear-gradient(145deg, #f7f1ff, #fefbff) padding-box,
        linear-gradient(120deg, rgba(109, 40, 217, .36), rgba(236, 72, 153, .28), rgba(245, 158, 11, .24)) border-box;
    box-shadow: 0 10px 22px rgba(74, 27, 124, .12), 0 2px 0 rgba(255, 255, 255, .85) inset;
}

.fb-notice-title span {
    color: #6d28d9;
    font-size: 18px;
    font-weight: 700;
}

.fb-notice-title strong {
    background: linear-gradient(95deg, #6d28d9, #c026d3 58%, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.fb-notice-content {
    max-width: 980px;
    color: var(--fb-text-secondary);
    font-size: 13px;
    line-height: 1.75;
}

.fb-notice-content p {
    margin: 3px 0 0;
}

.fb-config-notice {
    margin-bottom: 2px;
}

.fb-config-notice p {
    margin: 0;
}

.fb-notice-lead {
    color: var(--fb-text-secondary);
}

.fb-notice-warning {
    color: #1d4ed8;
    font-weight: 700;
}

.fb-notice-policy {
    color: #dc2626;
    font-weight: 700;
}

.fb-broadcast {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0 14px;
    overflow: hidden;
    border: 1px solid var(--fb-border);
    border-radius: 11px;
    background: linear-gradient(120deg, #f3e8ff, #fdf2f8);
    color: var(--fb-text-secondary);
    font-size: 12px;
}

.fb-broadcast-icon {
    color: #9333ea;
    font-size: 15px;
}

.fb-broadcast > div {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.fb-kingkong-panel {
    margin-bottom: 22px;
    padding: 14px;
    border: 1px solid #d9c8f4;
    border-radius: 16px;
    background: var(--fb-card);
    box-shadow: 0 14px 28px rgba(73, 24, 133, .1);
}

.fb-kingkong-grid,
.fb-subcategory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fb-kingkong-item {
    min-width: 180px;
    min-height: 40px;
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    overflow: hidden;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    background: #2f3136;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all .2s ease;
}

.fb-kingkong-item > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-category-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-block;
    border-radius: 4px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.fb-kingkong-item[data-id="37"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/custom.webp") !important; }
.fb-kingkong-item[data-id="41"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/facebook-new.webp") !important; }
.fb-kingkong-item[data-id="42"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/facebook-aged.webp") !important; }
.fb-kingkong-item[data-id="43"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/facebook-bm.webp") !important; }
.fb-kingkong-item[data-id="44"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/instagram.webp") !important; }
.fb-kingkong-item[data-id="45"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/threads.webp") !important; }
.fb-kingkong-item[data-id="46"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/gmail.webp") !important; }
.fb-kingkong-item[data-id="47"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/twitter.webp") !important; }
.fb-kingkong-item[data-id="48"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/tiktok.webp") !important; }
.fb-kingkong-item[data-id="49"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/telegram.webp") !important; }
.fb-kingkong-item[data-id="50"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/apple.webp") !important; }
.fb-kingkong-item[data-id="51"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/linkedin.webp") !important; }
.fb-kingkong-item[data-id="52"] .fb-category-icon { background-image: url("/assets/user/images/sssacc-platform/microsoft.webp") !important; }

.fb-kingkong-item:not(.active):hover {
    border-color: #111827;
    background: #f8fafc;
    color: #111827;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .16);
}

.fb-kingkong-item.active {
    border-color: #9333ea;
    background: linear-gradient(95deg, #6d28d9, #9333ea 55%, #db2777);
    color: #fff;
    box-shadow: 0 10px 22px rgba(88, 28, 135, .32);
}

.fb-subcategory-grid {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--fb-border);
}

.fb-subcategory-item {
    min-width: 160px;
    min-height: 34px;
    flex: 1 1 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #3f3f46;
    border-radius: 999px;
    background: #2f3136;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.fb-subcategory-item.active,
.fb-subcategory-item:hover {
    border-color: #a855f7;
    background: linear-gradient(95deg, #7c3aed, #c026d3);
    color: #fff;
}

.fb-category-block {
    margin-bottom: 14px;
}

.fb-category-header {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(92deg, #6d28d9, #a855f7 62%, #ea580c);
    color: #fff;
    box-shadow: 0 10px 22px rgba(88, 28, 135, .2);
}

.fb-category-header h2 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.fb-category-header h2 span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-category-count {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 12px;
}

.fb-product-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fb-product-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 11px 16px;
    border: 1px solid var(--fb-border-soft);
    border-radius: 12px;
    background: var(--fb-card);
    color: var(--fb-text);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    cursor: pointer;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    contain: layout paint;
    content-visibility: auto;
    contain-intrinsic-size: 142px;
}

.fb-product-row:hover {
    border-color: #c084fc;
    color: var(--fb-text);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .12);
}

.fb-product-row.is-soldout {
    cursor: not-allowed;
    opacity: .62;
}

.fb-product-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.fb-product-cover {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 50%;
    background-color: rgba(248, 250, 252, .95);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}

.fb-product-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 6px;
}

.fb-product-name {
    overflow: hidden;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-product-desc {
    overflow: hidden;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fb-product-side {
    min-width: 280px;
    max-width: 360px;
    flex: 0 1 clamp(280px, 32vw, 360px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 0 10px;
    border-left: 1px dashed #d4d4d8;
}

.fb-product-stock {
    min-width: 82px;
    height: 40px;
    flex: 0 0 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.fb-product-stock span {
    color: #6b7280;
    font-size: 13px;
}

.fb-product-stock strong {
    color: #9333ea;
    font-size: 14px;
    font-weight: 700;
}

.fb-product-price {
    min-width: 0;
    height: 40px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #f1b6cb;
    border-radius: 10px;
    background: #fff;
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.fb-buy-button {
    min-width: 88px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #7e22ce, #dc2626);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.fb-product-row.is-soldout .fb-product-stock strong {
    color: #dc2626;
}

.fb-product-row.is-soldout .fb-buy-button {
    background: #d1d5db;
    color: #6b7280;
}

.fb-empty-state,
.fb-loading-card {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border: 1px solid var(--fb-border);
    border-radius: 14px;
    background: var(--fb-card);
    color: var(--fb-muted);
    text-align: center;
}

.fb-loading-card {
    flex-wrap: wrap;
}

.fb-loading-card span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    animation: fb-loading-bounce 1s infinite ease-in-out;
}

.fb-loading-card span:nth-child(2) { animation-delay: .12s; }
.fb-loading-card span:nth-child(3) { animation-delay: .24s; }
.fb-loading-card p { width: 100%; margin: 4px 0 0; }

@keyframes fb-loading-bounce {
    0%, 80%, 100% { transform: scale(.65); opacity: .45; }
    40% { transform: scale(1); opacity: 1; }
}

.fb-chat-stack {
    position: fixed;
    right: 20px;
    bottom: 72px;
    z-index: 48;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fb-chat-button {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 12px 28px rgba(32, 17, 57, .24);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.fb-chat-button:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(32, 17, 57, .3);
}

.fb-chat-button svg {
    width: 24px;
    height: 24px;
}

.fb-chat-telegram { background: linear-gradient(145deg, #38bdf8, #2563eb); }
.fb-chat-help { background: linear-gradient(145deg, #9333ea, #db2777); }

.fb-chat-caption {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(95deg, #7c3aed, #c026d3);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(88, 28, 135, .22);
}

.fb-store-footer {
    padding: 14px 20px 22px;
    color: var(--fb-muted);
    font-size: 12px;
    text-align: center;
}

html[data-theme="dark"] .fb-store-sidebar {
    border-right-color: #26354f;
    background: linear-gradient(180deg, #0b1426 0%, #101a2e 100%);
    box-shadow: 6px 0 28px rgba(0, 0, 0, .32);
}

html[data-theme="dark"] .fb-content-header {
    background: rgba(15, 23, 42, .96);
}

html[data-theme="dark"] .fb-icon-button,
html[data-theme="dark"] .fb-balance-chip,
html[data-theme="dark"] .fb-header-search,
html[data-theme="dark"] .fb-segmented,
html[data-theme="dark"] .fb-profile-chip {
    background: #111c31;
    color: var(--fb-text-secondary);
}

html[data-theme="dark"] .fb-notice-card,
html[data-theme="dark"] .fb-kingkong-panel,
html[data-theme="dark"] .fb-product-row,
html[data-theme="dark"] .fb-empty-state,
html[data-theme="dark"] .fb-loading-card {
    border-color: var(--fb-border-soft);
    background: var(--fb-card);
}

html[data-theme="dark"] .fb-notice-title {
    background:
        linear-gradient(145deg, #141d32, #0f172a) padding-box,
        linear-gradient(120deg, #6d28d9, #c026d3, #ea580c) border-box;
}

html[data-theme="dark"] .fb-notice-title span,
html[data-theme="dark"] .fb-product-name {
    color: #e8eefb;
}

html[data-theme="dark"] .fb-broadcast {
    background: linear-gradient(120deg, #15122a, #221227);
}

html[data-theme="dark"] .fb-product-desc {
    color: #9ca3af;
}

html[data-theme="dark"] .fb-product-side {
    border-left-color: #314561;
}

html[data-theme="dark"] .fb-product-stock,
html[data-theme="dark"] .fb-product-price {
    border-color: #2f4565;
    background: #111c31;
}

html[data-theme="dark"] .dropdown-menu {
    border-color: #2f4565;
    background: #0f172a;
}

html[data-theme="dark"] .dropdown-item {
    color: #dbe7ff;
}

html[data-theme="dark"] .dropdown-item:hover {
    background: #111c31;
}

@media (max-width: 1160px) {
    .fb-header-tools .fb-segmented {
        display: none;
    }

    .fb-header-search {
        width: min(210px, 25vw);
    }
}

@media (max-width: 980px) {
    .fb-store-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(84vw, 300px);
        height: 100vh;
        flex-basis: auto;
        transform: translateX(-110%);
    }

    .fb-store-shell.sidebar-collapsed .fb-store-sidebar {
        width: min(84vw, 300px);
    }

    .fb-store-shell.mobile-sidebar-open .fb-store-sidebar {
        transform: translateX(0);
    }

    .fb-store-shell.sidebar-collapsed .fb-sidebar-brand {
        padding: 4px 8px 14px;
    }

    .fb-store-shell.sidebar-collapsed .fb-brand-banner {
        width: 100%;
        height: 60px;
        margin: 0;
        padding: 3px 7px;
    }

    .fb-store-shell.sidebar-collapsed .fb-brand-banner img {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .fb-store-shell.sidebar-collapsed .fb-brand-banner span,
    .fb-store-shell.sidebar-collapsed .fb-sidebar-stats,
    .fb-store-shell.sidebar-collapsed .fb-sidebar-title,
    .fb-store-shell.sidebar-collapsed .fb-sidebar-item span,
    .fb-store-shell.sidebar-collapsed .fb-sidebar-item .fb-item-spacer {
        display: inline-flex;
    }

    .fb-store-shell.sidebar-collapsed .fb-sidebar-title {
        display: block;
    }

    .fb-store-shell.sidebar-collapsed .fb-sidebar-item {
        padding: 8px 10px;
    }

    .fb-sidebar-mask {
        position: fixed;
        inset: 0;
        z-index: 59;
        display: none;
        border: 0;
        background: rgba(17, 7, 31, .38);
        backdrop-filter: blur(2px);
    }

    .fb-store-shell.mobile-sidebar-open .fb-sidebar-mask {
        display: block;
    }

    .fb-content-header {
        position: static;
        min-height: 68px;
        padding: 8px 10px;
        gap: 6px;
    }

    .fb-header-left {
        min-width: 0;
        flex: 1 1 auto;
        gap: 6px;
    }

    .fb-header-actions {
        flex: 0 0 auto;
        gap: 4px;
    }

    .fb-mobile-brand {
        min-width: 0;
        width: 106px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        overflow: hidden;
        padding: 2px 6px;
        border: 1px solid var(--fb-border);
        border-radius: 9px;
        background: rgba(255, 255, 255, .8);
        color: #6d28d9;
    }

    .fb-mobile-brand img {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
        border-radius: 7px;
    }

    .fb-mobile-brand span {
        overflow: hidden;
        font-size: 13px;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .fb-balance-chip {
        padding: 4px 8px;
        gap: 4px;
    }

    .fb-balance-chip > span {
        display: none;
    }

    .fb-mobile-tools-toggle {
        display: inline-flex;
    }

    .fb-header-tools {
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        z-index: 70;
        min-width: 230px;
        display: none;
        flex-wrap: wrap;
        justify-content: flex-end;
        padding: 10px;
        border: 1px solid var(--fb-border);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 16px 28px rgba(39, 15, 70, .18);
    }

    .fb-header-tools.open {
        display: flex;
    }

    .fb-header-tools .fb-segmented {
        display: flex;
    }

    .fb-header-search {
        width: 100%;
    }

    .fb-profile-chip {
        max-width: 38px;
        padding: 3px;
    }

    .fb-profile-chip span,
    .fb-header-actions .fb-register-button {
        display: none;
    }

    .fb-login-link,
    .fb-logout-link {
        padding: 6px 5px;
        font-size: 11px;
    }

    .fb-main {
        padding: 12px 10px 24px;
    }

    .fb-chat-stack {
        right: 12px;
        bottom: 72px;
    }
}

@media (max-width: 720px) {
    .fb-notice-card {
        min-height: 390px;
        justify-content: space-evenly;
        padding: 16px 14px;
    }

    .fb-notice-title {
        min-width: 100%;
        flex-direction: column;
        gap: 0;
    }

    .fb-notice-title span { font-size: 14px; }
    .fb-notice-title strong { font-size: 23px; }

    .fb-notice-content {
        font-size: 13px;
        line-height: 1.7;
    }

    .fb-notice-content p {
        margin-top: 9px;
    }

    .fb-kingkong-panel {
        padding: 12px;
    }

    .fb-kingkong-grid,
    .fb-subcategory-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .fb-kingkong-item,
    .fb-subcategory-item {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .fb-product-row {
        flex-direction: column;
        gap: 7px;
        padding: 12px 14px;
    }

    .fb-product-side {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex-basis: auto;
        padding: 8px 0 0;
        border-top: 1px dashed #d4d4d8;
        border-left: 0;
    }

    .fb-product-stock {
        min-width: 78px;
        flex-basis: 78px;
        padding-inline: 8px;
    }

    .fb-product-price {
        padding-inline: 8px;
    }

    .fb-buy-button {
        min-width: 80px;
        padding-inline: 10px;
    }
}

@media (max-width: 430px) {
    .fb-content-header {
        min-height: 62px;
        padding-inline: 7px;
    }

    .fb-header-left,
    .fb-header-actions {
        gap: 3px;
    }

    .fb-icon-button {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .fb-balance-chip {
        padding-inline: 5px;
    }

    .fb-mobile-brand {
        width: 94px;
        padding-inline: 4px;
    }

    .fb-mobile-brand span {
        font-size: 12px;
    }

    .fb-register-button {
        display: none;
    }

    .fb-category-header {
        padding-inline: 11px;
    }

    .fb-category-header h2 {
        font-size: 14px;
    }

    .fb-product-main {
        gap: 10px;
    }

    .fb-product-copy {
        gap: 9px;
        padding-left: 0;
    }

    .fb-product-name {
        font-size: 14px;
    }

    .fb-product-desc {
        font-size: 12px;
    }
}
