/* Shop homepage hero + product polish. 2026-11-30d (navy/sapphire palette)
   Official Cartoon hooks unchanged; announcement popup / header menu / tab bar kept. */

.shop-home {
    --shop-card-radius: 22px;
    --shop-row-radius: 16px;
    --shop-buy: #3a5fd6;
    --shop-buy-ink: #fff;
    --shop-accent: #8fb4ff;
    --shop-accent-btn: #3a5fd6;
    --shop-accent-ink: #eef3ff;
    --shop-stock: #5b7ec8;
    --shop-hero-ink: #eef2fb;
    --shop-hero-muted: rgba(214, 224, 242, .74);
}

:root[data-theme="dark"] .shop-home {
    --shop-stock: #8fb4ff;
}

/* ---------- dotted homepage backdrop (dark theme only) ---------- */
:root[data-theme="dark"] body.uc-body:has(main.shop-home) {
    background-image: none !important;
    background-color: #070910;
}

:root[data-theme="dark"] body.uc-body:has(main.shop-home)::before {
    background:
        radial-gradient(circle, rgba(150, 185, 240, .20) 1.1px, transparent 1.5px) 0 0 / 30px 30px,
        radial-gradient(ellipse 80% 45% at 88% -8%, rgba(30, 52, 120, .36), transparent 55%),
        linear-gradient(180deg, #0b0f18 0%, #070910 100%);
}

/* ---------- homepage stack ---------- */
main.shop-home.container {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-top: 12px;
    padding-bottom: 56px;
    max-width: 1180px;
}

.shop-home .panel + .panel,
.shop-home-card + .shop-home-card {
    margin-top: 0;
}

.shop-home-card {
    position: relative;
    border-radius: var(--shop-card-radius);
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-filter);
    backdrop-filter: var(--glass-filter);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-hi);
    overflow: hidden;
}

:root[data-theme="dark"] .shop-home-card,
:root[data-theme="dark"] .shop-home .panel {
    background: rgba(14, 18, 28, .90);
    border-color: rgba(255, 255, 255, .07);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ---------- hero wrap (always the dark dotted stage) ---------- */
.shop-hero-wrap {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    color: var(--shop-hero-ink);
    background:
        radial-gradient(circle, rgba(150, 185, 240, .24) 1.1px, transparent 1.5px) 0 0 / 28px 28px,
        radial-gradient(ellipse 70% 55% at 92% 0%, rgba(40, 70, 150, .38), transparent 52%),
        radial-gradient(ellipse 40% 40% at 8% 100%, rgba(20, 35, 80, .30), transparent 50%),
        #0a0e16;
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
    padding: 28px 28px 0;
}

:root[data-theme="dark"] .shop-hero-wrap {
    background:
        radial-gradient(circle, rgba(150, 185, 240, .18) 1.1px, transparent 1.5px) 0 0 / 30px 30px,
        radial-gradient(ellipse 70% 55% at 92% 0%, rgba(40, 70, 150, .22), transparent 52%),
        transparent;
    border-color: transparent;
    box-shadow: none;
    padding-left: 12px;
    padding-right: 12px;
}

.shop-hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .9fr);
    gap: 28px 36px;
    align-items: center;
    padding: 4px 4px 22px;
}

.shop-hero__tags {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .04em;
    color: var(--shop-accent);
}

.shop-hero__title {
    margin: 0 0 12px;
    font-size: clamp(26px, 4.2vw, 42px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: .01em;
    color: #fff;
}

.shop-hero__title em {
    font-style: normal;
    color: var(--shop-accent);
}

.shop-hero__desc {
    margin: 0 0 22px;
    max-width: 38rem;
    font-size: 14px;
    line-height: 1.7;
    color: var(--shop-hero-muted);
}

.shop-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.shop-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .16s, filter .16s, background .16s, border-color .16s;
}

.shop-hero__btn--primary {
    background: var(--shop-accent-btn);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 8px 22px rgba(58, 95, 214, .30);
}

.shop-hero__btn--primary:hover {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.shop-hero__btn--ghost {
    background: rgba(8, 12, 10, .35);
    color: var(--shop-hero-ink);
    border: 1px solid rgba(255, 255, 255, .22);
}

.shop-hero__btn--ghost:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .06);
}

.shop-hero__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-trust {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1.3;
    color: rgba(232, 237, 234, .86);
}

.shop-trust--users,
.shop-trust--served {
    background: rgba(8, 12, 10, .55);
    border: 1px solid rgba(255, 255, 255, .08);
}

.shop-trust--live {
    padding-left: 4px;
    background: transparent;
    border: 0;
}

.shop-trust__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.shop-trust--users .shop-trust__icon {
    color: #9ec4ff;
}

.shop-trust--served .shop-trust__icon {
    color: #ff9b4a;
}

.shop-trust__label {
    white-space: nowrap;
}

.shop-trust__num {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #fff;
    letter-spacing: .02em;
}

.shop-trust__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--shop-accent);
    box-shadow: 0 0 0 3px rgba(143, 180, 255, .22);
    flex: 0 0 auto;
    animation: shop-trust-pulse 2.4s ease-out infinite;
}

@keyframes shop-trust-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(143, 180, 255, .45); }
    55% { box-shadow: 0 0 0 6px rgba(143, 180, 255, 0); }
}

/* ---------- Telegram card ---------- */
.shop-tg-card {
    position: relative;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(16, 24, 44, .90), rgba(10, 14, 24, .92));
    border: 1px solid rgba(90, 130, 220, .30);
    box-shadow:
        0 0 0 1px rgba(90, 130, 220, .08) inset,
        0 12px 36px rgba(0, 0, 0, .28),
        0 0 32px rgba(50, 90, 200, .16);
}

.shop-tg-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.shop-tg-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    box-shadow: 0 0 0 2px rgba(90, 130, 220, .30);
}

.shop-tg-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.shop-tg-card__label {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.shop-tg-card__handle {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #d7eef8;
    background: rgba(8, 16, 22, .7);
    border: 1px solid rgba(255, 255, 255, .08);
}

.shop-tg-card__open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--shop-accent-btn);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(58, 95, 214, .30);
}

.shop-tg-card__open:hover {
    color: #fff;
    filter: brightness(1.06);
}

.shop-tg-card__tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.shop-tg-card__tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    min-height: 64px;
    padding: 10px 10px 9px;
    border-radius: 12px;
    background: rgba(6, 10, 12, .45);
    border: 1px solid rgba(255, 255, 255, .06);
    color: rgba(232, 237, 234, .92);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.shop-tg-card__tile:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(90, 130, 220, .30);
}

.shop-tg-card__tile .material-icons-outlined {
    font-size: 18px;
    color: var(--shop-accent);
}

/* ---------- info bar ---------- */
.shop-hero__bar {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    padding: 14px 4px 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: 13px;
    color: rgba(223, 232, 226, .7);
}

.shop-hero__bar-item {
    color: inherit;
    text-decoration: none;
}

.shop-hero__bar-item b {
    color: #f4f7f5;
    font-weight: 700;
}

a.shop-hero__bar-item:hover {
    color: #fff;
}

.shop-hero__bar-orders {
    margin-left: auto;
}

.shop-hero__bar-orders::after {
    content: " →";
}

.shop-hero__bar-contract {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--shop-accent-btn, #3a5fd6);
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    box-shadow: 0 4px 12px rgba(58, 95, 214, .28);
}

a.shop-hero__bar-contract,
a.shop-hero__bar-contract:hover {
    color: #fff;
}

a.shop-hero__bar-contract:hover {
    filter: brightness(1.06);
}

#shop-products {
    scroll-margin-top: 86px;
}

/* ---------- products ---------- */
.shop-products {
    padding: 16px 16px 18px;
}

.shop-products .panel-body,
.shop-products .panel-header {
    padding: 0;
}

.shop-products__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.shop-products__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 750;
    color: var(--uc-ink);
}

.shop-products__title i {
    color: var(--shop-accent-btn);
    font-size: 15px;
}

.shop-products__count {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--uc-ink-med);
    background: rgba(125, 125, 135, .14);
}

.shop-products__search {
    margin-bottom: 12px;
}

.shop-products__search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--uc-field-bg);
    border: 1px solid var(--glass-border-soft);
    color: var(--uc-ink-med);
    transition: border-color .16s, box-shadow .16s;
}

.shop-products__search-box:focus-within {
    border-color: var(--uc-focus);
    box-shadow: 0 0 0 3px rgba(var(--uc-focus-rgb), .18);
}

.shop-products__search-box i {
    font-size: 15px;
    flex: 0 0 auto;
}

.shop-products__search-box input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--uc-ink);
    font-size: 14px;
}

.shop-products__search-box input::placeholder {
    color: var(--uc-ink-dis);
}

/* ---------- chips ---------- */
.shop-home .chip-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: thin;
}

.shop-home .chip {
    height: 34px;
    padding: 0 12px 0 8px;
    background: var(--uc-field-bg);
    border: 1px solid var(--glass-border-soft);
}

.shop-home .chip .chip-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.shop-home .chip-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    background: rgba(125, 125, 135, .16);
    color: var(--uc-ink-med);
}

.shop-home .chip.is-primary {
    color: #fff;
    background: var(--shop-accent-btn);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(58, 95, 214, .30);
}

.shop-home .chip.is-primary .chip-count {
    background: rgba(5, 33, 15, .18);
    color: inherit;
}

/* ---------- product cards ---------- */
.shop-home .item-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 720px) {
    .shop-home .item-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1080px) {
    .shop-home .item-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.shop-home .acg-card {
    border-radius: 18px;
    background: var(--glass-bg-soft, rgba(255, 255, 255, .7));
    border: 1px solid var(--glass-border-soft);
    box-shadow: 0 6px 18px rgba(31, 45, 70, .08);
}

:root[data-theme="dark"] .shop-home .acg-card {
    background: #12151e;
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
}

.shop-home .item-card-cell:hover .acg-card {
    transform: translateY(-3px);
    border-color: rgba(143, 180, 255, .28);
}

.shop-home .acg-thumb {
    aspect-ratio: 1 / 1;
    background-color: rgba(125, 125, 135, .08);
}

.shop-home .acg-card > .acg-body {
    padding: 10px 11px 12px;
    gap: 6px;
}

.shop-home .goods-title {
    order: 1;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.4;
    min-height: 2.8em;
}

.shop-home .tags { order: 2; }

.shop-home .stat-row {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.shop-home .price {
    color: var(--shop-buy);
    font-size: 18px;
    font-weight: 760;
}

:root[data-theme="dark"] .shop-home .price {
    color: #9bb7ff;
}

.shop-home .stat-row::after {
    content: "购买";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--shop-buy);
    color: var(--shop-buy-ink);
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 auto;
    letter-spacing: .02em;
}

.shop-home .acg-card.soldout .stat-row::after {
    content: "售罄";
    background: rgba(125, 125, 135, .45);
    color: #fff;
}

.shop-home .stat-bottom {
    order: 4;
    justify-content: flex-start;
    gap: 10px;
    font-size: 11.5px;
}

.shop-home .stat-bottom span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.shop-home .stat-bottom span:first-child::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--shop-stock);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-stock) 22%, transparent);
}

.shop-home .acg-card.soldout .stat-bottom span:first-child::before {
    background: #9aa0ab;
    box-shadow: none;
}

.shop-home .badge-soft,
.shop-home .acg-tag {
    padding: 1px 7px;
    font-size: 10.5px;
}

/* ---------- bottom tab bar (mobile) ---------- */
.shop-tabbar { display: none; }

@media (max-width: 768px) {
    .shop-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 150;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        height: calc(56px + env(safe-area-inset-bottom, 0px));
        padding: 4px 8px env(safe-area-inset-bottom, 0px);
        background: rgba(252, 252, 253, .94);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border-top: 1px solid var(--glass-border, rgba(0, 0, 0, .08));
        box-shadow: 0 -8px 24px rgba(31, 45, 70, .06);
    }

    :root[data-theme="dark"] .shop-tabbar {
        background: rgba(9, 12, 20, .94);
        border-top-color: rgba(255, 255, 255, .08);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .28);
    }

    .shop-tabbar__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--uc-ink-dis, #8b8f9a);
        font-size: 11px;
        font-weight: 500;
        text-decoration: none;
        min-width: 0;
    }

    .shop-tabbar__item .material-icons-outlined {
        font-size: 22px;
        line-height: 1;
    }

    .shop-tabbar__item.is-active {
        color: var(--shop-accent-btn, #3a5fd6);
        font-weight: 700;
    }

    .shop-tabbar__item:hover { color: var(--uc-ink); }
    .shop-tabbar__item.is-active:hover { color: var(--shop-accent-btn, #3a5fd6); }

    body.uc-body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    main.shop-home.container { padding-bottom: 24px; }
}

body.shop-notice-open .shop-tabbar,
body.shop-drawer-open .shop-tabbar {
    visibility: hidden;
}

/* ---------- mobile: single column ---------- */
@media (max-width: 860px) {
    .shop-hero-wrap {
        padding: 20px 16px 0;
        border-radius: 20px;
    }

    .shop-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 0 18px;
    }

    .shop-hero__title {
        font-size: clamp(24px, 7vw, 34px);
    }

    .shop-hero__bar-orders {
        margin-left: 0;
    }

    .shop-hero__bar-contract {
        height: 32px;
        padding: 0 14px;
    }

    .shop-tg-card__tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-tg-card__tile {
        flex-direction: row;
        align-items: center;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .shop-tg-card__head {
        flex-wrap: wrap;
    }

    .shop-tg-card__open {
        margin-left: auto;
    }

    .shop-hero__btn {
        height: 42px;
        padding: 0 16px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-hero__btn,
    .shop-home .acg-card,
    .shop-tg-card__tile {
        transition: none;
    }
}

@media print {
    .shop-tabbar { display: none !important; }
}
