/* ==========================================================================
   天津宸达商城 · 基础样式（变量 / 重置 / 排版 / 按钮 / 表单 / 工具类）
   ========================================================================== */

:root {
  /* 品牌色 */
  --brand: #e8392c;
  --brand-600: #d02a1e;
  --brand-700: #b3221a;
  --brand-50: #fff2f0;
  --brand-100: #ffe1dd;
  --orange: #ff7a33;

  /* 中性色 */
  --ink: #17181c;
  --ink-2: #565c66;
  --ink-3: #8d939d;
  --line: #eceef1;
  --line-2: #e3e6ea;
  --bg: #f6f7f9;
  --bg-2: #fafbfc;
  --white: #fff;

  /* 主题渐变 */
  --hero-grad:
    radial-gradient(1200px 460px at 78% 8%, rgba(255, 214, 170, .55), transparent 62%),
    radial-gradient(760px 420px at 12% 92%, rgba(255, 255, 255, .28), transparent 60%),
    linear-gradient(112deg, #ffa151 0%, #ff7a3d 26%, #f2512f 55%, #dc2b21 78%, #c31f18 100%);

  /* 阴影 / 圆角 */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 2px 6px rgba(16, 24, 40, .04), 0 8px 20px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, .10);
  --shadow-lg: 0 18px 50px rgba(16, 24, 40, .14);
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-100); color: var(--brand-700); }

/* 滚动条（桌面端） */
@media (hover: hover) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: #d9dde3; border-radius: 10px; border: 2px solid #fff; }
  ::-webkit-scrollbar-thumb:hover { background: #c3c9d1; }
  ::-webkit-scrollbar-track { background: #fff; }
}

/* --------------------------------------------------------------------------
   布局容器
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 900px; }

/* --------------------------------------------------------------------------
   排版
   -------------------------------------------------------------------------- */
.t-xs { font-size: 12px; }
.t-sm { font-size: 13px; }
.t-md { font-size: 14px; }
.t-lg { font-size: 16px; }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

.title-xl {
  font-size: 40px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -.6px;
}

.section-title {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.4px;
}

.text-link {
  color: var(--brand);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s var(--ease), opacity .2s;
}
.text-link:hover { gap: 8px; opacity: .85; }

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 22px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s, box-shadow .2s, transform .18s var(--ease), border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 17px; height: 17px; }

.btn--primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 57, 44, .22);
}
.btn--primary:hover { background: var(--brand-600); box-shadow: 0 10px 24px rgba(232, 57, 44, .3); }

.btn--dark { background: #1f2229; color: #fff; }
.btn--dark:hover { background: #000; }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn--ghost:hover { border-color: #c9ced6; color: var(--brand); }

.btn--soft { background: var(--brand-50); color: var(--brand); }
.btn--soft:hover { background: var(--brand-100); }

.btn--white { background: #fff; color: var(--brand-600); box-shadow: 0 10px 26px rgba(120, 20, 10, .18); }
.btn--white:hover { background: #fff7f4; }

.btn--onlight {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
}
.btn--onlight:hover { background: rgba(255, 255, 255, .22); }

.btn--sm { --btn-h: 36px; padding: 0 16px; font-size: 13px; border-radius: var(--r-xs); }
.btn--lg { --btn-h: 52px; padding: 0 30px; font-size: 16px; border-radius: var(--r-md); }
.btn--block { width: 100%; }

.btn[disabled] { opacity: .55; pointer-events: none; }

/* 图标按钮 */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink-2);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--bg); color: var(--brand); }
.icon-btn svg { width: 21px; height: 21px; }

/* --------------------------------------------------------------------------
   表单
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field__label .req { color: var(--brand); margin-left: 2px; }
.field__hint { font-size: 12px; color: var(--ink-3); }
.field__error { font-size: 12px; color: var(--brand); display: none; }
.field.is-error .field__error { display: block; }
.field.is-error .input,
.field.is-error .select,
.field.is-error .textarea { border-color: var(--brand); background: var(--brand-50); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input::placeholder, .textarea::placeholder { color: #aab0b9; }
.input:hover, .select:hover, .textarea:hover { border-color: #cdd2da; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 57, 44, .12);
}
.textarea { min-height: 108px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d939d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.6;
}
.checkbox input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.checkbox a { color: var(--brand); }

/* --------------------------------------------------------------------------
   工具类
   -------------------------------------------------------------------------- */
.price { color: var(--brand); font-weight: 700; letter-spacing: -.3px; }
.price small { font-size: .72em; font-weight: 700; margin-right: 1px; }
.price-old { color: var(--ink-3); text-decoration: line-through; font-size: 12px; font-weight: 400; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  background: var(--brand-50);
  color: var(--brand-600);
}
.tag--gray { background: #f2f4f7; color: var(--ink-2); }
.tag--dark { background: #1f2229; color: #fff; }

.divider { height: 1px; background: var(--line); }

.hidden { display: none !important; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* 入场动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.reveal { animation: fadeUp .5s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 720px) {
  .title-xl { font-size: 28px; }
  .section-title { font-size: 22px; }
  .container { padding: 0 16px; }
}
