/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #ff6b35;
    --primary-dark: #e85a2b;
    --primary-light: #fff0ea;
    --accent: #ff9f1c;
    --text-main: #1a1a2e;
    --text-sub: #6b7280;
    --text-light: #9ca3af;
    --bg: #f5f5f7;
    --card-bg: #ffffff;
    --border: #eee;
    --green: #52b788;
    --red: #e63946;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --tab-h: 56px;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

/* ===== 页面切换 ===== */
.page {
    display: none;
    min-height: 100vh;
    padding-bottom: calc(var(--tab-h) + 10px);
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 顶部栏 ===== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.top-bar-center {
    justify-content: center;
}

.bar-title {
    font-size: 17px;
    font-weight: 600;
}

.location {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.loc-icon { font-size: 14px; }

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.92);
    border-radius: 20px;
    padding: 7px 14px;
    color: var(--text-light);
}

.search-box-full {
    width: 100%;
    flex: 1;
}

.search-icon { font-size: 14px; }

.search-placeholder {
    font-size: 13px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
    color: var(--text-main);
}

/* ===== 轮播图 ===== */
.banner-wrap {
    position: relative;
    overflow: hidden;
    margin: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.banner-track {
    display: flex;
    transition: transform 0.4s ease;
}

.banner-slide {
    min-width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.banner-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.banner-text p {
    font-size: 13px;
    opacity: 0.95;
}

.banner-emoji {
    font-size: 52px;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all 0.3s;
}

.banner-dot.active {
    width: 18px;
    border-radius: 3px;
    background: #fff;
}

/* ===== 快捷分类 ===== */
.quick-cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 4px 14px 12px;
}

.quick-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px;
    background: var(--card-bg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.15s;
}

.quick-cat:active {
    transform: scale(0.95);
}

.qc-icon {
    font-size: 28px;
}

.quick-cat span {
    font-size: 12px;
    color: var(--text-sub);
}

/* ===== 通用区块 ===== */
.section {
    padding: 0 14px 14px;
}

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

.section-head h3 {
    font-size: 16px;
    font-weight: 600;
}

.more {
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
}

/* ===== 优惠速递（横向滚动） ===== */
.deal-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.deal-scroll::-webkit-scrollbar { display: none; }

.deal-card-mini {
    min-width: 200px;
    background: linear-gradient(135deg, #fff5f0, #ffe8db);
    border-radius: var(--radius);
    padding: 12px;
    border: 1px solid #ffd9c4;
    position: relative;
    overflow: hidden;
}

.deal-card-mini::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: rgba(255,107,53,0.1);
    border-radius: 50%;
}

.dcm-top {
    display: flex;
    align-items: baseline;
    gap: 3px;
    color: var(--primary);
    margin-bottom: 4px;
}

.dcm-amount {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.dcm-unit {
    font-size: 14px;
    font-weight: 600;
}

.dcm-title {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 2px;
}

.dcm-desc {
    font-size: 11px;
    color: var(--text-light);
}

.dcm-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 14px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== 摊位卡片 ===== */
.stall-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stall-list-full {
    grid-template-columns: 1fr 1fr;
    padding: 10px 14px;
}

.stall-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s;
}

.stall-card:active {
    transform: scale(0.97);
}

.stall-img {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    position: relative;
}

.stall-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}

.badge-hot { background: var(--red); }
.badge-new { background: var(--green); }
.badge-rec { background: var(--accent); }

.stall-info {
    padding: 8px 10px 10px;
}

.stall-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stall-tags {
    display: flex;
    gap: 4px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.stall-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary);
}

.stall-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stall-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}

.stall-price {
    font-size: 12px;
    color: var(--text-light);
}

.stall-price b {
    color: var(--primary);
    font-size: 14px;
}

/* ===== 分类标签栏 ===== */
.cat-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-sub);
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
}

.cat-tab.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

/* ===== 空状态 ===== */
.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-emoji {
    font-size: 48px;
    margin-bottom: 10px;
}

/* ===== 优惠专区 ===== */
.deal-banner {
    margin: 12px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    padding: 18px 20px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,107,53,0.25);
}

.db-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.db-emoji {
    font-size: 40px;
}

.deal-banner h2 {
    font-size: 18px;
    margin-bottom: 2px;
}

.deal-banner p {
    font-size: 13px;
    opacity: 0.9;
}

.coupon-list {
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coupon-card {
    display: flex;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.coupon-left {
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    color: #fff;
    position: relative;
    flex-shrink: 0;
}

.coupon-left::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--card-bg);
}

.coupon-left::before {
    content: '';
    position: absolute;
    right: -5px;
    top: 0;
    width: 10px;
    height: 50%;
    transform: translateY(-50%);
    border-radius: 0 0 10px 10px;
    background: var(--card-bg);
}

.cl-amount {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.cl-amount span {
    font-size: 14px;
}

.cl-label {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.9;
}

.coupon-right {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cr-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.cr-desc {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 3px;
}

.cr-validity {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.cr-btn {
    align-self: flex-start;
    padding: 4px 16px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.cr-btn.available {
    background: var(--primary);
    color: #fff;
}

.cr-btn.claimed {
    background: var(--bg);
    color: var(--text-light);
    cursor: default;
}

/* ===== 个人中心 ===== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: 2px solid rgba(255,255,255,0.4);
}

.profile-info h2 {
    font-size: 18px;
    margin-bottom: 3px;
}

.profile-info p {
    font-size: 13px;
    opacity: 0.9;
}

.profile-stats {
    display: flex;
    background: var(--card-bg);
    margin: -12px 14px 0;
    border-radius: var(--radius);
    padding: 16px 0;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.stat-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.stat-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 2px;
}

.menu-list {
    margin: 14px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

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

.menu-item:active { background: var(--bg); }

.mi-icon {
    font-size: 20px;
    margin-right: 12px;
}

.mi-text {
    flex: 1;
    font-size: 14px;
}

.mi-arrow {
    color: var(--text-light);
    font-size: 18px;
}

/* ===== 摊位详情弹层 ===== */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: flex-end;
}

.detail-overlay.show {
    display: flex;
    animation: fadeBg 0.25s;
}

@keyframes fadeBg {
    from { background: rgba(0,0,0,0); }
    to { background: rgba(0,0,0,0.4); }
}

.detail-page {
    width: 100%;
    max-width: 430px;
    height: 92vh;
    background: var(--bg);
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.22,0.61,0.36,1);
}

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

.detail-hero {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    position: relative;
}

.detail-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.detail-body {
    padding: 0 16px 30px;
}

.detail-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.detail-name {
    font-size: 20px;
    font-weight: 700;
}

.detail-fav {
    font-size: 22px;
    cursor: pointer;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 12px;
}

.detail-rating {
    color: var(--accent);
    font-weight: 600;
}

.detail-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.detail-tag {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    background: var(--primary-light);
    color: var(--primary);
}

.detail-info-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}

.info-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
    padding: 5px 0;
    color: var(--text-sub);
}

.info-row span:first-child {
    flex-shrink: 0;
}

.detail-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.menu-item-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
}

.mil-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

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

.mil-emoji {
    font-size: 30px;
    margin-right: 12px;
    width: 40px;
    text-align: center;
}

.mil-info {
    flex: 1;
}

.mil-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.mil-desc {
    font-size: 12px;
    color: var(--text-light);
}

.mil-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.mil-price span {
    font-size: 12px;
    font-weight: 400;
}

.mil-original {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 4px;
}

.detail-coupon {
    background: linear-gradient(135deg, #fff5f0, #ffe8db);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px dashed var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.dc-info {
    display: flex;
    flex-direction: column;
}

.dc-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.dc-amount span { font-size: 14px; }

.dc-title {
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

.dc-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.dc-btn {
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.dc-btn.claimed {
    background: #ccc;
    cursor: default;
}

/* ===== 底部导航 ===== */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--tab-h);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    display: flex;
    border-top: 1px solid var(--border);
    z-index: 200;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-icon {
    font-size: 22px;
    transition: transform 0.2s;
}

.tab-label {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 500;
}

.tab-item.active .tab-icon {
    transform: translateY(-2px) scale(1.1);
}

.tab-item.active .tab-label {
    color: var(--primary);
    font-weight: 600;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.78);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    white-space: nowrap;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.modal-overlay.show {
    display: flex;
    animation: fadeBg 0.25s;
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    animation: scaleIn 0.3s cubic-bezier(0.22,0.61,0.36,1);
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-box h2 {
    font-size: 18px;
    margin-bottom: 14px;
}

.modal-box p {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 10px;
    text-align: left;
}

.modal-box ul {
    text-align: left;
    margin-bottom: 14px;
    padding-left: 20px;
}

.modal-box li {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.modal-contact {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

/* ===== 底部占位 ===== */
.bottom-pad { height: 20px; }

/* ===== 菜单加购按钮 ===== */
.mil-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mil-price-group {
    text-align: right;
    white-space: nowrap;
}

.mil-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.mil-add-btn:active { transform: scale(0.85); }

.mil-qty-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mil-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    background: #fff;
    color: var(--primary);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mil-qty-btn:active { transform: scale(0.85); }

.mil-qty-num {
    font-size: 14px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

/* ===== 详情页底部购物车栏 ===== */
.detail-cart-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    z-index: 10;
}

.dcb-cart-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    flex-shrink: 0;
}

.dcb-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.dcb-total {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dcb-total-label {
    font-size: 11px;
    color: var(--text-light);
}

.dcb-total-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.dcb-checkout {
    padding: 10px 24px;
    border-radius: 22px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.dcb-checkout:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===== 购物车弹层 ===== */
.cart-page {
    height: 70vh;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.cart-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.cart-clear {
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
}

.cart-stall-name {
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-sub);
    background: var(--primary-light);
    font-weight: 500;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

.ci-emoji {
    font-size: 28px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

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

.ci-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-price {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

.ci-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ci-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    background: #fff;
    color: var(--primary);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ci-qty-btn:active { transform: scale(0.85); }

.ci-qty-num {
    font-size: 15px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.cart-empty-emoji {
    font-size: 48px;
    margin-bottom: 10px;
}

.cart-footer {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid var(--border);
    gap: 12px;
}

.cart-total {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ct-label {
    font-size: 12px;
    color: var(--text-light);
}

.ct-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.cart-checkout-btn {
    padding: 12px 32px;
    border-radius: 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.cart-checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===== 下单确认页 ===== */
.checkout-page {
    height: 92vh;
}

.checkout-body {
    padding: 14px 16px 30px;
}

.delivery-mode {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.dm-option {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.dm-option.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dm-icon {
    font-size: 26px;
    margin-bottom: 4px;
}

.dm-label {
    font-size: 14px;
    font-weight: 600;
}

.dm-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.checkout-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}

.checkout-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.form-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}

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

.form-label {
    width: 70px;
    font-size: 14px;
    color: var(--text-sub);
    flex-shrink: 0;
}

.form-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: var(--text-main);
}

.form-input::placeholder {
    color: var(--text-light);
}

textarea.form-input {
    resize: none;
    min-height: 40px;
    line-height: 1.5;
}

.order-items-preview {
    margin-bottom: 14px;
}

.oip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.oip-name {
    color: var(--text-main);
}

.oip-qty {
    color: var(--text-light);
    font-size: 12px;
    margin-left: 4px;
}

.oip-price {
    color: var(--primary);
    font-weight: 600;
}

.order-summary {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.os-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: var(--text-sub);
}

.os-row.total {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.os-row.total span:last-child {
    color: var(--primary);
}

.submit-order-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255,107,53,0.3);
}

/* ===== 订单列表 ===== */
.orders-page {
    height: 92vh;
}

.orders-body {
    padding: 14px 16px 30px;
}

.order-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.15s;
}

.order-card:active { transform: scale(0.98); }

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

.oc-stall {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
}

.oc-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
}

.os-pending { background: #fff3cd; color: #856404; }
.os-cooking { background: #cce5ff; color: #004085; }
.os-delivering { background: #d4edda; color: #155724; }
.os-done { background: #e2e3e5; color: #6c757d; }
.os-cancelled { background: #f8d7da; color: #721c24; }

.oc-items {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 10px;
    line-height: 1.6;
}

.oc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.oc-time {
    font-size: 12px;
    color: var(--text-light);
}

.oc-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.orders-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.orders-empty-emoji {
    font-size: 48px;
    margin-bottom: 10px;
}

.orders-empty p {
    margin-bottom: 14px;
}

.orders-empty-btn {
    padding: 8px 24px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== 订单详情 ===== */
.order-detail-page {
    height: 92vh;
}

.order-detail-body {
    padding: 14px 16px 30px;
}

.od-status-banner {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    color: #fff;
}

.od-status-banner h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.od-status-banner p {
    font-size: 13px;
    opacity: 0.9;
}

.od-timeline {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 10px;
    position: relative;
}

.od-timeline::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.ot-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.ot-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.3s;
}

.ot-step.active .ot-dot {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.ot-label {
    font-size: 11px;
    color: var(--text-light);
}

.ot-step.active .ot-label {
    color: var(--primary);
    font-weight: 600;
}

.od-action-btn {
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 14px;
}

.od-action-btn.cancel {
    background: #fff;
    color: var(--text-sub);
    border: 1px solid var(--border);
}

/* ===== 全局购物车浮标 ===== */
.cart-float {
    position: fixed;
    bottom: 70px;
    right: 16px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255,107,53,0.4);
    cursor: pointer;
    z-index: 150;
    transition: transform 0.2s;
}

.cart-float.show {
    display: flex;
}

.cart-float:active {
    transform: scale(0.9);
}

.cf-icon {
    font-size: 24px;
}

.cf-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

