/* ============================================================
   学驿点·美食 PC 端 —— 全站样式
   用途：支付宝电脑支付审核演示站，高饱和美食主题
   ============================================================ */

:root {
  --primary: #ff2e4d;        /* 主色：高饱和红 */
  --primary-dark: #e01e3c;
  --accent: #ff7a1a;         /* 辅助色：暖橙 */
  --gold: #ffd100;           /* 强调色：诱食欲黄 */
  --bg: #fff7f2;             /* 页面底色：暖白 */
  --card: #ffffff;
  --text: #2b1a12;
  --text-sub: #8a7a70;
  --price: #ff2e4d;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(255, 46, 77, 0.10);
  --grad: linear-gradient(135deg, #ff2e4d 0%, #ff7a1a 100%);
  --grad-btn: linear-gradient(135deg, #ff5c2e 0%, #ff2e4d 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input { outline: none; font-family: inherit; }

.container { width: 1200px; margin: 0 auto; }

/* ---------- 顶部通栏 ---------- */
.topbar {
  background: var(--grad);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; }
.topbar a { color: #fff; margin-left: 16px; }

/* ---------- 头部导航 ---------- */
.header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(43, 26, 18, 0.06);
  position: sticky; top: 0; z-index: 100;
}
.header .container {
  display: flex; align-items: center; height: 76px; gap: 48px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff;
}
.logo-name { font-size: 24px; font-weight: 800; }
.logo-name em { font-style: normal; color: var(--primary); }
.logo-sub { font-size: 11px; color: var(--text-sub); letter-spacing: 2px; }

.nav { display: flex; gap: 36px; flex: 1; }
.nav a {
  font-size: 16px; font-weight: 600; color: var(--text);
  padding: 6px 2px; position: relative;
}
.nav a.active, .nav a:hover { color: var(--primary); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 3px; border-radius: 3px; background: var(--grad);
}

.header-right { display: flex; align-items: center; gap: 20px; }
.cart-entry {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: #fff2f0; color: var(--primary);
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  transition: transform .15s;
}
.cart-entry:hover { transform: translateY(-2px); }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--gold); color: var(--text);
  border-radius: 999px; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.cart-badge[data-count="0"] { display: none; }

.avatar-mini {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; cursor: pointer; overflow: hidden;
}
.avatar-mini img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 700; transition: all .18s;
}
.btn-primary {
  background: var(--grad-btn); color: #fff;
  padding: 12px 36px; font-size: 16px;
  box-shadow: 0 6px 18px rgba(255, 46, 77, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 46, 77, 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-gold {
  background: var(--gold); color: var(--text); font-size: 20px;
  padding: 14px 52px; box-shadow: 0 8px 20px rgba(255, 209, 0, 0.5);
}
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost {
  background: #fff; color: var(--primary);
  border: 2px solid var(--primary); font-size: 14px; padding: 8px 22px;
}
.btn-ghost:hover { background: #fff2f0; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---------- 页面标题 ---------- */
.page-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 24px; font-weight: 800; margin: 32px 0 24px;
}
.page-title::before {
  content: ""; width: 6px; height: 24px; border-radius: 4px; background: var(--grad);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}

/* ---------- 商品网格 ---------- */
.goods-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.goods-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all .2s; cursor: pointer;
  display: flex; flex-direction: column;
}
.goods-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(255, 46, 77, 0.18); }
.goods-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; background: #ffe8de; }
.goods-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.goods-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.goods-desc { font-size: 12px; color: var(--text-sub); margin-bottom: 12px; flex: 1; }
.goods-foot { display: flex; align-items: center; justify-content: space-between; }
.goods-price { color: var(--price); font-weight: 800; }
.goods-price .yen { font-size: 13px; }
.goods-price .num { font-size: 22px; }
.add-cart-btn {
  background: var(--grad-btn); color: #fff;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 20px; line-height: 1;
  box-shadow: 0 4px 12px rgba(255, 46, 77, 0.4);
  transition: transform .15s;
}
.add-cart-btn:hover { transform: scale(1.15); }

/* ---------- 首页 hero ---------- */
.hero { margin-top: 24px; }
.hero-banner {
  position: relative; border-radius: 20px; overflow: hidden;
  height: 360px; box-shadow: 0 12px 40px rgba(255, 46, 77, 0.18);
}
.hero-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,8,4,.72) 0%, rgba(20,8,4,.25) 55%, transparent 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 0 64px; color: #fff;
}
.hero-slogan {
  font-size: 44px; font-weight: 900; letter-spacing: 2px; line-height: 1.3;
  text-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.hero-slogan em { font-style: normal; color: var(--gold); }
.hero-sub { font-size: 17px; margin: 14px 0 30px; opacity: .92; }

/* ---------- 分类胶囊 ---------- */
.cat-row { display: flex; gap: 14px; margin: 30px 0 8px; flex-wrap: wrap; }
.cat-chip {
  padding: 10px 26px; border-radius: 999px; font-size: 15px; font-weight: 700;
  background: #fff; color: var(--text); box-shadow: var(--shadow); cursor: pointer;
  transition: all .15s;
}
.cat-chip.active, .cat-chip:hover {
  background: var(--grad); color: #fff; transform: translateY(-2px);
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: calc(100vh - 84px);
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 500px at 15% 10%, rgba(255,122,26,.18), transparent),
    radial-gradient(1000px 500px at 85% 90%, rgba(255,46,77,.15), transparent),
    var(--bg);
}
.login-card {
  width: 420px; background: #fff; border-radius: 20px; padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(255, 46, 77, 0.16);
}
.login-title { font-size: 26px; font-weight: 900; text-align: center; margin-bottom: 6px; }
.login-title em { font-style: normal; color: var(--primary); }
.login-tip { text-align: center; color: var(--text-sub); font-size: 13px; margin-bottom: 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.field-input {
  width: 100%; height: 48px; border: 2px solid #f0e2da; border-radius: 12px;
  padding: 0 16px; font-size: 15px; transition: border .15s;
}
.field-input:focus { border-color: var(--primary); }
.field-code { display: flex; gap: 12px; }
.field-code .field-input { flex: 1; }
.send-code-btn {
  white-space: nowrap; padding: 0 20px; border-radius: 12px;
  background: #fff2f0; color: var(--primary); font-weight: 700; font-size: 14px;
}
.send-code-btn:hover { background: #ffe0dc; }
.login-submit { width: 100%; height: 50px; font-size: 17px; margin-top: 8px; }
.login-alt { text-align: center; font-size: 13px; color: var(--text-sub); margin-top: 22px; }

/* ---------- 我的页面 ---------- */
.mine-hero {
  background: var(--grad); border-radius: 20px; padding: 36px;
  color: #fff; display: flex; align-items: center; gap: 26px; margin-top: 28px;
  box-shadow: 0 14px 40px rgba(255, 46, 77, 0.3);
}
.mine-avatar {
  width: 88px; height: 88px; border-radius: 50%; border: 4px solid rgba(255,255,255,.7);
  background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; color: var(--primary);
}
.mine-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mine-nick { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.mine-phone { font-size: 14px; opacity: .9; }
.mine-logout {
  margin-left: auto; background: rgba(255,255,255,.22); color: #fff;
  padding: 10px 24px; border-radius: 999px; font-size: 14px; font-weight: 700;
}
.mine-logout:hover { background: rgba(255,255,255,.35); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 26px 0; }
.stat-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center; padding: 26px 0; cursor: pointer; transition: transform .15s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-num { font-size: 28px; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-sub); margin-top: 6px; }

.menu-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu-item {
  display: flex; align-items: center; padding: 22px 26px;
  border-bottom: 1px solid #faf0ea; cursor: pointer; transition: background .15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #fff7f2; }
.menu-item .mi-icon {
  width: 42px; height: 42px; border-radius: 12px; font-size: 20px;
  display: flex; align-items: center; justify-content: center; margin-right: 16px;
}
.menu-item .mi-name { font-size: 16px; font-weight: 700; flex: 1; }
.menu-item .mi-arrow { color: #d8c8be; font-size: 18px; }

/* ---------- 订单列表 ---------- */
.order-tabs { display: flex; gap: 10px; margin-bottom: 22px; }
.order-tab {
  padding: 10px 28px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: #fff; color: var(--text-sub); box-shadow: var(--shadow); cursor: pointer;
}
.order-tab.active { background: var(--grad); color: #fff; }

.order-card { margin-bottom: 20px; overflow: hidden; }
.order-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: #fff8f4; font-size: 14px;
}
.order-no { color: var(--text-sub); }
.order-status { font-weight: 800; }
.st-wait { color: #ff9500; }
.st-done { color: #07c160; }
.st-cancel { color: #9aa0a6; }
.st-deliver { color: var(--primary); }

.order-goods { display: flex; gap: 16px; padding: 18px 24px; align-items: center; }
.order-goods img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.og-info { flex: 1; }
.og-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.og-spec { font-size: 12px; color: var(--text-sub); }
.og-price { text-align: right; }
.og-price .p { color: var(--price); font-weight: 800; font-size: 16px; }
.og-price .q { font-size: 12px; color: var(--text-sub); }
.order-foot {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
  padding: 14px 24px; border-top: 1px dashed #f3e3da; font-size: 14px;
}
.order-total .n { color: var(--price); font-size: 20px; font-weight: 900; }
.pay-again {
  background: #fff; border: 2px solid var(--primary); color: var(--primary);
  border-radius: 999px; padding: 6px 22px; font-weight: 700; font-size: 13px;
}
.pay-again:hover { background: #fff2f0; }

/* ---------- 购物车 ---------- */
.cart-table { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-thead {
  display: grid; grid-template-columns: 60px 1fr 140px 160px 120px;
  padding: 16px 24px; background: #fff8f4; font-size: 14px; font-weight: 700; color: var(--text-sub);
}
.cart-row {
  display: grid; grid-template-columns: 60px 1fr 140px 160px 120px;
  align-items: center; padding: 20px 24px; border-bottom: 1px solid #faf0ea;
}
.cart-row:last-of-type { border-bottom: none; }
.cart-check {
  width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer;
}
.cart-goods { display: flex; align-items: center; gap: 16px; }
.cart-goods img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; }
.cg-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.cg-spec { font-size: 12px; color: var(--text-sub); }
.cart-price { color: var(--price); font-weight: 800; font-size: 16px; }

.qty-ctrl { display: inline-flex; align-items: center; gap: 0; border: 2px solid #f0e2da; border-radius: 10px; overflow: hidden; }
.qty-btn { width: 34px; height: 36px; background: #fff8f4; font-size: 18px; font-weight: 800; color: var(--primary); }
.qty-btn:hover { background: #ffe8de; }
.qty-num { width: 46px; height: 36px; text-align: center; font-weight: 700; border: none; font-size: 15px; }
.cart-del { background: none; color: #b0a49c; font-size: 13px; }
.cart-del:hover { color: var(--primary); }

.cart-bar-wrap { position: sticky; bottom: 20px; margin-top: 26px; }
.cart-bar {
  background: #fff; border-radius: 999px; box-shadow: 0 12px 40px rgba(43,26,18,.16);
  display: flex; align-items: center; padding: 12px 12px 12px 30px; gap: 24px;
}
.cart-bar .sel-info { flex: 1; font-size: 14px; color: var(--text-sub); }
.cart-bar .sel-info b { color: var(--text); }
.cart-sum .r { color: var(--text-sub); font-size: 13px; }
.cart-sum .n { color: var(--price); font-size: 30px; font-weight: 900; }
.cart-sum .n .yen { font-size: 15px; }

.empty {
  text-align: center; padding: 90px 0; color: var(--text-sub);
}
.empty .icon { font-size: 64px; margin-bottom: 16px; }
.empty p { font-size: 15px; margin-bottom: 24px; }

/* ---------- 结算页 ---------- */
.checkout-block { margin-bottom: 24px; }
.block-title { font-size: 17px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.block-title::before { content: ""; width: 5px; height: 18px; border-radius: 3px; background: var(--grad); }

.addr-card {
  display: flex; align-items: center; gap: 16px; padding: 22px 24px;
  border: 2px solid #ffd9c9; border-radius: var(--radius); background: #fff;
}
.addr-icon { font-size: 26px; }
.addr-info { flex: 1; }
.addr-line1 { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.addr-line1 .tag {
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; margin-right: 8px; vertical-align: 2px;
}
.addr-line2 { font-size: 13px; color: var(--text-sub); }

.co-goods { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid #faf0ea; align-items: center; }
.co-goods:last-child { border-bottom: none; }
.co-goods img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }

.co-summary { background: #fff8f4; border-radius: 12px; padding: 20px 24px; }
.co-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--text-sub); }
.co-line.total { color: var(--text); font-weight: 800; font-size: 16px; border-top: 1px dashed #f0d8cc; margin-top: 8px; padding-top: 14px; }
.co-line.total .n { color: var(--price); font-size: 24px; font-weight: 900; }

.pay-methods { display: flex; gap: 16px; }
.pay-method {
  flex: 1; display: flex; align-items: center; gap: 12px;
  border: 2px solid #f0e2da; border-radius: 12px; padding: 16px 18px; cursor: pointer;
  background: #fff; transition: all .15s; font-weight: 700;
}
.pay-method.selected { border-color: var(--primary); background: #fff2f0; }
.pay-method .pm-logo { font-size: 26px; }
.pm-alipay { color: #1677ff; }

.co-foot { display: flex; justify-content: flex-end; margin-top: 28px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; top: 100px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: rgba(20, 8, 4, .85); color: #fff; padding: 12px 30px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 页脚 ---------- */
.footer { margin-top: 60px; padding: 30px 0; background: #2b1a12; color: #a89486; text-align: center; font-size: 13px; }
.footer b { color: #fff; }

/* 响应式兜底 */
@media (max-width: 1240px) {
  .container { width: 100%; padding: 0 16px; }
  .goods-grid { grid-template-columns: repeat(3, 1fr); }
}
