/*
 * LUXURY WATCH — 独立站扩展样式
 *
 * 延续 bundle 现有黑色奢华风：#050505 黑底、琥珀金 #F59E0B 点缀、
 * Bodoni Moda 衬线标题 + Inter 正文、宽字距 uppercase。
 * 所有选择器一律以 `.watch-` 开头，不影响 bundle 与其他站点。
 */

/* ---------- 通用 ---------- */

/* 导航是 fixed h-20（80px），锚点/程序滚动时给 bundle 顶层区块留出导航高度 */
#root > section,
#root > footer,
#root > div {
  scroll-margin-top: 88px;
}

.watch-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: #f59e0b;
  font: 600 11px/1.3 Inter, sans-serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.watch-eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f59e0b);
}

/* ---------- 分类区 ---------- */
.watch-categories {
  position: relative;
  padding: 6.5rem 1.5rem;
  background: #050505;
  color: #fff;
  scroll-margin-top: 96px;
}

.watch-categories__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.watch-categories h2 {
  margin: 1rem 0 0.7rem;
  font: 500 clamp(2.2rem, 4.5vw, 3.8rem) / 1.08 'Bodoni Moda', serif;
  letter-spacing: 0.01em;
}

.watch-categories__sub {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font: 300 15px/1.8 Inter, sans-serif;
}

.watch-categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 2.8rem;
}

.watch-cat-card {
  position: relative;
  overflow: hidden;
  padding: 1.9rem 1.7rem 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.watch-cat-card:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.05);
  transform: translateY(-4px);
}

.watch-cat-card:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
}

.watch-cat-card__index {
  display: block;
  color: rgba(245, 158, 11, 0.85);
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.28em;
}

.watch-cat-card h3 {
  margin: 0.9rem 0 0.6rem;
  font: 500 1.45rem/1.25 'Bodoni Moda', serif;
}

.watch-cat-card__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font: 300 13px/1.7 Inter, sans-serif;
}

.watch-cat-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}

.watch-cat-card__tags span {
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.6);
  font: 500 10px/1.2 Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.watch-cat-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.4rem;
  color: #fff;
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.watch-cat-card__cta::after {
  content: '→';
  color: #f59e0b;
  transition: transform 0.3s;
}

.watch-cat-card:hover .watch-cat-card__cta::after {
  transform: translateX(4px);
}

/* ---------- 全部商品区 ---------- */
.watch-products {
  position: relative;
  padding: 6.5rem 1.5rem;
  background: #050505;
  color: #fff;
  scroll-margin-top: 96px;
}

.watch-products__inner {
  max-width: 1280px;
  margin: 0 auto;
}

.watch-products__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.6rem;
}

.watch-products__heading h2 {
  margin: 1rem 0 0.6rem;
  font: 500 clamp(2.2rem, 4.5vw, 3.8rem) / 1.08 'Bodoni Moda', serif;
}

.watch-products__heading p:last-child {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font: 300 14px/1.8 Inter, sans-serif;
}

.watch-products__count {
  color: rgba(255, 255, 255, 0.45);
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.watch-products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
}

.watch-product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s, transform 0.3s;
}

.watch-product-card:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-4px);
}

.watch-product-card__image {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #101010;
}

.watch-product-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.watch-product-card:hover img {
  transform: scale(1.05);
}

.watch-product-card__body {
  padding: 1.1rem 1.2rem 1.3rem;
}

.watch-product-card__cat {
  color: rgba(245, 158, 11, 0.8);
  font: 600 10px/1.2 Inter, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.watch-product-card h3 {
  min-height: 3em;
  margin: 0.55rem 0 0.9rem;
  color: #fff;
  font: 400 0.95rem/1.5 Inter, sans-serif;
  overflow-wrap: anywhere;
}

.watch-product-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.watch-product-card__meta strong {
  color: #f59e0b;
  font: 500 1.02rem/1 'Bodoni Moda', serif;
}

.watch-product-card__meta small {
  color: rgba(255, 255, 255, 0.4);
  font: 400 10.5px/1.2 Inter, sans-serif;
  text-align: right;
}

.watch-product-card__link {
  display: inline-flex;
  margin-top: 0.95rem;
  color: #fff;
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.watch-product-card__link::after {
  content: '→';
  margin-left: 0.4rem;
  color: #f59e0b;
}

.watch-products__empty {
  grid-column: 1 / -1;
  padding: 2.8rem 1.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
  font: 300 14px/1.8 Inter, sans-serif;
  text-align: center;
}

/* ---------- 系列区（GSAP pin 的四张系列卡）----------
   中间大图宽度由 85vh 高度撑出（约 700px），窗口较窄时两侧 1fr 文字列
   会被 grid 压到 min-content，描述文字变成一两个词一行。
   这里限制大图宽度（保持比例，object-contain 不裁切），把空间还给文字列；
   同时匹配 bridge 改写前后的 src（images/watch_xxx → watch-media/series-xxx）。 */
@media (min-width: 768px) {
  #root img[src*="images/watch_"],
  #root img[src*="watch-media/series-"] {
    max-width: min(36vw, 540px);
  }
}

/* ---------- Gallery 右下角的全部商品入口 ----------
   gallery 的 section 没有 position，这里补上作为绝对定位基准；
   GSAP pin 期间 section 变 fixed，按钮会一直贴在视口右下角。 */
#root section[class*="bg-black"] {
  position: relative;
}

.watch-gallery-cta {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vw, 2.5rem);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.9rem;
  border: 1px solid rgba(245, 158, 11, 0.7);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f59e0b;
  font: 600 11.5px/1 Inter, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.watch-gallery-cta:hover {
  background: #f59e0b;
  color: #050505;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.28);
}

.watch-gallery-cta:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
}

/* ---------- 分类全屏面板 ---------- */
.watch-cat-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
}

.watch-cat-overlay.is-open {
  display: block;
}

.watch-cat-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.42s ease;
}

.watch-cat-overlay.is-open .watch-cat-overlay__scrim {
  opacity: 1;
}

.watch-cat-overlay.is-closing .watch-cat-overlay__scrim {
  opacity: 0;
}

.watch-cat-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(165deg, #050505 0%, #0d0d0d 45%, #17110a 100%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.75);
  transform-origin: 0 0;
  will-change: transform;
  color: #fff;
}

.watch-cat-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 8% -12%, rgba(245, 158, 11, 0.12), transparent 60%),
    radial-gradient(760px 520px at 94% 6%, rgba(245, 158, 11, 0.08), transparent 62%);
}

.watch-cat-panel::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.55), transparent);
}

.watch-cat-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 44px;
  padding: 0 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}

.watch-cat-close:hover {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.1);
}

.watch-cat-close:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
}

.watch-cat-panel__scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.watch-cat-panel__inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 92px 1.5rem 4rem;
}

.watch-cat-hero {
  position: relative;
}

.watch-cat-hero__ghost {
  position: absolute;
  top: -2.4rem;
  right: -0.4rem;
  z-index: 0;
  font: 500 clamp(6.5rem, 15vw, 13rem) / 1 'Bodoni Moda', serif;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 158, 11, 0.35);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.watch-cat-hero > *:not(.watch-cat-hero__ghost) {
  position: relative;
  z-index: 1;
}

.watch-cat-hero__title {
  margin: 1.1rem 0 0;
  font: 500 clamp(2.4rem, 5vw, 4.4rem) / 1.05 'Bodoni Moda', serif;
}

.watch-cat-hero__desc {
  max-width: 620px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font: 300 15.5px/1.85 Inter, sans-serif;
}

.watch-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.watch-cat-tags li {
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.65);
  font: 500 11px/1.2 Inter, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.watch-cat-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.watch-cat-highlight {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.5rem 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s;
}

.watch-cat-highlight:hover {
  border-color: rgba(245, 158, 11, 0.5);
}

.watch-cat-highlight::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, #f59e0b, rgba(245, 158, 11, 0.15));
}

.watch-cat-highlight__index {
  display: block;
  color: rgba(245, 158, 11, 0.85);
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.28em;
}

.watch-cat-highlight__label {
  margin: 0.8rem 0 0.5rem;
  font: 500 1.15rem/1.35 'Bodoni Moda', serif;
}

.watch-cat-highlight__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font: 300 13.5px/1.8 Inter, sans-serif;
}

.watch-cat-browse {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2.6rem;
  padding: 0.9rem 1.6rem;
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 999px;
  background: transparent;
  color: #f59e0b;
  font: 600 11px/1 Inter, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.watch-cat-browse:hover {
  background: #f59e0b;
  color: #050505;
}

.watch-cat-browse:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
}

.watch-cat-footnote {
  margin: 2.2rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  font: 300 12.5px/1.7 Inter, sans-serif;
}

/* 分阶段淡入：延迟只加在淡入方向 */
.watch-cat-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.watch-cat-panel.is-revealed .watch-cat-reveal {
  opacity: 1;
  transform: none;
  transition-delay: var(--watch-cat-delay, 0ms);
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .watch-categories,
  .watch-products {
    padding: 4.5rem 1.1rem;
  }

  .watch-cat-close {
    top: 12px;
    right: 12px;
    height: 40px;
    padding: 0 0.95rem;
  }

  .watch-cat-panel__inner {
    padding: 76px 1.1rem 3rem;
  }

  .watch-cat-highlights {
    grid-template-columns: 1fr;
  }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .watch-cat-overlay *,
  .watch-cat-overlay *::before,
  .watch-cat-overlay *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .watch-cat-reveal {
    opacity: 1;
    transform: none;
  }
}
