/* ==========================================================================
   base.css — 设计令牌 / 重置 / 基础排版 / 工具类
   江西扬名大药房连锁有限公司官网（ymdyfls.com）
   配色沿用旧站青绿色系（主色 #62C1B4）
   ========================================================================== */

/* ---------- 设计令牌 ---------- */
:root {
  /* 品牌色（沿用旧站） */
  --primary: #62c1b4;            /* 主色：青绿 */
  --primary-dark: #4eaea1;       /* 主色 hover/深 */
  --primary-light: #e8f6f3;      /* 主色浅底 */
  --accent: #5eb87b;             /* 强调色（联系方式等） */
  --accent-dark: #4a9e65;
  --warning: #f5a623;            /* 提示色 */

  /* 中性色 */
  --text-main: #333333;          /* 标题/导航 */
  --text-body: #666666;          /* 正文 */
  --text-sub: #999999;           /* 次要文字 */
  --text-invert: #ffffff;

  /* 背景 */
  --bg-page: #ffffff;
  --bg-light: #f5f8f6;
  --bg-footer: #eaeaea;
  --bg-copyright: #666666;

  /* 边框/阴影 */
  --border: #e5e5e5;
  --border-light: #eef1f0;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  /* 字体 */
  --font-main: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Helvetica Neue", Arial, sans-serif;
  --font-title: "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 布局 */
  --container: 1200px;
  --header-h: 80px;
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--primary);
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.4;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* ---------- 工具类 ---------- */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-sub     { color: var(--text-sub); }
.text-main    { color: var(--text-main); }

.bg-light     { background-color: var(--bg-light); }
.bg-primary   { background-color: var(--primary); }
.bg-footer    { background-color: var(--bg-footer); }

.hidden       { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

/* 图片懒加载淡入 */
img[data-src] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[data-src].loaded {
  opacity: 1;
}

/* 滚动动画初始状态（.wow 由 main.js 控制） */
.wow {
  opacity: 0;
}
.wow.animated {
  opacity: 1;
  animation-duration: 0.8s;
  animation-fill-mode: both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
