/* Shared display polish for every Chinese storefront template. */
.unified-shortcuts-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)) !important;
    gap: 10px !important;
    overflow: visible !important;
}

.has-unified-category-thumb {
    display: flex !important;
    min-width: 0;
    min-height: 62px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent) !important;
    border-radius: 10px !important;
    background-color: color-mix(in srgb, Canvas 96%, currentColor 4%) !important;
    box-shadow: 0 5px 16px rgb(0 0 0 / 5%);
    text-align: left !important;
}

.unified-category-thumb {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 8px;
    background-color: color-mix(in srgb, currentColor 9%, Canvas);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.unified-category-thumb::after {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: grid;
    width: 16px;
    height: 16px;
    border: 1px solid rgb(255 255 255 / 88%);
    border-radius: 50%;
    background: rgb(42 39 38 / 76%);
    color: #fff;
    content: '\82b1';
    font-size: 9px;
    line-height: 1;
    place-items: center;
}

.unified-category-thumb--love::after { content: '\7231'; }
.unified-category-thumb--red-rose::after { content: '\7ea2'; background-color: #a9192f; }
.unified-category-thumb--pink-rose::after { content: '\7c89'; background-color: #dc668a; }
.unified-category-thumb--champagne-rose::after { content: '\9999'; background-color: #b68952; }
.unified-category-thumb--lily::after { content: '\5408'; background-color: #9071ad; }
.unified-category-thumb--carnation::after,
.unified-category-thumb--elder::after { content: '\5eb7'; background-color: #be6075; }
.unified-category-thumb--birthday::after { content: '\751f'; background-color: #cc8247; }
.unified-category-thumb--blessing::after { content: '\798f'; background-color: #bb3c39; }
.unified-category-thumb--opening::after { content: '\4e1a'; background-color: #bd3030; }
.unified-category-thumb--cake::after,
.unified-category-thumb--fruit-cake::after,
.unified-category-thumb--chocolate-cake::after,
.unified-category-thumb--european-cake::after,
.unified-category-thumb--cream-cake::after,
.unified-category-thumb--children::after,
.unified-category-thumb--elder-cake::after { content: '\7cd5'; background-color: #9d6847; }
.unified-category-thumb--combo::after { content: '+'; background-color: #8d5b8c; }

.has-unified-category-thumb > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.has-unified-category-thumb > span:not(.unified-category-thumb) { display: none !important; }

#product-grid,
.cn-product-search .product-results,
.unified-home-region :is(.f-product-grid, .c6-product-grid, .eduoduo-product-grid, .f18-product-grid, .h9-product-grid, .sy-product-grid) {
    column-gap: 12px !important;
    row-gap: 20px !important;
}

#product-grid :is([class$="-product-card__image"], .sy-product-card__media, .product-result-image),
.cn-product-search .product-result-image,
.unified-home-region :is([class$="-product-card__image"], .sy-product-card__media) {
    overflow: hidden;
    border-radius: 8px !important;
}

#product-grid :is([class$="-product-card__image"], .sy-product-card__media, .product-result-image) > img,
.cn-product-search .product-result-image > img,
.unified-home-region :is([class$="-product-card__image"], .sy-product-card__media) > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.unified-mobile-dock__icon {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
}

.unified-mobile-dock__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 720px) {
    .unified-home-region > :is(.f-breadcrumb, .sy-breadcrumb, .c6-breadcrumb) { display: none !important; }
    .unified-home-region > :is(.f-home-hero, .f-marquee) { display: none !important; }
    .unified-home-region [class$="-opening"] > :is(.f-hero, .f-region-hero),
    .unified-home-region > :is(.f-region-hero, .c6-hero, .f18-hero, .f18-region-hero, .sy-hero, .sy-region-hero, .eduoduo-region-hero, .h9-region-hero) {
        display: none !important;
    }
    .unified-home-region :is(.eduoduo-hero__content, .h9-hero__content) { display: none !important; }
    .unified-home-region :is(.eduoduo-hero, .h9-hero) { min-height: 0 !important; padding: 0 !important; }
    .unified-home-region .f-hero--products { padding-top: 0 !important; }
    .unified-home-region .f-hero--products > .f-container > :is(.f-eyebrow, h1, .f-hero-note) { display: none !important; }

    .unified-shortcuts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    .has-unified-category-thumb {
        min-height: 58px !important;
        gap: 5px !important;
        padding: 7px !important;
    }
    .has-unified-category-thumb > strong { font-size: 12px !important; }
    .unified-shortcuts--many { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .unified-shortcuts--many .has-unified-category-thumb {
        min-height: 78px !important;
        flex-direction: column;
        justify-content: center !important;
        gap: 4px !important;
        padding: 6px 3px !important;
        text-align: center !important;
    }
    .unified-shortcuts--many .unified-category-thumb {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    #product-grid,
    .cn-product-search .product-results,
    .unified-home-region :is(.f-product-grid, .c6-product-grid, .eduoduo-product-grid, .f18-product-grid, .h9-product-grid, .sy-product-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        column-gap: 8px !important;
        row-gap: 16px !important;
    }
    #product-grid :is([class$="-product-card__image"], .sy-product-card__media, .product-result-image),
    .cn-product-search .product-result-image,
    .unified-home-region :is([class$="-product-card__image"], .sy-product-card__media) {
        aspect-ratio: 4 / 5 !important;
    }

    :is(.detail-tabs, .f-detail-tabs, [class$="-detail-tabs"]) { top: 0 !important; }

    .unified-mobile-dock {
        position: fixed !important;
        z-index: 1000 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        min-height: 60px !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
        background: Canvas !important;
        box-shadow: 0 -5px 18px rgb(0 0 0 / 8%);
    }
    .unified-mobile-dock > a {
        display: flex !important;
        min-width: 0;
        min-height: 54px;
        flex: 1 1 20% !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        padding: 4px 2px !important;
        font-size: 11px !important;
        line-height: 1.15 !important;
    }
}
