:root {
    --xz-bg: #f4f4f6;
    --xz-card: #ffffff;
    --xz-ink: #050505;
    --xz-muted: #5c6370;
    --xz-line: #dedfe5;
    --xz-soft-line: #ececf1;
    --xz-shadow: 0 10px 24px rgba(15, 23, 42, .12);
    --xz-radius: 28px;
}

html {
    font-size: 14px;
}

body.xz-store {
    min-height: 100vh;
    background: var(--xz-bg) !important;
    color: var(--xz-ink);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.xz-store a {
    color: inherit;
    text-decoration: none;
}

.navbar-acg.xz-topbar {
    max-width: calc(100% - 112px);
    margin: 32px auto 0;
    padding: 10px 18px;
    border: 1px solid var(--xz-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--xz-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.xz-topbar .container {
    max-width: none;
}

.xz-topbar-inner {
    gap: 14px;
}

.xz-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-right: 18px;
    padding: 0;
}

.xz-brand-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 22px;
    background: #ffd0db;
    box-shadow: inset 0 -12px 0 rgba(255, 255, 255, .34);
    overflow: hidden;
}

.xz-brand-avatar img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.xz-brand-text {
    display: block;
    max-width: 220px;
    overflow: hidden;
    color: var(--xz-ink);
    font-size: 20px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xz-nav {
    align-items: center;
    gap: 8px;
}

.xz-nav .xz-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 14px !important;
    border-radius: 999px;
    color: #69707d;
    font-size: 16px;
    font-weight: 800;
}

.xz-nav .xz-nav-link.active,
.xz-nav .xz-nav-link:hover {
    background: #fff;
    color: var(--xz-ink);
    box-shadow: 0 4px 16px rgba(15, 23, 42, .14);
}

.xz-pill,
.xz-auth-actions .xz-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--xz-line);
    border-radius: 999px;
    background: #fff;
    color: var(--xz-ink);
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
    box-shadow: none;
}

.xz-register-btn,
.xz-auth-actions .xz-register-btn {
    border-color: #050505;
    background: #050505;
    color: #fff;
}

.xz-login-btn:hover,
.lang-switch__btn:hover {
    border-color: #c9ccd4;
    background: #f8f8fa;
    color: var(--xz-ink);
}

.xz-register-btn:hover {
    background: #202020;
    color: #fff;
}

.xz-shell {
    display: grid;
    grid-template-columns: minmax(280px, 486px) minmax(0, 1fr);
    gap: 30px;
    max-width: calc(100% - 112px);
    margin: 32px auto 64px;
}

.xz-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.xz-card {
    overflow: hidden;
    border: 1px solid var(--xz-line);
    border-radius: var(--xz-radius);
    background: var(--xz-card);
    box-shadow: var(--xz-shadow);
}

.xz-category-card {
    padding: 34px 28px 28px;
}

.xz-eyebrow {
    margin-bottom: 24px;
    color: #536070;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .04em;
}

.xz-side-title,
.xz-catalog-title {
    margin: 0;
    color: var(--xz-ink);
    font-size: 28px;
    font-weight: 950;
    line-height: 1.2;
}

.xz-category-list {
    margin: 28px -28px -28px;
    padding: 28px;
    border-top: 1px solid var(--xz-line);
}

.xz-category-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 12px;
    border: 1px solid var(--xz-line);
    border-radius: 999px;
    background: #fff;
    color: var(--xz-ink);
    font-size: 16px;
    font-weight: 850;
}

.xz-category-item + .xz-category-item {
    margin-top: 12px;
}

.xz-category-item.is-primary,
.xz-category-item:hover {
    box-shadow: 0 5px 15px rgba(15, 23, 42, .14);
}

.xz-category-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f1f4;
    background-position: center;
    background-size: cover;
}

.xz-category-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xz-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f2f3f6;
    color: #565d69;
    font-size: 14px;
    font-weight: 900;
}

.xz-service-card {
    padding: 22px 12px 26px;
    text-align: center;
}

.xz-fee-badge {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: #e7f8e9;
    color: #10883a;
    font-weight: 900;
}

.xz-service-card h2 {
    margin: 12px 0 10px;
    font-size: 24px;
    font-weight: 950;
}

.xz-service-card p {
    margin: 0;
    color: #4f5662;
    font-size: 16px;
    line-height: 1.7;
}

.xz-qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    margin: 22px 0 12px;
    border: 1px solid var(--xz-line);
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px) 0 0 / 22px 22px,
        #fff;
    color: #4f5662;
    font-weight: 850;
}

.xz-qr-placeholder img {
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .12);
}

.xz-service-note {
    margin: 8px 0 16px !important;
    font-size: 14px !important;
}

.xz-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(300px, calc(100% - 64px));
    height: 52px;
    margin: 14px auto 0;
    border-radius: 999px;
    color: #fff;
    font-size: 16px;
    font-weight: 950;
}

.xz-social:hover {
    color: #fff;
    transform: translateY(-1px);
}

.xz-social-telegram {
    background: #0d96d9;
}

.xz-social-qq {
    background: #050505;
}

.xz-catalog-card {
    min-height: 640px;
}

.xz-catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 136px;
    padding: 28px;
    border-bottom: 1px solid var(--xz-line);
}

.xz-catalog-head .xz-eyebrow {
    margin-bottom: 20px;
}

.xz-search {
    display: grid;
    grid-template-columns: 24px minmax(120px, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: min(450px, 48%);
    min-height: 60px;
    padding: 0 6px 0 22px;
    border: 1px solid #d5d8df;
    border-radius: 999px;
    background: #fff;
    color: #4d5561;
}

.xz-search-input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--xz-ink);
    font-size: 16px;
}

.xz-search-input::placeholder {
    color: #a2a8b3;
}

.xz-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-weight: 950;
}

.xz-product-table {
    padding: 28px;
}

.xz-product-head,
.xz-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 120px 100px;
    align-items: center;
    gap: 10px;
}

.xz-product-head {
    min-height: 54px;
    padding: 0 20px;
    border: 1px solid var(--xz-line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: #f5f5f7;
    color: #4f5662;
    font-weight: 950;
}

.xz-product-row {
    min-height: 98px;
    padding: 14px 20px;
    border: 1px solid var(--xz-line);
    border-bottom: 0;
    background: #fff;
    color: var(--xz-ink);
}

.xz-product-row:last-child {
    border-bottom: 1px solid var(--xz-line);
    border-radius: 0 0 22px 22px;
}

.xz-product-row:hover {
    background: #fbfbfc;
}

.xz-product-main {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.xz-product-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #f0f1f4;
    overflow: hidden;
}

.xz-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xz-product-copy {
    min-width: 0;
}

.xz-product-copy strong {
    display: block;
    overflow: hidden;
    color: var(--xz-ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xz-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.xz-product-price {
    color: var(--xz-ink);
    font-size: 18px;
    font-weight: 950;
}

.xz-product-stock {
    color: #4f5662;
    font-size: 16px;
    font-weight: 650;
}

.xz-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 82px;
    height: 44px;
    justify-self: end;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-size: 15px;
    font-weight: 950;
}

.xz-product-row.is-soldout {
    opacity: .58;
    cursor: not-allowed;
}

.xz-product-row.is-soldout .xz-buy-button {
    background: #8f949d;
}

.badge-soft,
.acg-tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.badge-soft-success {
    background: #dff7e7;
    color: #10833b;
}

.badge-soft-primary {
    background: #e3f1ff;
    color: #1370cf;
}

.acg-tag--red { background: #ffe7e7; color: #bd1f2d; }
.acg-tag--orange { background: #fff0d9; color: #a94a00; }
.acg-tag--green { background: #e1f7e9; color: #147a3a; }
.acg-tag--cyan { background: #ddf8fb; color: #087487; }
.acg-tag--blue { background: #e4f0ff; color: #1769c2; }
.acg-tag--purple { background: #f0e8ff; color: #7040b8; }
.acg-tag--pink { background: #ffe7f3; color: #aa216b; }
.acg-tag--gray { background: #edf0f4; color: #545b66; }

.item-message {
    padding: 28px;
    border: 1px solid var(--xz-line);
    border-radius: 0 0 22px 22px;
    color: #68707d;
    text-align: center;
}

.panel {
    border: 1px solid var(--xz-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--xz-shadow);
}

.panel::before {
    display: none;
}

.panel-header {
    border-bottom: 1px solid var(--xz-line);
    box-shadow: none;
}

footer {
    color: #7b8290;
}

@media (max-width: 1180px) {
    .navbar-acg.xz-topbar,
    .xz-shell {
        max-width: calc(100% - 32px);
    }

    .xz-shell {
        grid-template-columns: 320px minmax(0, 1fr);
        gap: 18px;
    }

    .xz-search {
        width: min(420px, 52%);
    }
}

@media (max-width: 991.98px) {
    .navbar-acg.xz-topbar {
        margin-top: 16px;
        border-radius: 24px;
    }

    .xz-topbar .container {
        flex-wrap: wrap;
    }

    .xz-brand-avatar {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 18px;
    }

    .xz-brand-text {
        max-width: 42vw;
    }

    .xz-shell {
        grid-template-columns: 1fr;
    }

    .xz-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .xz-catalog-head {
        flex-direction: column;
        align-items: stretch;
    }

    .xz-search {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .xz-sidebar {
        grid-template-columns: 1fr;
    }

    .xz-product-head {
        display: none;
    }

    .xz-product-table {
        padding: 18px;
    }

    .xz-product-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .xz-product-row {
        grid-template-columns: 1fr auto;
        min-height: 0;
        gap: 12px;
        border: 1px solid var(--xz-line);
        border-radius: 18px;
    }

    .xz-product-row:last-child {
        border-radius: 18px;
    }

    .xz-product-main {
        grid-column: 1 / -1;
    }

    .xz-product-price,
    .xz-product-stock {
        align-self: center;
    }

    .xz-buy-button {
        width: 86px;
    }
}

@media (max-width: 575.98px) {
    .navbar-acg.xz-topbar,
    .xz-shell {
        max-width: calc(100% - 20px);
    }

    .xz-auth-actions {
        display: flex;
        width: 100%;
        gap: 8px;
        margin: 8px 0 0 !important;
    }

    .xz-auth-actions .xz-pill {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 10px;
    }

    .xz-side-title,
    .xz-catalog-title {
        font-size: 24px;
    }

    .xz-category-card,
    .xz-catalog-head {
        padding: 22px;
    }

    .xz-category-list {
        margin: 22px -22px -22px;
        padding: 22px;
    }

    .xz-search {
        grid-template-columns: 20px minmax(0, 1fr) auto;
        min-height: 52px;
        padding-left: 16px;
    }

    .xz-search-button {
        width: 44px;
        padding: 0;
        font-size: 0;
    }

    .xz-search-button i {
        font-size: 15px;
    }

    .xz-product-copy strong {
        white-space: normal;
    }

    .xz-qr-placeholder {
        min-height: 240px;
    }
}
