/* ============================================
   Product Grid Widget Styles
   PC: rem (1rem = 16px) | Mobile: px
   ============================================ */

.zjny-product-grid-wrapper {
    padding: 2.5rem 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ---------- 分类筛选 ---------- */
.zjny-product-filter-bar {
    margin-bottom: 3.75rem;
}

.zjny-product-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
}

.zjny-filter-item {
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    font-family: inherit;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: block;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 0 21px rgba(0,0,0,0.07);
    border-radius: 50px;
    color: #000;
}

.zjny-filter-item:hover {
    background-color: #ee8400;
    border-color: #ee8400;
    color: #fff;
}

.zjny-filter-item.active {
    background-color: #ee8400;
    border-color: #ee8400;
    color: #fff;
}

/* ---------- 产品网格 ---------- */
.zjny-product-grid-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.875rem;
}

/* ---------- 产品卡片 ---------- */
.zjny-product-card {
    background: #f5f5f5;
    border-radius: 0.5rem;
    padding: 1.875rem 1.875rem 1.875rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zjny-product-card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 0.9375rem 1.875rem rgba(0, 0, 0, 0.08);
}

/* 卡片头部 - 标题区域 */
.zjny-product-card-head {
    text-align: center;
    margin-bottom: 1.25rem;
}

.zjny-product-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    color: #1a1a1a;
}

.zjny-product-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.zjny-product-card-title a:hover {
    color: #ee8400;
}

.zjny-product-card-subtitle {
    font-size: 0.875rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* 产品图片区域 - 图片在左，Hot标签在右 */
.zjny-product-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.625rem 0;
    margin-bottom: 1.875rem;
}

.zjny-product-card-image {
    flex: 1;
    max-width: 75%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zjny-product-card-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.zjny-product-card:hover .zjny-product-card-image img {
    transform: scale(1.03);
}

/* Hot 标签 - 图片右侧，垂直居中 */
.zjny-product-hot-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1em;
    background: #ee8400;
    min-height: 2.4em;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    color: #fff;
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transition: all .4s;
}

.zjny-product-hot-tag img {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25rem;
    width: 1.125rem;
    height: auto;
}

.zjny-product-hot-tag div {
    display: inline-flex;
    align-items: center;
    gap: 0.1875rem;
}

/* 卡片底部 - Learn More */
.zjny-product-card-foot {
    text-align: center;
    margin-top: auto;
}

.zjny-product-learn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    border-radius: 3.125rem;
    background: transparent;
    color: #000;
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1.2;
    padding: 1rem 2rem 1rem 2rem;
}

.zjny-product-learn-btn:hover {
    background: #333;
    color: #fff;
}

/* ---------- Load More 按钮 ---------- */
.zjny-product-loadmore-box {
    display: flex;
    justify-content: center;
    margin-top: 3.75rem;
}

.zjny-product-loadmore-btn {
    padding: 0.75rem 3.75rem;
    background: #ee8400;
    color: #fff;
    border: none;
    border-radius: 3.125rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    min-width: 12.5rem;
}

.zjny-product-loadmore-btn:hover {
    background: #c7762a;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1rem rgba(224, 136, 50, 0.3);
}

.zjny-product-loadmore-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------- 空状态 ---------- */
.zjny-product-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.75rem 0;
    color: #999;
    font-size: 1rem;
}

/* ---------- 加载状态 ---------- */
.zjny-product-grid-list.loading {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* ============================================
   移动端适配 (Mobile) - Max Width 767px
   ============================================ */
@media (max-width: 767px) {
    .zjny-product-grid-wrapper {
        padding: 20px 0;
    }

    /* 分类筛选 */
    .zjny-product-filter-bar {
        margin-bottom: 30px;
    }

    .zjny-product-filter-list {
        gap: 10px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    .zjny-product-filter-list::-webkit-scrollbar {
        height: 2px;
    }

    .zjny-product-filter-list::-webkit-scrollbar-thumb {
        background: #e0e0e0;
        border-radius: 2px;
    }

    .zjny-filter-item {
        padding: 6px 14px;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 产品网格 - 单列 */
    .zjny-product-grid-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* 产品卡片 */
    .zjny-product-card {
        padding: 20px 20px 24px;
    }

    .zjny-product-card-title {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .zjny-product-card-subtitle {
        font-size: 13px;
    }

    /* 产品图片 - 移动端图片和Hot标签并排 */
    .zjny-product-card-media {
        gap: 10px;
        padding: 8px 0;
        margin-bottom: 20px;
    }

    .zjny-product-card-image {
        max-width: 70%;
    }

    /* Hot 标签 */
    .zjny-product-hot-tag {
        font-size: 12px;
        padding: 4px 10px;
    }

    .zjny-product-hot-tag img {
        width: 14px;
        margin-right: 3px;
    }

    /* Learn More 按钮 */
    .zjny-product-learn-btn {
        padding: 7px 24px;
        font-size: 14px;
    }

    /* Load More 按钮 */
    .zjny-product-loadmore-box {
        margin-top: 30px;
    }

    .zjny-product-loadmore-btn {
        width: 100%;
        padding: 12px 0;
        font-size: 15px;
        min-width: 0;
    }

    .zjny-product-empty {
        padding: 30px 0;
        font-size: 14px;
    }
}

/* ============================================
   平板适配 (Tablet) - 768px ~ 991px
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .zjny-product-grid-wrapper {
        padding: 30px 0;
    }

    .zjny-product-filter-bar {
        margin-bottom: 40px;
    }

    .zjny-product-filter-list {
        gap: 14px;
    }

    .zjny-filter-item {
        padding: 7px 18px;
        font-size: 15px;
    }

    .zjny-product-grid-list {
        gap: 20px;
    }

    .zjny-product-card {
        padding: 20px 20px 28px;
    }

    .zjny-product-card-title {
        font-size: 20px;
    }

    .zjny-product-loadmore-box {
        margin-top: 40px;
    }
}

/* ============================================
   大屏幕 - 1920px+
   ============================================ */
@media (min-width: 1920px) {
    .zjny-product-grid-wrapper {
        padding: 50px 0;
    }

    .zjny-product-grid-list {
        gap: 30px;
    }
}
