/* PHASE:6A:START — directory.css — Brand Directory Styles */
/* =================================================================
   FILE: /src/css/directory.css
   Injected by build.js for every PAGE_TYPE: directory.

   CLASS NAMES — two wrapper classes, both covered by this CSS:
   - .directory-listing-page  used by /src/directory/index.html
   - .directory-page          used by /src/directory/[brand].html pages
   Both get identical wrapper rules (padding + > * max-width).

   ARCHITECTURE — identical to tools.css and articles.css:
   - wrapper class    → padding only, no max-width (Rule 1)
   - wrapper class > * → max-width: 1100px, auto margins (Rule 1)
   - Padding: 0 16px → 0 24px (600px) → 0 40px (1140px) in px (Rule 2)
   - H1: 1.5rem → 1.75rem (600px) → 2rem (768px) (Rule 3)
   - Sections own only vertical rhythm, never max-width/padding (Rule 4)

   Mobile-first. Base = 375px.
   Breakpoints: 600px | 768px | 1024px | 1140px
   ================================================================= */


/* ─────────────────────────────────────────────────────────────────
   OUTER PAGE WRAPPER
   Mirrors .tool-page and .article-page exactly.
   max-width NEVER goes here — it goes on > * below.
   ───────────────────────────────────────────────────────────────── */

.directory-page,
.directory-listing-page {
  padding: 0 16px;
  box-sizing: border-box;
}

/* Every direct child of <main> — breadcrumb, ad slots, sections — gets
   the same max-width constraint so nothing bleeds to viewport edge. */
.directory-page > *,
.directory-listing-page > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 600px) {
  .directory-page,
  .directory-listing-page { padding: 0 24px; }
}

@media (min-width: 1140px) {
  .directory-page,
  .directory-listing-page { padding: 0 40px; }
}

/* PHASE:6A:END */


/* =================================================================
   DIRECTORY LISTING PAGE
   ================================================================= */

/* PHASE:6A:START — Directory hero */
/* No max-width or horizontal padding — inherited from .directory-page > *
   Sections own vertical rhythm only. */
.directory-hero {
  padding: 24px 0 16px;
}

.directory-hero h1 {
  font-size: 1.5rem;     /* Rule 3: identical to tool-hero h1 — mobile */
  margin: 0 0 8px;
  color: var(--color-text);
  line-height: 1.25;
}

.directory-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-light, #666);
  margin: 0 0 20px;
}

@media (min-width: 600px) {
  .directory-hero h1 { font-size: 1.75rem; }
}

@media (min-width: 768px) {
  .directory-hero { padding: 32px 0 20px; }
  .directory-hero h1 { font-size: 2rem; }
}
/* PHASE:6A:END */


/* PHASE:6A:START — Brand grid */
/* No max-width or padding — inherited from .directory-page > * */
.brand-grid-section {
  padding-bottom: 16px;
}

.brand-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.brand-grid-loading {
  color: var(--color-text-light, #888);
  font-style: italic;
  padding: 1rem 0;
}

/* Brand card */
.brand-card {
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.brand-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}

.brand-card-logo {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.brand-card-logo-placeholder {
  height: 48px;
  width: 120px;
  background: var(--color-primary, #E85D26);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.brand-card-parent {
  font-size: 0.875rem;
  color: var(--color-text-light, #666);
  margin: 0;
}

.brand-card-profiles {
  font-size: 0.85rem;
  color: var(--color-text-light, #555);
}

.brand-card-link {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding: 0.5rem 1rem;
  background: var(--color-primary, #E85D26);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 44px;
  width: fit-content;
  transition: background 0.15s ease;
}

.brand-card-link:hover {
  background: #c94f1e;
  text-decoration: none;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Directory footer CTA */
.directory-footer-cta {
  text-align: center;
  padding: 2rem 0 3rem;
  color: var(--color-text-light, #666);
  font-size: 0.95rem;
}

.directory-footer-cta a {
  color: var(--color-primary, #E85D26);
  text-decoration: underline;
}
/* PHASE:6A:END */


/* 2-column grid at 600px */
@media (min-width: 600px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 3-column grid at 1024px */
@media (min-width: 1024px) {
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
}


/* =================================================================
   BRAND PAGE — SHARED STYLES
   ================================================================= */

/* PHASE:6A:START — Brand hero */
/* No max-width or horizontal padding — inherited from .directory-page > *
   Sections own vertical rhythm and flex layout only. */
.brand-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--color-border, #e0e0e0);
  margin-bottom: 1.5rem;
}

.brand-hero img {
  height: 60px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.brand-hero-text h1 {
  font-size: 1.5rem;     /* Rule 3: matches tool-hero h1 — mobile */
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--color-text);
}

.brand-tagline {
  font-size: 1rem;
  color: var(--color-text-light, #555);
  margin: 0 0 0.3rem;
  font-style: italic;
}

.brand-parent {
  font-size: 0.875rem;
  color: var(--color-text-light, #666);
  margin: 0;
}

.brand-hq {
  font-size: 0.85rem;
  color: var(--color-text-light, #888);
  margin: 0.3rem 0 0;
}

@media (min-width: 600px) {
  .brand-hero-text h1 { font-size: 1.75rem; }
}

@media (min-width: 640px) {
  .brand-hero {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .brand-hero { padding: 32px 0 20px; }
  .brand-hero-text h1 { font-size: 2rem; }
}
/* PHASE:6A:END */


/* PHASE:6A:START — IS standard badges */
.is-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.is-badge {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  letter-spacing: 0.02em;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Brand about section */
.brand-about {
  margin-bottom: 2rem;
}

.brand-about h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.brand-about p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text, #444);
  margin-bottom: 1rem;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Profile specs section */
.brand-profiles {
  margin-bottom: 2rem;
}

.brand-profiles h2,
.brand-colours h2,
.brand-tool-cta h2,
.brand-dealer-form h2,
.brand-faq h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.profile-block {
  background: #f8f8f8;
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.profile-block h3 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.profile-note {
  font-size: 0.88rem;
  color: var(--color-text-light, #666);
  background: #fff8f5;
  border-left: 3px solid var(--color-primary, #E85D26);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 1rem;
}

.profile-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.9rem;
}

.profile-specs li {
  color: var(--color-text-light, #555);
}

.profile-specs li strong {
  color: var(--color-text);
}

/* Spec grid */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-light, #888);
}

.spec-value {
  font-size: 0.92rem;
  color: var(--color-text);
  font-weight: 500;
}

@media (min-width: 600px) {
  .spec-grid         { grid-template-columns: repeat(3, 1fr); }
  .profile-specs     { grid-template-columns: repeat(3, 1fr); }
}

.weight-chart-heading {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.loading-text {
  color: var(--color-text-light, #888);
  font-style: italic;
  font-size: 0.9rem;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Data table (weight chart) */
/*
   global.css also defines .data-table with neutral th background.
   directory.css intentionally overrides th background to orange
   for brand page weight charts. Load order: global.css first,
   directory.css second — so these rules always win.
*/
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table caption {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light, #555);
  text-align: left;
  caption-side: top;
  padding-bottom: 6px;
}

.data-table th,
.data-table td {
  border: 1px solid var(--color-border, #ddd);
  padding: 0.45rem 0.65rem;
  text-align: center;
}

.data-table th {
  background: var(--color-primary, #E85D26);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td:first-child {
  font-weight: 600;
  text-align: left;
  background: #f5f5f5;
  white-space: nowrap;
}

.data-table tbody tr:hover td {
  background: #fafafa;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Colour swatches */
.brand-colours {
  margin-bottom: 2rem;
}

.colour-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.colour-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.swatch {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Legacy alias — keep for Phase 6A brand pages */
.swatch-box {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
  display: block;
}

.swatch-label {
  font-size: 0.72rem;
  color: var(--color-text-light, #555);
  text-align: center;
  max-width: 60px;
  line-height: 1.2;
}

.colour-note {
  font-size: 0.8rem;
  color: var(--color-text-light, #888);
  margin-top: 0.5rem;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Tool CTA */
.brand-tool-cta {
  background: #fff8f5;
  border: 1px solid #ffddd0;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.brand-tool-cta p {
  font-size: 0.95rem;
  color: var(--color-text-light, #555);
  margin: 0 0 1rem;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Dealer lead form */
.brand-dealer-form {
  background: #f8f8f8;
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 2rem;
}

.brand-dealer-form > p {
  font-size: 0.95rem;
  color: var(--color-text-light, #555);
  margin: 0 0 1.25rem;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.input-group input,
.input-group select {
  font-size: 16px;   /* Mandatory — prevents iOS auto-zoom */
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border, #ccc);
  border-radius: 4px;
  background: #fff;
  color: var(--color-text);
  width: 100%;
  box-sizing: border-box;
  line-height: 1.4;
  min-height: 44px;  /* minimum tap target */
}

.input-group input:focus,
.input-group select:focus {
  outline: 2px solid var(--color-primary, #E85D26);
  outline-offset: 1px;
  border-color: var(--color-primary, #E85D26);
}

.input-group input.input-error-state {
  border-color: #c62828;
}

.input-error {
  font-size: 0.82rem;
  color: #c62828;
  min-height: 1.1em;
  display: block;
}

.btn-primary {
  display: inline-block;
  background: var(--color-primary, #E85D26);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s ease;
  text-decoration: none;
  text-align: center;
}

.btn-primary:hover:not(:disabled) {
  background: #c94f1e;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-disclaimer {
  font-size: 0.8rem;
  color: var(--color-text-light, #888);
  margin: 0;
}

.lead-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  color: #2e7d32;
  font-size: 0.95rem;
  font-weight: 600;
}

.lead-form-error {
  font-size: 0.88rem;
  color: #c62828;
  margin-top: 0.25rem;
}
/* PHASE:6A:END */


/* PHASE:6A:START — FAQ section */
/*
   Intentionally identical to tools.css .faq-* values.
   If tools.css values change, update here to match.
*/
.brand-faq {
  margin-bottom: 2.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--color-border, #f0f0f0);
  padding: 16px 0;
}

.faq-item:first-child  { padding-top: 0; }
.faq-item:last-child   { border-bottom: none; padding-bottom: 0; }

.faq-question {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
  color: var(--color-text);
}

.faq-answer,
.faq-answer p {
  font-size: 0.95rem;
  color: var(--color-text, #555);
  line-height: 1.6;
  margin: 0;
}
/* PHASE:6A:END */


/* PHASE:6A:START — Desktop refinements */
@media (min-width: 768px) {
  .profile-specs { grid-template-columns: repeat(3, 1fr); }

  .lead-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .lead-form .input-group:last-of-type { grid-column: 1 / -1; }
  .lead-form .btn-primary              { grid-column: 1; width: auto; }
  .lead-form .form-disclaimer          { grid-column: 1 / -1; }
}
/* PHASE:6A:END */

/* PHASE:6A:END — directory.css complete */