/* Page-specific styles: products.html */
:root {
  --bg: #FFF3E8;
  --bg-alt: #FBE3D1;
  --ink: #211512;
  --ink-soft: #6A4A40;
  --primary: #D71920;
  --primary-dark: #8F1015;
  --accent: #F15A24;
  --accent-soft: #F7C84B;
  --herb-brown: #A52A1E;
  --line: #E8C6B2;
  --white: #FFFDFC;

  --font-display: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-body: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-full: 999px;

  --max-width: 1120px;
}

img { max-width: 100%; height: auto; display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
}

/* ---- Header ---- */

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.nav-links a:not(:last-child)::after {
  content: "｜"; position: absolute; right: -1px; top: 50%;
  transform: translateY(-50%); color: rgba(0,0,0,0.5); font-weight: 400;
}

.nav-links a.is-current { color: var(--primary); }

.mobile-menu {
  display: none; flex-direction: column; gap: 4px; padding: 16px 24px 24px;
  background: rgba(255,243,232,0.96);
  backdrop-filter: blur(8px);
}

/* ---- Page hero (작은 배너형) ---- */

.page-hero {
  position: relative;
  overflow: hidden;
  height: 420px;
  padding: 0 24px;
  display: flex;
  align-items: center;   /* ← 이게 "세로" 중앙 정렬 담당 */
  background: linear-gradient(160deg, #C9151B, #49090B);
  color: var(--white);
}

.page-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.70;
  z-index: 1;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(201,21,27,0.80), rgba(73,9,11,0.88));
  z-index: 2;
}

.page-hero .container {
  position: relative;
  z-index: 3;
  text-align: center;
}

.page-hero .eyebrow { color: var(--accent-soft); }

.page-hero h1 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero p {
  margin: 14px auto 0;
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  max-width: 560px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- 제품 라인업 카드 (index와 동일 톤) ---- */

.line-group { margin-bottom: 48px; }

.line-group:last-child { margin-bottom: 0; }

.line-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.line-group-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.line-dot-z { background: var(--primary); }

.line-dot-g { background: var(--accent); }

.line-dot-a { background: var(--herb-brown); }

.line-group-head h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--primary-dark);
}

.line-group-head span {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  justify-content: center;
  gap: 20px;
}

.product-grid.is-pair {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

a.product-card { display: block; cursor: pointer; }

.product-grid.is-pair .product-card {
  flex: 0 1 260px;
}

.product-card {
  background: var(--white);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(73,9,11,0.07);
}

.product-card-img {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.product-card-img img { width: auto; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }

.product-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--herb-brown);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.product-card h3 { font-size: 18px; margin-bottom: 10px; }

.product-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---- 매칭 퀴즈 (선택하면 추천 라인업 표시) ---- */

.match-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.match-opt {
  flex: 1 1 220px;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, transform .15s ease;
}

.match-opt:hover { transform: translateY(-2px); }

.match-opt.is-selected { border-color: var(--accent); background: var(--accent-soft); }

.match-result {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: 0 4px 16px rgba(73,9,11,0.07);
  min-height: 140px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.match-placeholder {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 auto;
  text-align: center;
}

.match-result-img { flex: 0 0 90px; }

.match-result-img img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 10px; }

.match-result-body h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.match-result-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--herb-brown);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.match-result-body p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

@media (max-width: 560px) {
  .match-result { flex-direction: column; text-align: center; }
}

/* ---- CTA ---- */

.products-cta {
  background: var(--bg);
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 72px 24px;
}

.products-cta h2 { color: var(--primary-dark); font-size: clamp(24px, 3vw, 32px); }

.products-cta p { color: var(--ink-soft); margin: 14px 0 28px; }

.site-footer {
  padding: 48px 0 40px;
  background: var(--primary-dark);
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  text-align: center;
}

.site-footer span:first-of-type { color: rgba(255,255,255,0.6); font-size: 13px; }

.site-footer span:last-of-type { max-width: 780px; line-height: 1.7; color: rgba(255,255,255,0.35); }

#all-products .section-head {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#all-products .line-group-head {
  justify-content: center;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .site-header .nav-inner > .btn { display: none; }
  .menu-toggle { display: flex; }
  .product-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .page-hero { padding: 140px 0 48px; }
}
