:root {
  color-scheme: light;
  --ink: #202628;
  --muted: #667071;
  --paper: #f3f1eb;
  --white: #ffffff;
  --copper: #a75f34;
  --copper-dark: #7d4324;
  --line: #d4d2ca;
  --slate: #384143;
  --focus: #1e5e73;
  --max: 88rem;
  --radius: 0.5rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}
body.dialog-open { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  transform: translateY(-180%);
  background: var(--white);
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  object-fit: contain;
}
nav { display: flex; gap: clamp(0.35rem, 2vw, 1.5rem); }
nav a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
nav a:hover { color: var(--ink); }

main { max-width: var(--max); margin: 0 auto; }
.catalog-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: end;
  padding: clamp(3rem, 8vw, 7.5rem) clamp(1rem, 3vw, 3rem) clamp(2.5rem, 5vw, 4rem);
}
.catalog-intro h1,
.installation h2,
.contact h2,
.error-page h1 {
  margin: 0;
  max-width: 14ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 8vw, 7.2rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.055em;
}
.catalog-intro > p {
  max-width: 32rem;
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}
.section-label {
  margin: 0 0 0.75rem;
  color: var(--copper-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.catalog-section {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3vw, 3rem) clamp(3rem, 6vw, 6rem);
}
.catalog-tools {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.catalog-tools h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: -0.035em; }
.result-count { margin: 0.25rem 0 0; color: var(--muted); }
.search-field { width: min(100%, 28rem); }
.search-field label { display: block; margin-bottom: 0.45rem; font-weight: 650; font-size: 0.9rem; }
.search-control { position: relative; }
.search-control svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  width: 1.25rem;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}
.search-control input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem 0.75rem 2.85rem;
  border: 1px solid #aaa9a3;
  border-radius: var(--radius);
  background: #fbfaf7;
  color: var(--ink);
}
.search-control input::placeholder { color: #777d7d; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
}
.product-card {
  appearance: none;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.product-card:hover { border-color: #8a8984; box-shadow: 0 0.8rem 2rem rgba(32, 38, 40, 0.1); }
.product-card:active { background: #f8f7f3; }
.product-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: #efefed;
  border-bottom: 1px solid var(--line);
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 7.25rem; padding: 0.9rem; }
.product-copy { min-width: 0; display: grid; gap: 0.35rem; }
.product-meta strong { overflow-wrap: anywhere; font-size: 0.95rem; letter-spacing: 0.01em; }
.product-title { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 0.82rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.product-meta svg { width: 1.25rem; flex: 0 0 auto; fill: none; stroke: var(--copper-dark); stroke-width: 1.8; }
.load-more {
  display: block;
  min-width: 12rem;
  min-height: 3rem;
  margin: 2rem auto 0;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-weight: 650;
}
.load-more:hover { background: var(--ink); color: var(--white); }
.status-panel { padding: 2rem; border: 1px dashed #aaa9a3; color: var(--muted); text-align: center; }

.installation {
  padding: clamp(4rem, 9vw, 9rem) clamp(1rem, 3vw, 3rem);
  background-image: linear-gradient(90deg, rgba(167,95,52,0.1) 1px, transparent 1px);
  background-size: 25% 100%;
}
.installation-heading { display: grid; grid-template-columns: 1.1fr 0.75fr; column-gap: clamp(2rem, 8vw, 9rem); }
.installation-heading .section-label { grid-column: 1 / -1; }
.installation h2 { font-size: clamp(2.5rem, 6vw, 5.2rem); }
.installation-heading > p { align-self: end; margin: 0 0 1rem; color: var(--muted); font-size: 1.05rem; }
.guide-download {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin-top: 0.4rem;
  color: var(--copper-dark);
  font-weight: 700;
  text-underline-offset: 0.25rem;
}
.guide-download svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.steps { list-style: none; margin: clamp(3rem, 7vw, 7rem) 0 0; padding: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.steps li > span { color: var(--copper-dark); font-family: Georgia, serif; font-size: 1.7rem; }
.steps h3, .care-notes h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.steps p, .care-notes p { margin: 0; color: var(--muted); }
.care-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 3rem; background: var(--line); border: 1px solid var(--line); }
.care-notes > div { background: var(--slate); color: var(--white); padding: clamp(1.25rem, 3vw, 2.25rem); }
.care-notes p { color: #dce0df; }

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(22rem, 1.1fr);
  gap: clamp(2.5rem, 8vw, 8rem);
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 3vw, 3rem);
  background: var(--slate);
  color: var(--white);
}
.contact .section-label { color: #e5b28f; }
.contact h2 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
.contact-heading > p:last-child { max-width: 34rem; margin: 1.5rem 0 0; color: #dce0df; font-size: 1.05rem; }
.contact-links { align-self: center; border-top: 1px solid rgba(255,255,255,0.24); }
.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.24);
  color: var(--white);
  text-decoration: none;
}
.contact-link span { color: #dce0df; }
.contact-link strong { min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: clamp(1rem, 2vw, 1.25rem); }
.contact-link:hover strong, .contact-link:focus-visible strong { color: #f2bc96; }
.contact-link-primary strong { color: #f2bc96; }
.legal-name { grid-column: 1 / -1; margin: 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.24); color: #dce0df; font-size: 0.9rem; }
.legal-name span { margin-right: 0.75rem; color: var(--white); font-weight: 700; }

footer { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1rem, 3vw, 3rem) 4rem; color: var(--muted); font-size: 0.9rem; }
footer p { margin: 0; max-width: 56rem; }
footer a { min-height: 2.75rem; white-space: nowrap; }

dialog {
  width: min(72rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2rem 5rem rgba(0,0,0,0.32);
}
dialog::backdrop { background: rgba(20, 25, 26, 0.75); backdrop-filter: blur(3px); }
.dialog-shell { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr); min-height: 34rem; }
.icon-button {
  position: absolute;
  z-index: 3;
  right: 1rem;
  top: 1rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}
.icon-button:hover { background: var(--paper); }
.icon-button svg { width: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dialog-gallery { display: flex; flex-direction: column; background: #ebeae6; min-width: 0; }
.dialog-gallery > img { width: 100%; flex: 1; min-height: 0; max-height: 70dvh; object-fit: contain; }
.dialog-thumbs { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.75rem; background: var(--white); border-top: 1px solid var(--line); }
.dialog-thumbs button { flex: 0 0 auto; width: 4.5rem; height: 4.5rem; padding: 0; border: 2px solid transparent; border-radius: 0.3rem; overflow: hidden; background: #eee; cursor: pointer; }
.dialog-thumbs button[aria-current="true"] { border-color: var(--copper-dark); }
.dialog-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dialog-info { align-self: start; max-height: calc(100dvh - 2rem); overflow-y: auto; padding: clamp(2rem, 4vw, 3.5rem); }
.dialog-info h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(2rem, 4vw, 3.8rem); letter-spacing: -0.04em; }
.dialog-info > p:not(.section-label) { color: var(--muted); }
.dialog-title { margin: 0.8rem 0 1.25rem; font-size: clamp(1.1rem, 2vw, 1.45rem); line-height: 1.25; }
.dialog-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0 0 1.25rem; padding: 1rem 0; border-block: 1px solid var(--line); font-size: 0.92rem; }
.dialog-facts dt { color: var(--muted); }
.dialog-facts dd { margin: 0; font-weight: 650; }
.dialog-bullets { display: grid; gap: 0.7rem; margin: 0; padding-left: 1.2rem; font-size: 0.92rem; }
.dialog-bullets li::marker { color: var(--copper-dark); }
.dialog-note { font-size: 0.82rem; }
.email-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  margin-top: 1rem;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius);
  background: var(--copper-dark);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}
.email-link:hover { background: #64361f; }
.email-link[aria-disabled="true"] { background: #a4a4a0; cursor: not-allowed; }
.dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.25rem; margin-top: 1rem; }
.dialog-actions .email-link { margin-top: 0; }
.text-link { min-height: 2.75rem; display: inline-flex; align-items: center; color: var(--copper-dark); font-weight: 700; text-underline-offset: 0.25rem; }
.email-note { font-size: 0.88rem; }

.error-page { display: grid; place-items: center; min-height: 100dvh; padding: 1.5rem; }
.error-page main { width: min(48rem, 100%); }
.error-page h1 { font-size: clamp(2.5rem, 8vw, 5rem); }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .installation-heading { grid-template-columns: 1fr; }
  .installation-heading > p, .guide-download { grid-column: 1; }
  .installation-heading > p { margin-top: 1.5rem; }
  .dialog-shell { grid-template-columns: 1fr; }
  .dialog-gallery > img { max-height: 55dvh; }
  .dialog-info { padding-top: 2rem; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { align-items: flex-start; }
  .brand { max-width: 12rem; line-height: 1.2; }
  nav { flex-direction: column; gap: 0; }
  nav a { justify-content: flex-end; min-height: 2.5rem; }
  .catalog-intro { padding-top: 3rem; }
  .catalog-intro h1 { font-size: clamp(3rem, 17vw, 5rem); }
  .catalog-tools { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-meta { min-height: 7.6rem; padding: 0.65rem; }
  .product-meta strong { font-size: 0.85rem; }
  .care-notes { grid-template-columns: 1fr; }
  .contact-link { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  .contact-link strong { text-align: left; }
  footer { flex-direction: column; }
  dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .dialog-shell { min-height: 100%; }
  .dialog-gallery > img { max-height: 50dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
