/* 商品列表页样式 */
.products-header {
	margin-bottom: 1.5rem;
}
.section-title {
	font-size: 1.4rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}
.products-description {
	color: #475569;
	font-size: 0.9rem;
	line-height: 1.6;
	margin-top: 0.5rem;
	padding: 0.8rem;
	background: #f8fafc;
	border-radius: 16px;
	border-left: 3px solid var(--theme-color);
}

/* 分类导航 */
.category-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #eef2ff;
}
.category-link {
	background: #f1f5f9;
	padding: 0.5rem 1rem;
	border-radius: 40px;
	font-size: 0.8rem;
	font-weight: 500;
	color: #334155;
	text-decoration: none;
	transition: all 0.2s;
	display: inline-block;
}
.category-link:hover {
	background: var(--theme-color);
	color: white;
}
.category-link.active {
	background: var(--theme-color);
	color: white;
}

/* 商品卡片*/
.product-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100px; 
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.10);
}

.product-img-wrapper {
    flex: 0 0 100px;     
    min-height: 100px;  
    position: relative;
    background: #f0f2f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}
.product-info {
    flex: 1;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;          
    min-width: 0;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;  
}

.category-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    background: #e5e7eb;
    padding: 2px 10px;
    border-radius: 12px;
    white-space: nowrap;
}
.category-label i {
    font-size: 10px;
    color: #6b7280;
}

.product-stock {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.product-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--theme-color);
    letter-spacing: -0.2px;
    white-space: nowrap;
}
.buy-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #0f172a;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	padding: 3px 14px;
	border-radius: 30px;
	transition: background 0.2s ease, transform 0.15s ease;
	cursor: pointer;
	border: none;
	white-space: nowrap;
	margin-left: auto;  
}
.product-card:hover .buy-link {
	background: var(--theme-color);
	color: #0f172a;
}
@media (max-width: 640px) {
    .product-card {
        flex-direction: column;
        min-height: unset;
    }

    .product-img-wrapper {
        display: none;
        flex: 0 0 120px;
        width: 100%;
        height: 120px;
        min-height: unset;
    }

    .product-img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    .product-info {
        padding: 12px 14px;
        gap: 6px;
    }

    .product-title {
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-meta-row {
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .buy-link {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        padding: 6px 0;
    }
}

/* 分类区域样式 */
.category-section {
	margin-bottom: 2.5rem;
	scroll-margin-top: 80px;
}
.category-title {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 1rem 0;
	padding-left: 0.8rem;
	border-left: 4px solid var(--theme-color);
	display: flex;
	align-items: center;
	gap: 8px;
}
.category-title i {
	color: var(--theme-color);
	font-size: 1.1rem;
}

/* FAQ 问答区域 */
.faq-section {
	margin-top: 2rem;
	background: #f9fafc;
	border-radius: 24px;
	padding: 1.5rem;
}
.faq-title {
	font-size: 1.3rem;
	font-weight: 700;
	margin-bottom: 1rem;
	text-align: center;
}
.faq-grid {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}
.faq-item {
	background: white;
	border-radius: 16px;
	border: 1px solid #e9eef3;
	overflow: hidden;
}
.faq-question {
	padding: 1rem;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: white;
}
.faq-question i {
	color: var(--theme-color);
	transition: transform 0.2s;
}
.faq-answer {
	padding: 1rem;
	color: #475569;
	font-size: 0.85rem;
	line-height: 1.5;
	display: none;
	border-top: 1px solid #eef2ff;
}
.faq-item.active .faq-answer {
	display: block;
}
.faq-item.active .faq-question i {
	transform: rotate(180deg);
}


/* 高亮锚点效果 */
:target {
	scroll-margin-top: 80px;
}