/* Storefront homepage. Shared checkout and account styles are kept separate. */
body:has(main.shop-home) {
    background-color: #f4f3f9;
}

body:has(main.shop-home) .uc-topbar {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body:has(main.shop-home) .uc-topbar .shop-nav {
    border-color: transparent !important;
    box-shadow: none !important;
}

body:has(main.shop-home) .uc-topbar .shop-brand__name {
    color: #fff !important;
}

body:has(main.shop-home) .uc-topbar .shop-nav__item.active {
    background: #594394 !important;
}

main.shop-home.container {
    --shop-hero-ink: #f9f7ff;
    --shop-hero-muted: #e1d9f5;
    --shop-home-ink: #251d39;
    --shop-home-muted: #675d78;
    --shop-home-accent: #50359e;
    --shop-home-line: #e5dff1;
    gap: 26px;
}

.shop-home .shop-hero-wrap {
    isolation: isolate;
    color: var(--shop-hero-ink);
    background: linear-gradient(118deg, #211532, #352357 65%, #252246);
    border-color: #77619c;
    box-shadow: none !important;
}

.shop-home .shop-hero-wrap::before,
.shop-home .shop-hero-wrap::after {
    content: "";
    position: absolute;
    display: block;
    pointer-events: none;
    z-index: -1;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    width: auto;
    height: auto;
}

.shop-home .shop-hero-wrap::before {
    inset: -23% -15% -18% -10%;
    background:
        radial-gradient(ellipse 43% 46% at 87% 29%, #6559c1c4 0%, #7950b770 46%, transparent 74%),
        radial-gradient(ellipse 33% 75% at 96% 66%, #4fa7b578 0%, #455fb14a 47%, transparent 76%),
        radial-gradient(ellipse 37% 45% at 48% 96%, #b74eaf69 0%, #7544af38 45%, transparent 76%),
        linear-gradient(151deg, transparent 41%, #d0acff30 53%, #7a79dc12 62%, transparent 75%);
    opacity: .93;
    transform-origin: 78% 48%;
    animation: shop-home-aurora 18s ease-in-out infinite alternate;
}

.shop-home .shop-hero-wrap::after {
    inset: 0;
    opacity: .82;
    background:
        radial-gradient(circle at 4% 14%, #e3cbff 0 1px, transparent 2px),
        radial-gradient(circle at 9% 83%, #bbacff 0 1px, transparent 2px),
        radial-gradient(circle at 17% 8%, #e6c1fa 0 1px, transparent 2px),
        radial-gradient(circle at 29% 74%, #bfa7ef 0 1px, transparent 2px),
        radial-gradient(circle at 38% 12%, #bd9fe5 0 1px, transparent 2px),
        radial-gradient(circle at 49% 20%, #ded4ff 0 1px, transparent 2px),
        radial-gradient(circle at 51% 64%, #efe4ff 0 1px, #c8aaff50 2px, transparent 5px),
        radial-gradient(circle at 56% 11%, #faf5ff 0 1px, #e9caff66 2px, transparent 6px),
        radial-gradient(circle at 59% 46%, #d2c5fd 0 1px, transparent 2px),
        radial-gradient(circle at 62% 69%, #dac7fc 0 1px, transparent 2px),
        radial-gradient(circle at 73% 6%, #e9c3ff 0 1px, transparent 3px),
        radial-gradient(circle at 78% 90%, #b9d8ff 0 1px, transparent 3px),
        radial-gradient(circle at 96% 79%, #a5e2ff 0 1px, #bfefff44 2px, transparent 6px),
        radial-gradient(circle at 98% 19%, #ece7ff 0 1px, transparent 3px);
}

@keyframes shop-home-aurora {
    from { transform: translate3d(-2%, 0, 0) rotate(-3deg) scale(1); }
    to { transform: translate3d(3%, -3%, 0) rotate(6deg) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .shop-home .shop-hero-wrap::before { animation: none; }
    .shop-home .shop-trust__dot { animation: none; }
}

.shop-home .shop-hero__tags { color: #e8d5ff; }
.shop-home .shop-hero__title { color: var(--shop-hero-ink); letter-spacing: 0; }
.shop-home .shop-hero__title em { color: #e0c6ff; }
.shop-home .shop-hero__desc { color: var(--shop-hero-muted); }

.shop-home .shop-hero__actions { gap: 9px; }
.shop-home .shop-hero__btn { min-height: 44px; border-radius: 11px; }
.shop-home .shop-hero__btn--primary,
.shop-home .shop-hero__btn--primary:hover {
    color: #2a194c !important;
    background: linear-gradient(115deg, #efdcff, #d8d1ff) !important;
    border-color: #e5d3ff !important;
    box-shadow: 0 4px 16px #c5a5ff49;
}

.shop-home .shop-hero__btn--primary:hover { background: #f0e6ff !important; }
.shop-home .shop-hero__btn--ghost,
.shop-home .shop-hero__btn--ghost:hover {
    color: #fff !important;
    background: #ffffff12 !important;
    border-color: #cdb9ea91 !important;
}

.shop-home .shop-hero__trust { gap: 6px 14px; }
.shop-home .shop-hero__trust :is(.shop-trust--users, .shop-trust--served) {
    background: #ffffff14;
    border-color: #dfcbff65;
}
.shop-home .shop-hero__trust .shop-trust__label,
.shop-home .shop-hero__trust .shop-trust__num { color: #ece3fb; }
.shop-home .shop-hero__trust .shop-trust__icon { color: #d9baff; }
.shop-home .shop-trust__dot { background: #d6b4ff; }
.shop-home .shop-tg-card {
    border-color: #eee8fa;
    border-radius: 19px;
    background: #fbf9ff;
    box-shadow: 0 6px 18px #1d103623;
}

.shop-home .shop-hero__bar {
    border-top-color: #f2e4ff42;
    color: #e8dcfb;
}
.shop-home .shop-hero__bar-item b,
.shop-home a.shop-hero__bar-item:hover { color: #fff; }
.shop-home a.shop-hero__bar-contract,
.shop-home a.shop-hero__bar-contract:hover {
    color: #2a194c;
    background: #ecddff;
    border-radius: 11px;
}

.shop-home .shop-products__head { min-width: 0; }
.shop-home .shop-products { box-shadow: none !important; }
.shop-home .shop-products__title { color: var(--shop-home-ink); }
.shop-home .shop-products__search-box,
.shop-home .chip-list {
    border-color: var(--shop-home-line);
    box-shadow: 0 3px 12px #3723570a;
}
.shop-home .chip.is-primary {
    background: #eee8fa;
    color: #3d267c;
    box-shadow: inset 3px 0 var(--shop-home-accent);
}
.shop-home .chip-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.shop-home .chip-count { flex-shrink: 0; }

.shop-home .item-list {
    gap: 10px;
    padding: 0;
    margin-inline: 0;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.shop-home .item-card-cell { display: flex; min-width: 0; text-decoration: none; }
.shop-home .item-card-cell .acg-card,
.shop-home .item-card-cell:last-child .acg-card {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--shop-home-line);
    border-radius: 16px;
    padding: 13px 15px;
    box-shadow: 0 3px 10px #3629540b;
}
.shop-home .item-card-cell:hover .acg-card,
.shop-home .item-card-cell:focus-visible .acg-card {
    border-color: #b9a9de;
    background: #fcfaff;
}
.shop-home .acg-card .acg-thumb {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    border-color: var(--shop-home-line);
}
.shop-home .acg-card .goods-title {
    color: var(--shop-home-ink);
    font-size: 15px;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}
.shop-home .acg-body .stat-row .price {
    color: #442c87;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}
.shop-home .acg-body > .stat-bottom { color: var(--shop-home-muted); }
.shop-home .acg-card > .acg-body::after {
    min-height: 38px;
    height: auto;
    padding: 6px 15px;
    background: var(--shop-home-accent);
    border-radius: 10px;
}
.shop-home .acg-card.soldout > .acg-body::after {
    background: #eee9f7;
    color: #584e67;
}
.shop-home a:focus-visible,
body:has(main.shop-home) .uc-topbar a:focus-visible {
    outline: 2px solid #9d76e7;
    outline-offset: 3px;
}

@media (min-width: 1050px) {
    .shop-home .shop-products { grid-template-columns: 215px minmax(0, 1fr); }
    .shop-home .item-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 899px), (min-width: 1050px) {
    .shop-home .acg-card > .acg-body {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto;
        grid-template-areas: "title title" "tags tags" "price action" "stock action";
        gap: 5px 7px;
    }
    .shop-home .acg-body > .stat-row {
        flex-flow: row wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
    }
    .shop-home .acg-body > .stat-bottom {
        grid-area: stock;
        justify-self: stretch;
        align-items: center;
        justify-content: flex-start;
        flex-flow: row wrap;
        gap: 2px 8px;
        margin: 0;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    main.shop-home.container { gap: 18px; }
    .shop-home .shop-hero { gap: 14px; }
    .shop-home .shop-products { padding-inline: 0; }
    .shop-home .acg-card .acg-thumb { width: 43px; height: 43px; flex-basis: 43px; }
    .shop-home .item-card-cell .acg-card,
    .shop-home .item-card-cell:last-child .acg-card { gap: 9px; padding: 11px; }
    .shop-home .acg-card > .acg-body::after { padding-inline: 10px; }
}

@media (max-width: 768px) {
    body:has(main.shop-home) .uc-topbar .shop-nav { gap: 8px; }
    body:has(main.shop-home) .uc-topbar :is(.shop-nav__list,.shop-search,.shop-auth,.shop-extra),
    body:has(main.shop-home) .uc-topbar .shop-nav__right > a.shop-icon-btn { display: none !important; }
    body:has(main.shop-home) .uc-topbar .shop-brand { flex: 1 1 auto; gap: 7px; }
    body:has(main.shop-home) .uc-topbar .shop-brand__name { display: block; min-width: 0; }
    body:has(main.shop-home) .uc-topbar .shop-burger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        color: #fff;
        width: 42px;
        height: 42px;
    }
    .shop-home .shop-tg-card__tile .material-icons-outlined { flex: 0 0 22px; width: 22px; overflow: hidden; }
}

@media (min-width: 1200px) {
    body:has(main.shop-home) { --shop-home-width: min(94vw, 1880px); }

    body:has(main.shop-home) .uc-topbar__inner,
    main.shop-home.container {
        width: 100%;
        max-width: var(--shop-home-width);
    }

    body:has(main.shop-home) .uc-topbar .shop-nav {
        height: 68px;
        gap: 12px;
        padding-inline: 16px 10px;
    }

    body:has(main.shop-home) .shop-brand { font-size: 18px; }
    body:has(main.shop-home) .shop-brand img { width: 36px; height: 36px; }
    body:has(main.shop-home) .shop-brand__name { max-width: 230px; }
    body:has(main.shop-home) :is(.shop-nav__item, .shop-search input) { font-size: 15px; }
    body:has(main.shop-home) .shop-search { max-width: min(29vw, 480px); }

    .shop-home .shop-hero {
        gap: clamp(24px, 3vw, 52px);
        padding: clamp(32px, 3.2vw, 56px) clamp(32px, 3.4vw, 60px);
    }

    .shop-home .shop-hero__title { font-size: clamp(44px, 3.1vw, 68px); }
    .shop-home :is(.shop-hero__desc, .shop-hero__tags) { font-size: clamp(15px, 1.02vw, 18px); }
    .shop-home :is(.shop-hero__btn, .shop-tg-card__group) { min-height: 46px; font-size: 15px; }
    .shop-home .shop-hero__bar { font-size: 14px; }
    .shop-home .shop-tg-card { padding: clamp(19px, 1.6vw, 28px); }
    .shop-home .shop-tg-card__tile { min-height: 70px; font-size: 14px; }
    .shop-home .shop-products {
        grid-template-columns: clamp(230px, 15vw, 280px) minmax(0, 1fr);
        column-gap: clamp(18px, 1.6vw, 28px);
    }

    .shop-home .shop-products__title { font-size: clamp(24px, 1.65vw, 32px); }
    .shop-home .shop-products__search-box { min-height: 47px; }
    .shop-home .chip-name { font-size: 14px; }
    .shop-home .item-list { gap: 14px; }
    .shop-home .item-card-cell .acg-card,
    .shop-home .item-card-cell:last-child .acg-card { padding: 17px 20px; gap: 16px; }
    .shop-home .acg-card .acg-thumb { width: 64px; height: 64px; flex-basis: 64px; }
    .shop-home .acg-card .goods-title { font-size: clamp(17px, 1.05vw, 20px); }
    .shop-home .acg-body .stat-row .price { font-size: clamp(22px, 1.35vw, 26px); }
    .shop-home .acg-card > .acg-body::after { min-height: 42px; font-size: 14px; }
}

@media (min-width: 1920px) {
    main.shop-home.container::before,
    main.shop-home.container::after {
        content: "";
        position: fixed;
        top: 11vh;
        width: calc((100vw - var(--shop-home-width)) / 2 - 16px);
        height: min(84vh, 880px);
        pointer-events: none;
        background:
            radial-gradient(ellipse, #fff 0 12%, #ad80eab0 28%, transparent 72%) 28% 26% / 5px 33px no-repeat,
            radial-gradient(ellipse, #fff 0 12%, #ad80eab0 28%, transparent 72%) 28% 26% / 33px 5px no-repeat,
            radial-gradient(ellipse, #fff 0 10%, #5caac5bf 27%, transparent 72%) 58% 68% / 4px 25px no-repeat,
            radial-gradient(ellipse, #fff 0 10%, #5caac5bf 27%, transparent 72%) 58% 68% / 25px 4px no-repeat,
            linear-gradient(137deg, transparent 47%, #b186e548 49%, #a36cdf 50%, #fff 51%, transparent 53%) 61% 37% / 108px 82px no-repeat,
            linear-gradient(137deg, transparent 47%, #82c8e226 49%, #79b6db 50%, #fff 51%, transparent 54%) 15% 73% / 60px 45px no-repeat,
            radial-gradient(circle at 69% 47%, #a171d3 0 1px, transparent 3px),
            radial-gradient(circle at 23% 59%, #71a7d5 0 1px, transparent 3px),
            radial-gradient(circle at 76% 65%, #a482da 0 1px, transparent 3px),
            radial-gradient(circle at 48% 21%, #a482da 0 1px, transparent 3px),
            repeating-radial-gradient(ellipse 92% 33% at 1% 48%, transparent 0 19%, #a67cde56 19.3% 19.9%, transparent 20.3% 31%),
            radial-gradient(ellipse 62% 37% at 32% 37%, #b887e68f, transparent 76%),
            radial-gradient(ellipse 64% 39% at 37% 57%, #b494eb9c, transparent 80%),
            radial-gradient(ellipse 66% 33% at 61% 68%, #8dd5e89c, transparent 78%);
        mask-image: radial-gradient(ellipse 86% 53% at 31% 49%, #000 38%, transparent 100%);
    }

    main.shop-home.container::before { left: 0; }
    main.shop-home.container::after { right: 0; transform: rotate(180deg); }
}

.shop-home .shop-products :is(.shop-products__search-box input, .shop-search-go) {
    font-size: 16px;
}

.shop-home .shop-products .chip-name {
    font-size: 16px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.shop-home .shop-products .chip { min-height: 44px; height: auto; padding-block: 7px; }
.shop-home .shop-products .chip-count { font-size: 13px; }
.shop-home .shop-products .acg-card .goods-title { font-size: 17px; line-height: 1.35; }
.shop-home .shop-products .acg-body .stat-row .price { font-size: 23px; }
.shop-home .shop-products .stat-row .price .unit { font-size: .7em; }
.shop-home .shop-products .acg-body > .stat-bottom { font-size: 14px; line-height: 1.4; }
.shop-home .shop-products .acg-body > .stat-bottom span { overflow-wrap: anywhere; }
.shop-home .shop-products :is(.tags .badge-soft, .stat-row .agent-price-tag) {
    font-size: 13px;
    line-height: 1.4;
    padding: 2px 8px;
}
.shop-home .shop-products .acg-card > .acg-body::after { font-size: 15px; }

@media (min-width: 1200px) {
    .shop-home .shop-products {
        grid-template-columns: clamp(250px, 16vw, 305px) minmax(0, 1fr);
        padding: clamp(14px, 1.2vw, 24px);
        background:
            radial-gradient(ellipse 290px 210px at 0 0, #e9dbf8, transparent),
            radial-gradient(ellipse 380px 430px at 0 100%, #ede2fb, transparent),
            #fcfaff;
    }

    .shop-home .shop-products__search-box { min-height: 52px; }
    .shop-home .shop-search-go { height: 50px; padding-inline: 24px; }
    .shop-home .shop-products__count { min-height: 26px; font-size: 14px; }
    .shop-home .shop-products .chip-list::after {
        content: "";
        height: 162px;
        margin-top: 5px;
        border: 1px solid #e3d8f5;
        border-radius: 14px;
        pointer-events: none;
        background:
            radial-gradient(ellipse, #fff 0 12%, #b481e4aa 30%, transparent 71%) 64% 42% / 5px 26px no-repeat,
            radial-gradient(ellipse, #fff 0 12%, #b481e4aa 30%, transparent 71%) 64% 42% / 26px 5px no-repeat,
            radial-gradient(circle at 25% 38%, #a985dc 0 1px, transparent 3px),
            radial-gradient(circle at 79% 69%, #8cafdd 0 1px, transparent 3px),
            repeating-radial-gradient(ellipse at 0 128%, transparent 0 15px, #ae89dd42 16px 17px, transparent 18px 31px),
            radial-gradient(ellipse at top right, #c2e6f1, transparent 65%),
            linear-gradient(140deg, #f8f1ff, #e5d4f8);
    }

    .shop-home .shop-products .item-card-cell .acg-card {
        --shop-card-aurora: #eee3fb;
        background-image:
            radial-gradient(circle at 87% 22%, #b58ddd80 0 1px, transparent 3px),
            radial-gradient(circle at 93% 39%, #8daed780 0 1px, transparent 3px),
            radial-gradient(ellipse 39% 85% at 100% 0, var(--shop-card-aurora), transparent);
    }

    .shop-home .shop-products .item-card-cell:nth-child(even) .acg-card { --shop-card-aurora: #e3ecfc; }
    .shop-home .shop-products .item-card-cell:hover .acg-card { background-color: #fcfaff; }
    .shop-home .shop-products .acg-card .goods-title { font-size: clamp(20px, 1.2vw, 25px); }
    .shop-home .shop-products .acg-body .stat-row .price { font-size: clamp(27px, 1.5vw, 32px); }
    .shop-home .shop-products .acg-body > .stat-bottom { font-size: 15px; }
    .shop-home .shop-products :is(.tags .badge-soft, .stat-row .agent-price-tag) { font-size: 14px; }
    .shop-home .shop-products .acg-card > .acg-body::after { min-height: 46px; font-size: 16px; padding-inline: 19px; }
}

@media (min-width: 1050px) {
    .shop-home .shop-products {
        grid-template-columns: clamp(270px, 21vw, 390px) minmax(0, 1fr);
    }

    .shop-home .shop-products .chip-list { gap: 8px; padding: 20px 16px; }
    .shop-home .shop-cat-kicker__title { font-size: 28px; }
    .shop-home .shop-cat-kicker .shop-kicker { font-size: 13px; }
    .shop-home .shop-products .chip { min-height: 60px; gap: 10px; padding-inline: 10px; }
    .shop-home .shop-products .chip-name { font-size: 21px; font-weight: 600; }
    .shop-home .shop-products .chip .chip-icon { width: 29px; height: 29px; flex: 0 0 29px; }
    .shop-home .shop-products .chip-count { min-width: 26px; height: 26px; font-size: 15px; }
}

