/* ===================================================================
   PawMart 设计系统 — 浅色 · 简洁 · 美观
   =================================================================== */
:root {
  /* 主色：温柔的青绿，传达健康与亲和 */
  --brand: #14b8a6;
  --brand-dark: #0d9488;
  --brand-soft: #ccfbf1;
  --accent: #f59e0b;

  /* 中性色 */
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --border: #e8ecf0;
  --text: #1f2937;
  --text-soft: #6b7280;
  --text-faint: #9ca3af;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow: 0 4px 6px -1px rgba(16, 24, 40, 0.05), 0 10px 24px -6px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, 0.14);

  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── 顶栏 ───────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.navbar .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 22px;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 21px; letter-spacing: -0.4px; color: var(--text);
}
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center; font-size: 18px; box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; color: var(--text-soft);
  font-size: 14.5px; font-weight: 500; transition: all .16s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.cart-btn {
  position: relative; width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; font-size: 18px; transition: all .16s;
}
.cart-btn:hover { border-color: var(--brand); background: var(--brand-soft); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* ── 按钮 ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; transition: all .16s; white-space: nowrap;
  background: var(--surface-2); color: var(--text);
}
.btn:hover { background: var(--border); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--brand); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-danger { background: #fef2f2; color: var(--danger); }
.btn-danger:hover { background: #fee2e2; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── 通用卡片/表单 ───────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 600;
  color: var(--text-soft); margin-bottom: 6px;
}
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
  background: var(--surface); color: var(--text); transition: all .16s;
}
.input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
textarea.input { resize: vertical; min-height: 90px; }
.hint { font-size: 12.5px; color: var(--text-faint); margin-top: 5px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-soft);
}
.badge.green { background: #ecfdf5; color: var(--success); }
.badge.amber { background: #fffbeb; color: var(--warning); }
.badge.red { background: #fef2f2; color: var(--danger); }
.badge.blue { background: #eff6ff; color: #3b82f6; }

/* ── 页面骨架 ───────────────────────────────── */
.page { padding: 36px 0 80px; min-height: 70vh; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 28px; letter-spacing: -0.5px; }
.page-head p { color: var(--text-soft); margin-top: 4px; }

.section-title { font-size: 22px; letter-spacing: -0.4px; margin-bottom: 4px; }
.section-sub { color: var(--text-soft); margin-bottom: 22px; }

/* ── 提示条 ─────────────────────────────────── */
.alert { padding: 11px 15px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert.warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* Toast */
#toast-wrap {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.toast {
  background: var(--text); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease; max-width: 90vw;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* 加载态 */
.spinner {
  width: 22px; height: 22px; border: 2.5px solid var(--border);
  border-top-color: var(--brand); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; }

.empty { text-align: center; padding: 70px 20px; color: var(--text-faint); }
.empty .ico { font-size: 46px; margin-bottom: 12px; }

/* ── 页脚 ───────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 40px 0; margin-top: 60px; color: var(--text-soft); font-size: 14px;
}
.footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .page-head h1 { font-size: 23px; }
}
