/* ============ 宠饱饱 v2.0 ============ */
:root {
  --primary: #FF6B35;
  --primary-dark: #E5572A;
  --primary-light: #FFF0E8;
  --accent: #4ECDC4;
  --accent-dark: #3DBDB5;
  --accent-light: #E8F8F5;
  --bg: #FEFAF6;
  --bg-card: #FFFFFF;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #B2BEC3;
  --border: #F0E6D9;
  --border-light: #F8F2EB;
  --star: #FFB800;
  --success: #00B894;
  --danger: #E17055;
  --warning: #FDCB6E;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ---- 导航栏 ---- */
.navbar { background: rgba(255,255,255,0.92); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 1px 0 rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.nav-brand-icon { font-size: 30px; filter: drop-shadow(0 2px 4px rgba(255,107,53,0.3)); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link { color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 8px; transition: var(--transition); }
.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-link.highlight { color: var(--primary); font-weight: 600; }
.nav-auth { display: flex; gap: 8px; margin-left: 8px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ---- 按钮 ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); letter-spacing: 0.2px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #FF8F65); color: #fff; box-shadow: 0 4px 12px rgba(255,107,53,0.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(255,107,53,0.4); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent { background: linear-gradient(135deg, var(--accent), #66D9D0); color: #fff; box-shadow: 0 4px 12px rgba(78,205,196,0.3); }
.btn-accent:hover { box-shadow: 0 6px 20px rgba(78,205,196,0.4); transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-ghost { background: rgba(255,255,255,0.15); color: #fff; backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,0.25); }
.btn-login { background: linear-gradient(135deg, var(--primary), #FF8F65); color: #fff; padding: 8px 22px; border-radius: 22px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(255,107,53,0.25); transition: var(--transition); }
.btn-login:hover { box-shadow: 0 4px 16px rgba(255,107,53,0.35); transform: translateY(-1px); }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, #FF6B35 0%, #FF8F65 50%, #FFB088 100%); padding: 72px 24px 80px; text-align: center; color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); border-radius: 50%; }
.hero::after { content: ''; position: absolute; bottom: -30%; left: -10%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%); border-radius: 50%; }
.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 12px; letter-spacing: -1px; text-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.hero p { font-size: 18px; opacity: 0.92; margin-bottom: 36px; font-weight: 400; }
.search-box { max-width: 580px; margin: 0 auto; display: flex; background: rgba(255,255,255,0.2); backdrop-filter: blur(12px); border-radius: 16px; padding: 5px; border: 1px solid rgba(255,255,255,0.3); }
.search-box input { flex: 1; padding: 14px 20px; border: none; border-radius: 12px; font-size: 16px; outline: none; background: #fff; }
.search-box input::placeholder { color: #B2BEC3; }
.search-box button { padding: 14px 28px; background: var(--accent); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; margin-left: 5px; transition: var(--transition); white-space: nowrap; }
.search-box button:hover { background: var(--accent-dark); }

/* ---- 分类网格 ---- */
.categories { max-width: 1200px; margin: -36px auto 0; padding: 0 24px; position: relative; z-index: 10; }
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-card { background: #fff; border-radius: var(--radius); padding: 28px 14px; text-align: center; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; border: 1px solid transparent; }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.cat-icon { font-size: 40px; margin-bottom: 10px; display: block; }
.cat-name { font-size: 15px; font-weight: 700; color: var(--text); }
.cat-desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* ---- 商家卡片 ---- */
.section { max-width: 1200px; margin: 48px auto; padding: 0 24px; }
.section-title { font-size: 26px; font-weight: 800; margin-bottom: 24px; letter-spacing: -0.5px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px; }
.shop-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); border: 1px solid var(--border-light); }
.shop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.shop-card-img { width: 100%; height: 200px; object-fit: cover; position: relative; }
.shop-card-placeholder { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; font-size: 52px; position: relative; }
.shop-card-placeholder.grooming { background: linear-gradient(135deg, #FFE0D0, #FFF0E8); }
.shop-card-placeholder.boarding { background: linear-gradient(135deg, #E8F8F5, #D4F0EC); }
.shop-card-placeholder.training { background: linear-gradient(135deg, #FFF3CD, #FFEAA7); }
.shop-card-placeholder.medical { background: linear-gradient(135deg, #E8F0FE, #D4E4FC); }
.shop-card-placeholder.photography { background: linear-gradient(135deg, #F0E8FF, #E4D8FC); }
.shop-card-placeholder.funeral { background: linear-gradient(135deg, #F0F0F0, #E8E8E8); }
.shop-card-body { padding: 18px 20px 20px; }
.shop-card-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.shop-card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.shop-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 14px; font-size: 12px; font-weight: 500; background: var(--primary-light); color: var(--primary); }
.tag-district { background: var(--accent-light); color: var(--accent-dark); }
.tag-featured { background: linear-gradient(135deg, #FFF3CD, #FFEAA7); color: #D4A017; font-weight: 600; }

/* ---- 星级评分 ---- */
.stars { color: var(--star); font-size: 14px; letter-spacing: 2px; }
.rating-num { font-weight: 800; color: var(--primary); font-size: 17px; }
.star-rating { display: flex; gap: 4px; font-size: 28px; color: #ddd; user-select: none; }
.star-rating.star-sm { font-size: 20px; }
.star-rating .star-btn { cursor: pointer; transition: var(--transition); }
.star-rating .star-btn:hover { transform: scale(1.2); }

/* ---- 详情页 ---- */
.detail-header { padding: 32px 24px; max-width: 1200px; margin: 0 auto; }
.detail-info { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.detail-section { background: #fff; border-radius: var(--radius); padding: 28px; margin-bottom: 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.detail-section h3 { font-size: 18px; font-weight: 700; }

/* ---- 表单 ---- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.form-input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; outline: none; transition: var(--transition); background: #fff; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.1); }
.form-input::placeholder { color: var(--text-muted); }
select.form-input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 14px center; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* ---- Dashboard ---- */
.dashboard { max-width: 1200px; margin: 32px auto; padding: 0 24px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow); }
.stat-num { font-size: 34px; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ---- 表格 ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; font-size: 14px; }
th { background: var(--bg); font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border); }
td { border-bottom: 1px solid var(--border-light); }
tr:hover td { background: #FEFAF6; }
.status-pending { color: #F39C12; font-weight: 600; }
.status-confirmed { color: var(--accent); font-weight: 600; }
.status-completed { color: var(--success); font-weight: 600; }
.status-cancelled { color: var(--text-muted); font-weight: 600; }

/* ---- 页脚 ---- */
.footer { background: #1A1D23; color: #8B95A5; padding: 56px 24px 32px; margin-top: 72px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer h4 { color: #fff; margin-bottom: 16px; font-size: 16px; font-weight: 700; }
.footer p { font-size: 14px; line-height: 1.7; }
.footer a { color: #8B95A5; display: block; margin-bottom: 8px; font-size: 14px; transition: var(--transition); }
.footer a:hover { color: var(--primary); transform: translateX(3px); }
.footer-bottom { text-align: center; padding-top: 28px; margin-top: 40px; border-top: 1px solid #2D3139; font-size: 13px; color: #636E72; }

/* ---- 模态框 ---- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 20px; padding: 36px; width: 90%; max-width: 420px; position: relative; box-shadow: var(--shadow-lg); animation: modalIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal h3 { margin-bottom: 24px; font-size: 22px; font-weight: 700; }
.modal-close { position: absolute; top: 16px; right: 20px; font-size: 24px; cursor: pointer; color: #B2BEC3; background: none; border: none; transition: var(--transition); }
.modal-close:hover { color: var(--text); transform: rotate(90deg); }

/* ---- 空状态 ---- */
.empty-state { text-align: center; padding: 72px 24px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.6; }
.empty-state p { font-size: 16px; }

/* ---- 筛选栏 ---- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-chip { padding: 7px 18px; border-radius: 22px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition); color: var(--text-secondary); }
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(255,107,53,0.25); }

/* ---- AI顾问 ---- */
.chat-container { max-width: 700px; margin: 32px auto; padding: 0 24px; }
.chat-messages { background: #fff; border-radius: var(--radius); padding: 24px; min-height: 400px; max-height: 60vh; overflow-y: auto; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-bottom: 16px; }
.chat-msg { margin-bottom: 18px; display: flex; gap: 12px; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar { width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.chat-msg.assistant .chat-avatar { background: var(--accent-light); }
.chat-msg.user .chat-avatar { background: var(--primary-light); }
.chat-bubble { max-width: 78%; padding: 14px 18px; border-radius: 16px; font-size: 15px; line-height: 1.7; }
.chat-msg.assistant .chat-bubble { background: #F8F9FA; border-bottom-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: linear-gradient(135deg, var(--primary), #FF8F65); color: #fff; border-bottom-right-radius: 4px; }
.chat-input-area { display: flex; gap: 10px; }
.chat-input-area input { flex: 1; padding: 14px 18px; border: 1.5px solid var(--border); border-radius: 14px; font-size: 15px; outline: none; transition: var(--transition); }
.chat-input-area input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.1); }
.quick-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.quick-tag { padding: 8px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--border); font-size: 13px; cursor: pointer; transition: var(--transition); color: var(--text-secondary); }
.quick-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ---- CTA Banner ---- */
.cta-banner { background: linear-gradient(135deg, var(--accent), #66D9D0); border-radius: 20px; padding: 48px 36px; color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; top: -40%; right: -15%; width: 300px; height: 300px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.cta-banner h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; }
.cta-banner p { font-size: 16px; opacity: 0.92; margin-bottom: 28px; }

/* ---- 分页 ---- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.pagination a { background: #fff; border: 1px solid var(--border); color: var(--text-secondary); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; box-shadow: 0 2px 6px rgba(255,107,53,0.3); }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(255,255,255,0.98); backdrop-filter: blur(20px); flex-direction: column; padding: 16px 24px; box-shadow: var(--shadow-lg); gap: 4px; border-radius: 0 0 16px 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { padding: 52px 20px 64px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .search-box { flex-direction: column; background: transparent; border: none; padding: 0; backdrop-filter: none; }
  .search-box input { border-radius: 12px; margin-bottom: 8px; }
  .search-box button { border-radius: 12px; margin-left: 0; }
  .categories { margin-top: -28px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-card { padding: 20px 10px; }
  .cat-icon { font-size: 32px; }
  .detail-info { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-container { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner { padding: 36px 24px; }
  .cta-banner h2 { font-size: 24px; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-card { padding: 16px 8px; }
  .cat-name { font-size: 13px; }
  .cat-desc { display: none; }
}
