/* Shared styles for brands / imported-brands / catalog / trust / contact / admin.
   Loaded alongside main.css — reuses its tokens (--bg, --navy, --gold, etc). */

/* ---------- Brand showcase (brands.html / imported-brands.html) ---------- */
.brand-showcase { display: flex; flex-direction: column; }
.brand-feature {
  scroll-margin-top: 90px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}
.brand-feature:last-child { border-bottom: 1px solid var(--line); }
.brand-feature { transition: background .3s ease; }
.brand-feature:hover { background: var(--bg-alt); }
.brand-feature .mark {
  height: 168px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .3s ease;
}
.brand-feature:hover .mark { box-shadow: 0 18px 40px rgba(15,23,42,.1); }
.brand-feature .mark img { transition: transform .35s ease; }
.brand-feature:hover .mark img { transform: scale(1.05); }
.brand-feature .mark::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent, var(--navy));
}
.brand-feature .mark img { max-width: 100%; max-height: 90px; object-fit: contain; }
.brand-feature .tagline {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent, var(--gold-ink));
  margin-bottom: 12px;
}
.brand-feature h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 0 0 10px; }
.brand-feature .desc { color: var(--ink-soft); font-size: 14px; max-width: 560px; margin: 0 0 18px; }
.brand-feature .go-catalog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: gap .25s ease, border-color .25s ease;
}
.brand-feature .go-catalog:hover { gap: 14px; border-color: var(--navy); }

/* ---------- Catalog ---------- */
.catalog-toolbar {
  position: sticky;
  top: 61px;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.filter-group { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-group:last-of-type { margin-bottom: 0; }
.filter-label { font-size: 11px; letter-spacing: .08em; color: var(--ink-soft); font-weight: 600; flex-shrink: 0; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-chip {
  font-size: 12.5px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s ease;
}
.filter-chip:hover { border-color: var(--navy); color: var(--navy); }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.catalog-count { font-size: 12.5px; color: var(--ink-soft); margin-top: 12px; }

.catalog-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: box-shadow .3s ease, transform .3s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: 0 18px 40px rgba(15,23,42,.12); transform: translateY(-3px); }
.product-card .thumb { aspect-ratio: 1/1; background: var(--bg-alt); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .4s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .info { padding: 16px 18px 20px; }
.product-card .brand-tag { font-size: 10.5px; letter-spacing: .06em; color: var(--gold-ink); margin-bottom: 6px; text-transform: uppercase; }
.product-card h4 { font-family: var(--serif); font-size: 14.5px; font-weight: 500; margin: 0 0 6px; line-height: 1.4; }
.product-card .spec { font-size: 11.5px; color: var(--ink-soft); }
.catalog-empty { text-align: center; padding: 80px 0; color: var(--ink-soft); font-size: 14px; }

/* Product detail overlay */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14,23,48,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.product-modal.open { opacity: 1; pointer-events: auto; }
.product-modal .sheet {
  background: var(--bg);
  max-width: 880px;
  width: 100%;
  max-height: 86vh;
  overflow: hidden;
  position: relative;
  transform: translateY(12px);
  transition: transform .25s ease;
}
.product-modal.open .sheet { transform: translateY(0); }
.product-modal .close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-soft);
  z-index: 1;
}
.product-modal .close-btn:hover { color: var(--ink); border-color: var(--ink); }

/* Simple full-image lightbox (certifications, patents) */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(14,23,48,.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.image-lightbox.open { opacity: 1; pointer-events: auto; }
.image-lightbox img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  transform: scale(.97);
  transition: transform .25s ease;
  background: #fff;
}
.image-lightbox.open img { transform: scale(1); }
.image-lightbox .close-btn {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.image-lightbox .close-btn:hover { background: rgba(255,255,255,.28); }

/* 좌측 대표 이미지는 고정, 우측 상세 정보만 스크롤되도록 분리 */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; max-height: 86vh; }
.product-detail .pd-media { background: var(--bg-alt); display: flex; align-items: center; justify-content: center; padding: 40px; min-width: 0; }
.product-detail .pd-media img { max-width: 100%; max-height: 360px; object-fit: contain; }
.product-detail .pd-body { padding: 44px 40px; min-width: 0; max-height: 86vh; overflow-y: auto; }
.product-detail h2 { min-width: 0; max-width: 100%; }
.product-detail .brand-tag { font-size: 11px; letter-spacing: .08em; color: var(--gold-ink); margin-bottom: 12px; text-transform: uppercase; }
.product-detail h2 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 0 0 6px; }
.product-detail .meta-row { display: flex; gap: 24px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 20px; flex-wrap: wrap; }
.product-detail .meta-row strong { color: var(--ink); font-weight: 600; }
.product-detail ul.pd-features { margin: 0 0 22px; padding-left: 18px; font-size: 13px; color: var(--ink-soft); }
.product-detail ul.pd-features li { margin-bottom: 6px; }
.pd-nutrition { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 18px; }
.pd-nutrition > div { background: #fff; padding: 10px 4px; text-align: center; display: flex; flex-direction: column; }
.pd-nutrition .label {
  font-size: 10px;
  color: var(--ink-soft);
  margin-bottom: 4px;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.pd-nutrition .value { font-size: 12px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.pd-ingredients { font-size: 12px; color: var(--ink-soft); line-height: 1.7; padding-top: 14px; border-top: 1px solid var(--line); }
.pd-ingredients strong { display: block; color: var(--ink); font-size: 12.5px; margin-bottom: 6px; }
.pd-detail-images { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pd-detail-images img { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; cursor: zoom-in; }
.pd-buy-link { display: inline-block; margin-top: 18px; font-size: 13px; font-weight: 600; color: var(--navy); }
.pd-buy-link:hover { text-decoration: underline; }

/* ---------- Trust page ---------- */
.cert-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cert-card.clickable { cursor: pointer; }
.cert-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 36px 28px;
  min-height: 176px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
}
.cert-card:hover { box-shadow: 0 18px 40px rgba(15,23,42,.1); transform: translateY(-3px); border-color: var(--signature); }
.cert-card h3 { font-family: var(--serif); font-size: 16px; font-weight: 500; margin: 0 0 10px; }
.cert-card p { font-size: 12.5px; color: var(--ink-soft); margin: 0; }

.patent-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.patent-card { background: #fff; border: 1px solid var(--line); overflow: hidden; transition: box-shadow .3s ease; }
.patent-card.clickable { cursor: pointer; }
.patent-card:hover { box-shadow: 0 14px 30px rgba(15,23,42,.1); }
.patent-card .thumb { aspect-ratio: 3/4; overflow: hidden; background: var(--bg-alt); }
.patent-card img { width: 100%; height: 100%; object-fit: cover; }
.patent-card .cap { padding: 12px 14px; }
.patent-card .type { font-size: 10.5px; color: var(--gold-ink); letter-spacing: .04em; }
.patent-card .num { font-size: 12px; color: var(--ink); font-family: var(--serif); margin-top: 2px; line-height: 1.4; }
.cert-card.no-thumb { display: flex; flex-direction: column; justify-content: center; }

/* ---------- Global exhibition galleries ---------- */
.expo-block { padding: 32px 0; border-top: 1px solid var(--line); }
.expo-block:last-child { border-bottom: 1px solid var(--line); }
.expo-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.expo-head h3 { font-family: var(--serif); font-size: 17px; font-weight: 500; margin: 0; }
.expo-location { font-size: 12px; color: var(--ink-soft); }
.expo-gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.expo-photo { aspect-ratio: 1/1; overflow: hidden; border-radius: 3px; }
.expo-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.expo-photo:hover img { transform: scale(1.08); }

/* ---------- Logo flow grid (retail / distributor partnership) ---------- */
.logo-flow-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; }
.contact-info h2 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 0 0 16px; }
.contact-info p { color: var(--ink-soft); font-size: 14px; line-height: 1.8; margin: 0 0 28px; }
.contact-detail-list { display: flex; flex-direction: column; gap: 14px; }
.contact-detail-list .row { display: flex; gap: 14px; font-size: 13.5px; }
.contact-detail-list .label { width: 70px; color: var(--ink-soft); flex-shrink: 0; }
.contact-detail-list .value { color: var(--ink); }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.form-row label .req { color: #b91c1c; margin-left: 2px; }
.form-row input, .form-row textarea {
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  transition: border-color .2s ease;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--navy); }
.form-row textarea { resize: vertical; min-height: 120px; font-family: var(--sans); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-btn {
  align-self: flex-start;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 999px;
  font-size: 13.5px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .25s ease;
}
.submit-btn:hover { background: var(--navy-deep); }
.submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.form-msg { font-size: 13px; padding: 12px 16px; border-radius: 4px; display: none; }
.form-msg.show { display: block; }
.form-msg.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.form-msg.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

@media (max-width: 900px) {
  .brand-feature { grid-template-columns: 1fr; gap: 24px; padding: 44px 0; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  /* 좁은 화면에서는 이미지+정보가 세로로 쌓이므로, 우측만 스크롤하는 데스크톱
     레이아웃을 풀고 시트 전체가 하나로 스크롤되게 되돌림 */
  .product-detail { grid-template-columns: 1fr; max-height: none; }
  .product-detail .pd-body { max-height: none; overflow-y: visible; }
  .product-modal .sheet { overflow-y: auto; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .patent-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .pd-nutrition { grid-template-columns: repeat(2, 1fr); }
  .expo-gallery { grid-template-columns: repeat(3, 1fr); }
  .logo-flow-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Corporate weight tuning (see main.css for rationale) ---------- */
.brand-feature h3,
.product-detail h2,
.cert-card h3,
.expo-head h3,
.contact-info h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.product-card h4,
.patent-card .num {
  font-weight: 600;
}
