/* ══════════════════════════════════════════════
   DTW Specification Tool — v2
   Card system modelled on the LAA systems grid:
   white cards on a warm neutral ground, cutaway
   renders contain-fit on pure white, photography
   full-bleed, pill tags, no heavy per-card CTA.
   ══════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────── */
.spec-hero {
  background: linear-gradient(165deg, #ffffff 0%, #f6f5f2 55%, #efedea 100%);
  padding: 88px 0 64px;
  text-align: center;
}
.spec-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(219, 9, 51, 0.06);
  border: 1px solid rgba(219, 9, 51, 0.14);
  border-radius: 100px;
  padding: 7px 18px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.spec-hero-label .dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}
.spec-hero h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--color-dark);
  margin: 0 0 20px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.spec-hero .intro-text {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--color-text);
}
.spec-hero .intro-text p { margin: 0; }
.spec-hero .intro-text strong { color: var(--color-text-dark); }

/* ── Audience cards ────────────────────────── */
.spec-audience {
  background: #fff;
  padding: 64px 0;
  border-top: 1px solid #efedea;
}
.spec-audience h2 { text-align: center; margin-bottom: 8px; }
.spec-audience .spec-subtitle {
  text-align: center;
  color: var(--color-grey-mid);
  max-width: 680px;
  margin: 0 auto 36px;
}
.spec-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1020px;
  margin: 0 auto;
}
.spec-audience-card {
  background: #fbfaf8;
  border: 1px solid #efedea;
  border-radius: 14px;
  padding: 28px 26px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.spec-audience-card:hover {
  border-color: #e0ddd7;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(28, 38, 51, 0.06);
}
.spec-audience-card h3 {
  margin-bottom: 8px;
  font-size: 17px;
}
.spec-audience-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text);
}

/* ── Filter Bar ────────────────────────────── */
.spec-filters {
  background: #fff;
  border-top: 1px solid var(--color-grey-light);
  border-bottom: 1px solid var(--color-grey-light);
  padding: 16px 0;
  position: sticky;
  /* Site header is fixed at z-index 100; sit below it, not over it */
  top: var(--header-height);
  z-index: 97;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}
.spec-filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.filter-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-group label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #a5a19a;
  margin: 0 2px 0 0;
  white-space: nowrap;
}

/* Filter Pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border: 1px solid #e2e0db;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  background: #fff;
  color: #5b5b57;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
}
.filter-pill:hover {
  border-color: var(--color-dark);
  color: var(--color-dark);
}
.filter-pill.active {
  background: var(--color-dark);
  color: #fff;
  border-color: var(--color-dark);
}

/* Search */
.spec-search {
  padding: 8px 14px 8px 36px;
  border: 1px solid #e2e0db;
  border-radius: 100px;
  font-size: 0.88rem;
  min-width: 200px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23a5a19a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 14px center no-repeat;
  transition: border-color 0.15s ease;
}
.spec-search:focus {
  outline: none;
  border-color: var(--color-dark);
  box-shadow: 0 0 0 3px rgba(28, 38, 51, 0.07);
}

/* U-value Slider */
.u-value-slider {
  display: flex;
  align-items: center;
  gap: 8px;
}
.u-value-slider input[type="range"] {
  width: 110px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.u-value-display {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-dark);
  min-width: 90px;
  white-space: nowrap;
}

/* Sort & Reset */
.spec-sort {
  padding: 8px 12px;
  border: 1px solid #e2e0db;
  border-radius: 100px;
  font-size: 0.85rem;
  background: #fff;
  color: #5b5b57;
  cursor: pointer;
}
.filter-reset {
  padding: 8px 15px;
  border: 1px solid #e2e0db;
  border-radius: 100px;
  background: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  color: #a5a19a;
  font-weight: 500;
  transition: all 0.18s ease;
}
.filter-reset:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Results Bar */
.spec-results-bar {
  padding: 20px 0 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.results-count {
  font-size: 0.88rem;
  color: var(--color-grey-mid);
  font-weight: 500;
}

/* Mobile Filter Toggle */
.filter-toggle-btn {
  display: none;
  padding: 11px 20px;
  background: var(--color-dark);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  letter-spacing: 0.3px;
}
.filter-toggle-btn:active { transform: scale(0.98); }

/* ── Card Grid ─────────────────────────────── */
.spec-grid-section { background: #f6f5f2; }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 20px 0 72px;
}

/* System Card */
.system-card {
  background: #fff;
  border: 1px solid #eceae5;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.system-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(28, 38, 51, 0.09);
  border-color: #ded9d1;
}
.system-card:hover .card-image img { transform: scale(1.04); }

/* Card Image — two treatments:
   .is-render : manufacturer cutaway on pure white, contain-fit with padding
   .is-photo  : lifestyle photography, full-bleed cover */
.card-image {
  height: 210px;
  background: #fff;
  position: relative;
  border-bottom: 1px solid #f0eeea;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image img {
  transition: transform 0.35s ease;
}
.card-image.is-render img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 18px 22px;
}
.card-image.is-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card Body */
.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
  color: var(--color-dark);
}
.card-origin {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.card-origin .sep {
  color: #c9c6bf;
  margin: 0 5px;
  font-weight: 400;
}

/* Spec chip pills */
.card-specs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: auto;
}
.card-spec-chip {
  background: #f8f7f4;
  border: 1px solid #eceae5;
  border-radius: 100px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 500;
  color: #6d6a64;
  line-height: 1;
  white-space: nowrap;
}
.card-spec-chip strong {
  color: var(--color-dark);
  font-weight: 600;
}

.card-more {
  margin-top: 16px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s ease;
}
.system-card:hover .card-more { gap: 10px; }

/* Generic tag (modal reuse) */
.card-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 100px;
  background: #f8f7f4;
  border: 1px solid #eceae5;
  color: #6d6a64;
  line-height: 1;
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--color-grey-mid);
}
.no-results h3 {
  font-size: 1.1rem;
  color: var(--color-text-dark);
  margin-bottom: 8px;
}
.no-results p { margin: 0; }
.no-results button {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
}

/* ── Supporting sections ───────────────────── */
.spec-guide { background: #fff; padding: 72px 0; }
.spec-guide h2 { text-align: center; margin-bottom: 36px; }
.spec-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
  max-width: 880px;
  margin: 0 auto;
}
.spec-guide h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--color-dark);
}
.spec-guide h3::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: middle;
}
.spec-guide p {
  font-size: 14.5px;
  color: var(--color-text);
  margin: 0 0 22px;
  line-height: 1.7;
}

.spec-related { background: #f6f5f2; padding: 72px 0; }
.spec-related h2 { text-align: center; margin-bottom: 8px; }
.spec-related .spec-subtitle {
  text-align: center;
  color: var(--color-grey-mid);
  max-width: 680px;
  margin: 0 auto 32px;
}
.spec-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
}
.spec-related-card {
  background: #fff;
  border: 1px solid #eceae5;
  border-radius: 14px;
  padding: 20px 22px;
  text-decoration: none;
  color: var(--color-dark);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.spec-related-card:hover {
  border-color: #ded9d1;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(28, 38, 51, 0.07);
}
.spec-related-card h4 {
  margin: 0 0 4px;
  font-size: 15.5px;
}
.spec-related-card p {
  margin: 0;
  font-size: 13px;
  color: var(--color-grey-mid);
}
.spec-related-cta { text-align: center; margin-top: 36px; }

/* ── Modals ────────────────────────────────── */
.spec-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 38, 51, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.spec-modal-overlay.active { display: flex; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.spec-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 700px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #eceae5;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--color-grey-mid);
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
  line-height: 1;
}
.modal-close:hover {
  background: #f6f5f2;
  color: var(--color-dark);
}

/* Detail Modal */
.detail-header {
  display: flex;
  gap: 24px;
  padding: 32px 32px 0;
}
.detail-image {
  width: 200px;
  height: 200px;
  background: #fff;
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #eceae5;
}
.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-image.is-render img {
  object-fit: contain;
  padding: 14px;
}
.detail-info { flex: 1; padding-top: 4px; }
.detail-info h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--color-dark);
  line-height: 1.25;
}
.detail-origin {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Detail Body */
.detail-body { padding: 24px 32px 32px; }
.detail-description {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: 28px;
}
.detail-section { margin-bottom: 24px; }
.detail-section h4 {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #a5a19a;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0eeea;
}
.detail-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 6px 0;
}
.spec-row .label { color: var(--color-grey-mid); }
.spec-row .value {
  font-weight: 600;
  color: var(--color-dark);
}
.detail-opening-types {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.detail-quote {
  background: #f8f7f4;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.65;
  border-left: 3px solid var(--color-primary);
}

/* Detail Actions */
.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #f0eeea;
}
.detail-actions .btn {
  flex: 1;
  text-align: center;
  padding: 13px 20px;
  font-weight: 600;
  font-size: 0.88rem;
}

/* ── Lead Capture Modal ────────────────────── */
.lead-modal .spec-modal { max-width: 480px; }
.lead-form-content { padding: 36px 32px; }
.lead-form-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--color-dark);
}
.lead-field { margin-bottom: 18px; }
.lead-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-dark);
}
.lead-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e0db;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.lead-field input:focus {
  outline: none;
  border-color: var(--color-dark);
  box-shadow: 0 0 0 3px rgba(28, 38, 51, 0.07);
}
.lead-submit {
  width: 100%;
  padding: 13px;
  margin-top: 8px;
  font-size: 0.92rem;
}
.lead-privacy {
  font-size: 0.75rem;
  color: #a5a19a;
  margin-top: 16px;
  text-align: center;
  line-height: 1.5;
}
.lead-privacy a {
  color: var(--color-grey-mid);
  text-decoration: underline;
}

/* ── Spec Sheet Output Modal ───────────────── */
.spec-sheet-modal .spec-modal { max-width: 560px; }
.spec-sheet-content { padding: 36px 32px; }
.spec-sheet-header {
  text-align: center;
  border-bottom: 2px solid var(--color-dark);
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.spec-sheet-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-dark);
  margin: 0 0 4px;
}
.spec-sheet-header p {
  margin: 0;
  color: var(--color-grey-mid);
  font-size: 0.88rem;
}
.spec-sheet-header .date {
  font-size: 0.8rem;
  color: #a5a19a;
  margin-top: 4px;
}
.spec-sheet-section { margin-bottom: 20px; }
.spec-sheet-section h4 {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 700;
  color: #a5a19a;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0eeea;
}
.spec-sheet-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--color-text-dark);
}
.spec-sheet-row span:last-child {
  font-weight: 600;
  color: var(--color-dark);
}
.spec-sheet-footer {
  border-top: 1px solid #eceae5;
  padding-top: 20px;
  margin-top: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: #a5a19a;
  line-height: 1.6;
}
.spec-sheet-footer strong {
  color: var(--color-text-dark);
  display: block;
  font-size: 0.88rem;
}
.copy-btn {
  display: block;
  margin: 24px auto 0;
  padding: 11px 28px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.copy-btn.copied {
  background: #1e8e5a !important;
  border-color: #1e8e5a !important;
}

/* ── Responsive ────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-specs-grid { grid-template-columns: 1fr; }
  .spec-audience-grid { grid-template-columns: 1fr; max-width: 560px; }
  .spec-related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  .spec-hero { padding: 56px 0 40px; }
  .spec-hero .intro-text { font-size: 0.92rem; }
  .spec-guide-grid { grid-template-columns: 1fr; }
  .spec-related-grid { grid-template-columns: 1fr; }

  /* Collapsible filter panel */
  .filter-toggle-btn { display: block; }
  .spec-filters-inner {
    display: none;
    padding-top: 14px;
    flex-direction: column;
    align-items: stretch;
  }
  .spec-filters-inner.open { display: flex; }
  .filter-group {
    width: 100%;
    padding-bottom: 8px;
  }
  .spec-search {
    width: 100%;
    min-width: unset;
  }
  .spec-sort { width: 100%; }

  /* Single column grid */
  .spec-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0 48px;
  }

  /* Full-screen modals */
  .spec-modal-overlay { padding: 0; }
  .spec-modal {
    max-width: 100%;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .detail-header {
    flex-direction: column;
    padding: 24px 20px 0;
    gap: 16px;
  }
  .detail-image {
    width: 100%;
    height: 180px;
  }
  .detail-body { padding: 20px; }
  .detail-actions { flex-direction: column; }
  .lead-form-content { padding: 28px 20px; }
  .spec-sheet-content { padding: 28px 20px; }
  .lead-modal .spec-modal,
  .spec-sheet-modal .spec-modal { max-width: 100%; }
}


/* ── Qualifiers, size breakdowns and the lead form ───────────────────────
   Added with spec-tool-v3 (2026-10-04). Three jobs:
   1. .spec-note / .spec-cond carry the conditions that have to travel with
      every figure on this page — "from" U-values, "up to" Rw, and the fact
      that max width and max height are separate limits.
   2. .detail-specs-grid.is-wide gives the published size tables one column;
      labels like "Heavy duty — top hung projecting" do not fit two-up.
   3. .lead-hp hides the honeypot from people but not from bots, and
      .lead-error finally gives the lead form somewhere to show a failure.
      Before v3 the form could not fail: it discarded every lead and said
      thank you.                                                            */

.detail-specs-grid.is-wide { grid-template-columns: 1fr; }

.spec-note {
  font-size: 0.75rem;
  line-height: 1.55;
  color: #a5a19a;
  margin: 10px 0 0;
}
.spec-cond {
  font-style: normal;
  font-weight: 400;
  color: var(--color-grey-mid);
  font-size: 0.82em;
}
.spec-sheet-section .spec-note { margin-top: 8px; }

/* Honeypot: reachable by a bot, invisible and unfocusable for a person.
   display:none would stop some bots filling it, which defeats the trap. */
.lead-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-error {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fdf2f2;
  border: 1px solid #f3d4d4;
  color: #9b2c2c;
  font-size: 0.84rem;
  line-height: 1.5;
}

.lead-type {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}
.lead-type legend {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
  color: var(--color-text-dark);
}
.lead-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e2e0db;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--color-text-dark);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lead-field select:focus {
  outline: none;
  border-color: var(--color-dark);
  box-shadow: 0 0 0 3px rgba(28, 38, 51, 0.07);
}
