/* ============================================================
   demo.css — 演示站交互样式（商品弹窗 / 购物车抽屉 / Toast / 结账页）
   风格：极简高级感，白底、细字重、衬线标题
   ============================================================ */

/* ---------- 遮罩 ---------- */
.demo-overlay {
  position: fixed; inset: 0; z-index: 9990;
  background: rgba(20, 20, 20, 0.55);
  opacity: 0; transition: opacity .25s ease;
}
.demo-overlay.demo-open { opacity: 1; }

/* ---------- 商品弹窗 ---------- */
.demo-modal {
  position: fixed; z-index: 9991;
  top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.96);
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: 4px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.demo-modal.demo-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.demo-modal__close {
  position: absolute; top: 10px; right: 12px; z-index: 5;
  width: 36px; height: 36px; border: 0; background: rgba(255,255,255,.9);
  font-size: 22px; line-height: 1; cursor: pointer; color: #333; border-radius: 50%;
}
.demo-modal__body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.demo-modal__media { background: #f7f6f4; padding: 0; position: relative; }
.demo-modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3/4; }
.demo-modal__thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: #fff; }
.demo-modal__thumbs img { width: 52px; height: 68px; object-fit: cover; cursor: pointer; opacity: .55; border: 1px solid transparent; flex: 0 0 auto; }
.demo-modal__thumbs img.demo-thumb-active { opacity: 1; border-color: #111; }
.demo-modal__info { padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.demo-modal__brand { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8a857d; }
.demo-modal__title { font-family: var(--heading-font-family, Georgia, 'Times New Roman', serif); font-size: 24px; line-height: 1.25; color: #111; margin: 0; }
.demo-modal__price { font-size: 16px; color: #333; }
.demo-modal__desc { font-size: 13px; color: #777; line-height: 1.6; }
.demo-size-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #555; margin: 8px 0 6px; display: block; }
.demo-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-size-btn {
  min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid #d8d5cf;
  background: #fff; font-size: 13px; cursor: pointer; transition: all .15s;
}
.demo-size-btn.demo-size-active { background: #111; color: #fff; border-color: #111; }
.demo-qty-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.demo-qty-row label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #555; }
.demo-qty { display: flex; align-items: center; border: 1px solid #d8d5cf; }
.demo-qty button { width: 34px; height: 38px; border: 0; background: none; font-size: 16px; cursor: pointer; color: #333; }
.demo-qty input { width: 40px; height: 38px; border: 0; text-align: center; font-size: 14px; outline: none; -moz-appearance: textfield; }
.demo-qty input::-webkit-outer-spin-button, .demo-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.demo-add-btn {
  margin-top: 14px; width: 100%; padding: 14px; border: 0; background: #111; color: #fff;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s;
}
.demo-add-btn:hover { background: #333; }
.demo-modal__note { font-size: 11px; color: #999; text-align: center; margin-top: 6px; }

/* ---------- 购物车抽屉 ---------- */
.demo-cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9992;
  width: min(400px, 100vw); background: #fff;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s ease;
  box-shadow: -12px 0 40px rgba(0,0,0,.14);
}
.demo-cart.demo-open { transform: translateX(0); }
.demo-cart__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #ecebe8;
}
.demo-cart__title { font-family: var(--heading-font-family, Georgia, serif); font-size: 18px; margin: 0; }
.demo-cart__close { border: 0; background: none; font-size: 24px; cursor: pointer; color: #333; line-height: 1; }
.demo-cart__items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.demo-cart-empty { text-align: center; color: #999; font-size: 13px; padding: 40px 0; }
.demo-cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f0ed; }
.demo-cart-item img { width: 64px; height: 84px; object-fit: cover; }
.demo-cart-item__name { font-size: 13px; color: #222; line-height: 1.35; }
.demo-cart-item__meta { font-size: 12px; color: #999; margin-top: 2px; }
.demo-cart-item__price { font-size: 13px; color: #333; margin-top: 4px; }
.demo-cart-item__right { text-align: right; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.demo-cart-qty { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.demo-cart-qty button { width: 22px; height: 22px; border: 1px solid #d8d5cf; background: #fff; cursor: pointer; font-size: 12px; line-height: 1; }
.demo-cart-item__remove { border: 0; background: none; color: #b0aca4; font-size: 11px; text-decoration: underline; cursor: pointer; padding: 0; }
.demo-cart__foot { padding: 16px 20px; border-top: 1px solid #ecebe8; }
.demo-cart__total { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.demo-cart__checkout { width: 100%; padding: 14px; border: 0; background: #111; color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.demo-cart__checkout:hover { background: #333; }
.demo-cart__note { font-size: 11px; color: #999; text-align: center; margin-top: 8px; }

/* ---------- Toast ---------- */
.demo-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 9999;
  background: #111; color: #fff; font-size: 13px; padding: 12px 22px; border-radius: 2px;
  opacity: 0; transition: opacity .25s ease, transform .25s ease; max-width: 86vw; text-align: center;
}
.demo-toast.demo-open { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 结账页 ---------- */
.demo-checkout-body { margin: 0; font-family: var(--body-font-family, -apple-system, 'Helvetica Neue', Arial, sans-serif); background: #f4f3f0; color: #222; }
.demo-checkout-top { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px 32px; background: #fff; border-bottom: 1px solid #e8e6e2; }
.demo-checkout-top .demo-checkout-logo { font-family: var(--heading-font-family, Georgia, serif); font-size: 20px; letter-spacing: .04em; text-decoration: none; color: #111; }
.demo-checkout-top .demo-checkout-lock { position: absolute; right: 32px; font-size: 12px; color: #8a857d; }
.demo-checkout-wrap { max-width: 420px; margin: 36px auto 60px; padding: 0 16px; }
.demo-checkout-card { background: #fff; border: 1px solid #e8e6e2; padding: 28px; margin-bottom: 18px; }
.demo-checkout-card h2 { font-size: 15px; margin: 0 0 16px; letter-spacing: .02em; }
.demo-checkout-field { margin-bottom: 12px; }
.demo-checkout-field label { display: block; font-size: 12px; color: #555; margin-bottom: 4px; }
.demo-checkout-field input, .demo-checkout-field select {
  width: 100%; padding: 10px 12px; border: 1px solid #d8d5cf; border-radius: 2px;
  font-size: 14px; background: #fff; box-sizing: border-box; outline: none;
}
.demo-checkout-field input:focus { border-color: #111; }
.demo-checkout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.demo-checkout-pay { width: 100%; padding: 15px; border: 0; background: #111; color: #fff; font-size: 14px; letter-spacing: .06em; cursor: pointer; margin-top: 6px; }
.demo-checkout-pay:hover { background: #333; }
.demo-checkout-demo { background: #fff7e6; border: 1px solid #f0dfb8; color: #7a6420; font-size: 12px; padding: 12px 16px; border-radius: 2px; margin-bottom: 18px; }
.demo-checkout-summary { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: #444; }
.demo-checkout-summary.demo-total { font-weight: 700; color: #111; border-top: 1px solid #e8e6e2; margin-top: 8px; padding-top: 12px; font-size: 15px; }
.demo-checkout-done { text-align: center; padding: 48px 24px; }
.demo-checkout-done .demo-checkout-done-icon { font-size: 44px; margin-bottom: 12px; }
.demo-checkout-done h1 { font-family: var(--heading-font-family, Georgia, serif); font-size: 24px; margin: 0 0 8px; }
.demo-checkout-done p { color: #777; font-size: 14px; line-height: 1.7; }
.demo-checkout-done .demo-checkout-order { font-weight: 700; color: #111; }
.demo-checkout-back { display: inline-block; margin-top: 18px; padding: 12px 28px; background: #111; color: #fff; text-decoration: none; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- 购物车徽章 ---------- */
.demo-cart-badge {
  position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px;
  background: #c8392e; color: #fff; font-size: 10px; line-height: 16px; text-align: center;
  padding: 0 4px; box-sizing: border-box; display: none;
}

/* ---------- 文字 Logo（替换原站 logo 图片） ---------- */
.demo-logo-text {
  display: inline-block;
  font-family: Ovo, "Times New Roman", Times, serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #111;
  text-transform: none;
  line-height: 1;
  white-space: nowrap;
}
.demo-logo-text--big { font-size: 28px; }
.demo-logo-text--small { font-size: 20px; }

/* 品牌 logo 图片（黑字透明底 SVG） */
/* 预隐藏原站 logo 图片 —— 避免刷新时闪现原品牌（FOUC） */
img.logo__image { display: none !important; }
.demo-logo-img {
  display: inline-block;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}
/* 原站主题 header（logo 独占一行居中，layout-underneath）→ 仿原站大小 */
.logo-area .demo-logo-img,
.logo-area__middle .demo-logo-img { max-height: 56px; }
/* 详情页单行 header → 紧凑 */
.demo-header .demo-logo-img { max-height: 32px; }
/* footer → 小尺寸 */
.demo-logo-img--small { max-height: 22px; }

/* Pinterest Pin It 按钮兜底隐藏（pinit.js 注入的悬浮按钮） */
[class^="PIN_"], [class*=" PIN_"], [id^="PIN_"], [id*=" PIN_"], .pin-it-button, [class*="pin-it"] { display: none !important; }

/* 强制隐藏所有二级/三级导航（用户要求"只显示一级"） */
.navigation__tier-2,
.navigation__tier-3,
.sub-menu, .subnav,
.mobile-menu, .mobile-nav,
[class*="mobile-menu"],
[class*="meganav"],
[class*="dropdown-panel"],
details > ul,
details > div { display: none !important; }

/* 隐藏所有 tier-1 ul（极强兜底：仅 #main-nav 内的显示） */
ul.navigation__tier-1 { display: none !important; }
#main-nav .navigation__tier-1-container > ul.navigation__tier-1,
#main-nav > div > div > ul.navigation__tier-1 { display: flex !important; list-style: none !important; gap: 26px; margin: 0; padding: 0; align-items: center; }
#main-nav .navigation__tier-1-container > ul.navigation__tier-1 > li { display: inline-block; }
#main-nav .navigation__tier-1-container > ul.navigation__tier-1 > li > a { text-decoration: none; color: #2c2c2c; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* 导航栏居中 */
#main-nav .navigation--main,
#main-nav .navigation__tier-1-container,
#main-nav .navigation__tier-1-container > ul.navigation__tier-1 { justify-content: center !important; text-align: center !important; }

/* 终极兜底：仅 #main-nav 内的 navigation__link 显示 */
a.navigation__link { display: none !important; }
#main-nav a.navigation__link { display: inline-block !important; text-decoration: none; color: #2c2c2c; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- 响应式 ---------- */
@media (max-width: 767px) {
  .demo-modal__body { grid-template-columns: 1fr; }
  .demo-modal__media img { aspect-ratio: 1/1; }
  .demo-modal__info { padding: 24px 20px; }
  .demo-cart { width: 100vw; }
  .demo-checkout-wrap { margin-top: 20px; }
}

/* 清理原站评价/弹窗痕迹（judgeme / consentmo） */
.jdgm-widget, .jdgm-prev-badge, .jdgm-reviews-tab, [class*="jdgm"], [class*="consentmo"], [id*="consentmo"] {
  display: none !important;
}

/* 页脚底部版权行居中（三列区块保持原样式） */
.section-footer__row-lower { justify-content: center; text-align: center; }
.section-footer__row-lower .section-footer__row__col { justify-content: center; }
.section-footer__row-lower .section-footer__lower-menu, .section-footer__row-lower .copyright { margin: 0 auto; }
