/* 首页分类、商品区和商品列表的图片放大效果。 */
.category-row-item .category-tile-link,
.mySwiper .product-image-frame {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
}

.category-row-item .category-tile-link {
    position: relative;
}

.category-caption {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-sizing: border-box;
    padding: 72px 20px 20px;
    color: #fff;
    text-align: left;
    background: linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .38) 46%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.category-caption-title {
    margin: 0;
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 700;
    line-height: 1.15;
}

.category-caption-subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    white-space: pre-line;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.category-row-item .category-image,
.mySwiper .product-image-frame img,
.home-product-grid .home-product-card__media img,
#J_item_list > li > a > p:first-child img {
    transform: scale(1);
    transform-origin: center;
    transition: transform 650ms ease-in-out;
}

.home-product-grid .home-product-grid__title {
    margin: 0 0 20px;
    padding: 0;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.2;
    text-align: left;
    color: #222;
}

.home-product-grid .home-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.home-product-grid .home-product-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    color: #111;
    text-decoration: none;
}

.home-product-grid .home-product-card__link:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.home-product-grid .home-product-card__media {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}

.home-product-grid .home-product-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-sizing: border-box;
    padding: 8% 10% 4%;
    background: #fff;
}

.home-product-grid .home-product-card__name,
.home-product-grid .home-product-card__price {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px;
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
    color: #111;
}

.home-product-grid .home-product-card__name {
    margin-top: 2px;
    font-weight: 700;
}

.home-product-grid .home-product-card__price {
    margin-top: auto;
    padding-top: 16px;
    padding-bottom: 24px;
    font-weight: 400;
}

.home-product-grid .home-product-card__name:last-child {
    padding-bottom: 24px;
}

@media (max-width: 768px) {
    .home-product-grid .home-product-grid__title {
        margin-bottom: 12px;
        font-size: 28px;
    }

    .home-product-grid .home-product-card__name,
    .home-product-grid .home-product-card__price {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 14px;
    }

    .home-product-grid .home-product-card__price {
        padding-top: 12px;
        padding-bottom: 16px;
    }

    .home-product-grid .home-product-card__name:last-child {
        padding-bottom: 16px;
    }
}

#color-grid .grid > div > .absolute {
    pointer-events: none;
}

#color-grid .grid > div > .absolute a {
    pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
    .category-row-item .category-tile-link:hover .category-image,
    .mySwiper .product-image-frame:hover img,
    .home-product-grid .home-product-card__link:hover .home-product-card__media img,
    #J_item_list > li > a:hover > p:first-child img {
        transform: scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-row-item .category-image,
    .mySwiper .product-image-frame img,
    .home-product-grid .home-product-card__media img,
    #J_item_list > li > a > p:first-child img {
        transition: none;
    }
}
