/* ============================================================
   HNL WRAPS — /colors/ page styles
   Rebuilt to match the live production page's proportions (from screenshot
   reference), not a new design. Locked brand tokens:
   Background #050505 · Primary #f7f7f7 · Secondary #9a9a9a
   Display: Bebas Neue, uppercase · Body/UI: DM Sans
   ============================================================ */

:root {
  --bg: #050505;
  --fg: #f7f7f7;
  --fg-dim: #9a9a9a;
  --hairline: rgba(255,255,255,0.10);
  --hairline-strong: rgba(255,255,255,0.18);
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Header — compact bar, small logo, tight nav ---------- */
.site-header {
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
}
.header-inner {
  max-width: 1500px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  gap: 20px;
}
.logo { flex-shrink: 0; }
.logo-desktop { height: 30px; width: auto; }
.logo-mobile { display: none; }

.main-nav { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; }
.main-nav a { color: var(--fg-dim); transition: color 0.15s; padding-bottom: 2px; }
.main-nav a:hover { color: var(--fg); }
.main-nav a.active { color: var(--fg); border-bottom: 1px solid var(--fg); }

.btn-header, .btn-primary {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--fg);
  color: var(--bg);
  padding: 11px 20px;
  font-size: 12px;
  border: none;
  white-space: nowrap;
  transition: opacity 0.15s;
  display: inline-block;
}
.btn-header:hover, .btn-primary:hover { opacity: 0.85; }

/* ---------- Hero ---------- */
.hero {
  max-width: 900px; margin: 0 auto;
  padding: 72px 32px 48px;
  text-align: center;
}
.eyebrow { font-size: 12px; letter-spacing: 0.15em; color: var(--fg-dim); margin-bottom: 14px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}
.hero-sub { color: var(--fg-dim); font-size: 15px; max-width: 540px; margin: 0 auto 16px; }
.hnl50-link {
  font-size: 12px; letter-spacing: 0.05em; font-weight: 700;
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
}
.hnl50-link:hover { border-color: var(--fg); }

/* ---------- Controls (search + filters) ---------- */
.controls {
  max-width: 1500px; margin: 0 auto;
  padding: 0 32px 24px;
}
.search-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
#colorSearch {
  flex: 1;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--fg);
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: 13px;
}
#colorSearch:focus { outline: 1px solid var(--fg); border-color: var(--fg); }
#colorSearch::placeholder { color: var(--fg-dim); }
.result-count { font-size: 12px; color: var(--fg-dim); white-space: nowrap; }

.filter-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.filter-label {
  font-size: 10px; letter-spacing: 0.12em; color: var(--fg-dim);
  width: 48px; flex-shrink: 0;
}
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--fg-dim);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
  border-radius: 3px;
}
.filter-chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.filter-chip:hover { color: var(--fg); border-color: var(--fg); }
.filter-chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Library section headings (two-section layout) ---------- */
.library-section:first-of-type { padding-top: 8px; }
.library-heading {
  max-width: 1500px; margin: 0 auto;
  padding: 32px 32px 0;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.library-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.03em;
}
.library-heading .section-count {
  font-size: 12px; color: var(--fg-dim); white-space: nowrap;
}
@media (max-width: 640px) {
  .library-heading { padding: 24px 16px 0; }
}

/* ---------- Grid ---------- */
.color-grid {
  max-width: 1500px; margin: 0 auto;
  padding: 32px 32px 80px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
@media (min-width: 1500px) {
  .color-grid { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 1100px) {
  .color-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 860px) {
  .color-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .color-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 20px 16px 56px; }
}

.color-card {
  cursor: pointer;
  background: #111;
  transition: transform 0.15s;
}
.color-card:hover { transform: translateY(-2px); }
.color-card .swatch {
  aspect-ratio: 4 / 3;
  background: #1a1a1a;
  background-size: cover;
  background-position: center;
}
.color-card .card-info { padding: 10px 2px 4px; }
.color-card .card-name {
  font-size: 13px; font-weight: 700; line-height: 1.25; margin-bottom: 3px;
}
.color-card .card-finish {
  font-size: 10px; letter-spacing: 0.08em; color: var(--fg-dim); text-transform: uppercase;
}

.empty-state { text-align: center; color: var(--fg-dim); padding: 60px 32px; }

/* ---------- Bottom CTA ---------- */
.bottom-cta {
  border-top: 1px solid var(--hairline);
  text-align: center;
  padding: 64px 32px;
}
.bottom-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 40px);
  letter-spacing: 0.01em;
  margin-bottom: 24px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  background: var(--bg);
  border: 1px solid var(--hairline-strong);
  max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 28px;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: var(--fg);
  font-size: 26px; line-height: 1; cursor: pointer;
}
#modalColorName {
  font-family: var(--font-display);
  font-size: 32px; letter-spacing: 0.01em;
  padding-right: 28px;
}
.modal-finish {
  font-size: 11px; letter-spacing: 0.1em; color: var(--fg-dim);
  text-transform: uppercase; margin-bottom: 16px;
}
.modal-swatch { aspect-ratio: 4/3; background: #1a1a1a; margin-bottom: 14px; }
.modal-swatch img { width: 100%; height: 100%; object-fit: cover; }
.install-label {
  font-size: 10px; letter-spacing: 0.1em; color: var(--fg-dim);
  text-transform: uppercase; margin-bottom: 8px;
}
.modal-install { margin-bottom: 18px; }
.modal-install img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #1a1a1a; }
.modal-warranty {
  font-family: var(--font-display);
  font-size: 16px; letter-spacing: 0.03em;
  margin-bottom: 18px;
}
.modal-cta { width: 100%; text-align: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 40px 32px; }
.footer-inner { max-width: 1500px; margin: 0 auto; }
.footer-logo { height: 24px; margin-bottom: 14px; }
.disclaimer { font-size: 10px; color: var(--fg-dim); max-width: 700px; line-height: 1.6; }

/* ---------- Mobile header ---------- */
@media (max-width: 900px) {
  .main-nav { display: none; }
}
@media (max-width: 640px) {
  .logo-desktop { display: none; }
  .logo-mobile { display: block; height: 24px; }
  .btn-header { display: none; }
  .header-inner { padding: 12px 20px; }
  .hero { padding: 48px 20px 32px; }
  .controls { padding: 0 20px 20px; }
}
