.dc-mobile-category-page,
.dc-mobile-category-page * {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    overscroll-behavior-y: none;
    background: #fff !important;
}

.dc-mobile-category-page {
    --dc-mobile-category-bottom-space: calc(76px + env(safe-area-inset-bottom, 0px));
    display: flex;
    width: 100%;
    height: 100dvh;
    min-height: 100vh;
    flex-direction: column;
    padding: 0 0 var(--dc-mobile-category-bottom-space);
    overflow: hidden;
}

.dc-mobile-category-page__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-height: calc(50px + env(safe-area-inset-top, 0px));
    padding: calc(env(safe-area-inset-top, 0px) + 5px) 12px 5px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.dc-mobile-category-page__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--text-main, #1f2937);
    background: #f7f8fa;
    font-size: 23px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.dc-mobile-category-page__back:active {
    transform: scale(0.96);
}

.dc-mobile-category-page__search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0 5px 0 12px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.95);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.dc-mobile-category-page__search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    flex: 0 0 auto;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--theme-primary, #2196F3);
    font: inherit;
    font-size: 13px;
    -webkit-tap-highlight-color: transparent;
}

.dc-mobile-category-page__search > i {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 20px;
}

.dc-mobile-category-page__search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: #1e293b;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 15px;
}

.dc-mobile-category-page__search input::placeholder {
    color: #94a3b8;
}

.dc-mobile-category-page__browser {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 0px;
    overflow: hidden;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.dc-mobile-category-page__roots-wrap {
    position: relative;
    flex: 0 0 auto;
}

.dc-mobile-category-page__roots-wrap::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 58px;
    pointer-events: none;
    content: '';
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 42%);
}

.dc-mobile-category-page__roots,
.dc-mobile-category-page__second {
    display: flex;
    flex: 0 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.dc-mobile-category-page__second[hidden],
.dc-mobile-category-page__content[hidden] {
    display: none !important;
}

.dc-mobile-category-page__roots::-webkit-scrollbar,
.dc-mobile-category-page__second::-webkit-scrollbar {
    display: none;
}

.dc-mobile-category-page__roots {
    gap: 11px;
    padding: 14px 54px 10px 12px;
}

.dc-mobile-category-page__roots-more {
    position: absolute;
    z-index: 3;
    top: 24px;
    right: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 50%;
    color: #64748b;
    outline: 0;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
    font-size: 24px;
    -webkit-tap-highlight-color: transparent;
}

.dc-mobile-category-page__roots-more i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.dc-mobile-category-page__roots-more:focus,
.dc-mobile-category-page__roots-more:focus-visible {
    outline: 0;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.dc-mobile-category-page__root-menu[hidden] {
    display: none !important;
}

.dc-mobile-category-page__root-menu {
    position: fixed;
    z-index: 1200;
    top: var(--dc-mobile-category-root-menu-top, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
}

.dc-mobile-category-page__root-menu-panel {
    display: flex;
    width: 100%;
    max-height: min(50dvh, 380px);
    flex: 0 0 auto;
    flex-direction: column;
    overflow: hidden;
    outline: 0;
    border-radius: 0 0 18px 18px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
    animation: dcMobileCategoryMenuIn 180ms ease-out both;
}

.dc-mobile-category-page__root-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 0 14px 0 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.dc-mobile-category-page__root-menu-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.4;
}

.dc-mobile-category-page__root-menu-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #64748b;
    background: #f8fafc;
    font-size: 20px;
}

.dc-mobile-category-page__root-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 8px;
    padding: 16px 14px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dc-mobile-category-page__root-menu-item {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0;
    border: 0;
    color: #64748b;
    background: transparent;
    font: inherit;
    flex-direction: column;
}

.dc-mobile-category-page__root-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 6px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 50%;
    background: #f8fafc;
}

.dc-mobile-category-page__root-menu-name {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc-mobile-category-page__root-menu-item.is-active {
    color: var(--theme-primary, #2196F3);
    font-weight: 600;
}

.dc-mobile-category-page__root-menu-item.is-active .dc-mobile-category-page__root-menu-icon {
    border-color: var(--theme-primary, #2196F3);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.16);
}

.dc-mobile-category-page__root-menu-backdrop {
    min-height: 0;
    flex: 1 1 auto;
    margin-top: -1px;
    padding: 0;
    border: 0;
    background: transparent;
    animation: dcMobileCategoryMaskIn 180ms ease-out both;
}

@keyframes dcMobileCategoryMenuIn {
    from { transform: translateY(-12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes dcMobileCategoryMaskIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .dc-mobile-category-page__root-menu-panel,
    .dc-mobile-category-page__root-menu-backdrop {
        animation: none;
    }
}

.dc-mobile-category-page__root {
    display: flex;
    align-items: center;
    flex: 0 0 64px;
    flex-direction: column;
    min-width: 64px;
    min-height: 75px;
    padding: 0;
    border: 0;
    color: #64748b;
    background: transparent;
    font: inherit;
}

.dc-mobile-category-page__root-icon,
.dc-mobile-category-page__fourth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #f8fafc;
}

.dc-mobile-category-page__root-icon {
    width: 51px;
    height: 51px;
    margin-bottom: 6px;
    border-radius: 50%;
}

.dc-mobile-category-page__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.dc-mobile-category-page__fallback-icon {
    color: var(--theme-primary, #2196F3);
    font-size: 23px;
}

.dc-mobile-category-page__root-name,
.dc-mobile-category-page__fourth-name {
    display: block;
    width: 100%;
    overflow: hidden;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc-mobile-category-page__root.is-active {
    color: var(--theme-primary, #2196F3);
    font-weight: 600;
}

.dc-mobile-category-page__root.is-active .dc-mobile-category-page__root-icon {
    border-color: var(--theme-primary, #2196F3);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.16);
}

.dc-mobile-category-page__second {
    gap: 6px;
    padding: 6px 10px;
    background: #f4f5f7;
}

.dc-mobile-category-page__second-item {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font: inherit;
    font-size: 12px;
    white-space: nowrap;
}

.dc-mobile-category-page__second-item.is-active {
    border-color: var(--theme-primary, #2196F3);
    color: #fff;
    background: var(--theme-primary, #2196F3);
}

.dc-mobile-category-page__content {
    display: grid;
    grid-template-columns: minmax(78px, 21%) minmax(0, 1fr);
    min-height: 0;
    flex: 1 1 0;
    overflow: hidden;
}

.dc-mobile-category-page__content.is-product-only {
    grid-template-columns: minmax(0, 1fr);
}

.dc-mobile-category-page__rail {
    overflow-y: auto;
    min-height: 0;
    background: #fff;
    overscroll-behavior: contain;
    scrollbar-color: rgba(100, 116, 139, 0.48) transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.dc-mobile-category-page__rail::-webkit-scrollbar {
    width: 4px;
}

.dc-mobile-category-page__rail::-webkit-scrollbar-track {
    background: transparent;
}

.dc-mobile-category-page__rail::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.48);
}

.dc-mobile-category-page__rail-item {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    border: 0;
    border-left: 3px solid transparent;
    color: #64748b;
    background: transparent;
    font: inherit;
    font-size: 14px;
    text-align: left;
    word-break: break-all;
}

.dc-mobile-category-page__rail-item.is-active {
    border-left-color: var(--theme-primary, #2196F3);
    color: var(--theme-primary, #2196F3);
    background: #f4f5f7;
    font-weight: 600;
}

.dc-mobile-category-page__fourth {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    padding: 12px;
    overflow-y: auto;
    background: #f4f5f7;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.dc-mobile-category-page__fourth-item {
    display: flex;
    align-items: center;
    min-height: 98px;
    flex-direction: column;
    justify-content: center;
    padding: 7px 4px;
    border: 2px solid #fff;
    border-radius: 10px;
    color: #475569;
    background: linear-gradient(0deg, #fff, #f3f5f8);
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.dc-mobile-category-page__fourth-item:active {
    border-color: var(--theme-primary, #2196F3);
    color: var(--theme-primary, #2196F3);
}

.dc-mobile-category-page__fourth-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 6px;
    border-radius: 12px;
}

.dc-mobile-category-page__products {
    min-height: 0;
}

.dc-mobile-category-page__product-host .dc-mobile-category-page__products {
    margin: 0;
    padding: 12px 12px calc(100px + env(safe-area-inset-bottom, 0px));
}

.dc-mobile-category-page__product-host {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 24px;
    touch-action: pan-y;
    background: #f4f5f7;
}

.dc-mobile-category-page__hint,
.dc-mobile-category-page__loading,
.dc-mobile-category-empty {
    display: flex;
    align-items: center;
    min-height: 180px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    border: 1px dashed rgba(203, 213, 225, 0.9);
    border-radius: 14px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.58);
    font-size: 14px;
}

.dc-mobile-category-page__loading i {
    color: var(--theme-primary, #2196F3);
    font-size: 26px;
}

.dc-mobile-category-page__append-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    color: #94a3b8;
    font-size: 12px;
}

.dc-mobile-category-page__append-loading i {
    color: var(--theme-primary, #2196F3);
    font-size: 17px;
}

.dc-mobile-category-page__end {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 0 4px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

.dc-mobile-category-page__end::before,
.dc-mobile-category-page__end::after {
    height: 1px;
    flex: 1 1 auto;
    content: '';
    background: rgba(203, 213, 225, 0.78);
}

.dc-mobile-category-goods.goods-grid-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.dc-mobile-category-goods.goods-grid-list .goods-grid-item {
    min-width: 0;
}

.dc-mobile-category-goods.goods-grid-list .goods-card {
    display: flex;
    align-items: stretch;
    flex-direction: row;
    overflow: hidden;
}

.dc-mobile-category-goods.goods-grid-list .goods-img-box {
    width: 120px;
    height: 120px;
    min-width: 120px;
    max-width: 120px;
    padding-top: 0;
    flex-shrink: 0;
}

.dc-mobile-category-goods.goods-grid-list .goods-img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

@media (max-width: 768px) {
    .dc-mobile-category-goods.goods-grid-list .goods-card {
        isolation: isolate;
    }

    .dc-mobile-category-goods.goods-grid-list .goods-img-box {
        position: relative;
        overflow: hidden;
        border-radius: 8px 0 0 8px;
    }
}

.dc-mobile-category-goods.goods-grid-list .goods-info {
    display: flex;
    flex: 1;
    min-width: 0;
    padding: 8px 14px;
    flex-direction: column;
    justify-content: center;
}

.dc-mobile-category-goods.goods-grid-list .goods-title {
    display: -webkit-box;
    height: 42px;
    min-height: 42px;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dc-mobile-category-goods .goods-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.dc-mobile-category-goods .goods-meta-stock,
.dc-mobile-category-goods .goods-meta-sales,
.dc-mobile-category-goods__meta-divider {
    color: #bbb;
    font-size: 11px;
}

.dc-mobile-category-goods .goods-price-row {
    width: 100%;
    margin-top: auto;
    min-height: 32px;
}

.dc-mobile-category-goods .price-current {
    font-size: 16px;
}

.dc-mobile-category-goods .price-suffix {
    margin-left: 2px;
    color: #ff4d4f;
    font-size: 11px;
    font-weight: 400;
}

.dc-mobile-category-goods .buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    margin-left: auto;
    padding: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--theme-button, #2196F3);
    font-size: 17px;
    line-height: 1;
}

.dc-mobile-category-empty img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    opacity: 0.56;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.dc-mobile-category-empty p {
    margin: 0;
}

.fk-global-pull-refresh-indicator {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 999px;
    color: var(--theme-primary, #2196F3);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    font-size: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, -22px, 0) scale(0.8);
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(.22, .61, .36, 1);
    will-change: transform, opacity;
    z-index: 1005;
}

.fk-global-pull-refresh-indicator.is-visible,
.fk-global-pull-refresh-indicator.is-refreshing {
    opacity: 1;
}

.fk-global-pull-refresh-indicator.is-ready i {
    transform: rotate(180deg);
}

.fk-global-pull-refresh-indicator.is-refreshing i {
    animation: fkMobileCategoryPullSpin 0.75s linear infinite;
}

@keyframes fkMobileCategoryPullSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

html[data-theme="dark"] .dc-mobile-category-goods .goods-title {
    color: #e2e8f0;
}

html[data-theme="dark"] .dc-mobile-category-page__browser,
html[data-theme="dark"] .dc-mobile-category-goods .goods-card,
html[data-theme="dark"] .dc-mobile-category-page__hint,
html[data-theme="dark"] .dc-mobile-category-page__loading,
html[data-theme="dark"] .dc-mobile-category-empty {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .dc-mobile-category-page__root,
html[data-theme="dark"] .dc-mobile-category-page__second-item,
html[data-theme="dark"] .dc-mobile-category-page__rail-item,
html[data-theme="dark"] .dc-mobile-category-page__back {
    color: #cbd5e1;
}

html[data-theme="dark"] .dc-mobile-category-page__root-icon,
html[data-theme="dark"] .dc-mobile-category-page__fourth-icon,
html[data-theme="dark"] .dc-mobile-category-page__second-item,
html[data-theme="dark"] .dc-mobile-category-page__fourth-item,
html[data-theme="dark"] .dc-mobile-category-page__rail-item.is-active {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .dc-mobile-category-page__rail {
    background: rgba(15, 23, 42, 0.72);
}
