/* TJ v4 — 暖白画布 + 莫兰蒂 + 街头骨架
 * DNA: Archivo Black display + Inter body, Jil Sander off-white bg,
 * 12 Morandi colors, LOT Nº signature, Pinterest 16px radius
 */

/* ====== Reset ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Inter', system-ui, sans-serif; font-weight: 400; color: var(--ink); background: var(--bg); line-height: 1.5; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ====== Design Tokens ====== */
:root {
  /* Primary */
  --bg: #FBFBF6;                 /* Jil Sander 暖白主画布 */
  --bg-card: #DDDCD8;            /* 产品卡底冷灰纸 */
  --ink: #1A1A1A;                /* 近黑正文 */
  --ink-soft: #4A4A48;           /* 次要文字 */
  --ink-mute: #8A8A85;           /* 三级灰 */
  --line: rgba(26,26,26,0.08);   /* 分隔线 */
  --shadow: 0 8px 24px -8px rgba(40,38,34,0.08);
  --shadow-hover: 0 12px 32px -6px rgba(40,38,34,0.16);

  /* Accent */
  --hype: #D13A2F;               /* 仅 drop / sale / LOT Nº */

  /* Morandi 12 */
  --c-ivory: #F1EBE0;
  --c-pebble: #D4CDBF;
  --c-stone: #B8B0A0;
  --c-sage: #9FA893;
  --c-olive: #7E7A5E;
  --c-haze: #A8B1BA;
  --c-dusk: #7D8A9A;
  --c-clay: #BE9A8C;
  --c-earth: #A06851;
  --c-mocha: #6E5A4B;
  --c-mushroom: #9C8F7F;
  --c-charcoal: #3A3A38;

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* ====== Typography ====== */
.display { font-family: 'Archivo Black', 'Arial Black', sans-serif; font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; }
.eyebrow { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.price { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

h1 { font-family: 'Archivo Black', sans-serif; font-weight: 900; letter-spacing: -0.04em; text-transform: uppercase; line-height: 0.9; font-size: clamp(48px, 9vw, 140px); }
h2 { font-family: 'Archivo Black', sans-serif; font-weight: 900; letter-spacing: -0.03em; text-transform: uppercase; font-size: clamp(28px, 4vw, 56px); line-height: 1; }
h3 { font-weight: 600; letter-spacing: -0.01em; font-size: 18px; }

/* ====== Layout ====== */
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* ====== Nav ====== */
.nav { position: sticky; top: 0; background: rgba(251,251,246,0.92); backdrop-filter: blur(12px); z-index: 100; border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; }
.nav-brand { font-family: 'Archivo Black', sans-serif; font-weight: 900; font-size: 18px; letter-spacing: 0.04em; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; transition: opacity .2s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav-links a { opacity: 0.72; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.cart-btn { font-family: 'Inter'; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; position: relative; }
.cart-count { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; background: var(--ink); color: var(--bg); border-radius: 10px; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; margin-left: 6px; }
.cart-count:empty { display: none; }

/* ====== Hero ====== */
.hero { position: relative; height: calc(100vh - 57px); min-height: 600px; overflow: hidden; background: var(--ink); }
.hero-media { position: absolute; inset: 0; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.hero-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; color: var(--bg); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hero-drop { font-family: 'Inter'; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; background: var(--bg); color: var(--ink); padding: 8px 12px; border-radius: 3px; }
.hero-drop.hype { background: var(--hype); color: var(--bg); }
.hero-meta { font-family: 'Inter'; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.7; text-align: right; }
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; }
.hero-title { flex: 1; }
.hero-title .eyebrow { color: var(--bg); opacity: 0.7; margin-bottom: 16px; }
.hero-title h1 { color: var(--bg); max-width: 14ch; }
.hero-cta { display: flex; gap: 12px; }

/* ====== Button ====== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 16px; font-family: 'Inter'; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; transition: transform .2s var(--ease), background .2s, color .2s; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--bg); border: 1px solid rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-light { background: var(--bg); color: var(--ink); }
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }

/* ====== Product Grid ====== */
.section { padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 48px; }
.section-head h2 { max-width: 16ch; }

/* Editorial grid — 4 cols wide / 3 tablet / 2 mobile, no orphan rows */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 28px 20px; } }
@media (max-width: 800px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; } }

/* Home hero sections can use tighter 3-col for variety */
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.card { position: relative; cursor: pointer; transition: transform .35s var(--ease); }
.card:hover { transform: translateY(-2px); }
.card-media { aspect-ratio: 3/4; background: var(--bg-card); border-radius: 10px; overflow: hidden; position: relative; }
.card-media::after {
  /* 悬浮期 soft 柱状 shadow, Jacquemus-ish */
  content: ''; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(to top, rgba(26,26,26,0.35), transparent);
  opacity: 0; transition: opacity .3s var(--ease);
}
.card:hover .card-media::after { opacity: 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
/* 小色点放图左上角 (Toteme 风), 不在底部占位 */
.card-swatch-dot { position: absolute; top: 12px; left: 12px; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,0.7); z-index: 1; }
/* 卡片文字极简: 只 1 行名 + 1 行色 + 价 (右对齐) */
.card-body { padding: 14px 2px 4px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.card-lot-mini { grid-column: 1 / -1; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; margin-bottom: 2px; }
.card-name { font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: -0.005em; font-size: 13px; color: var(--ink); }
.card-color { font-size: 11px; color: var(--ink-soft); letter-spacing: 0.06em; text-transform: uppercase; }
.card-price { font-family: 'Inter'; font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; grid-row: span 2; align-self: center; color: var(--ink-soft); }
.card:hover .card-price { color: var(--ink); }

/* ====== Category Tabs ====== */
.tabs { display: flex; gap: 8px; margin-bottom: 48px; padding: 6px; background: rgba(26,26,26,0.04); border-radius: 20px; width: fit-content; }
.tab { padding: 10px 20px; border-radius: 14px; font-family: 'Inter'; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; transition: all .2s; color: var(--ink-soft); }
.tab.active { background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }

/* ====== Split Model Stage ====== */
.model-stage { position: relative; display: grid; grid-template-columns: 1fr 0fr; gap: 0; transition: grid-template-columns .4s var(--ease), gap .4s var(--ease); min-height: 80vh; }
.model-stage.is-split { grid-template-columns: 0.55fr 0.45fr; gap: 24px; }
.model-visual { position: relative; background: var(--bg-card); border-radius: 20px; overflow: hidden; }
.model-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.model-stage.is-split .model-img { transform: scale(0.96); }
.model-overlay { position: absolute; inset: 0; }
.hotspot { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(251,251,246,0.9); border: 2px solid var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: 'Inter'; font-size: 18px; font-weight: 700; color: var(--ink); transition: transform .2s, background .2s; animation: pulse 2s infinite; }
.hotspot:hover { transform: scale(1.15); background: var(--hype); color: var(--bg); border-color: var(--hype); }
.hotspot.active { background: var(--ink); color: var(--bg); animation: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(209,58,47,0.4); } 50% { box-shadow: 0 0 0 12px rgba(209,58,47,0); } }

.split-panel { overflow: hidden; opacity: 0; transform: translateX(24px); transition: opacity .3s var(--ease) .1s, transform .3s var(--ease) .1s; pointer-events: none; }
.model-stage.is-split .split-panel { opacity: 1; transform: translateX(0); pointer-events: all; }
.split-content { padding: 16px 0; display: grid; gap: 16px; }
.split-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 0 4px; }
.split-close { padding: 8px 14px; border-radius: 14px; background: rgba(26,26,26,0.06); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.split-item { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; padding: 12px; background: rgba(255,255,255,0.6); border-radius: 16px; transition: background .2s; }
.split-item:hover { background: rgba(255,255,255,1); }
.split-item-media { width: 80px; height: 80px; border-radius: 10px; overflow: hidden; background: var(--bg-card); }
.split-item-media img { width: 100%; height: 100%; object-fit: cover; }
.split-item-info { display: flex; flex-direction: column; gap: 2px; }
.split-item-info .eyebrow { color: var(--ink-mute); font-size: 10px; }
.split-item-info h4 { font-family: 'Archivo Black'; font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: -0.01em; }
.split-item-info p { font-size: 11px; color: var(--ink-soft); }
.split-item-buy { padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; transition: background .2s; }
.split-item-buy:hover { background: var(--hype); }

/* ====== Product Detail ====== */
.product { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; padding: 64px 0; }
@media (max-width: 768px) { .product { grid-template-columns: 1fr; gap: 32px; } }
.product-media { aspect-ratio: 3/4; background: var(--bg-card); border-radius: 20px; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(36px, 5vw, 72px); margin: 16px 0 24px; }
.product-price { font-family: 'Archivo Black'; font-size: 28px; margin: 24px 0; }
.product-desc { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin: 24px 0 32px; max-width: 48ch; }
.product-lot { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 32px 0; }
.product-lot dt { font-size: 10px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 4px; }
.product-lot dd { font-size: 14px; font-family: 'Inter'; font-weight: 500; }
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 32px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .2s, border-color .2s; }
.swatch:hover { transform: scale(1.1); }
.swatch.selected { border-color: var(--ink); }
.size-row { display: flex; gap: 8px; margin: 16px 0 32px; }
.size { padding: 10px 18px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; transition: all .2s; }
.size:hover, .size.selected { border-color: var(--ink); background: var(--ink); color: var(--bg); }

/* ====== Cart ====== */
.cart-items { display: flex; flex-direction: column; gap: 16px; margin: 32px 0; }
.cart-item { display: grid; grid-template-columns: 100px 1fr auto; gap: 20px; padding: 16px; background: rgba(255,255,255,0.6); border-radius: 16px; align-items: center; }
.cart-item-media { width: 100px; height: 120px; border-radius: 12px; overflow: hidden; background: var(--bg-card); }
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info h3 { font-size: 16px; margin-bottom: 4px; }
.cart-item-info p { font-size: 12px; color: var(--ink-soft); }
.cart-remove { font-size: 11px; color: var(--ink-mute); text-decoration: underline; margin-top: 8px; display: inline-block; cursor: pointer; }
.cart-summary { padding: 32px; background: rgba(26,26,26,0.03); border-radius: 20px; margin: 48px 0; }
.cart-row { display: flex; justify-content: space-between; padding: 12px 0; font-size: 14px; }
.cart-row.total { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 20px; font-family: 'Archivo Black'; font-size: 20px; text-transform: uppercase; letter-spacing: -0.01em; }
.cart-empty { text-align: center; padding: 96px 32px; color: var(--ink-mute); }
.cart-empty h2 { margin: 16px 0; color: var(--ink-soft); }

/* ====== Footer ====== */
footer { margin-top: 96px; padding: 64px 32px 32px; background: var(--ink); color: var(--bg); }
footer .container { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
@media (max-width: 768px) { footer .container { grid-template-columns: 1fr; } }
footer h4 { font-family: 'Archivo Black'; font-size: 16px; margin-bottom: 16px; letter-spacing: 0; text-transform: uppercase; }
footer a { display: block; font-size: 12px; padding: 4px 0; opacity: 0.7; letter-spacing: 0.1em; text-transform: uppercase; }
footer a:hover { opacity: 1; }
.footer-bottom { padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 11px; opacity: 0.5; letter-spacing: 0.14em; text-transform: uppercase; }

/* ====== Utilities ====== */
.fade-in { animation: fadeIn .6s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.text-hype { color: var(--hype); }
.mt-auto { margin-top: auto; }
.hidden { display: none !important; }
