/**
 * 产品展示页 — Lookbook 布局（品牌主视觉横幅 + 产品网格）
 */

body[data-page="products"] .product-lookbook {
  padding: 0;
  background: var(--surface-dark, #14110e);
}

/* 页头：纯暗色标题带，底部渐隐融入首个品牌 Hero */
body[data-page="products"] .products-lookbook-intro {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(2rem, 4vw, 2.75rem) var(--content-pad-x) clamp(4.5rem, 9vw, 6.5rem);
  background: linear-gradient(
    180deg,
    #14110e 0%,
    #181512 42%,
    rgba(20, 17, 14, 0.88) 68%,
    transparent 100%
  );
}

body[data-page="products"] .products-lookbook-intro .section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.97);
}

body[data-page="products"] .products-lookbook-intro .section-title::after {
  display: none;
}

body[data-page="products"] .products-lookbook-intro .page-hero-eyebrow {
  margin-bottom: 0.85rem;
}

body[data-page="products"] .products-lookbook-intro .page-hero-subtitle {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.62);
}

body[data-page="products"] .products-lookbook-intro .page-hero-rule {
  display: block;
  width: min(72%, 14rem);
  height: 1px;
  margin: 1.15rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.72), transparent);
}

body[data-page="products"] .product-lookbook-body {
  position: relative;
  z-index: 1;
  margin-top: clamp(-5.5rem, -10vw, -4rem);
}

/* 加载占位 */
body[data-page="products"] #product-groups:empty {
  min-height: 14rem;
  background: linear-gradient(180deg, transparent 0%, #1a1814 40%, #1a1814 100%);
}

body[data-page="products"] .product-brand-block {
  margin-bottom: 0;
}

body[data-page="products"] .product-brand-block + .product-brand-block {
  border-top: 1px solid rgba(212, 175, 55, 0.12);
}

/* ---------- 品牌主视觉横幅 ---------- */
body[data-page="products"] .product-brand-hero {
  position: relative;
  width: 100%;
  min-height: min(42vh, 420px);
  max-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1814;
}

/* 首个品牌 Hero：顶部加深遮罩，与标题带渐变衔接 */
body[data-page="products"] .product-brand-block:first-child .product-brand-hero-scrim {
  background: linear-gradient(
    180deg,
    rgba(10, 8, 6, 0.82) 0%,
    rgba(10, 8, 6, 0.52) 28%,
    rgba(12, 10, 8, 0.45) 50%,
    rgba(12, 10, 8, 0.72) 100%
  );
}

body[data-page="products"] .product-brand-block:first-child .product-brand-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5rem;
  background: linear-gradient(180deg, rgba(20, 17, 14, 0.65) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

body[data-page="products"] .product-brand-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  pointer-events: none;
}

/* 品牌 Hero 缺图：深色金调幕布，文案仍可读 */
body[data-page="products"] .product-brand-hero.is-hero-placeholder {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(184, 150, 46, 0.22) 0%, transparent 55%),
    linear-gradient(160deg, #1c1812 0%, #0e0c0a 100%);
}

body[data-page="products"] .product-brand-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 10, 8, 0.35) 0%,
    rgba(12, 10, 8, 0.55) 45%,
    rgba(12, 10, 8, 0.72) 100%
  );
  pointer-events: none;
}

body[data-page="products"] .product-brand-hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 40rem;
}

body[data-page="products"] .product-brand-hero-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.98);
  text-transform: none;
}

body[data-page="products"] .product-brand-hero-desc {
  margin: 0;
  font-size: clamp(0.88rem, 1.8vw, 1.02rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  color: rgba(245, 230, 184, 0.92);
}

html[lang="en"] body[data-page="products"] .product-brand-hero-title {
  letter-spacing: 0.18em;
}

/* ---------- 产品目录区 ---------- */
body[data-page="products"] .product-catalog {
  max-width: min(var(--content-max), calc(100% - 2 * var(--content-pad-x)));
  margin: 0 auto;
  padding: 2rem var(--content-pad-x) 2.75rem;
  background: var(--page-surface);
}

body[data-page="products"] .product-brand-block:last-child .product-catalog {
  padding-bottom: 3.25rem;
}

/* MTORTO 车载 / 酒店子系列标题 */
body[data-page="products"] .product-series-block + .product-series-block {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(212, 175, 55, 0.16);
}

body[data-page="products"] .product-series-heading {
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-align: center;
  color: var(--color-gold-dark);
}

body[data-page="products"] .product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

/* 产品卡：单层容器 + 满幅图区，避免「框套框」 */
body[data-page="products"] .product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(26, 26, 26, 0.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

body[data-page="products"] .product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.28);
  box-shadow: 0 14px 32px rgba(26, 26, 26, 0.09);
}

/* 覆盖 styles.css 内层 hover 位移，统一由整卡动效承担 */
body[data-page="products"] .product-card:hover .product-img-wrap {
  transform: none;
  box-shadow: none;
}

body[data-page="products"] .product-img-wrap {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  background: #f3f1ec;
  box-shadow: none;
}

/* 缺图占位层：上传同路径文件后自动替换 */
body[data-page="products"] .product-img-ph {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background:
    linear-gradient(160deg, #f7f4ee 0%, #efe8da 100%);
  border: 1px dashed rgba(184, 150, 46, 0.35);
  box-sizing: border-box;
}

body[data-page="products"] .product-img-ph-mark {
  width: 2.1rem;
  height: 2.1rem;
  border: 1.5px solid rgba(184, 150, 46, 0.55);
  border-radius: 50%;
  position: relative;
}

body[data-page="products"] .product-img-ph-mark::before,
body[data-page="products"] .product-img-ph-mark::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(184, 150, 46, 0.7);
  transform: translate(-50%, -50%);
}

body[data-page="products"] .product-img-ph-mark::before {
  width: 0.9rem;
  height: 1.5px;
}

body[data-page="products"] .product-img-ph-mark::after {
  width: 1.5px;
  height: 0.9rem;
}

body[data-page="products"] .product-img-ph-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(154, 125, 36, 0.88);
}

body[data-page="products"] .product-img-wrap.is-placeholder .product-img-ph {
  display: flex;
}

body[data-page="products"] .product-img-wrap.is-placeholder .product-img-trigger {
  cursor: default;
  pointer-events: none;
}

body[data-page="products"] .product-img-trigger {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.1rem;
  box-sizing: border-box;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

body[data-page="products"] .product-img-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

body[data-page="products"] .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0.9rem 0.85rem 1.05rem;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  background: #fffefb;
}

body[data-page="products"] .product-name {
  font-size: 0.88rem;
  margin: 0 0 0.35rem;
  font-weight: 700;
  width: 100%;
  text-align: center;
  color: #141414;
  line-height: 1.45;
}

body[data-page="products"] .product-brand {
  font-size: 0.8rem;
  margin: 0 0 0.25rem;
  color: var(--color-gold-dark);
  width: 100%;
  text-align: center;
  letter-spacing: 0.14em;
  font-family: var(--font-display);
}

body[data-page="products"] .product-series {
  font-size: 0.74rem;
  margin: 0;
  color: #8a7a62;
  width: 100%;
  text-align: center;
  line-height: 1.5;
}

/* 无系列文案时隐藏，避免空行占位 */
body[data-page="products"] .product-series:empty {
  display: none;
}

body[data-page="products"] .product-grid--catalog {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--color-border-light);
}

body[data-page="products"] .product-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 18rem;
  margin: 1.35rem auto 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-gold-dark);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
}

body[data-page="products"] .product-expand-arrow {
  transition: transform 0.25s ease;
}

body[data-page="products"] .product-expand-btn.is-expanded .product-expand-arrow {
  transform: rotate(180deg);
}

/* ---------- 产品预览弹窗（产品页动态注入） ---------- */
body.product-preview-open {
  overflow: hidden;
}

body[data-page="products"] .product-preview-modal,
.product-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

body[data-page="products"] .product-preview-modal[hidden] {
  display: none !important;
}

.product-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 12, 0.74);
  cursor: pointer;
}

.product-preview-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #fffefb;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 22px 56px rgba(26, 26, 26, 0.22);
}

.product-preview-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 50%;
  background: rgba(255, 254, 251, 0.95);
  color: var(--color-gold-dark);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.product-preview-zoom-viewport {
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
  max-height: min(58vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-preview-image-wrap img {
  display: block;
  width: 100%;
  max-height: min(58vh, 520px);
  object-fit: contain;
  background: #f8f6f0;
  transform-origin: center center;
}

.product-preview-meta {
  padding: 1.35rem 1.75rem 1.6rem;
  text-align: center;
}

.product-preview-name {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.product-preview-brand {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-gold-dark);
}

.product-preview-series {
  margin: 0;
  font-size: 0.82rem;
  color: #8b7355;
}

.product-preview-rule {
  width: 48px;
  height: 2px;
  margin: 1rem auto;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.product-preview-intro {
  margin: 0;
  font-size: 0.9rem;
  color: #6b6b6b;
  line-height: 1.9;
}

@media (max-width: 1100px) {
  body[data-page="products"] .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body[data-page="products"] .products-lookbook-intro {
    padding-bottom: 4.25rem;
  }

  body[data-page="products"] .product-lookbook-body {
    margin-top: -3.25rem;
  }

  body[data-page="products"] .product-brand-hero {
    min-height: min(36vh, 320px);
    max-height: 380px;
  }

  body[data-page="products"] .product-brand-hero-title {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
    letter-spacing: 0.14em;
  }

  body[data-page="products"] .product-brand-hero-desc {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }

  body[data-page="products"] .product-catalog {
    padding: 1.5rem 1rem 2rem;
  }

  body[data-page="products"] .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

/* ---------- 页底订制引导（暗色编辑带，衔接页脚） ---------- */
body[data-page="products"] .products-bespoke-bridge {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 5.5vw, 4rem) var(--content-pad-x);
  text-align: center;
  background: linear-gradient(180deg, #1a1612 0%, #12100d 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.24);
}

body[data-page="products"] .products-bespoke-bridge-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 85% at 50% 0%, rgba(212, 175, 55, 0.12) 0%, transparent 62%),
    radial-gradient(ellipse 45% 40% at 12% 100%, rgba(212, 175, 55, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 88% 100%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

body[data-page="products"] .products-bespoke-bridge-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
}

body[data-page="products"] .products-bespoke-eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: rgba(212, 175, 55, 0.92);
  text-transform: uppercase;
}

body[data-page="products"] .products-bespoke-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.05rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.97);
}

body[data-page="products"] .products-bespoke-rule {
  display: block;
  width: min(72%, 14rem);
  height: 1px;
  margin: 1.1rem auto 1.25rem;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.72), transparent);
}

body[data-page="products"] .products-bespoke-desc {
  margin: 0 auto;
  max-width: 34rem;
  font-size: clamp(0.9rem, 1.7vw, 0.98rem);
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

body[data-page="products"] .products-bespoke-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  min-width: min(100%, 15.5rem);
}

@media (max-width: 768px) {
  body[data-page="products"] .products-bespoke-bridge {
    padding: 2.75rem 1.15rem 3rem;
  }

  body[data-page="products"] .products-bespoke-title {
    font-size: clamp(1.38rem, 5vw, 1.65rem);
    letter-spacing: 0.08em;
  }

  body[data-page="products"] .products-bespoke-desc {
    font-size: 0.88rem;
    line-height: 1.85;
  }

  body[data-page="products"] .products-bespoke-cta {
    width: 100%;
    max-width: 18rem;
  }
}
