:root {
    --font-body: "Nunito", "Segoe UI", Arial, sans-serif;
    --font-heading: "Quicksand", "Nunito", "Segoe UI", Arial, sans-serif;
    --surface-card: #ffffff;
    --text-main: #24303d;
    --text-muted: #64748b;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background: linear-gradient(180deg, #fffaf6 0%, #ffffff 240px);
}

h1,
h2,
h3,
h4,
h5,
h6,
.site_nav a,
.nav_group_toggle,
.site_brand,
.gallery_trigger,
.main_title,
.p_title {
    font-family: var(--font-heading);
}

.iconfont {
    font-family: inherit !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    min-width: 1.2em;
    line-height: 1;
    font-style: normal;
    font-weight: 700;
}

.iconfont::before {
    display: block;
}

.icon-sousuo1 {
    position: relative;
    width: 18px;
    min-width: 18px;
    height: 18px;
}

.icon-sousuo1::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 1px;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-sizing: border-box;
}

.icon-sousuo1::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    width: 7px;
    height: 2px;
    background-color: currentColor;
    border-radius: 999px;
    transform: rotate(45deg);
    transform-origin: center;
}

.icon-pet_store1::before { content: "*"; }
.icon-changguizidian::before { content: "+"; }
.icon-left::before { content: "<"; }
.icon-left-copy::before { content: ">"; }
.icon-hot1::before { content: "!"; }
.icon-Recommended-1::before { content: "*"; }
.icon-new::before { content: "+"; }
.icon-time::before { content: "@"; }
.icon-Buy::before { content: "+"; }

.site-header .site_brand img {
    height: 28px;
}

.site-header .site_nav {
    flex-wrap: nowrap;
}

.site-header .site_nav a.active,
.site-header .site_nav a:hover,
.site-header .nav_group_links a.active,
.site-header .site_nav .nav_group_links a:hover,
.site-header .nav_group_links a.current,
.site-header .nav_group.is-active .nav_group_toggle,
.site-header .nav_group_toggle:hover {
    background-color: rgba(255, 255, 255, 0.18);
}

.site-header .nav_group_links {
    flex-wrap: nowrap;
}

.site-header .nav_group_links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.site-header .site_search button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #5d4b45;
    cursor: pointer;
}

.site-header .site_search button .iconfont {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.recommend_pet .ih-item,
.hot_pet .main li a .thum,
.category_list li a .img,
.pro_list_box li a .thum,
.detail_main .detail_bottom_info aside .category_list li a .img,
.product_main .product_main_content .pet_recommend .category_list li a .img {
    aspect-ratio: 1 / 1;
    height: auto !important;
}

#new_pet .main .new_pet_main > li a .thum {
    aspect-ratio: 4 / 3;
    height: auto !important;
}

#new_pet .aside .top_pet a .thum {
    aspect-ratio: 1 / 1;
    height: auto;
}

.hot_pet .main li a,
.category_list li,
.pro_list_box li,
.product_main aside ul li a,
.detail_main .detail_bottom_info aside ul li a {
    background: var(--surface-card);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.product_main aside ul li a,
.detail_main .detail_bottom_info aside ul li a {
    padding: 12px;
    box-sizing: border-box;
}

.product_main aside ul li a .thum,
.product_main aside ul li a .thum.thum_small,
.detail_main .detail_bottom_info aside ul li a .thum,
.detail_main .detail_bottom_info aside ul li a .thum.thum_small {
    margin-bottom: 12px;
}

.product_main aside ul li a dl,
.detail_main .detail_bottom_info aside ul li a dl {
    width: 100%;
    padding: 0 4px 4px;
    box-sizing: border-box;
}

.product_main aside ul li a dl dt,
.detail_main .detail_bottom_info aside ul li a dl dt {
    line-height: 1.45;
}

.hot_pet .main li a h2,
.category_list li a .info {
    min-height: 52px;
}

.gallery_overview {
    display: grid;
    gap: 14px;
}

.gallery_stage {
    /*display: grid;*/
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    align-items: stretch;
}

.gallery_preview {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    border-radius: 18px;
}

.gallery_preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery_preview:hover img {
    transform: scale(1.04);
}

.gallery_preview_primary {
    /*aspect-ratio: 4 / 3;*/
}

.gallery_preview_stack {
    display: grid;
    gap: 12px;
}

.gallery_preview_stack .gallery_preview {
    aspect-ratio: 4 / 3;
}

.gallery_trigger {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(36, 48, 61, 0.82);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.gallery_trigger::before {
    content: "+";
    font-size: 16px;
}

.gallery_strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.gallery_item {
    padding: 0;
    border: none;
    background: transparent;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
}

.gallery_item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery_item:hover img {
    transform: scale(1.05);
}

.gallery_item.is-active {
    box-shadow: 0 0 0 3px rgba(244, 81, 30, 0.28);
}

.gallery_item.is-active img {
    transform: scale(1.03);
}

.gallery_lightbox[hidden] {
    display: none !important;
}

.gallery_lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(12, 18, 28, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.gallery_lightbox.is-visible {
    opacity: 1;
    visibility: visible;
}

.gallery_lightbox_inner {
    position: relative;
    width: min(980px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.gallery_lightbox.is-visible .gallery_lightbox_inner {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery_lightbox_image_wrap {
    display: grid;
    justify-items: center;
    gap: 14px;
    min-width: 0;
}

.gallery_lightbox_viewport {
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    touch-action: pan-y;
}

.gallery_lightbox_track {
    display: flex;
    align-items: center;
    will-change: transform;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery_lightbox_track.is-dragging {
    transition: none;
}

.gallery_lightbox_slide {
    flex: 0 0 100%;
    width: 100%;
}

.gallery_lightbox_image {
    width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.gallery_counter {
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.gallery_close,
.gallery_nav {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.22s ease, background-color 0.22s ease, opacity 0.22s ease;
}

.gallery_close {
    position: absolute;
    top: -8px;
    right: 0;
}

.gallery_nav {
    justify-self: center;
}

.gallery_close:hover,
.gallery_nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.04);
}

.gallery_close:active,
.gallery_nav:active {
    transform: scale(0.96);
}

body.gallery-open {
    overflow: hidden;
}

#extension {
    width: min(1280px, calc(100% - 32px));
}

#extension .extension_box {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 1fr;
}

#extension .extension_box > li {
    width: auto;
    height: auto;
    aspect-ratio: 1 / 1;
}

#extension .extension_box > li > a,
#extension .extension_box > li.adBox_ > div {
    width: 100%;
    height: 100%;
}

#extension .extension_box > li.adBox_,
#extension .extension_box > li.recommend {
    aspect-ratio: 1 / 1;
    grid-column: span 2;
    grid-row: span 2;
}

@media screen and (max-width: 960px) {
    .gallery_stage {
        grid-template-columns: 1fr;
    }

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

    .gallery_strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery_lightbox {
        padding: 12px;
    }

    .gallery_lightbox_inner {
        width: min(100%, calc(100vw - 24px));
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        gap: 10px;
    }

    .gallery_close,
    .gallery_nav {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .recommend_pet .ih-item {
        aspect-ratio: 4 / 3;
    }

    .product_detail_page .gallery_preview_primary {
        width: 100%;
    }

    #extension .extension_box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 640px) {
    .gallery_strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery_lightbox_inner {
        grid-template-columns: 1fr;
    }

    .gallery_nav {
        position: absolute;
        bottom: 52px;
        z-index: 2;
    }

    .gallery_nav.prev {
        left: 8px;
    }

    .gallery_nav.next {
        right: 8px;
    }

    .gallery_close {
        top: 8px;
        right: 8px;
    }

    #extension .extension_box {
        grid-template-columns: 1fr;
    }

    #extension .extension_box > li.adBox_,
    #extension .extension_box > li.recommend {
        grid-column: span 1;
    }
}
