:root { --bg: #fff; --ink: #111; --muted: #666; --line: #e9e9e9; --radius: 14px; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

.site-header { display: grid; gap: 24px; padding: 32px 20px; border-bottom: 1px solid var(--line); }
.brand h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.02em; }
.brand .sub { margin: 0; color: var(--muted); }
.brand a { color: inherit; text-decoration-color: #bbb; }
.hero-media { border-radius: var(--radius); overflow: hidden; max-height: 260px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.02); }

.catalog { padding: 28px 20px 60px; display: grid; gap: 40px; max-width: 1200px; margin: 0 auto; }
.category { display: grid; gap: 18px; }
.category-header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.category-title { font-size: 22px; margin: 0; }
.category-note { color: var(--muted); font-family: "Space Mono", monospace; font-size: 12px; }

.section { display: grid; gap: 14px; }
.section-title { font-size: 16px; margin: 0; color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform .14s ease, box-shadow .14s ease; }
.card:focus-within, .card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.06); }
.thumb { aspect-ratio: 4/3; background: #f6f6f6; display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; will-change: transform; }
.card:focus-within .thumb img, .card:hover .thumb img { transform: scale(1.04); }
.meta { padding: 12px; display: grid; gap: 6px; }
.name { font-weight: 600; margin: 0; }
.tag { font-size: 12px; color: var(--muted); }

.callout { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,0.06); }
.callout h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.callout h3 { margin: 18px 0 8px; font-size: 14px; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; }
.callout p { margin: 0 0 10px; color: #000; }
.callout ul { margin: 8px 0 0 18px; padding: 0; }
.callout li { margin: 6px 0; }
.callout .cta-btn { display: inline-block; background: #111; color: #fff; padding: 10px 14px; border-radius: 10px; border: 1px solid #111; text-decoration: none; }
.callout .cta-btn.cta-green { background: #2bb24a; border-color: #2bb24a; color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.callout .cta-btn.cta-green:hover { background: #25a042; border-color: #25a042; }

.placeholder { padding: 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); background: #fafafa; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .nav { position: fixed; top: 50%; transform: translateY(-50%); font-size: 28px; color: #fff; background: rgba(0,0,0,.35); border: 1px solid #666; padding: 10px; border-radius: 40px; cursor: pointer; }
.lightbox .prev { left: 22px; }
.lightbox .next { right: 22px; }
.lightbox .close { position: fixed; top: 20px; right: 22px; font-size: 24px; color: #fff; background: rgba(0,0,0,.35); border: 1px solid #666; padding: 8px 12px; border-radius: 32px; cursor: pointer; }

/* ====== Before / After Slider ====== */
.ba {
  --pos: 50%;               /* posición inicial del corte */
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 8px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,.07);
  background: #eee;
}
.ba-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}
.ba-after {
  clip-path: polygon(0 0, var(--pos) 0, var(--pos) 100%, 0 100%);
}
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--pos) - 1px);
  width: 2px;
  background: #fff;
  border: none;
  cursor: ew-resize;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.ba-handle:after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 2px 0 rgba(0,0,0,.25), 0 0 0 3px #fff inset;
}

@media (min-width: 900px) {
  .site-header { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 40px 32px; }
  .catalog { padding: 36px 32px 80px; }
}

/* === Ajuste de separación respecto al header fijo === */
body {
  margin: 0;
  padding: 0;
}

.site-header {
  position: relative; /* si tu navbar es fija, cámbiala a fixed */
  z-index: 100;
}

.catalog {
  margin-top: 140px; /* ✅ separa el contenido de la cabecera */
}

@media (max-width: 768px) {
  .catalog {
    margin-top: 120px; /* menos espacio en móviles */
  }
}

/* === Paleta de colores para Hardie Trim === */
.palette-block {
  margin-top: 30px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.palette-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #333;
}

.palette-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.palette-image img:hover {
  transform: scale(1.03);
}
