/* ZT Shop —— 基础组件样式（主题负责整体视觉，本文件保证核心组件在任何主题下可用） */

/* 按钮 */
.zt-btn {
	display: inline-block;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	background: #0e1116;
	border: 1px solid #0e1116;
	border-radius: 6px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: opacity .15s, transform .1s;
}
.zt-btn:hover { opacity: .9; color: #fff; }
.zt-btn-dark { background: #0e1116; border-color: #0e1116; }
.zt-btn-outline { background: transparent; color: #0e1116; border-color: #d1d5db; }
.zt-btn-outline:hover { color: #99792e; border-color: #99792e; background: transparent; }
.zt-btn-light { background: #fff; color: #111827; border-color: #fff; }
.zt-btn-sm { padding: 6px 14px; font-size: 13px; }
.zt-btn-block { display: block; width: 100%; }
.zt-btn-disabled { background: #9ca3af; border-color: #9ca3af; cursor: not-allowed; }

/* 表单 */
.zt-form p { margin: 0 0 12px; }
.zt-form label { display: block; margin-bottom: 4px; font-size: 13px; color: #374151; }
.zt-form input[type="text"],
.zt-form input[type="email"],
.zt-form input[type="tel"],
.zt-form input[type="password"],
.zt-form input[type="number"],
.zt-form textarea,
.zt-form select {
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
}
.zt-form input:focus, .zt-form textarea:focus { outline: none; border-color: #b8923f; box-shadow: 0 0 0 3px rgba(184,146,63,.15); }
.zt-form-msg { font-size: 13px; min-height: 18px; }
.zt-form-msg.ok { color: #059669; }
.zt-form-msg.err { color: #dc2626; }
.zt-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* 表格 */
.zt-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.zt-table th, .zt-table td { padding: 12px 14px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: middle; }
.zt-table th { background: #f9fafb; font-weight: 600; }

/* 迷你购物车 */
.zt-mini-cart-wrap { position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 90vw; background: #fff; z-index: 99999; transform: translateX(100%); transition: transform .25s ease; box-shadow: -12px 0 40px rgba(0,0,0,.15); }
.zt-mini-cart-wrap.open { transform: translateX(0); }
.zt-mini-cart { padding: 20px; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
.zt-mini-items { list-style: none; margin: 0; padding: 0; flex: 1; overflow: auto; }
.zt-mini-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.zt-mini-thumb { width: 64px; height: 64px; flex: none; }
.zt-mini-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.zt-mini-info { flex: 1; font-size: 13px; }
.zt-mini-info a { color: #111827; text-decoration: none; }
.zt-mini-price { display: block; color: #6b7280; margin-top: 4px; }
.zt-mini-remove { background: none; border: 0; color: #9ca3af; font-size: 18px; cursor: pointer; }
.zt-mini-footer { border-top: 1px solid #e5e7eb; padding-top: 14px; }
.zt-mini-subtotal { margin: 0 0 8px; font-size: 14px; }
.zt-mini-empty { text-align: center; color: #6b7280; margin-top: 40px; }
.zt-free-ship-hint { font-size: 12px; color: #059669; margin: 0 0 8px; }

/* 提示 */
.zt-toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px); background: #111827; color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; opacity: 0; transition: all .25s; z-index: 100000; pointer-events: none; }
.zt-toast.show { opacity: 1; transform: translate(-50%, 0); }
.zt-toast.err { background: #dc2626; }

/* 弹窗 */
.zt-modal { position: fixed; inset: 0; z-index: 99998; display: none; }
.zt-modal.open { display: block; }
.zt-modal-mask { position: absolute; inset: 0; background: rgba(17,24,39,.55); }
.zt-modal-box { position: relative; max-width: 760px; width: 92vw; max-height: 86vh; margin: 7vh auto; background: #fff; border-radius: 12px; overflow: auto; padding: 28px; box-sizing: border-box; }
.zt-modal-close { position: absolute; top: 12px; right: 16px; font-size: 24px; background: none; border: 0; cursor: pointer; color: #6b7280; z-index: 2; }
.zt-no-scroll { overflow: hidden; }

/* 徽标 */
.zt-badge { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #fff; }
.zt-badge-sale { background: #dc2626; }
.zt-badge-new { background: #059669; }
.zt-badge-bestseller { background: #d97706; }
.zt-badge-hot { background: #db2777; }

/* 星星 */
.zt-stars { color: #f59e0b; letter-spacing: 1px; }
.zt-stars-count { color: #6b7280; font-size: 12px; margin-left: 4px; }

/* 倒计时 */
.zt-countdown { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 12px; }
.zt-cd-label { background: #b8923f; color: #fff; padding: 2px 8px; border-radius: 4px; font-weight: 700; }
.zt-cd-time { font-variant-numeric: tabular-nums; color: #99792e; font-weight: 700; }

/* 占位图 */
.zt-placeholder-img { display: block; width: 100%; aspect-ratio: 1/1; background: linear-gradient(135deg, var(--zt-ph, #24406b), color-mix(in srgb, var(--zt-ph, #24406b) 55%, #fff)); position: relative; }
.zt-placeholder-img::after { content: ""; position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.5); border-radius: 50%; }
.zt-placeholder-img::before { content: ""; position: absolute; left: 8%; right: 8%; top: 46%; height: 8%; background: rgba(255,255,255,.5); border-radius: 4px; transform: rotate(-8deg); }

/* 实时搜索 */
.zt-search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e5e7eb; border-top: 0; border-radius: 0 0 8px 8px; box-shadow: 0 12px 24px rgba(0,0,0,.08); z-index: 999; max-height: 380px; overflow: auto; }
.zt-search-results ul { list-style: none; margin: 0; padding: 0; }
.zt-search-results li { border-bottom: 1px solid #f3f4f6; }
.zt-search-results li a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-decoration: none; color: #111827; }
.zt-search-results li a:hover { background: #f9fafb; }
.zt-sr-thumb img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; }
.zt-sr-title { flex: 1; font-size: 13px; }
.zt-sr-price { font-size: 13px; font-weight: 600; color: #99792e; }
.zt-search-none { padding: 14px; font-size: 13px; color: #6b7280; text-align: center; margin: 0; }

/* 空状态 */
.zt-empty-note { padding: 40px 20px; text-align: center; color: #6b7280; background: #f9fafb; border-radius: 10px; }

/* 面包屑 */
.zt-breadcrumbs { font-size: 13px; color: #6b7280; padding: 12px 0; }
.zt-breadcrumbs a { color: #374151; text-decoration: none; }
.zt-breadcrumbs a:hover { color: #99792e; }
.zt-bc-sep { margin: 0 8px; color: #c4c9d1; }

/* 订单状态 */
.zt-order-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f3f4f6; color: #374151; }
.zt-order-status.zt-pending { background: #fef3c7; color: #92400e; }
.zt-order-status.zt-processing { background: #dbeafe; color: #1e40af; }
.zt-order-status.zt-completed { background: #d1fae5; color: #065f46; }
.zt-order-status.zt-cancelled { background: #fee2e2; color: #991b1b; }
.zt-order-status.zt-refunded { background: #f3e8ff; color: #6b21a8; }

/* 分享 */
.zt-share { display: flex; gap: 8px; align-items: center; margin-top: 16px; font-size: 13px; }
.zt-share-label { color: #6b7280; }
.zt-share-btn { padding: 5px 12px; border: 1px solid #e5e7eb; border-radius: 6px; color: #374151; text-decoration: none; }
.zt-share-btn:hover { border-color: #99792e; color: #99792e; }

/* 分类卡片（兜底） */
.zt-cat-grid { display: grid; gap: 16px; }
.zt-cat-card { display: flex; flex-direction: column; justify-content: flex-end; min-height: 180px; padding: 20px; border-radius: 12px; color: #fff; text-decoration: none; background: var(--zt-cat, #24406b); position: relative; overflow: hidden; }
.zt-cat-card::after { content: ""; position: absolute; inset: 14%; border: 2px solid rgba(255,255,255,.4); border-radius: 50%; }
.zt-cat-name { font-size: 18px; font-weight: 700; position: relative; z-index: 1; }
.zt-cat-count { font-size: 12px; opacity: .85; margin-top: 4px; position: relative; z-index: 1; }

/* 促销横幅（兜底） */
.zt-promo-banner { position: relative; background-size: cover; background-position: center; border-radius: 14px; overflow: hidden; padding: 48px 40px; color: #fff; }
.zt-promo-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17,24,39,.72), rgba(17,24,39,.15)); }
.zt-promo-inner { position: relative; z-index: 1; max-width: 560px; }
.zt-promo-tagline { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; opacity: .85; margin: 0 0 8px; }
.zt-promo-inner h2 { font-size: 32px; margin: 0 0 16px; }

/* 对比表 */
.zt-compare-table-wrap { overflow-x: auto; }
.zt-compare-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.zt-compare-table th, .zt-compare-table td { border: 1px solid #e5e7eb; padding: 12px; text-align: center; }
.zt-compare-table thead th { background: #f9fafb; min-width: 180px; }
.zt-compare-table tbody th { background: #f9fafb; text-align: left; }
.zt-compare-price { color: #99792e; font-weight: 700; }
.zt-compare-table img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; }

/* 订阅 */
.zt-newsletter { text-align: center; padding: 24px; }
.zt-newsletter .zt-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.zt-newsletter .zt-form input[type="email"] { flex: 1; }
.zt-newsletter .zt-form-msg { width: 100%; }

/* 阶梯价提示 */
.zt-bulk-hint { display: block; font-size: 12px; color: #059669; margin: 6px 0; }
