/* ============================================
   产品页面 (sell) 特有样式
   ============================================ */

/* 产品列表页 */
.main-products {
	background: #FFFFFF !important;
	border-radius: 0;
	padding: 50px !important;
	margin-bottom: 0;
	box-shadow: none;
	border: none;
	animation: none;
}

.products-content {
	padding-top: 20px;
}

.products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin-bottom: 40px;
}

.product-card {
	background: #FFFFFF;
	border: 1px solid #E5E5E5;
	border-radius: 0;
	overflow: hidden;
	transition: all 0.3s ease;
	cursor: pointer;
	display: flex;
	flex-direction: column;
}

.product-card:hover {
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
	transform: translateY(-2px);
}

.product-image-wrapper {
	width: 100%;
	height: 220px;
	background: #F8F9FA;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

.product-image-link {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.product-card:hover .product-image {
	transform: scale(1.05);
}

.product-info {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.product-location {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 13px;
	color: #666;
}

.location-flag {
	font-size: 16px;
}

.location-text {
	font-weight: 500;
}

.product-title {
	margin: 0 0 12px 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #333;
	letter-spacing: 0.1px;
}

.product-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.product-title a:hover {
	color: #667eea;
}

.product-desc {
	font-size: 14px;
	color: #666;
	line-height: 1.7;
	margin: 0 0 12px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	letter-spacing: 0.2px;
	text-overflow: ellipsis;
	flex: 1;
}

.product-tag {
	display: inline-block;
	background: #F0F0F0;
	color: #666;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	margin-bottom: 12px;
	align-self: flex-start;
}

.product-minorder {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid #F0F0F0;
	margin-top: auto;
}

.minorder-label {
	font-size: 13px;
	color: #888;
}

.minorder-value {
	font-size: 14px;
	color: #333;
	font-weight: 600;
}

.products-more {
	text-align: center;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid #E5E5E5;
}

.more-button-wrapper {
	display: inline-block;
}

.products-empty {
	text-align: center;
	padding: 80px 20px;
	color: #999;
}

.products-empty p {
	font-size: 16px;
	margin: 0;
}

/* 产品详情页 */
.product-detail-page {
	background: #FFFFFF;
	padding: 40px 50px;
}

.detail-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 1px solid #E5E5E5;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #666;
	text-decoration: none;
	font-size: 14px;
	margin-bottom: 15px;
	transition: color 0.3s ease;
}

.back-link:hover {
	color: #667eea;
}

.back-icon {
	font-size: 18px;
}

.product-title-main {
	font-size: 24px;
	font-weight: 600;
	color: #333;
	margin: 0;
	line-height: 1.5;
	letter-spacing: -0.2px;
}

.product-detail-main {
	display: grid;
	grid-template-columns: 500px 1fr;
	gap: 40px;
	margin-bottom: 40px;
	position: relative; /* 为 #big_div 提供定位上下文 */
}

.product-image-section {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.product-main-image {
	width: 100%;
	height: 500px;
	background: #F8F9FA;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #E5E5E5;
	position: relative;
	overflow: visible; /* 改为 visible，让视频播放按钮和视频容器可以显示 */
}

.main-product-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.product-thumbnails {
	width: 100%;
}

.product-thumbnails .tbs {
	display: flex;
	align-items: center;
	gap: 10px;
}

.product-thumbnails .tbsm {
	flex: 1;
	overflow: hidden;
	position: relative;
	height: 56px;
}

.product-thumbnails .tbsm #thumbs {
	display: flex;
	flex-wrap: nowrap;
	height: 56px;
	transition: margin-left 0.3s ease;
}

.product-thumbnails .tbsm img {
	width: 70px;
	height: 56px;
	object-fit: cover;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.3s ease;
	flex-shrink: 0; /* 防止图片被压缩 */
	margin-right: 14px; /* 图片之间的间距 */
}

.product-thumbnails .tbsm img:last-child {
	margin-right: 0;
}

.product-thumbnails .tbsm img.ab_on {
	border-color: #667eea;
}

.product-info-section {
	display: flex;
	flex-direction: column;
}

.product-info-card {
	background: #FFFFFF;
	border: 1px solid #E5E5E5;
	padding: 30px;
}

.info-row {
	display: flex;
	align-items: flex-start;
	padding: 15px 0;
	border-bottom: 1px solid #F0F0F0;
}

.info-row:last-child {
	border-bottom: none;
}

.info-label {
	min-width: 80px;
	font-size: 14px;
	color: #666;
	font-weight: 500;
	margin-right: 20px;
}

.info-value {
	flex: 1;
	font-size: 14px;
	color: #333;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.price-row {
	padding: 20px 0;
	border-bottom: 2px solid #F0F0F0;
}

.price-value {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.price-symbol {
	font-size: 16px;
	color: #667eea;
	font-weight: 600;
}

.price-amount {
	font-size: 28px;
	color: #667eea;
	font-weight: 700;
}

.price-unit {
	font-size: 14px;
	color: #999;
}

.price-negotiable {
	font-size: 20px;
	color: #666;
	font-weight: 600;
}

.compare-btn {
	font-size: 12px;
	color: #667eea;
	cursor: pointer;
	padding: 4px 10px;
	border: 1px solid #667eea;
	border-radius: 4px;
	transition: all 0.3s ease;
	margin-left: auto;
}

.compare-btn:hover {
	background: #667eea;
	color: #FFFFFF;
}

.stat-value {
	font-size: 16px;
	color: #667eea;
	font-weight: 600;
}

.stat-empty {
	color: #999;
}

.location-info {
	color: #333;
}

.delivery-time {
	font-size: 12px;
	color: #999;
	margin-left: 10px;
}

.stock-amount {
	color: #333;
	font-weight: 500;
}

.order-limit {
	font-size: 12px;
	color: #999;
	margin-left: 10px;
}

.brand-name {
	color: #333;
	font-weight: 500;
}

.valid-forever {
	color: #52c41a;
}

.expired-badge {
	display: inline-block;
	padding: 2px 8px;
	background: #ff4d4f;
	color: #FFFFFF;
	font-size: 12px;
	border-radius: 4px;
	margin-left: 10px;
}

.update-time {
	color: #999;
	font-size: 13px;
}

.product-actions {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 2px solid #F0F0F0;
	display: flex;
	gap: 15px;
}

.btn-action {
	padding: 12px 30px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: all 0.3s ease;
	flex: 1;
}

.btn-buy {
	background: #667eea;
	color: #FFFFFF;
}

.btn-buy:hover {
	background: #5568d3;
}

.btn-cart {
	background: #FFFFFF;
	color: #667eea;
	border: 2px solid #667eea;
}

.btn-cart:hover {
	background: #667eea;
	color: #FFFFFF;
}

.btn-inquiry {
	background: #667eea;
	color: #FFFFFF;
	width: 100%;
}

.btn-inquiry:hover {
	background: #5568d3;
}

.expired-notice {
	margin-top: 30px;
	padding: 20px;
	background: #FFF7E6;
	border: 1px solid #FFE58F;
	text-align: center;
}

.expired-notice p {
	margin: 0;
	color: #D46B08;
	font-size: 16px;
}

.product-detail-content {
	margin-top: 40px;
	padding-top: 40px;
	border-top: 2px solid #E5E5E5;
}

.content-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
}

.content-title {
	font-size: 20px;
	font-weight: 600;
	color: #333;
	margin: 0;
}

.ip-location {
	font-size: 13px;
	color: #999;
}

.content-body {
	background: #FFFFFF;
	padding: 30px;
	border: 1px solid #E5E5E5;
}

.product-content {
	font-size: 14px;
	line-height: 1.8;
	color: #333;
}

.product-content img {
	max-width: 100%;
	height: auto;
}
/* 产品分类导航样式 - 扁平式设计 */
.category-nav {
	margin-bottom: 30px;
	background: #FFFFFF;
	border: 1px solid #E5E5E5;
	border-radius: 0;
	margin: 0 -50px 30px -50px;
	padding: 0;
}

.category-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border-bottom: 1px solid #E5E5E5;
}

.category-item {
	position: relative;
	margin: 0;
	border-right: 1px solid #E5E5E5;
}

.category-item:last-child {
	border-right: none;
}

.category-item.active {
	background: #F8F9FA;
}

.category-item.active > .category-link {
	color: #667eea;
	font-weight: 600;
	border-bottom: 2px solid #667eea;
}

.category-link {
	display: block;
	padding: 14px 24px;
	color: #333;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	transition: all 0.2s ease;
	position: relative;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.category-link:hover {
	color: #667eea;
	background: #F8F9FA;
}

.category-item.active > .category-link:hover {
	color: #667eea;
	background: #F8F9FA;
}

/* 二级分类 */
.category-sub {
	list-style: none;
	padding: 0;
	margin: 0;
	position: absolute;
	top: 100%;
	left: 0;
	background: #FFFFFF;
	border: 1px solid #E5E5E5;
	border-top: none;
	min-width: 180px;
	z-index: 10;
	display: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-item:hover > .category-sub {
	display: block;
}

.category-sub-item {
	margin: 0;
	border-bottom: 1px solid #F0F0F0;
}

.category-sub-item:last-child {
	border-bottom: none;
}

.category-sub-item.active {
	background: #F8F9FA;
}

.category-sub-item.active > .category-sub-link {
	color: #667eea;
	font-weight: 600;
}

.category-sub-link {
	display: block;
	padding: 12px 20px;
	color: #666;
	text-decoration: none;
	font-size: 14px;
	font-weight: 400;
	transition: all 0.2s ease;
	padding-left: 30px;
	position: relative;
}

.category-sub-link:before {
	content: "•";
	position: absolute;
	left: 15px;
	color: #999;
}

.category-sub-link:hover {
	color: #667eea;
	background: #F8F9FA;
}

.category-sub-item.active > .category-sub-link:hover {
	color: #667eea;
	background: #F8F9FA;
}
/* 响应式设计 - 产品列表页 */
@media (max-width: 1200px) {
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.products-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.product-image-wrapper {
		height: 180px;
	}
}
/* 产品图片样式 */
#mid_div {
	width: 100%;
	height: 100%;
	cursor: pointer;
	position: relative;
	background: #F8F9FA;
}

/* 视频播放相关样式 - 参考原模板的定位方式 */
.product-main-image {
	position: relative; /* 确保视频元素可以相对于此定位 */
}

/* 视频播放按钮 - 强制显示并正确定位 */
.product-main-image .ab_play {
	width: 60px !important;
	height: 60px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.95) url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggNXYxNGwxMC03eiIgZmlsbD0iIzY2N2VlYSIvPjwvc3ZnPg==') no-repeat center center !important;
	background-size: 28px 28px !important;
	position: absolute !important;
	z-index: 999 !important;
	/* 相对于 .product-main-image 居中定位 */
	top: 50% !important;
	left: 50% !important;
	margin-top: -30px !important; /* 向上移动按钮高度的一半 */
	margin-left: -30px !important; /* 向左移动按钮宽度的一半 */
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.product-main-image .ab_play:hover {
	background-color: #FFFFFF !important;
	transform: scale(1.15) !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

.ab_video {
	width: 500px;
	height: 375px;
	border: 2px solid #E5E5E5;
	background: #000000;
	position: absolute;
	z-index: 10;
	/* 相对于 .product-main-image 居中定位 */
	top: 50%;
	left: 50%;
	margin-top: -187.5px; /* 向上移动视频高度的一半 (375/2) */
	margin-left: -250px; /* 向左移动视频宽度的一半 (500/2) */
	display: none;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	border-radius: 4px;
	overflow: hidden;
}

.ab_video video,
.ab_video iframe {
	width: 100%;
	height: 100%;
	border: none;
}

.ab_hide {
	width: 32px;
	height: 32px;
	background: rgba(0, 0, 0, 0.7) url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE5IDYuNDFMMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=') no-repeat center center;
	background-size: 20px 20px;
	position: absolute;
	z-index: 12;
	/* 相对于 .ab_video 定位 */
	top: 10px;
	right: 10px;
	display: none;
	cursor: pointer;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.ab_hide:hover {
	background-color: rgba(0, 0, 0, 0.9);
	transform: scale(1.1);
}
/* 响应式设计 - 产品详情页 */
@media (max-width: 1200px) {
	.product-detail-main {
		grid-template-columns: 400px 1fr;
		gap: 30px;
	}
	
	.product-main-image {
		height: 400px;
	}
}

@media (max-width: 968px) {
	.product-detail-main {
		grid-template-columns: 1fr;
		gap: 30px;
	}
	
	.product-main-image {
		height: 400px;
	}
	
	.product-info-card {
		padding: 20px;
	}
}

/* 外部链接样式 */
.external-link {
	color: #667eea;
	text-decoration: underline;
	cursor: pointer;
	transition: color 0.3s ease;
	display: inline-block;
}

.external-link:hover {
	color: #5568d3;
	text-decoration: underline;
}

.external-link-modal {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	z-index: 999999 !important;
	display: none;
	align-items: center !important;
	justify-content: center !important;
	padding: 20px;
	box-sizing: border-box;
	overflow-y: auto;
	margin: 0 !important;
}

.external-link-modal[style*="flex"],
.external-link-modal.show {
	display: flex !important;
}

.modal-overlay {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 999998;
}

.modal-content {
	position: relative !important;
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
	max-width: 520px;
	width: 100%;
	z-index: 999999 !important;
	animation: modalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	overflow: hidden;
	margin: auto !important;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(-20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@keyframes modalFadeOut {
	from {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
	to {
		opacity: 0;
		transform: scale(0.9) translateY(-20px);
	}
}

.modal-header {
	padding: 24px 28px 20px;
	border-bottom: 1px solid #F0F0F0;
	background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.modal-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: #333;
	display: flex;
	align-items: center;
	gap: 10px;
}

.modal-header h3::before {
	content: "⚠️";
	font-size: 24px;
	line-height: 1;
}
.modal-body {
	padding: 28px;
}

.warning-text {
	margin: 0 0 16px 0;
	font-size: 15px;
	color: #555;
	line-height: 1.7;
	font-weight: 500;
}

.link-url {
	margin: 0 0 20px 0;
	padding: 14px 16px;
	background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
	border: 1px solid #e0e7ff;
	border-radius: 8px;
	font-size: 13px;
	color: #667eea;
	word-break: break-all;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	line-height: 1.6;
	position: relative;
	overflow-wrap: break-word;
}

.link-url::before {
	content: "🔗";
	margin-right: 8px;
	font-size: 14px;
}

.warning-tip {
	margin: 0;
	font-size: 14px;
	color: #ff6b6b;
	line-height: 1.7;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 12px;
	background: #fff5f5;
	border-radius: 6px;
	border-left: 3px solid #ff6b6b;
}

.warning-tip::before {
	content: "💡";
	font-size: 16px;
	flex-shrink: 0;
	margin-top: 2px;
}

.modal-footer {
	padding: 20px 28px 24px;
	border-top: 1px solid #F0F0F0;
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	background: #FAFAFA;
}

.btn-continue,
.btn-cancel {
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	min-width: 100px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-continue {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #FFFFFF;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-continue:hover {
	background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
	transform: translateY(-1px);
}

.btn-continue:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
	background: #FFFFFF;
	color: #666;
	border: 1px solid #E0E0E0;
}

.btn-cancel:hover {
	background: #F5F5F5;
	border-color: #D0D0D0;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-cancel:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
	.external-link-modal {
		padding: 15px;
	}
	
	.modal-content {
		width: 100%;
		max-width: none;
		border-radius: 10px;
	}
	
	.modal-header {
		padding: 20px 20px 16px;
	}
	
	.modal-header h3 {
		font-size: 18px;
	}
	
	.modal-body {
		padding: 20px;
	}
	
	.warning-text {
		font-size: 14px;
	}
	
	.link-url {
		font-size: 12px;
		padding: 12px;
	}
	
	.warning-tip {
		font-size: 13px;
		padding: 10px;
	}
	
	.modal-footer {
		padding: 16px 20px 20px;
		flex-direction: column-reverse;
	}
	
	.btn-continue,
	.btn-cancel {
		width: 100%;
		padding: 14px 24px;
	}
}
