/* ==========================================================================
   中山麦麦宠物店 · style.css
   经典布局：Banner → 导航条 → 简介 → 服务 → 相册/活动并排 → 联系 → 页脚
   mobile-first / 断点 640px / 900px / 1024px / 深色模式自动适配
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #FFF9F2;
  --bg-soft: #FFF1E4;
  --surface: #FFFFFF;
  --text: #2D2A26;
  --text-muted: #8A8178;
  --line: #F0E4D6;

  --primary: #FF8A5C;
  --primary-deep: #F76B3C;
  --primary-soft: #FFE9DE;
  --accent: #FFC94D;
  --teal: #4ECDC4;
  --ink: #2B2622;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(45, 42, 38, .06);
  --shadow-md: 0 10px 30px rgba(45, 42, 38, .10);

  --nav-h: 56px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

html.dark {
  --bg: #17140F;
  --bg-soft: #1F1B14;
  --surface: #241F18;
  --text: #F4EDE3;
  --text-muted: #A79B8D;
  --line: #383023;
  --primary: #FF9A70;
  --primary-deep: #FF7E47;
  --primary-soft: #33261C;
  --accent: #FFD071;
  --ink: #12100C;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .5);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  transition: background .35s, color .35s;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

section[id] { scroll-margin-top: calc(var(--nav-h) + 10px); }
#gallery, #events { scroll-margin-top: calc(var(--nav-h) + 70px); }

.container {
  width: min(1080px, 100% - 40px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- 通用 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; line-height: 1.4;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 8px 20px rgba(247, 107, 60, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(247, 107, 60, .45); }
.btn-block { width: 100%; }

.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); transition: background .35s; }

/* 经典区块标题：居中 + 两侧装饰线 + 英文小字 */
.section-title {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  margin-bottom: 42px;
}
.section-title h2 {
  display: flex; align-items: center; gap: 18px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900; letter-spacing: .12em;
}
.section-title h2::before,
.section-title h2::after {
  content: ""; flex: none;
  width: 44px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--primary));
}
.section-title h2::after { background: linear-gradient(90deg, var(--primary), transparent); }
.section-title-en {
  font-size: 11.5px; font-weight: 800; letter-spacing: .34em;
  color: var(--primary-deep); text-indent: .34em;
}

/* ---------- Banner ---------- */
.banner {
  position: relative;
  min-height: clamp(280px, 36vw, 420px);
  display: flex; align-items: center;
  background: url("../images/hero.jpg") center 38% / cover no-repeat;
  overflow: hidden;
}
.banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(24, 16, 10, .78) 0%, rgba(24, 16, 10, .45) 48%, rgba(24, 16, 10, .18) 100%);
}
.banner-inner {
  position: relative; z-index: 1;
  padding: 40px 0;
  color: #fff;
}
.banner-en {
  font-size: 12px; font-weight: 800; letter-spacing: .42em;
  color: var(--accent);
  margin-bottom: 12px;
}
.banner h1 {
  font-size: clamp(30px, 5.6vw, 52px);
  font-weight: 900; letter-spacing: .06em; line-height: 1.25;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.banner-slogan {
  margin-top: 14px;
  font-size: clamp(14px, 2.2vw, 17px);
  color: rgba(255, 255, 255, .92);
  letter-spacing: .04em;
}
.banner-paw {
  position: absolute; color: #fff; opacity: .12; pointer-events: none;
}
.banner-paw-1 { width: 88px; height: 88px; right: 7%; top: 16%; transform: rotate(-16deg); }
.banner-paw-2 { width: 52px; height: 52px; right: 20%; bottom: 14%; transform: rotate(18deg); }

/* ---------- 导航条（Banner 下方，滚动吸顶） ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--ink);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.nav-links {
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  flex: none;
  padding: 7px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  color: rgba(255, 255, 255, .82);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-links a.active { color: #fff; background: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .85);
  border: 1.5px solid rgba(255, 255, 255, .22);
  transition: transform .2s, border-color .2s;
}
.icon-btn:hover { transform: rotate(15deg) scale(1.06); border-color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }
html.dark .ic-sun { display: none; }
html:not(.dark) .ic-moon { display: none; }

.nav-cta {
  flex: none;
  padding: 8px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(247, 107, 60, .4);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(247, 107, 60, .5); }

/* ---------- 门店简介 ---------- */
.about-grid {
  display: grid; gap: 34px; align-items: start;
}
.about-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
}
.about-copy h3 {
  font-size: clamp(19px, 3vw, 23px); font-weight: 900;
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  line-height: 1.4;
}
.about-copy p { color: var(--text-muted); font-size: 15px; text-align: justify; }
.about-copy p + p { margin-top: 10px; }
.about-points {
  margin-top: 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
}
.about-points li {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
}
.about-points li::before { content: "🐾"; font-size: 14px; flex: none; }

/* ---------- 服务项目 ---------- */
.service-grid { display: grid; gap: 20px; }
.service-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
  display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-media { aspect-ratio: 16 / 10; overflow: hidden; }
.service-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.service-card:hover .service-media img { transform: scale(1.06); }
.service-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.service-body h3 {
  font-size: 18px; font-weight: 900; letter-spacing: .04em;
}
.service-body h3::after {
  content: ""; display: block;
  width: 30px; height: 3px; border-radius: 2px;
  background: var(--primary);
  margin-top: 8px;
}
.service-body p { color: var(--text-muted); font-size: 14px; flex: 1; text-align: justify; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.service-tags span {
  font-size: 12px; font-weight: 700; color: var(--primary-deep);
  background: var(--primary-soft);
  padding: 4px 12px; border-radius: 999px;
}

/* ---------- 狗狗相册 + 活动回顾（并排） ---------- */
.showcase-grid { display: grid; gap: 36px; }
.col-title {
  font-size: 18px; font-weight: 900; letter-spacing: .1em;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

/* 照片无缝滚动（还原原站滚动相册） */
.marquee { overflow: hidden; max-width: 100%; }
.showcase-grid > .showcase-col { min-width: 0; }
.marquee-track {
  display: flex; gap: 14px;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  border: 3px solid var(--primary-soft);
  cursor: zoom-in;
  flex: none;
}
.gallery-item img {
  height: clamp(140px, 22vw, 180px); width: auto;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.07); }
.showcase-tip { margin-top: 12px; font-size: 13px; color: var(--text-muted); }

/* 活动新闻列表（还原原站新闻列表样式） */
.news-list { display: grid; gap: 10px; }
.news-list a {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.news-list a:hover {
  transform: translateX(4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.news-list a::before {
  content: "▸"; flex: none;
  color: var(--primary); font-size: 15px; font-weight: 900;
}
.news-title {
  flex: 1; min-width: 0;
  font-size: 14.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-list time {
  flex: none;
  font-size: 12.5px; color: var(--text-muted);
}

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; gap: 30px; }
.contact-info { display: grid; gap: 13px; }
.contact-info li {
  display: flex; align-items: center; gap: 15px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.contact-info li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.contact-info svg { width: 25px; height: 25px; color: var(--primary); flex: none; }
.contact-info strong { display: block; font-size: 15px; font-weight: 800; line-height: 1.4; }
.contact-info span { font-size: 14px; color: var(--text-muted); }
.contact-info a:hover { color: var(--primary-deep); }

.contact-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 13px;
}
.contact-form h3 {
  font-size: 19px; font-weight: 900;
  padding-left: 12px; border-left: 4px solid var(--primary); line-height: 1.35;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; padding: 12px 15px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 14.5px;
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.contact-form textarea { resize: vertical; min-height: 92px; }
.form-row { display: grid; gap: 13px; }
.form-tip { font-size: 14px; font-weight: 600; color: #2FA574; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .82);
  padding: 34px 0 26px;
  text-align: center;
}
.footer-inner { display: grid; gap: 8px; }
.footer-line { font-size: 14px; }
.footer-line strong { color: #fff; }
.footer-line a:hover { color: var(--primary); }
.footer-copy { font-size: 12.5px; color: rgba(255, 255, 255, .5); margin-top: 8px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 12, 9, .88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 20px 30px;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1000px, 100%); max-height: calc(100vh - 150px);
  width: auto; height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lightbox-cap { margin-top: 16px; color: #fff; font-size: 14.5px; font-weight: 600; }
.lightbox button {
  position: absolute; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
}
.lightbox button:hover { background: rgba(255, 255, 255, .28); transform: scale(1.08); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.08); }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ==========================================================================
   响应式
   ========================================================================== */

@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 640px) {
  .section { padding: 76px 0; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form { padding: 28px 26px; }
  .about-points { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 639px) {
  .nav-cta { display: none; }
  .about-points { grid-template-columns: 1fr; }
  .news-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

@media (min-width: 900px) {
  .showcase-grid { grid-template-columns: 1.55fr 1fr; align-items: start; }
}

@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 2fr 3fr; gap: 48px; }
  .service-grid { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
}
