:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #1d2733;
    --muted: #7a8491;
    --line: #e9edf2;
    --red: #e93440;
    --orange: #ff8a1f;
    --green: #19a974;
    --dark: #111827;
    --shadow: 0 12px 32px rgba(18, 26, 38, .08);
}

@font-face {
    font-family: iconfont;
    src: url("https://at.alicdn.com/t/c/font_993865_y16rke07phr.woff2?t=1770019710811") format("woff2"),
        url("https://at.alicdn.com/t/c/font_993865_y16rke07phr.woff?t=1770019710811") format("woff");
}

.iconfont { font-family: iconfont !important; font-style: normal; -webkit-font-smoothing: antialiased; }
.icon-kefuliaotian:before { content: "\e8c5"; }
.icon-ic_search:before { content: "\e870"; }
.icon-a-ic_Imageandtextsorting:before { content: "\e8bd"; }
.icon-ic_rightarrow:before { content: "\e8b3"; }
.icon-ic_increase-2:before { content: "\e8be"; }
.icon-shouye8:before { content: "\e79e"; }
.icon-fenlei3:before { content: "\e7bc"; }
.icon-huiyuanzhongxin:before { content: "\e6d5"; }
.icon-gouwuche7:before { content: "\e79f"; }
.icon-gerenzhongxin1:before { content: "\e79c"; }

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #e9edf2;
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

.mall-shell {
    width: min(430px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 10px 82px;
    background: var(--bg);
}

.mall-header {
    margin: 0 -10px 12px;
    padding: 4px 6px 8px;
    overflow: hidden;
    background: #d9aaae;
}

.mall-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 8px 4px;
}

.brand-logo {
    flex: 0 0 auto;
    color: #ffffff;
    text-decoration: none;
    font-family: Arial Rounded MT Bold, Arial, sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-logo img {
    display: block;
    width: auto;
    max-width: 92px;
    height: 26px;
    object-fit: contain;
}

.mall-top p,
.section-title p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
}

.mall-top h1,
.section-title h2 {
    margin: 0;
    letter-spacing: 0;
}

.mall-top h1 {
    font-size: 22px;
}

.round-btn {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #3587f2;
    background: #edf6ff;
    box-shadow: var(--shadow);
    text-decoration: none;
    font-size: 19px;
}

.search-card {
    min-height: 44px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 14px;
    background: var(--panel);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.mall-header .search-card {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 32px;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 0;
    padding: 0 2px 0 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .4);
    box-shadow: none;
}

.mall-header .search-card input {
    color: #ffffff;
    font-size: 13px;
}

.mall-header .search-card input::placeholder { color: rgba(255,255,255,.92); }

.mall-header .search-card .search-icon {
    min-height: 28px;
    padding: 0;
    color: #ffffff;
    background: transparent;
    font-size: 18px;
}

.search-card span {
    color: var(--muted);
    font-size: 12px;
}

.search-card input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.search-card button,
.section-title button,
.product-card button,
.bargain-item button {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--red);
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 0 10px;
}

.category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 4px;
    padding-left: 5px;
}

.mall-header .category-tabs {
    gap: 0;
    padding: 3px 0 5px;
    scrollbar-width: none;
}

.mall-header .category-tabs::-webkit-scrollbar { display: none; }

.category-tabs button {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--muted);
    background: #ffffff;
}

.mall-header .category-tabs button {
    min-height: 28px;
    padding: 0 8px;
    border-radius: 0;
    color: rgba(255,255,255,.9);
    background: transparent;
    font-size: 13px;
}

.category-tabs button.active {
    color: #ffffff;
    background: var(--dark);
}

.mall-header .category-tabs button.active {
    color: #ffffff;
    background: transparent;
    font-weight: 700;
}

.category-shortcut {
    display: grid;
    place-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 21px;
}

.hero-slider {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow: hidden;
    padding-right: 1px;
}

.hero-card {
    position: relative;
    flex: 0 0 100%;
    aspect-ratio: 750 / 345;
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.hero-card > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 8px;
    display: flex;
    gap: 5px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 6px;
    height: 6px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.58);
}

.hero-dots button.active {
    width: 16px;
    border-radius: 6px;
    background: #ffffff;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px 8px;
    margin: 12px 0;
    padding: 14px 10px;
    background: var(--panel);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.quick-item {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 0;
    color: var(--text);
    background: transparent;
    font-size: 12px;
}

.quick-item span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    line-height: 1.35;
    text-align: center;
}

.quick-icon {
    width: 44px;
    height: 44px;
    display: block;
    object-fit: contain;
}

.store-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    aspect-ratio: 572 / 251;
    gap: 8px;
    margin: 0 0 12px;
}

.store-entry-card {
    position: relative;
    min-width: 0;
    height: auto;
    overflow: hidden;
    padding: 13px 10px 10px 13px;
    border-radius: 8px;
    color: #1e5e4a;
    background: #e7f5ee;
    text-align: left;
    isolation: isolate;
}

.store-entry-card:first-child {
    grid-row: 1 / span 2;
    height: auto;
    padding: 17px 14px;
    color: #9a4c13;
    background: #fff0df;
}

.store-entry-card.theme-rose {
    color: #2665a4;
    background: #e5f2ff;
}

.store-entry-card.theme-gold {
    color: #b52848;
    background: #ffe7ec;
}

.store-entry-copy {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.store-entry-copy strong {
    display: block;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: 0;
}

.store-entry-copy small {
    display: block;
    width: 68%;
    margin-top: 4px;
    color: currentColor;
    font-size: 10px;
    line-height: 1.35;
    opacity: .76;
}

.store-entry-copy em {
    display: none;
    align-items: center;
    min-height: 20px;
    margin-top: 7px;
    padding: 0;
    border-radius: 0;
    color: currentColor;
    background: transparent;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.store-entry-card:first-child .store-entry-copy strong { font-size: 19px; }
.store-entry-card:first-child .store-entry-copy small { width: 88%; font-size: 11px; }
.store-entry-card:first-child .store-entry-copy em { margin-top: 10px; font-size: 11px; }

.store-entry-card img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.store-entry-card:first-child img {
    inset: 0;
    width: 100%;
    height: 100%;
}

.store-entry-card:active {
    transform: translateY(1px);
}

.elder-goods-section {
    margin: 12px 0;
    padding: 14px;
    border-radius: 8px;
    background: #fff0df;
}

.elder-goods-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.elder-goods-head h2 {
    margin: 0;
    color: #232323;
    font-size: 20px;
    letter-spacing: 0;
}

.elder-goods-head span {
    padding: 2px 7px;
    border-radius: 5px;
    color: #ffffff;
    background: #dfa157;
    font-size: 14px;
}

.elder-goods-list {
    display: grid;
    gap: 10px;
}

.elder-goods-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
}

.elder-goods-item > img {
    width: 88px;
    height: 88px;
    display: block;
    border-radius: 7px;
    object-fit: cover;
    background: #f3f5f8;
}

.elder-goods-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.elder-goods-info h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 2px 0 8px;
    color: #303030;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.elder-goods-info > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.elder-goods-info strong {
    color: #e52323;
    font-size: 21px;
    letter-spacing: 0;
}

.elder-goods-info button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 15px;
    border-radius: 18px;
    color: #ffffff;
    background: #d29a3f;
}

.elder-empty {
    margin: 0;
    padding: 28px 0;
    text-align: center;
    color: var(--muted);
}

.deal-section,
.product-tabs,
.recommend-head {
    margin-top: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 18px;
}

.section-title button {
    color: var(--red);
    background: #fff1f2;
}

.horizontal-products {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: 10px;
    overflow-x: auto;
}

.group-card,
.bargain-item,
.product-card {
    background: var(--panel);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.group-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    padding: 10px;
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    background: #eef2f7;
}

.group-card h3,
.product-card h3,
.bargain-item h3 {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    line-height: 1.45;
}

.group-meta {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}

.mini-pill {
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--red);
    background: #fff1f2;
    font-size: 11px;
}

.price {
    color: var(--red);
    font-weight: 800;
}

.origin-price {
    margin-left: 5px;
    color: var(--muted);
    text-decoration: line-through;
    font-size: 12px;
}

.bargain-list {
    display: grid;
    gap: 10px;
}

.bargain-item {
    display: grid;
    grid-template-columns: 82px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.product-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.product-tabs button {
    min-height: 38px;
    border-radius: 8px;
    color: var(--muted);
    background: #ffffff;
}

.product-tabs button.active {
    color: #1c1c1c;
    background: #d7a23f;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.product-card {
    overflow: hidden;
}

.product-card-body {
    padding: 10px;
}

.product-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.product-card button {
    width: 100%;
    margin-top: 9px;
}

.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}

.product-card .product-buy-btn {
    flex: 0 0 70px;
    width: 70px;
    height: 30px;
    min-height: 30px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0 8px;
    border-radius: 5px;
    color: #ffffff;
    background: var(--red);
    font-size: 12px;
    white-space: nowrap;
}

.product-card .product-buy-btn:disabled { background: #cbd0d7; }
.points-product-card .points-product-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.points-product-card .points-product-foot .price {
    display: block;
    width: 100%;
    line-height: 1.35;
}
.points-product-card .points-product-foot .product-buy-btn {
    width: 100%;
    flex-basis: 34px;
    height: 34px;
    min-height: 34px;
}
.points-product-card { cursor: pointer; }
.points-product-card .points-product-foot .product-buy-btn.sold-out { background: #cbd0d7; }
.home-empty { grid-column: 1 / -1; padding: 42px 0; text-align: center; color: var(--muted); }

.recommend-head {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 10;
    width: min(430px, 100%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    transform: translateX(-50%);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.bottom-nav button,
.bottom-nav a {
    min-height: 38px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    grid-template-rows: 21px auto;
    gap: 2px;
    font-size: 11px;
}

.bottom-nav .tab-icon { font-size: 21px; line-height: 1; }

.bottom-nav button.active,
.bottom-nav a.active {
    color: var(--red);
    font-weight: 700;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 78px;
    z-index: 20;
    max-width: 280px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, .92);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.category-shell {
    min-height: 100vh;
    padding: 12px 10px 82px;
}

.category-search {
    position: sticky;
    top: 0;
    z-index: 5;
}

.category-layout {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.category-sidebar {
    position: sticky;
    top: 68px;
    align-self: start;
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.category-sidebar button {
    min-height: 44px;
    padding: 0 8px;
    border-radius: 8px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

.category-sidebar button.active {
    color: #ffffff;
    background: var(--dark);
    font-weight: 700;
}

.category-content {
    min-width: 0;
}

.category-banner {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
    padding: 14px;
    border-radius: 8px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .28), transparent 28%),
        linear-gradient(135deg, #e93440 0%, #111827 100%);
    box-shadow: var(--shadow);
}

.category-banner span {
    width: fit-content;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    font-size: 12px;
}

.category-banner h1,
.category-banner p {
    margin: 0;
}

.category-banner h1 {
    font-size: 21px;
    letter-spacing: 0;
}

.category-banner p {
    opacity: .82;
    font-size: 12px;
}

.sub-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.sub-category-grid button {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--text);
    background: transparent;
}

.sub-category-grid span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 700;
}

.sub-category-grid em {
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 10px;
}

.category-section-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0;
}

.category-section-head span {
    color: var(--muted);
    font-size: 12px;
}

.category-product-list {
    display: grid;
    gap: 10px;
}

.category-product {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 68px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-product img {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    object-fit: cover;
    background: #eef2f7;
}

.category-product h3,
.category-product p {
    margin: 0;
}

.category-product h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    line-height: 1.45;
}

.category-product p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.category-product strong {
    color: var(--red);
    font-size: 16px;
}

.category-product span {
    margin-left: 5px;
    color: var(--muted);
    text-decoration: line-through;
    font-size: 12px;
}

.category-product button {
    width: 68px;
    height: 30px;
    border-radius: 5px;
    color: #ffffff;
    background: var(--red);
    font-size: 12px;
    white-space: nowrap;
}

.empty-state {
    margin: 0;
    padding: 24px 12px;
    border-radius: 8px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

@media (max-width: 380px) {
    .quick-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .store-card-grid { grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .store-entry-card { height: auto; padding: 11px 8px 8px 10px; }
    .store-entry-card:first-child { height: auto; padding: 15px 12px; }
    .store-entry-copy strong { font-size: 14px; }
    .store-entry-card:first-child .store-entry-copy strong { font-size: 18px; }
    .store-entry-copy small { font-size: 9px; }
    .store-entry-card img,
    .store-entry-card:first-child img { width: 100%; height: 100%; }

    .bargain-item {
        grid-template-columns: 72px 1fr;
    }

    .bargain-item button {
        grid-column: 1 / -1;
    }

    .category-layout {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .sub-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-product {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .category-product img {
        width: 72px;
        height: 72px;
    }

    .category-product button {
        grid-column: 1 / -1;
        width: 100%;
        border-radius: 8px;
    }
}
