﻿* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: #f5f7f5;
	color: #333;
	padding-bottom: 60px;
	max-width: 480px;
	margin: 0 auto;
	position: relative;
	min-height: 100vh;
}
a {
	text-decoration: none;
	color: inherit;
}
img {
	max-width: 100%;
	display: block;
}
/* 头部导航 */
.header {
	background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
	color: white;
	padding: 12px 16px;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}
.header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.logo {
	font-size: 20px;
	font-weight: bold;
	display: flex;
	align-items: center;
	gap: 6px;
}
.user-info {
	font-size: 14px;
}
.user-info a {
	margin-left: 12px;
}
.search-bar {
	margin-top: 10px;
	background: rgba(255,255,255,0.2);
	border-radius: 20px;
	padding: 8px 16px;
	display: flex;
	align-items: center;
}
.search-bar input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: white;
	font-size: 14px;
}
.search-bar input::placeholder {
	color: rgba(255,255,255,0.8);
}
/* 分类导航 */
.category-nav {
	background: white;
	padding: 12px 0;
	overflow-x: auto;
	white-space: nowrap;
	position: sticky;
	top: 68px;
	z-index: 99;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.category-nav::-webkit-scrollbar {
	display: none;
}
.category-item {
	display: inline-block;
	padding: 6px 16px;
	margin: 0 4px;
	border-radius: 20px;
	font-size: 14px;
	color: #666;
}
.category-item.active {
	background: #dcfce7;
	color: #16a34a;
	font-weight: 500;
}
/* 轮播图 */
.banner {
	margin: 12px;
	border-radius: 12px;
	overflow: hidden;
	height: 160px;
	background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 24px;
	font-weight: bold;
}
/* 商品网格 */
.section-title {
	padding: 16px 16px 8px;
	font-size: 18px;
	font-weight: bold;
	color: #1f2937;
}
.goods-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	padding: 0 12px;
}
.goods-card {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.goods-img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	background: #f3f4f6;
}
.goods-info {
	padding: 10px;
}
.goods-name {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	height: 42px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.goods-subtitle {
	font-size: 12px;
	color: #9ca3af;
	margin: 4px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.goods-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 6px;
}
.price {
	color: #ef4444;
	font-weight: bold;
	font-size: 18px;
}
.price small {
	font-size: 12px;
	font-weight: normal;
}
.original-price {
	color: #9ca3af;
	font-size: 12px;
	text-decoration: line-through;
	margin-left: 4px;
}
.add-cart-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #16a34a;
	color: white;
	border: none;
	font-size: 18px;
	line-height: 28px;
	text-align: center;
	cursor: pointer;
}
/* 底部导航 */
.tab-bar {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	max-width: 480px;
	width: 100%;
	background: white;
	display: flex;
	height: 56px;
	box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
	z-index: 100;
}
.tab-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #9ca3af;
	gap: 2px;
}
.tab-item.active {
	color: #16a34a;
}
.tab-item .icon {
	font-size: 20px;
}
/* 按钮 */
.btn {
	display: block;
	width: 100%;
	padding: 12px;
	border-radius: 24px;
	border: none;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
}
.btn-primary {
	background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
	color: white;
}
.btn-outline {
	background: white;
	border: 1px solid #16a34a;
	color: #16a34a;
}
.btn-wechat {
	background: #07c160;
	color: white;
}
.btn-alipay {
	background: #1677ff;
	color: white;
}
/* 表单 */
.form-group {
	margin-bottom: 16px;
}
.form-input {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 15px;
	outline: none;
}
.form-input:focus {
	border-color: #16a34a;
}
.form-label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	color: #374151;
}
/* 商品详情 */
.detail-swiper {
	width: 100%;
	height: 300px;
	background: #f3f4f6;
}
.detail-swiper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.detail-info {
	background: white;
	padding: 16px;
}
.detail-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 8px;
}
.detail-price .price {
	font-size: 28px;
}
.detail-name {
	font-size: 20px;
	font-weight: bold;
	line-height: 1.4;
	margin-bottom: 4px;
}
.detail-subtitle {
	color: #6b7280;
	font-size: 14px;
}
.detail-section {
	background: white;
	margin-top: 10px;
	padding: 16px;
}
.detail-section h3 {
	font-size: 16px;
	margin-bottom: 12px;
}
.detail-content {
	line-height: 1.8;
	font-size: 15px;
}
.detail-content img {
	border-radius: 8px;
	margin: 8px 0;
}
.detail-bottom-bar {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	max-width: 480px;
	width: 100%;
	background: white;
	padding: 10px 16px;
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
	z-index: 100;
}
.cart-icon-btn {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	position: relative;
}
.cart-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: #ef4444;
	color: white;
	font-size: 10px;
	min-width: 16px;
	height: 16px;
	border-radius: 8px;
	text-align: center;
	line-height: 16px;
	padding: 0 4px;
}
.add-cart-btn-large {
	flex: 1;
	background: #f59e0b;
	color: white;
	border: none;
	padding: 12px;
	border-radius: 24px;
	font-size: 16px;
	font-weight: 500;
}
.buy-now-btn {
	flex: 1;
	background: #ef4444;
	color: white;
	border: none;
	padding: 12px;
	border-radius: 24px;
	font-size: 16px;
	font-weight: 500;
}
/* 购物车 */
.cart-item {
	background: white;
	margin: 10px 12px;
	border-radius: 12px;
	padding: 12px;
	display: flex;
	gap: 12px;
	align-items: center;
}
.cart-checkbox {
	width: 20px;
	height: 20px;
	accent-color: #16a34a;
}
.cart-item-img {
	width: 80px;
	height: 80px;
	border-radius: 8px;
	object-fit: cover;
	background: #f3f4f6;
}
.cart-item-info {
	flex: 1;
}
.cart-item-name {
	font-size: 15px;
	font-weight: 500;
	margin-bottom: 4px;
}
.cart-item-price {
	color: #ef4444;
	font-weight: bold;
	font-size: 16px;
}
.quantity-control {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}
.qty-btn {
	width: 24px;
	height: 24px;
	border-radius: 4px;
	border: 1px solid #d1d5db;
	background: white;
	font-size: 16px;
	line-height: 22px;
	text-align: center;
	cursor: pointer;
}
.qty-num {
	min-width: 24px;
	text-align: center;
	font-size: 14px;
}
.qty-input {
	width: 60px;
	height: 28px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	text-align: center;
	font-size: 14px;
	padding: 0 4px;
}
.cart-bottom-bar {
	position: fixed;
	bottom: 56px;
	left: 50%;
	transform: translateX(-50%);
	max-width: 480px;
	width: 100%;
	background: white;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
	z-index: 100;
}
.cart-total {
	font-size: 14px;
}
.cart-total .total-price {
	color: #ef4444;
	font-weight: bold;
	font-size: 20px;
}
.checkout-btn {
	background: #ef4444;
	color: white;
	border: none;
	padding: 10px 24px;
	border-radius: 20px;
	font-size: 15px;
	font-weight: 500;
}
.empty-state {
	text-align: center;
	padding: 60px 20px;
	color: #9ca3af;
}
.empty-state .icon {
	font-size: 60px;
	margin-bottom: 12px;
}
/* 订单 */
.order-item {
	background: white;
	margin: 10px 12px;
	border-radius: 12px;
	padding: 12px;
}
.order-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 8px;
	border-bottom: 1px solid #f3f4f6;
	font-size: 14px;
}
.order-status {
	color: #ef4444;
}
.order-goods {
	padding: 8px 0;
	display: flex;
	gap: 8px;
	align-items: center;
}
.order-goods-img {
	width: 60px;
	height: 60px;
	border-radius: 6px;
	object-fit: cover;
}
.order-goods-info {
	flex: 1;
}
.order-footer {
	padding-top: 8px;
	border-top: 1px solid #f3f4f6;
	text-align: right;
	font-size: 14px;
}
/* 支付页 */
.pay-box {
	background: white;
	margin: 20px 12px;
	border-radius: 12px;
	padding: 24px;
	text-align: center;
}
.pay-amount {
	font-size: 36px;
	font-weight: bold;
	color: #ef4444;
	margin: 16px 0;
}
.pay-methods {
	margin-top: 24px;
}
.pay-method {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 12px;
	cursor: pointer;
}
.pay-method.active {
	border-color: #16a34a;
	background: #f0fdf4;
}
.pay-method-left {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
}
.pay-icon {
	font-size: 24px;
}
/* 登录注册 */
.auth-container {
	padding: 40px 24px;
}
.auth-title {
	font-size: 28px;
	font-weight: bold;
	text-align: center;
	margin-bottom: 40px;
	color: #16a34a;
}
.auth-footer {
	text-align: center;
	margin-top: 20px;
	font-size: 14px;
	color: #6b7280;
}
.auth-footer a {
	color: #16a34a;
}
/* 用户中心 */
.user-header {
	background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
	color: white;
	padding: 30px 20px;
	display: flex;
	align-items: center;
	gap: 16px;
}
.user-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255,255,255,0.3);
}
.user-name {
	font-size: 20px;
	font-weight: bold;
}
.user-menu {
	background: white;
	margin: 12px;
	border-radius: 12px;
	overflow: hidden;
}
.menu-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid #f3f4f6;
	font-size: 15px;
}
.menu-item:last-child {
	border-bottom: none;
}
/* toast */
.toast {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0,0,0,0.75);
	color: white;
	padding: 12px 24px;
	border-radius: 8px;
	z-index: 9999;
	font-size: 14px;
	animation: fadeIn 0.2s;
}
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ==================== 语音下单 ==================== */
.voice-fab {
	position: fixed;
	right: 16px;
	bottom: 80px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(135deg, #16a34a, #15803d);
	color: white;
	border: none;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s;
}
.voice-fab:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5);
}
.voice-fab:active {
	transform: scale(0.95);
}
.voice-fab.recording {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
	animation: voicePulse 1.2s infinite;
}
@keyframes voicePulse {
	0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
	70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
	100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* 弹窗遮罩 */
.voice-modal-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	animation: fadeIn 0.2s;
}
.voice-modal-overlay.show {
	display: flex;
}
.voice-modal {
	background: white;
	border-radius: 16px;
	width: 90%;
	max-width: 400px;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
	animation: voiceSlideUp 0.25s ease-out;
}
@keyframes voiceSlideUp {
	from { transform: translateY(30px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}
.voice-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
	font-size: 16px;
	font-weight: 600;
	color: #1f2937;
}
.voice-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: #9ca3af;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}
.voice-modal-close:hover {
	color: #374151;
}
.voice-modal-body {
	padding: 20px;
}

/* 聆听中状态 */
.voice-listening {
	text-align: center;
	padding: 10px 0;
}
.voice-wave {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 50px;
	margin-bottom: 16px;
}
.voice-wave span {
	display: inline-block;
	width: 5px;
	height: 20px;
	background: linear-gradient(180deg, #16a34a, #15803d);
	border-radius: 3px;
	animation: voiceWave 1s ease-in-out infinite;
}
.voice-wave span:nth-child(1) { animation-delay: 0s; }
.voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; }
.voice-wave span:nth-child(4) { animation-delay: 0.3s; }
.voice-wave span:nth-child(5) { animation-delay: 0.4s; }
@keyframes voiceWave {
	0%, 100% { height: 12px; }
	50% { height: 40px; }
}
.voice-listening-text {
	font-size: 16px;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 8px;
}
.voice-tip {
	font-size: 13px;
	color: #9ca3af;
	margin-bottom: 20px;
}
.voice-stop-btn {
	background: #f3f4f6;
	color: #374151;
	border: none;
	border-radius: 20px;
	padding: 8px 24px;
	font-size: 14px;
	cursor: pointer;
}
.voice-stop-btn:hover {
	background: #e5e7eb;
}

/* 识别结果 */
.voice-recognized-text {
	font-size: 14px;
	color: #374151;
	margin-bottom: 16px;
	padding: 10px 12px;
	background: #f9fafb;
	border-radius: 8px;
	line-height: 1.5;
}
.voice-label {
	color: #9ca3af;
	font-size: 12px;
}
.voice-result-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}
.voice-result-item {
	padding: 12px;
	background: #f9fafb;
	border-radius: 10px;
	border-left: 3px solid #16a34a;
}
.voice-result-name {
	font-size: 15px;
	font-weight: 600;
	color: #1f2937;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.voice-result-detail {
	font-size: 13px;
	color: #6b7280;
}
.voice-tag {
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 10px;
	font-weight: 500;
}
.voice-tag-match {
	background: #dcfce7;
	color: #15803d;
}
.voice-tag-new {
	background: #fef3c7;
	color: #b45309;
}
.voice-price-pending {
	color: #f59e0b;
	font-weight: 500;
}
.voice-result-actions {
	display: flex;
	gap: 10px;
}
.voice-btn-primary {
	flex: 1;
	background: linear-gradient(135deg, #16a34a, #15803d);
	color: white;
	border: none;
	border-radius: 10px;
	padding: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.voice-btn-primary:hover {
	opacity: 0.9;
}
.voice-btn-secondary {
	flex: 1;
	background: #f3f4f6;
	color: #374151;
	border: none;
	border-radius: 10px;
	padding: 12px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}
.voice-btn-secondary:hover {
	background: #e5e7eb;
}

/* 手动输入降级 */
.voice-text-input {
	text-align: center;
}
.voice-manual-tip {
	color: #6b7280;
	font-size: 13px;
	margin-bottom: 12px;
}
.voice-manual-input {
	width: 100%;
	padding: 12px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 15px;
	box-sizing: border-box;
	margin-bottom: 12px;
	outline: none;
}
.voice-manual-input:focus {
	border-color: #16a34a;
}
.voice-submit-btn {
	width: 100%;
	background: linear-gradient(135deg, #16a34a, #15803d);
	color: white;
	border: none;
	border-radius: 10px;
	padding: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.voice-submit-btn:hover {
	opacity: 0.9;
}

/* 加载/错误状态 */
.voice-loading {
	text-align: center;
	padding: 30px 0;
	color: #6b7280;
	font-size: 15px;
}
.voice-error {
	text-align: center;
	padding: 30px 0;
	color: #ef4444;
	font-size: 15px;
}

/* 语音实时识别（优化版） */
.voice-duration {
	text-align: center;
	font-size: 13px;
	color: #9ca3af;
	margin-top: 4px;
	font-family: monospace;
}
.voice-realtime {
	margin: 12px 0;
	padding: 10px 12px;
	background: #f9fafb;
	border-radius: 8px;
	min-height: 40px;
	font-size: 14px;
	line-height: 1.6;
	color: #111827;
	word-break: break-all;
}
.voice-final-text {
	color: #111827;
	font-weight: 500;
}
.voice-interim-text {
	color: #9ca3af;
	font-style: italic;
}
.voice-listening-text {
	font-size: 15px;
	color: #374151;
	font-weight: 500;
}
.voice-auto-tip {
	text-align: center;
	font-size: 12px;
	color: #9ca3af;
	margin-top: 8px;
}
