/* ===== 栖物 QIWU · 电商独立站 ===== */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1c1a17;
  --muted: #7d756b;
  --line: #e7dfd4;
  --accent: #b5512a;
  --accent-deep: #93401f;
  --soft: #f1ebe1;
  --radius: 16px;
  --shadow: 0 18px 45px -18px rgba(28, 26, 23, .22);
  --serif: Georgia, "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-width: 375px;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.kicker {
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 14px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; }
h2 { font-size: clamp(28px, 3.4vw, 40px); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: .5px;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(181, 81, 42, .55); }
.btn-ghost { border: 1.5px solid var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted); transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--soft); color: var(--ink); }

/* ===== 顶部公告条 ===== */
.topbar {
  background: var(--ink); color: #efe9df;
  text-align: center; padding: 9px 16px; font-size: 13px; letter-spacing: .4px;
}
.topbar strong { color: #e8b48f; font-weight: 700; }

/* ===== 吸顶导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 32px; height: 66px; }
.logo { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: 2px; }
.logo-dot { color: var(--accent); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 14.5px; color: var(--muted); position: relative; padding: 4px 0;
  transition: color .2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px; background: var(--accent); transition: width .25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid var(--ink); font-size: 14px; font-weight: 600;
  position: relative; transition: background .2s, color .2s, transform .2s;
}
.cart-btn:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.cart-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: #fff;
  border-radius: 999px; font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.cart-badge[hidden] { display: none; }

/* ===== Hero ===== */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 80px;
}
.hero h1 { font-size: clamp(40px, 5.2vw, 66px); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 46ch; margin: 22px 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 48px; }
.hero-stats dt { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.hero-stats dt::after { content: "+"; color: var(--accent); }
.hero-stats dd { font-size: 13px; color: var(--muted); margin-top: 2px; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 9/11; object-fit: cover;
  border-radius: 200px 200px var(--radius) var(--radius);
}
.hero-card {
  position: absolute; left: -26px; bottom: 38px;
  background: var(--surface); border-radius: var(--radius);
  padding: 16px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
}
.hero-card-tag {
  font-size: 11px; letter-spacing: 2px; color: var(--accent); font-weight: 700;
}
.hero-card strong { font-family: var(--serif); font-size: 17px; }
.hero-card span:last-child { font-size: 12.5px; color: var(--muted); }

/* ===== 服务承诺 ===== */
.perks { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); }
.perks-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; padding-top: 30px; padding-bottom: 30px;
}
.perk { display: flex; align-items: center; gap: 14px; }
.perk-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0; box-shadow: 0 4px 12px -6px rgba(28,26,23,.2);
}
.perk strong { font-size: 14.5px; display: block; }
.perk small { font-size: 12.5px; color: var(--muted); }

/* ===== 商品区 ===== */
.shop { padding-top: 88px; padding-bottom: 96px; }
.shop-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 40px;
}
.shop-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 18px; border-radius: 999px; font-size: 13.5px;
  border: 1.5px solid var(--line); color: var(--muted);
  transition: all .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.sort-select {
  padding: 9px 14px; border-radius: 10px; font-size: 13.5px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer;
}
.sort-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 26px 22px;
}
.card { display: flex; flex-direction: column; }
.card-media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--soft); aspect-ratio: 4/5; margin-bottom: 14px;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.6,.2,1);
}
.card:hover .card-media img { transform: scale(1.06); }
.card-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--surface); color: var(--accent);
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 999px;
}
.card-tag.soldout-tag { color: var(--muted); }
.card-actions {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; gap: 8px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s, transform .3s;
}
.card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; transform: none; }
.card-actions button {
  flex: 1; padding: 10px 0; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  transition: background .2s, transform .2s;
}
.card-actions button:hover { background: #fff; }
.card-actions .add { background: var(--ink); color: #fff; }
.card-actions .add:hover { background: var(--accent); }
.card-actions button[disabled] { opacity: .5; cursor: not-allowed; }
.card-name { font-family: var(--serif); font-size: 16.5px; margin-bottom: 4px; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stars { color: #d9a441; letter-spacing: 1px; font-size: 12px; }
.card-price { font-size: 16px; font-weight: 700; }
.card-price s { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 7px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ===== 品牌故事 ===== */
.story { background: var(--ink); color: #efe9df; padding: 110px 0; }
.story-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.story-media img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.story-text .kicker { color: #e8b48f; }
.story-text p { color: #b8b0a4; margin: 20px 0; max-width: 52ch; }
.story-text .btn-ghost { border-color: #efe9df; color: #efe9df; margin-top: 8px; }
.story-text .btn-ghost:hover { border-color: #e8b48f; color: #e8b48f; }

/* ===== 评价 ===== */
.reviews { padding: 96px 0; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.review {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
}
.review .stars { font-size: 15px; }
.review blockquote { font-family: var(--serif); font-size: 16.5px; line-height: 1.7; margin: 14px 0 18px; }
.review figcaption { font-size: 13px; color: var(--muted); }

/* ===== 订阅 ===== */
.newsletter { background: var(--soft); padding: 90px 0; border-top: 1px solid var(--line); }
.newsletter-inner { text-align: center; max-width: 560px; }
.newsletter-inner p { color: var(--muted); margin: 12px 0 26px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1; padding: 13px 20px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 14.5px; color: var(--ink);
}
.newsletter-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.newsletter-msg { margin-top: 12px; font-size: 13.5px; color: var(--accent); min-height: 20px; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-desc { color: var(--muted); font-size: 14px; margin-top: 10px; }
.site-footer h4 { font-size: 13px; letter-spacing: 2px; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; }
.site-footer .footer-grid a:not(.logo) { display: block; font-size: 14px; color: var(--muted); margin-bottom: 9px; transition: color .2s; }
.site-footer .footer-grid a:hover { color: var(--accent); }
.copyright {
  border-top: 1px solid var(--line); text-align: center;
  padding: 20px; font-size: 12.5px; color: var(--muted);
}

/* ===== 遮罩 ===== */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(28, 26, 23, .45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .3s;
}
.overlay.show { opacity: 1; }

/* ===== 购物车抽屉 ===== */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(420px, 92vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .38s cubic-bezier(.3,.8,.3,1);
  box-shadow: -20px 0 50px -20px rgba(28,26,23,.3);
}
.cart-drawer.open { transform: none; }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.cart-head h3 { font-size: 19px; }
.cart-head span { color: var(--muted); font-size: 14px; font-family: var(--sans); }
.ship-progress { padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--soft); }
.ship-progress p { font-size: 13px; margin-bottom: 9px; }
.ship-progress strong { color: var(--accent); }
.ship-bar { height: 7px; border-radius: 99px; background: #ddd2c3; overflow: hidden; }
.ship-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #d9a441, var(--accent));
  transition: width .5s cubic-bezier(.3,.8,.3,1);
}
.cart-items { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-empty { text-align: center; color: var(--muted); padding: 70px 20px; }
.cart-empty .icon { font-size: 38px; display: block; margin-bottom: 12px; }
.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 14px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-item img { width: 72px; height: 84px; object-fit: cover; border-radius: 10px; }
.ci-name { font-family: var(--serif); font-size: 14.5px; margin-bottom: 3px; }
.ci-price { font-size: 12.5px; color: var(--muted); }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ci-total { font-weight: 700; font-size: 14.5px; }
.qty {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 2px;
}
.qty button {
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.qty button:hover { background: var(--soft); }
.qty span { min-width: 26px; text-align: center; font-size: 13.5px; font-weight: 600; }
.ci-remove { font-size: 12px; color: var(--muted); text-decoration: underline; }
.ci-remove:hover { color: var(--accent); }
.cart-foot { padding: 20px 24px 26px; border-top: 1px solid var(--line); background: var(--surface); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.cart-total strong { font-family: var(--serif); font-size: 22px; }
.cart-note { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }

/* ===== 快速查看弹窗 ===== */
.modal {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal[hidden] { display: none; }
.modal-panel {
  position: relative; width: min(760px, 100%);
  background: var(--bg); border-radius: 20px;
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden; box-shadow: var(--shadow);
  animation: pop .35s cubic-bezier(.3,.9,.3,1.1);
}
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(14px); } }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; background: rgba(255,255,255,.85); }
.qv-media { background: var(--soft); }
.qv-media img { width: 100%; height: 100%; object-fit: cover; min-height: 380px; }
.qv-info { padding: 42px 36px; display: flex; flex-direction: column; }
.qv-info h3 { font-size: 25px; }
.qv-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); margin: 8px 0 14px; }
.qv-price { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent); }
.qv-price s { color: var(--muted); font-size: 15px; font-weight: 400; margin-left: 8px; }
.qv-desc { color: var(--muted); font-size: 14px; margin: 14px 0 26px; flex: 1; }
.qv-actions { display: flex; gap: 14px; align-items: center; }
.qv-actions .btn { flex: 1; }

/* ===== Toast ===== */
.toast-wrap {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 130; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.toast {
  background: var(--ink); color: #efe9df;
  padding: 11px 22px; border-radius: 999px; font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: toast-in .3s cubic-bezier(.3,.9,.3,1.1);
}
.toast.out { animation: toast-out .3s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ===== 滚动显现 ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 52px; }
  .hero-media { max-width: 480px; }
  .hero-card { left: 14px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; gap: 44px; }
  .story-media { max-width: 420px; }
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .nav-links { display: none; }
  .cart-btn { margin-left: auto; }
  .hero-stats { gap: 26px; }
  .product-grid { grid-template-columns: 1fr; }
  .modal-panel { grid-template-columns: 1fr; max-height: 88vh; overflow-y: auto; }
  .qv-media img { min-height: 240px; max-height: 300px; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

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