/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #ff6b35;
  --primary-dark: #e8551f;
  --secondary: #2b2d42;
  --bg-light: #fff8f3;
  --text: #2b2d42;
  --text-light: #6b7280;
  --border: #eee0d5;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
}
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(255,107,53,0.35); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-outline:hover { background: var(--secondary); color: #fff; }
.btn-full { width: 100%; }

/* ===== 顶部导航 ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { font-size: 22px; font-weight: 800; color: var(--primary); }
.nav { display: flex; gap: 30px; }
.nav a { font-weight: 600; color: var(--text); font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-btn {
  position: relative; background: var(--bg-light); border: none;
  border-radius: 999px; padding: 9px 16px; font-size: 16px; cursor: pointer;
}
.cart-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--primary); color: #fff; font-size: 11px;
  border-radius: 50%; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, var(--bg-light) 0%, #ffe9d6 100%); padding: 70px 0; overflow: hidden; }
.hero-inner { display: flex; align-items: center; gap: 40px; }
.hero-text { flex: 1; }
.badge {
  display: inline-block; background: #fff; color: var(--primary);
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.hero-text h1 { font-size: 44px; font-weight: 800; line-height: 1.25; margin-bottom: 18px; color: var(--secondary); }
.highlight { color: var(--primary); }
.hero-text p { font-size: 16px; color: var(--text-light); max-width: 480px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 36px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 24px; color: var(--secondary); }
.stat span { font-size: 13px; color: var(--text-light); }
.hero-image { flex: 1; display: flex; justify-content: center; }
.hero-emoji {
  font-size: 90px; background: #fff; border-radius: 50%;
  width: 320px; height: 320px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); letter-spacing: 10px;
}

/* ===== Section 通用 ===== */
.section-title { font-size: 32px; font-weight: 800; text-align: center; color: var(--secondary); }
.section-sub { text-align: center; color: var(--text-light); margin: 10px 0 40px; }

/* ===== 分类 ===== */
.categories { padding: 70px 0 30px; }
.category-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
}
.category-card {
  background: var(--bg-light); border-radius: var(--radius);
  padding: 24px 10px; text-align: center; cursor: pointer;
  border: 2px solid transparent; transition: all .2s;
}
.category-card:hover, .category-card.active { border-color: var(--primary); transform: translateY(-4px); }
.category-card .emoji { font-size: 34px; margin-bottom: 8px; }
.category-card .name { font-weight: 700; font-size: 14px; }

/* ===== 菜单 ===== */
.menu { padding: 60px 0 80px; }
.filter-bar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn {
  padding: 9px 20px; border-radius: 999px; border: 2px solid var(--border);
  background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-light);
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.dish-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s;
  display: flex; flex-direction: column;
}
.dish-card:hover { transform: translateY(-6px); }
.dish-img {
  height: 150px; background: linear-gradient(135deg,#ffe9d6,#fff3e6);
  display: flex; align-items: center; justify-content: center; font-size: 60px;
  position: relative;
}
.dish-tag {
  position: absolute; top: 10px; left: 10px; background: var(--primary);
  color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700;
}
.dish-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.dish-name { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.dish-desc { font-size: 13px; color: var(--text-light); flex: 1; margin-bottom: 14px; }
.dish-footer { display: flex; align-items: center; justify-content: space-between; }
.dish-price { font-size: 19px; font-weight: 800; color: var(--primary); }
.dish-price small { font-size: 12px; color: var(--text-light); text-decoration: line-through; font-weight: 400; margin-right: 6px; }
.add-btn {
  background: var(--primary); color: #fff; border: none; border-radius: 999px;
  width: 36px; height: 36px; font-size: 18px; cursor: pointer; font-weight: 700;
  transition: background .2s;
}
.add-btn:hover { background: var(--primary-dark); }

/* ===== 关于我们 ===== */
.about { padding: 70px 0; background: var(--bg-light); }
.about-inner { display: flex; align-items: center; gap: 50px; }
.about-text { flex: 1.2; }
.about-text p { color: var(--text-light); margin: 16px 0 20px; }
.about-list li { margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.about-image { flex: 1; display: flex; justify-content: center; }
.about-emoji {
  font-size: 100px; background: #fff; border-radius: var(--radius);
  width: 260px; height: 260px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}

/* ===== 页脚 ===== */
.footer { background: var(--secondary); color: #d6d6e0; padding: 60px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1.3fr; gap: 30px; padding-bottom: 40px; }
.footer-logo { color: #fff; margin-bottom: 14px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 16px; }
.footer-col p, .footer-col a { display: block; margin-bottom: 10px; font-size: 14px; color: #b8b8c8; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); text-align: center;
  padding: 20px 0; font-size: 13px; color: #8888a0;
}

/* ===== 购物车侧边栏 ===== */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200;
  opacity: 0; visibility: hidden; transition: opacity .25s;
}
.cart-overlay.show { opacity: 1; visibility: visible; }
.cart-panel {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw; height: 100%;
  background: #fff; z-index: 201; box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  transition: right .3s ease; display: flex; flex-direction: column;
}
.cart-panel.show { right: 0; }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.cart-header h3 { font-size: 18px; }
.close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-light); }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 20px; }
.cart-empty { text-align: center; color: var(--text-light); margin-top: 60px; font-size: 14px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-item .ci-emoji { font-size: 32px; width: 50px; height: 50px; background: var(--bg-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-item .ci-info { flex: 1; }
.cart-item .ci-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.cart-item .ci-price { color: var(--primary); font-weight: 700; font-size: 13px; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 14px; line-height: 1;
}
.ci-remove { background: none; border: none; color: #bbb; cursor: pointer; font-size: 16px; margin-left: 8px; }
.ci-remove:hover { color: var(--primary); }
.cart-footer { padding: 18px 20px; border-top: 1px solid var(--border); }
.cart-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-light); margin-bottom: 8px; }
.cart-row.total { font-size: 17px; font-weight: 800; color: var(--secondary); margin: 12px 0 16px; }

/* ===== 弹窗通用 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 300;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s; padding: 20px;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 460px;
  max-height: 88vh; overflow-y: auto; padding: 26px; position: relative;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-header h3 { font-size: 19px; }

/* 结算表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 60px; }
.order-summary {
  background: var(--bg-light); border-radius: 10px; padding: 14px; margin-bottom: 16px;
  font-size: 13px; color: var(--text-light);
}
.order-summary .os-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.order-summary .os-total { font-weight: 800; color: var(--secondary); font-size: 15px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.pay-options { display: flex; gap: 20px; }
.pay-opt { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* 成功弹窗 */
.success-modal { text-align: center; max-width: 380px; }
.success-icon { font-size: 60px; margin-bottom: 10px; }
.success-modal h3 { font-size: 22px; margin-bottom: 12px; }
.success-modal p { color: var(--text-light); font-size: 14px; margin-bottom: 8px; }
.success-modal .btn { margin-top: 16px; }

/* Toast */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--secondary); color: #fff; padding: 12px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 600; z-index: 400; opacity: 0; transition: all .3s ease;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-text h1 { font-size: 34px; }
}
@media (max-width: 768px) {
  .nav { position: fixed; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column;
    padding: 20px; gap: 16px; box-shadow: var(--shadow); transform: translateY(-110%); transition: transform .25s; z-index: 99; }
  .nav.open { transform: translateY(0); }
  .menu-toggle { display: block; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-emoji { width: 220px; height: 220px; font-size: 60px; }
  .about-inner { flex-direction: column; }
  .about-text { text-align: center; }
  .about-text h2 { text-align: center !important; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 480px) {
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .cart-panel { width: 100%; }
}
