:root {
	--bg: #f6f7fb;
	--card: #ffffff;
	--primary: #ff6a3d;
	--primary-dark: #d9481c;
	--primary-soft: #fff1ec;
	--text: #1f2937;
	--subtext: #6b7280;
	--line: #eceff5;
	--shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
	--radius: 18px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
	background: linear-gradient(180deg, #fff8f5 0%, var(--bg) 220px);
	color: var(--text);
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select {
	font: inherit;
}

.page {
	min-height: 100vh;
	padding: 24px;
}

.shell {
	max-width: 1280px;
	margin: 0 auto;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
	padding: 0 24px;
	margin-bottom: 22px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: var(--shadow);
	backdrop-filter: blur(12px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 22px;
	font-weight: 700;
	white-space: nowrap;
}

.brand-badge {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	background: linear-gradient(135deg, #ff7c52, #ff4d6d);
	color: #ffffff;
	font-size: 18px;
	box-shadow: 0 10px 18px rgba(255, 106, 61, 0.25);
}

.brand-badge img {
	width: 42px;
	height: 42px;
	display: block;
}

.search {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	max-width: 520px;
	height: 48px;
	margin: 0 32px;
	padding: 0 10px 0 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #f7f8fc;
}

.search input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--text);
	font-size: 15px;
}

.search button,
.primary-btn {
	border: 0;
	border-radius: 999px;
	background: var(--primary);
	color: #ffffff;
	font-weight: 700;
	cursor: pointer;
}

.search button {
	height: 36px;
	padding: 0 18px;
}

.actions {
	display: flex;
	gap: 10px;
	color: var(--subtext);
	font-size: 14px;
}

.action-pill {
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #ffffff;
	color: var(--subtext);
	white-space: nowrap;
	cursor: pointer;
}

.layout {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.card {
	border: 1px solid #f1f3f8;
	border-radius: var(--radius);
	background: var(--card);
	box-shadow: var(--shadow);
}

.category-menu,
.product-section {
	padding: 18px;
}

.category-menu {
	position: sticky;
	top: 18px;
}

.section-title {
	margin-bottom: 14px;
	font-size: 18px;
	font-weight: 700;
}

.cat-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	margin-bottom: 10px;
	border: 1px solid transparent;
	border-radius: 14px;
	background: #ffffff;
	color: var(--text);
	cursor: pointer;
	text-align: left;
}

.cat-item span {
	font-weight: 700;
}

.cat-item em {
	color: var(--subtext);
	font-style: normal;
	font-weight: 700;
}

.cat-item.active,
.cat-item:hover {
	border-color: #ffd5c7;
	background: var(--primary-soft);
	color: var(--primary-dark);
}

.cat-item.active em,
.cat-item:hover em {
	color: var(--primary-dark);
}

.main-area {
	display: grid;
	gap: 20px;
	min-width: 0;
}

.ad-carousel {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 24 / 7;
	height: auto;
	min-height: 0;
	overflow: hidden;
	background: #0f172a;
}

.ad-track,
.ad-slide {
	width: 100%;
	height: 100%;
}

.ad-slide {
	position: absolute;
	inset: 0;
	display: block;
	padding: 0;
	border: 0;
	opacity: 0;
	background: #111827;
	transition: opacity .28s ease;
}

.ad-slide.active {
	opacity: 1;
	z-index: 1;
}

.ad-slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #0f172a;
}

.ad-title {
	display: none;
}

.ad-dots {
	position: absolute;
	right: 22px;
	bottom: 24px;
	z-index: 3;
	display: flex;
	gap: 8px;
}

.ad-dots button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	transition: width .18s ease, background .18s ease;
}

.ad-dots button.active {
	width: 22px;
	background: #ffffff;
}

.kicker {
	color: var(--primary-dark);
	font-size: 13px;
	font-weight: 700;
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.section-head h2 {
	margin: 4px 0 0;
	font-size: 26px;
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.product-card {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 14px;
	position: relative;
	min-height: 176px;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #ffffff;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.product-card:hover,
.product-card.active {
	border-color: #ffd5c7;
	box-shadow: 0 16px 32px rgba(255, 106, 61, 0.12);
	transform: translateY(-1px);
}

.product-card.active::after {
	content: "已选";
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 5px 9px;
	border-radius: 999px;
	background: var(--primary);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
}

.product-logo {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	overflow: hidden;
	border-radius: 16px;
	border: 1px solid var(--line);
	background: #ffffff;
	color: var(--primary-dark);
	font-size: 16px;
	font-weight: 700;
	text-align: center;
}

.product-logo img {
	display: block;
	width: 58px;
	height: 58px;
	object-fit: contain;
}

.product-logo span {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #3388ff, #19c2e6);
	color: #ffffff;
}

.product-info {
	min-width: 0;
	padding-right: 42px;
}

.product-brand {
	color: var(--primary-dark);
	font-size: 13px;
	font-weight: 700;
}

.product-info h3 {
	margin: 7px 0 8px;
	font-size: 18px;
	line-height: 1.35;
}

.product-info p {
	margin: 0 0 12px;
	color: var(--subtext);
	font-size: 13px;
	line-height: 1.6;
}

.meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.meta span {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--primary-soft);
	color: var(--primary-dark);
	font-size: 12px;
	font-weight: 700;
}

.price-row {
	grid-column: 1 / -1;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}

.price-row del {
	color: #9ca3af;
	font-size: 13px;
}

.price-row strong {
	color: #ef4444;
	font-size: 24px;
}

.price-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.buy-btn {
	height: 38px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--primary);
	color: #ffffff;
	font-weight: 700;
	cursor: pointer;
}

.buy-btn:hover,
.primary-btn:hover {
	background: #f2552b;
}

.cashier-mask {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(17, 24, 39, 0.46);
	backdrop-filter: blur(8px);
}

.cashier-mask.is-open {
	display: flex;
}

.cashier-modal {
	width: min(520px, 100%);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 24px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.cashier-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.cashier-head h2 {
	margin: 0;
	font-size: 24px;
	line-height: 1.3;
}

.cashier-head p {
	margin: 6px 0 0;
	color: var(--subtext);
	font-size: 13px;
}

.cashier-close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: #f3f4f6;
	color: var(--subtext);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.cashier-close:hover {
	border-color: #ffd5c7;
	background: var(--primary-soft);
	color: var(--primary-dark);
}

.cashier-order,
.cashier-amount {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.cashier-order {
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fafbff;
	color: var(--subtext);
	font-size: 13px;
}

.cashier-order strong {
	color: var(--text);
	font-size: 14px;
	word-break: break-all;
	text-align: right;
}

.cashier-account {
	margin-top: 14px;
}

.cashier-account input {
	width: 100%;
	height: 42px;
	margin-top: 10px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 12px;
	outline: 0;
	background: #ffffff;
	color: var(--text);
}

.cashier-account input:focus {
	border-color: #ffb899;
	box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.1);
}

.cashier-amount {
	margin: 18px 0;
	padding: 18px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.cashier-amount span {
	color: var(--subtext);
	font-size: 15px;
}

.cashier-amount strong {
	color: #ff4d2d;
	font-size: 30px;
	line-height: 1;
}

.cashier-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.cashier-section-title {
	font-size: 16px;
	font-weight: 700;
}

.cashier-section-head span {
	color: var(--subtext);
	font-size: 12px;
}

.cashier-pay-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 300px;
	overflow-y: auto;
	padding-right: 4px;
}

.cashier-pay-option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 58px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #ffffff;
	color: var(--text);
	font-size: 13px;
	text-align: left;
	cursor: pointer;
}

.cashier-pay-option:hover,
.cashier-pay-option.active {
	border-color: #ffb899;
	background: var(--primary-soft);
	box-shadow: 0 0 0 1px rgba(255, 106, 61, 0.1);
}

.cashier-pay-option img,
.cashier-pay-fallback {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 10px;
}

.cashier-pay-option img {
	object-fit: cover;
	background: #f8fafc;
}

.cashier-pay-fallback {
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, #ff7c52, #ff4d6d);
	color: #ffffff;
	font-weight: 700;
}

.cashier-pay-fallback.green {
	background: linear-gradient(135deg, #22c55e, #16a34a);
}

.cashier-pay-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.cashier-pay-text strong {
	font-size: 14px;
	line-height: 1.3;
}

.cashier-pay-text em {
	color: var(--subtext);
	font-style: normal;
	font-size: 12px;
}

.cashier-pay-radio {
	position: relative;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border: 2px solid #cbd5e1;
	border-radius: 50%;
}

.cashier-pay-option.active .cashier-pay-radio {
	border-color: var(--primary);
}

.cashier-pay-option.active .cashier-pay-radio::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--primary);
	transform: translate(-50%, -50%);
}

.cashier-qrcode {
	display: none;
	align-items: center;
	gap: 16px;
	margin-top: 14px;
	padding: 14px;
	border: 1px solid #ffd3c1;
	border-radius: 14px;
	background: #fff7f3;
}

.cashier-qrcode.is-open {
	display: flex;
}

.cashier-qrcode-box {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 128px;
	height: 128px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #ffffff;
}

.cashier-qrcode-box img {
	width: 110px;
	height: 110px;
	object-fit: contain;
}

.cashier-qrcode-text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.cashier-qrcode-text strong {
	font-size: 16px;
}

.cashier-qrcode-text span {
	color: var(--subtext);
	font-size: 13px;
	line-height: 1.5;
}

.checkout-message {
	min-height: 18px;
	margin: 12px 0 0;
	color: var(--subtext);
	font-size: 13px;
	line-height: 1.5;
}

.checkout-message.is-error {
	color: #e11d48;
}

.cashier-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 18px;
}

.action-btn {
	min-width: 112px;
	height: 42px;
	padding: 0 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #ffffff;
	color: var(--text);
	font-weight: 700;
	cursor: pointer;
}

.action-btn.primary {
	border-color: var(--primary);
	background: var(--primary);
	color: #ffffff;
}

.action-btn.primary:hover {
	background: #f2552b;
}

.empty-box {
	padding: 16px;
	border-radius: 14px;
	background: #f7f8fc;
	color: var(--subtext);
	font-size: 13px;
	line-height: 1.6;
}

.product-empty {
	grid-column: 1 / -1;
}

.order-page {
	padding: 24px;
}

.order-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 18px;
}

.order-card {
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #ffffff;
}

.order-card-head,
.order-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.order-card-head strong {
	font-size: 17px;
}

.order-card-head span {
	flex-shrink: 0;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--primary-soft);
	color: var(--primary-dark);
	font-size: 12px;
	font-weight: 700;
}

.order-card-meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 18px;
	margin: 14px 0;
	color: var(--subtext);
	font-size: 13px;
	line-height: 1.5;
}

.order-card-foot {
	padding-top: 12px;
	border-top: 1px solid var(--line);
	color: var(--subtext);
}

.order-card-foot strong {
	color: var(--primary);
	font-size: 20px;
}

.order-card-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.detail-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	padding: 0 14px;
	border-radius: 999px;
	background: var(--primary);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
}

.mobile-order-page {
	min-height: 100vh;
	background: #ffffff;
}

.mobile-order-head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 72px;
	background: #ff332f;
	color: #ffffff;
	font-size: 19px;
	font-weight: 700;
}

.mobile-order-head a {
	position: absolute;
	left: 18px;
	top: 18px;
	color: #ffffff;
	font-size: 34px;
	font-weight: 300;
	line-height: 1;
}

.mobile-order-body {
	min-height: calc(100vh - 72px);
	padding: 16px;
	background: linear-gradient(180deg, #ff332f 0, #ff332f 92px, #ffffff 92px, #ffffff 100%);
}

.mobile-detail-card {
	width: min(520px, 100%);
	margin: 0 auto 12px;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.mobile-product-card {
	display: flex;
	gap: 12px;
	padding: 16px;
}

.mobile-product-logo {
	display: grid;
	place-items: center;
	width: 86px;
	height: 86px;
	border: 1px solid #eeeeee;
	border-radius: 8px;
	background: #fafafa;
	overflow: hidden;
	flex-shrink: 0;
}

.mobile-product-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mobile-product-logo span {
	color: #ff332f;
	font-size: 20px;
	font-weight: 700;
}

.mobile-product-info {
	flex: 1;
	min-width: 0;
}

.mobile-product-info h1 {
	margin: 4px 0 8px;
	font-size: 15px;
	line-height: 1.5;
}

.mobile-product-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #333333;
	font-size: 14px;
}

.mobile-product-row em {
	color: #777777;
	font-style: normal;
}

.mobile-product-total {
	margin-top: 20px;
	color: #777777;
	font-size: 14px;
	text-align: right;
}

.mobile-product-total strong {
	margin-left: 8px;
	color: #333333;
	font-size: 22px;
}

.mobile-info-card {
	padding: 18px 16px;
}

.mobile-info-card h2 {
	margin: 0 0 18px;
	font-size: 18px;
}

.mobile-info-row {
	display: flex;
	gap: 18px;
	margin-bottom: 15px;
	color: #999999;
	font-size: 15px;
}

.mobile-info-row span {
	width: 76px;
	flex-shrink: 0;
}

.mobile-info-row strong {
	color: #444444;
	font-weight: 500;
	word-break: break-all;
}

.pay-page {
	display: grid;
	place-items: start center;
}

.pay-shell {
	width: min(920px, 100%);
}

.pay-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	padding: 18px 22px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: var(--shadow);
}

.pay-card {
	padding: 28px;
	border: 1px solid #f1f3f8;
	border-radius: 20px;
	background: #ffffff;
	box-shadow: var(--shadow);
}

.pay-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--line);
}

.pay-head h1 {
	margin: 5px 0 8px;
	font-size: 30px;
	line-height: 1.25;
}

.pay-head p {
	margin: 0;
	color: var(--subtext);
	font-size: 14px;
	line-height: 1.6;
}

.pay-amount {
	flex-shrink: 0;
	color: #ff4d2d;
	font-size: 32px;
	font-weight: 800;
	line-height: 1.2;
}

.pay-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 20px 0;
}

.pay-summary div {
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fafbff;
}

.pay-summary span {
	display: block;
	margin-bottom: 8px;
	color: var(--subtext);
	font-size: 13px;
}

.pay-summary strong {
	display: block;
	color: var(--text);
	font-size: 15px;
	line-height: 1.45;
	word-break: break-all;
}

.pay-qrcode-panel {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 24px;
	align-items: center;
	padding: 22px;
	border: 1px solid #ffd3c1;
	border-radius: 18px;
	background: #fff7f3;
}

.pay-qrcode-box {
	position: relative;
	display: grid;
	place-items: center;
	width: 240px;
	height: 240px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: #ffffff;
}

.pay-qrcode-box img {
	width: 204px;
	height: 204px;
	object-fit: contain;
}

.pay-qrcode-box span {
	position: absolute;
	color: var(--subtext);
	font-size: 13px;
}

.pay-qrcode-info h2 {
	margin: 0 0 10px;
	font-size: 24px;
}

.pay-qrcode-info p {
	margin: 0;
	color: var(--subtext);
	font-size: 14px;
	line-height: 1.7;
}

@media (max-width: 1180px) {
	.topbar,
	.layout {
		display: grid;
		grid-template-columns: 1fr;
		height: auto;
	}

	.topbar {
		gap: 14px;
		padding: 18px;
	}

	.search {
		width: 100%;
		max-width: none;
		margin: 0;
	}

	.actions {
		flex-wrap: wrap;
	}

	.order-card-meta {
		grid-template-columns: 1fr;
	}

	.pay-summary,
	.pay-qrcode-panel {
		grid-template-columns: 1fr;
	}

	.category-menu {
		position: static;
	}
}

@media (max-width: 760px) {
	.page {
		padding: 14px;
	}

	.product-grid {
		grid-template-columns: 1fr;
	}

	.ad-carousel {
		height: 220px;
		min-height: 220px;
	}

	.ad-title {
		left: 22px;
		bottom: 22px;
		max-width: calc(100% - 44px);
		font-size: 16px;
	}

	.product-card {
		grid-template-columns: 64px minmax(0, 1fr);
	}

	.product-logo {
		width: 64px;
		height: 64px;
		font-size: 15px;
	}

	.price-row {
		display: grid;
		align-items: start;
	}

	.price-actions {
		justify-content: space-between;
	}

	.pay-card {
		padding: 20px;
	}

	.pay-head {
		display: grid;
	}

	.pay-amount {
		font-size: 28px;
	}

	.pay-qrcode-box {
		width: 100%;
		max-width: 240px;
		justify-self: center;
	}
}

@media (max-width: 520px) {
	.price-actions {
		display: grid;
		width: 100%;
	}

	.buy-btn {
		width: 100%;
	}
}
