/**
 * Modern Cart Styles (TEMU 风格)
 *
 * @package Electro_Child
 * @version 2.0.0
 */

/* ==========================================================================
   隐藏 WooCommerce 默认的空购物车提示
   ========================================================================== */

.cart-empty.woocommerce-info {
	display: none !important;
}

/* ==========================================================================
   空购物车提示区域（顶部居中区域）
   ========================================================================== */

.empty-cart-header {
	max-width: 800px;
	margin: 40px auto 60px;
	padding: 0 20px;
	text-align: center;
}

/* ==========================================================================
   购物车图标
   ========================================================================== */

.empty-cart-icon {
	margin: 0 auto 20px;
}

.empty-cart-icon svg {
	width: 100px;
	height: 100px;
	color: #ff6f00; /* TEMU 橙色，更明显 */
	stroke-width: 1.5;
}

/* ==========================================================================
   文本样式
   ========================================================================== */

.empty-cart-title {
	font-size: 20px;
	font-weight: 600;
	color: #111;
	margin: 0 0 8px;
	letter-spacing: -0.01em;
}

.empty-cart-subtitle {
	font-size: 14px;
	color: #666;
	margin: 0 0 20px;
	line-height: 1.5;
}

/* ==========================================================================
   行动按钮（TEMU 橙色风格）
   ========================================================================== */

.cart-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	margin: 0 0 30px;
	max-width: 400px;
	margin-left: auto;
	margin-right: auto;
}

.btn-primary,
.btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 280px;
	padding: 14px 32px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 24px;
	transition: all 0.3s ease;
	border: none;
	cursor: pointer;
	letter-spacing: 0;
}

.btn-primary {
	background: linear-gradient(90deg, #ff6f00 0%, #ff8f00 100%);
	color: #fff;
	box-shadow: 0 2px 8px rgba(255, 111, 0, 0.3);
}

.btn-primary:hover {
	background: linear-gradient(90deg, #ff8f00 0%, #ffa000 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(255, 111, 0, 0.4);
}

.btn-secondary {
	background: #fff;
	color: #333;
	border: 1px solid #d1d5db;
}

.btn-secondary:hover {
	border-color: #9ca3af;
	background: #f9fafb;
}

/* ==========================================================================
   信任徽章（TEMU 风格）
   ========================================================================== */

.trust-badges {
	display: flex;
	justify-content: center;
	gap: 40px;
	margin: 30px 0 40px;
	padding: 20px 0;
	border-top: 1px solid #e5e7eb;
	border-bottom: 1px solid #e5e7eb;
}

.trust-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	padding: 10px;
	border-radius: 8px;
}

.trust-badge:hover {
	background: #f9fafb;
	transform: translateY(-2px);
}

.badge-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3f4f6;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.trust-badge:hover .badge-icon {
	background: #ff6f00;
}

.badge-icon svg {
	width: 24px;
	height: 24px;
	color: #6b7280;
	stroke-width: 2;
	transition: color 0.3s ease;
}

.trust-badge:hover .badge-icon svg {
	color: #fff;
}

.badge-text {
	text-align: center;
	line-height: 1.3;
}

.badge-text strong {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #333;
}

/* ==========================================================================
   Trust Badge 弹窗
   ========================================================================== */

.trust-badge-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 99999;
	animation: fadeIn 0.2s ease;
}

.trust-badge-modal.active {
	display: block;
}

.trust-badge-modal-content {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #fff;
	border-radius: 16px 16px 0 0;
	max-height: 80vh;
	overflow-y: auto;
	animation: slideUp 0.2s ease;
}

.trust-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #e5e7eb;
}

.trust-modal-title {
	font-size: 18px;
	font-weight: 600;
	color: #111;
}

.trust-modal-close {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.3s ease;
}

.trust-modal-close:hover {
	background: #f3f4f6;
}

.trust-modal-close svg {
	width: 20px;
	height: 20px;
	color: #666;
}

.trust-modal-body {
	padding: 20px;
}

.trust-modal-section {
	margin-bottom: 24px;
}

.trust-modal-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	font-weight: 600;
	color: #111;
	margin-bottom: 12px;
}

.trust-modal-section-title img {
	width: 32px;
	height: 32px;
}

.trust-modal-section-text {
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	margin-bottom: 16px;
}

.trust-modal-section-text .highlight {
	color: #0a8800;
	font-weight: 500;
}

.trust-modal-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.trust-modal-icons img {
	height: 32px;
	object-fit: contain;
}

.trust-modal-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.trust-modal-list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 12px;
	font-size: 14px;
	color: #333;
}

.trust-modal-list li svg {
	width: 20px;
	height: 20px;
	color: #0a8800;
	flex-shrink: 0;
	margin-top: 2px;
}

.trust-modal-divider {
	height: 1px;
	background: #e5e7eb;
	margin: 20px 0;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		transform: translateY(100%);
	}
	to {
		transform: translateY(0);
	}
}

/* ==========================================================================
   推荐商品区域
   ========================================================================== */

.recommended-products {
	margin: 40px 0 0;
}

/* ==========================================================================
   分类标签栏（TEMU 风格）
   ========================================================================== */

.category-tabs {
	margin-bottom: 24px;
	overflow: hidden;
}

.category-tabs-scroll {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 0 0 12px;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

.category-tabs-scroll::-webkit-scrollbar {
	display: none;
}

.category-tabs-scroll.dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.category-tabs-scroll.dragging .category-tab {
	pointer-events: none;
}

.category-tab {
	flex-shrink: 0;
	padding: 10px 20px;
	background: #fff;
	border: none;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	color: #666;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.category-tab:hover {
	background: #f3f4f6;
	color: #333;
}

.category-tab.active {
	background: #111;
	color: #fff;
}

/* ==========================================================================
   产品列表（使用 Electro 主题的 ul.products 结构）
   ========================================================================== */

/* 使用 Electro 主题的 products 列表，直接在页面中渲染，无包装容器 */
#cart-product-grid.products {
	margin-top: 20px;
}

.load-more-trigger {
	visibility: hidden;
}

/* ==========================================================================
   加载状态
   ========================================================================== */

.carousel-loading,
.carousel-empty,
.carousel-error {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	text-align: center;
	color: #9ca3af;
	width: 100%;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #f3f4f6;
	border-top-color: #ff6f00;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 16px;
}

.carousel-empty svg {
	margin-bottom: 16px;
	color: #d1d5db;
}

.btn-retry {
	margin-top: 16px;
	padding: 10px 24px;
	background: #ff6f00;
	color: #fff;
	border: none;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.btn-retry:hover {
	background: #ff8f00;
	transform: translateY(-1px);
}

/* ==========================================================================
   通知
   ========================================================================== */

.cart-notification {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #000;
	color: #fff;
	padding: 15px 25px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
	z-index: 99999;
	font-size: 14px;
	max-width: 300px;
}

/* ==========================================================================
   响应式设计
   ========================================================================== */

/* 平板设备 (≤1024px) */
@media (max-width: 1024px) {
	.trust-badges {
		flex-wrap: wrap;
		gap: 20px;
	}

	.trust-badge {
		flex: 1 1 calc(50% - 20px);
		min-width: 200px;
	}
}

/* 移动设备 (≤768px) */
@media (max-width: 768px) {
	.modern-empty-cart {
		margin: 20px auto;
		padding: 20px 15px;
	}

	.empty-cart-icon svg {
		width: 80px;
		height: 80px;
	}

	.empty-cart-title {
		font-size: 18px;
	}

	.empty-cart-subtitle {
		font-size: 13px;
	}

	.cart-actions {
		width: 100%;
		max-width: 100%;
	}

	.btn-primary,
	.btn-secondary {
		min-width: 100%;
		width: 100%;
	}

	/* Trust badges 保持水平一行，可滚动 */
	.trust-badges {
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		gap: 12px;
		padding: 10px 0;
		margin: 20px -15px 30px;
		padding-left: 15px;
		padding-right: 15px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.trust-badges::-webkit-scrollbar {
		display: none;
	}

	.trust-badge {
		flex: 0 0 auto;
		min-width: 120px;
		max-width: 140px;
	}

	.badge-icon {
		width: 40px;
		height: 40px;
	}

	.badge-icon svg {
		width: 20px;
		height: 20px;
	}

	.badge-text strong {
		font-size: 11px;
		line-height: 1.3;
	}

	.trust-modal-section-title {
		font-size: 14px;
	}

	.trust-modal-section-text {
		font-size: 13px;
	}

	.category-tab {
		font-size: 13px;
		padding: 8px 16px;
	}

	.product-card {
		width: 160px;
	}

	.product-carousel {
		padding: 20px 40px;
	}

	.carousel-nav {
		width: 36px;
		height: 36px;
	}

	.carousel-nav svg {
		width: 18px;
		height: 18px;
	}
}

/* 小型移动设备 (≤480px) */
@media (max-width: 480px) {
	.modern-empty-cart {
		padding: 15px 10px;
	}

	.empty-cart-icon svg {
		width: 60px;
		height: 60px;
	}

	.empty-cart-title {
		font-size: 16px;
	}

	/* Trust badges 水平一行，可滚动 */
	.trust-badges {
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 10px;
		padding: 10px 0;
		margin: 20px -10px 30px;
		padding-left: 10px;
		padding-right: 10px;
	}

	.trust-badge {
		flex: 0 0 auto;
		flex-direction: column;
		text-align: center;
		min-width: 100px;
		max-width: 110px;
		padding: 10px 8px;
	}

	.trust-badge:hover {
		background: #f9fafb;
	}

	.badge-text {
		text-align: center;
	}

	.badge-text strong {
		font-size: 10px;
		line-height: 1.2;
	}

	.badge-icon {
		width: 36px;
		height: 36px;
	}

	.badge-icon svg {
		width: 18px;
		height: 18px;
	}

	.product-card {
		width: 140px;
	}

	.product-name {
		font-size: 12px;
		height: 32px;
	}

	.product-price {
		font-size: 14px;
	}

	.quick-add-btn {
		width: 32px;
		height: 32px;
		bottom: 8px;
		right: 8px;
	}

	.quick-add-btn svg {
		width: 16px;
		height: 16px;
	}

	.product-carousel {
		padding: 20px 35px;
	}

	.carousel-nav {
		width: 32px;
		height: 32px;
	}
}

/* ==========================================================================
   打印样式
   ========================================================================== */

@media print {
	.cart-actions,
	.quick-add-btn,
	.carousel-nav {
		display: none;
	}
}
