/* 面包屑导航 */
.breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-bottom: 1.2rem;
	font-size: 0.85rem;
	color: #64748b;
}
.breadcrumb a {
	color: var(--theme-color);
	text-decoration: none;
	transition: color 0.2s;
}
.breadcrumb a:hover {
	text-decoration: underline;
}
.breadcrumb .separator {
	color: #94a3b8;
	font-size: 0.7rem;
}
.breadcrumb .current {
	color: #1e293b;
	font-weight: 500;
}

/* 商品详情页样式 - 左右布局 */
.product-detail {
	margin: 0 auto;
}
.detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
	background: #fff;
	border-radius: 24px;
	padding: 1.5rem;
	box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
@media (max-width: 768px) {
	.detail-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		padding: 1rem;
	}
}

/* 左侧区域 */
.detail-left {
	border-right: 1px solid #eef2ff;
	padding-right: 1.5rem;
	padding-top: 1.5rem;
}
@media (max-width: 768px) {
	.detail-left {
		border-right: none;
		padding-right: 0;
	}
}

.product-title-large {
	font-size: 1.8rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
	line-height: 1.3;
	color: #0f172a;
}

/* 账号信息栏 */
.account-info {
	background: #f8fafc;
	border-radius: 20px;
	padding: 1rem;
	margin-top: 1rem;
}
.info-title {
	font-weight: 700;
	margin-bottom: 0.8rem;
	font-size: 0.9rem;
	color: #0f172a;
	display: flex;
	align-items: center;
	gap: 6px;
}
.info-grid {
	grid-template-columns: 1fr 1fr;
	gap: 0.8rem;
}
.info-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.85rem;
	padding: 0.4rem 0;
	border-bottom: 1px dashed #e2e8f0;
}
.info-label {
	color: #64748b;
}
.info-value {
	font-weight: 500;
	color: #1e293b;
}
.info-value.clean {
	color: var(--theme-color);
}

/* 右侧区域 */
.detail-right {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}
.price-card {
	background: #f8fafc;
	padding: 0.4rem;
	border-radius: 20px;
}
.price-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.price-label {
	font-size: 1.5rem;
	color: #64748b;
}
.price-value {
	font-size: 2rem;
	font-weight: 800;
	color: var(--theme-color);
}
.price-value small {
	font-size: 0.9rem;
	font-weight: normal;
}

/* 邮箱输入框 */
.email-input-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0.5rem 0;
}
.email-label {
	font-size: 0.85rem;
	font-weight: 500;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 6px;
}
.email-input {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1px solid #e2e8f0;
	border-radius: 40px;
	font-size: 0.9rem;
	transition: all 0.2s;
	outline: none;
}
.email-input:focus {
	border-color: var(--theme-color);
	box-shadow: 0 0 0 2px var(--theme-glow);
}
.email-hint {
	font-size: 0.7rem;
	color: #f59e0b;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* 数量选择和实付金额同行 */
.quantity-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 0.75rem 0;
	border-top: 1px solid #eef2ff;
	border-bottom: 1px solid #eef2ff;
}
.quantity-selector {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.quantity-selector .spec-title {
	font-weight: 600;
	font-size: 0.9rem;
}
.quantity-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #e2e8f0;
	background: white;
	font-size: 1.2rem;
	cursor: pointer;
	transition: all 0.2s;
}
.quantity-btn:hover {
	background: var(--theme-light);
}
.quantity-input {
	width: 60px;
	text-align: center;
	font-size: 1rem;
	border: 1px solid #e2e8f0;
	border-radius: 30px;
	padding: 0.4rem;
}
.total-row {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}
.total-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: #1e293b;
}
.total-amount {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--theme-color);
}

/* 购买按钮 */
.btn-buy {
	width: 100%;
	background: var(--theme-color);
	border: none;
	padding: 1rem;
	border-radius: 50px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 0.5rem;
}
.btn-buy:hover {
	background: var(--theme-dark);
	transform: translateY(-1px);
}
.btn-buy:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* 商品详情区域 */
.detail-content {
	margin-top: 2rem;
	border-top: 1px solid #eef2ff;
	padding-top: 1.5rem;
}
.detail-section-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: #0f172a;
}
.detail-text {
	color: #475569;
	line-height: 1.7;
	white-space: pre-line;
}

/* 推荐商品 */
.recommend-section {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #eef2ff;
}
.recommend-title {
	font-size: 1.2rem;
	font-weight: 700;
	margin-bottom: 1rem;
}
/* ===== 横排商品列表 — 新布局（分类放标题右侧，靠右对齐） ===== */
.product-horizontal-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 16px 0 30px;
    padding: 0 4px;
}

/* 每个商品卡片 — 纵向flex，内部两行 */
.product-row {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f0f0f0;
    gap: 6px;
}

.product-row:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

/* 第一行：标题（左） + 分类标签（右） */
.row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.product-title-row {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    word-break: break-word;
    flex: 1 1 auto;
}

/* 分类标签 — 放在右侧，靠右对齐 */
.product-category-tag {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    padding: 3px 14px;
    border-radius: 20px;
    background: #6c7a89;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 分类颜色 */
.product-category-tag.tag-shiming { background: #3b8cbf; }
.product-category-tag.tag-lao { background: #e67e22; }
.product-category-tag.tag-gudong { background: #8e44ad; }
.product-category-tag.tag-haiwai { background: #1abc9c; }
.product-category-tag.tag-bai { background: #2c3e50; }
.product-category-tag.tag-default { background: #6c7a89; }

/* 第二行：描述（左） + 库存、价格、购买按钮（右） */
.row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.product-desc-row {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.4;
    flex: 1 1 180px;
    min-width: 100px;
}

.product-meta-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.product-stock-row {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}
.product-stock-row i {
    margin-right: 4px;
    color: #95a5a6;
}

.product-price-row {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
    white-space: nowrap;
}
.product-price-row small {
    font-size: 13px;
    font-weight: 400;
    color: #999;
}

.product-buy-row {
    background: #ff2442;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 30px;
    transition: background 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.product-row:hover .product-buy-row {
    background: #02c45e;
}

/* ===== 移动端适配（全面优化） ===== */
@media (max-width: 768px) {
    .product-row {
        padding: 12px 14px;
        gap: 8px;
    }

    /* 标题与分类：标题独占一行，分类换行靠右 */
    .row-top {
        flex-wrap: wrap;
        gap: 4px 12px;
    }
    .product-title-row {
        flex: 1 1 100%;          /* 标题占满整行 */
        font-size: 14px;
    }
    .product-category-tag {
        margin-left: auto;         /* 靠右对齐 */
        font-size: 12px;
        padding: 2px 12px;
    }

    /* 第二行：改为纵向排列，所有信息左对齐 */
    .row-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .product-desc-row {
        flex: 1 1 auto;
        font-size: 12px;
        min-width: 0;
    }
    .product-meta-right {
        width: 100%;
        justify-content: flex-start;  /* 左对齐 */
        flex-wrap: wrap;
        gap: 8px 14px;
    }
    .product-stock-row {
        font-size: 12px;
    }
    .product-price-row {
        font-size: 16px;
    }
    .product-buy-row {
        font-size: 13px;
        padding: 5px 14px;
    }
}

@media (max-width: 480px) {
    .product-row {
        padding: 10px 12px;
        gap: 6px;
    }
    .product-title-row {
        font-size: 13px;
    }
    .product-category-tag {
        font-size: 11px;
        padding: 2px 10px;
    }
    .product-desc-row {
        font-size: 12px;
    }
    .product-price-row {
        font-size: 15px;
    }
    .product-stock-row {
        font-size: 12px;
    }
    .product-buy-row {
        font-size: 12px;
        padding: 4px 12px;
    }
    .product-meta-right {
        gap: 6px 10px;
    }
}

/* 相关问答 */
.related-faq {
	margin-top: 2rem;
	background: #f9fafc;
	border-radius: 24px;
	padding: 1.5rem;
}
.faq-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 8px;
}
.faq-item {
	background: white;
	border-radius: 16px;
	border: 1px solid #e9eef3;
	margin-bottom: 0.8rem;
}
.faq-question {
	padding: 1rem;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.faq-question i {
	color: var(--theme-color);
	transition: transform 0.2s;
}
.faq-answer {
	padding: 1rem;
	color: #475569;
	font-size: 0.85rem;
	line-height: 1.6;
	display: none;
	border-top: 1px solid #eef2ff;
}
.faq-item.active .faq-answer {
	display: block;
}
.faq-item.active .faq-question i {
	transform: rotate(180deg);
}
/* 加载提示 */
.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	display: none;
}
.loading-spinner {
	background: white;
	padding: 2rem;
	border-radius: 20px;
	text-align: center;
}
.loading-spinner i {
	font-size: 2rem;
	color: var(--theme-color);
	animation: spin 1s linear infinite;
}
@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
