
/* 页面整体背景色 */
html[data-theme="t183"],
html[data-theme="t183"] body.products {
    background-color: #f5f5f5 !important;
}

/* 分类页主要区域背景色 */
html[data-theme="t183"] body.products #header,
html[data-theme="t183"] body.products .headerFixed,
html[data-theme="t183"] body.products .themes_global_header,
html[data-theme="t183"] body.products .visual_plugins_container,
html[data-theme="t183"] body.products .global_other_mode1,
html[data-theme="t183"] body.products .other_wide,
html[data-theme="t183"] body.products .ly_products_list,
html[data-theme="t183"] body.products #main,
html[data-theme="t183"] body.products .container_width_1200,
html[data-theme="t183"] body.products .default_products_list,
html[data-theme="t183"] body.products .default_products_list1,
html[data-theme="t183"] body.products .themes_plist_right {
    background-color: #f5f5f5 !important;
}

/* 分类页商品网格 */
html[data-theme="t183"] body.products .ly_products_list .list_products_box {
    --card-pad: clamp(10px, 1.35vw, 20px);
    --cart-size: 44px;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px 8px !important;
    margin: 0 !important;
    padding: 0 !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_box::before,
html[data-theme="t183"] body.products .ly_products_list .list_products_box::after,
html[data-theme="t183"] body.products .ly_products_list .list_products_box > .clear {
    display: none !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item {
    display: flex !important;
    float: none !important;
    width: auto !important;
    min-width: 0;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 卡片与方形图片区 */
html[data-theme="t183"] body.products .ly_products_list .list_products_item > .prod_hover {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff !important;
    border: 1px solid #e9eaec !important;
    border-radius: 8px !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .prod_hover > .item_img {
    position: static !important;
    width: 100% !important;
    overflow: visible !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_img_tab {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 0 !important;
    background: #f2f3f4 !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_img_tab > a {
    display: block;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .compute_item_img {
    mix-blend-mode: multiply;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .compute_process_img {
    position: relative;
    height: auto !important;
    aspect-ratio: 1 / 1;
    padding: 0 !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .compute_process_img > img {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    padding: var(--card-pad);
    object-fit: contain !important;
}

/* 白色信息区 */
html[data-theme="t183"] body.products .ly_products_list .list_products_item .prod_info {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    min-height: 0 !important;
    padding: var(--card-pad) !important;
    text-align: left !important;
    background: #fff !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_name {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    white-space: normal !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_name > h3 {
    display: -webkit-box !important;
    height: auto !important;
    min-height: 2.7em !important;
    max-height: 2.7em !important;
    margin: 0 !important;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: #191b1e !important;
    font-size: clamp(14px, 1.25vw, 18px) !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* 标题下方的评分 */
html[data-theme="t183"] body.products .ly_products_list .list_products_item .star_box {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-height: 18px;
    margin: 0 !important;
    color: #626770 !important;
    font-size: 12px !important;
}

/* 底部价格行 */
html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_price {
    display: block !important;
    box-sizing: border-box;
    min-height: var(--cart-size);
    align-content: center;
    margin: auto 0 0 !important;
    padding: 0 var(--cart-space, 0px) 0 0 !important;
    color: #191b1e !important;
    font-size: clamp(16px, 1.5vw, 22px) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .themes_products_origin_price {
    display: inline-block !important;
    margin-inline-start: 4px;
    color: #6b7078 !important;
    font-size: 0.68em !important;
    font-weight: 400 !important;
}

/* 将原有加购按钮移到价格右侧 */
html[data-theme="t183"] body.products .ly_products_list .list_products_item .prod_hover:has(> .item_img > .item_quick_btn > .add_cart) {
    --cart-space: calc(var(--cart-size) + 8px);
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_quick_btn:has(> .add_cart) {
    position: absolute !important;
    inset: auto var(--card-pad) var(--card-pad) auto !important;
    z-index: 2;
    display: block !important;
    width: var(--cart-size) !important;
    height: var(--cart-size) !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_quick_btn > .add_cart {
    position: relative !important;
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid currentColor !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #191b1e !important;
    font-size: 0 !important;
    text-decoration: none !important;
}

/* 购物袋图标 */
html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_quick_btn > .add_cart::before {
    content: "" !important;
    position: absolute;
    top: calc(50% - 4px);
    left: 50%;
    box-sizing: border-box;
    width: 14px;
    height: 12px;
    transform: translateX(-50%);
    border: 1.5px solid currentColor;
    border-radius: 1px 1px 3px 3px;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_quick_btn > .add_cart::after {
    content: "" !important;
    position: absolute;
    top: calc(50% - 9px);
    left: 50%;
    box-sizing: border-box;
    width: 7px;
    height: 6px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    transform: translateX(-50%);
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item .item_quick_btn > .add_cart:is(:hover, :focus-visible) {
    background: #191b1e !important;
    color: #fff !important;
}

html[data-theme="t183"] body.products .ly_products_list .list_products_item a:focus-visible {
    outline: 2px solid #b94b18;
    outline-offset: -2px;
}

/* 平板三列，手机两列 */
@media (max-width: 1000px) {
    html[data-theme="t183"] body.products .ly_products_list .list_products_box {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    html[data-theme="t183"] body.products .ly_products_list .list_products_box {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* 以整张商品卡片为定位基准 */
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item > .prod_hover {
    position: relative !important;
}

html[data-theme="t183"] body.products #main.ly_products_list .list_products_item .prod_hover > .item_img {
    position: static !important;
    transform: none !important;
    translate: none !important;
    filter: none !important;
    contain: none !important;
    will-change: auto !important;
    overflow: visible !important;
}

/* 固定购物袋距卡片右侧和底部的距离 */
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item .item_img > .item_quick_btn:has(> .add_cart) {
    position: absolute !important;
    inset: auto var(--card-pad, 16px) var(--card-pad, 16px) auto !important;
    width: var(--cart-size, 44px) !important;
    height: var(--cart-size, 44px) !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    translate: none !important;
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 清除按钮内部的位移 */
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item .item_quick_btn > .add_cart {
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
    transform: none !important;
    translate: none !important;
    transition: none !important;
    animation: none !important;
    background: #fff !important;
    color: #191b1e !important;
}

/* 让价格和购物袋共用同一条底线 */
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item .prod_info {
    padding-bottom: var(--card-pad, 16px) !important;
}

html[data-theme="t183"] body.products #main.ly_products_list .list_products_item .item_price {
    min-height: var(--cart-size, 44px) !important;
    margin: auto 0 0 !important;
    align-content: center !important;
}

/* 图片区域铺满卡片宽度，取消悬停缩放 */
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item
.item_img_tab :is(.compute_item_img, .compute_process_img),
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item .item_img_tab {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    scale: none !important;
}

/* 固定方形图片区 */
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item
.item_img_tab .compute_process_img {
    position: relative !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    overflow: hidden !important;
}

/* 主图与悬停图使用相同尺寸 */
html[data-theme="t183"] body.products #main.ly_products_list .list_products_item
.item_img_tab .compute_process_img > img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
    scale: none !important;
}
