/* ==========================================================================
   Carpintería El Nogal — Style System
   Tipografía: Libre Baskerville (headings) + Raleway (body)
   Paleta: Café nogal #4E342E · Beige madera #D7CCC8 · Verde bosque #33691E
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --nogal: #4E342E;
  --nogal-light: #6D4C41;
  --nogal-dark: #3E2723;
  --beige: #D7CCC8;
  --beige-light: #EFEBE9;
  --beige-warm: #F5F0ED;
  --verde: #33691E;
  --verde-light: #558B2F;
  --verde-dark: #1B5E20;
  --blanco: #FDFBF9;
  --negro: #2C1810;
  --texto: #3E2723;
  --texto-light: #5D4037;
  --gris: #8D6E63;
  --sombra: rgba(78, 52, 46, .12);
  --sombra-fuerte: rgba(78, 52, 46, .22);
  --radio: 4px;
  --radio-lg: 8px;
  --transicion: .3s ease;
  --max-ancho: 1120px;
  --fuente-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --fuente-body: 'Raleway', 'Segoe UI', system-ui, sans-serif;
  --wood-grain: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 20px,
    rgba(78,52,46,.03) 20px,
    rgba(78,52,46,.03) 21px
  );
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fuente-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--nogal); text-decoration: none; transition: color var(--transicion); }
a:hover { color: var(--verde); }
a:focus-visible { outline: 2px solid var(--verde); outline-offset: 2px; border-radius: 2px; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fuente-display);
  color: var(--nogal);
  line-height: 1.25;
  font-weight: 700;
}

/* --- Utilities --- */
.contenedor {
  max-width: var(--max-ancho);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .contenedor { padding: 0 40px; }
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.seccion { padding: 60px 0; }
@media (min-width: 768px) { .seccion { padding: 80px 0; } }

/* --- Textura madera de fondo sutil --- */
.wood-bg {
  background-color: var(--beige-warm);
  background-image: var(--wood-grain);
}
.wood-dark-bg {
  background: linear-gradient(135deg, var(--nogal-dark) 0%, var(--nogal) 50%, var(--nogal-light) 100%);
  background-image:
    var(--wood-grain),
    linear-gradient(135deg, var(--nogal-dark) 0%, var(--nogal) 50%, var(--nogal-light) 100%);
  color: var(--beige-light);
}

/* ==========================================================================
   HEADER — Nav centrada clásica
   ========================================================================== */
.header {
  background-color: var(--beige-warm);
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(78,52,46,.02) 40px, rgba(78,52,46,.02) 41px),
    linear-gradient(180deg, rgba(255,255,255,.5) 0%, transparent 100%);
  border-bottom: 3px solid var(--nogal);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-ancho);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-brand img {
  width: 48px;
  height: 48px;
}
.header-brand span {
  font-family: var(--fuente-display);
  font-size: 1.25rem;
  color: var(--nogal);
  font-weight: 700;
}
/* Desktop nav */
.nav-links {
  display: none;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-links a {
  padding: 6px 14px;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: var(--radio);
  transition: background var(--transicion), color var(--transicion);
  color: var(--nogal);
}
.nav-links a:hover,
.nav-links a.activa {
  background: var(--nogal);
  color: var(--beige-light);
}

/* Hamburger */
.menu-toggle {
  background: none;
  border: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-self: flex-end;
  position: absolute;
  top: 18px;
  right: 20px;
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--nogal);
  border-radius: 2px;
  transition: transform var(--transicion), opacity var(--transicion);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 0;
  border-top: 1px solid rgba(78,52,46,.12);
}
.nav-mobile.abierto { display: flex; }
.nav-mobile a {
  padding: 10px 16px;
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radio);
  color: var(--nogal);
}
.nav-mobile a:hover,
.nav-mobile a.activa {
  background: var(--nogal);
  color: var(--beige-light);
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .nav-links { display: flex; }
  .nav-mobile { display: none !important; }
  .header-inner { padding: 16px 40px; gap: 10px; }
  .header-brand img { width: 56px; height: 56px; }
  .header-brand span { font-size: 1.4rem; }
}

/* ==========================================================================
   HERO — Veta de madera, serif elegante
   ========================================================================== */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      85deg,
      transparent,
      transparent 30px,
      rgba(78,52,46,.04) 30px,
      rgba(78,52,46,.04) 32px
    ),
    repeating-linear-gradient(
      95deg,
      transparent,
      transparent 50px,
      rgba(78,52,46,.02) 50px,
      rgba(78,52,46,.02) 52px
    ),
    linear-gradient(
      160deg,
      #D7CCC8 0%,
      #BCAAA4 20%,
      #A1887F 40%,
      #8D6E63 60%,
      #6D4C41 80%,
      #4E342E 100%
    );
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(255,255,255,.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(0,0,0,.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--beige-light);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
  line-height: 1.15;
}
.hero p {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--beige);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-badge {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .85rem;
  color: var(--beige-light);
  font-weight: 600;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radio);
  border: 2px solid transparent;
  transition: all var(--transicion);
  text-align: center;
  line-height: 1.3;
}
.btn-primario {
  background: var(--verde);
  color: #fff;
  border-color: var(--verde);
}
.btn-primario:hover {
  background: var(--verde-dark);
  border-color: var(--verde-dark);
  color: #fff;
}
.btn-secundario {
  background: transparent;
  color: var(--beige-light);
  border-color: var(--beige);
}
.btn-secundario:hover {
  background: var(--beige-light);
  color: var(--nogal);
}
.btn-nogal {
  background: var(--nogal);
  color: var(--beige-light);
  border-color: var(--nogal);
}
.btn-nogal:hover {
  background: var(--nogal-dark);
  border-color: var(--nogal-dark);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--nogal);
  border-color: var(--nogal);
}
.btn-outline:hover {
  background: var(--nogal);
  color: var(--beige-light);
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   SECCIONES — Catálogo, Nosotros, etc.
   ========================================================================== */
.seccion-titulo {
  text-align: center;
  margin-bottom: 48px;
}
.seccion-titulo h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}
.seccion-titulo h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--verde);
  margin: 12px auto 0;
  border-radius: 2px;
}
.seccion-titulo p {
  color: var(--texto-light);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Cards con marco de madera --- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 600px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--blanco);
  border: 3px solid var(--beige);
  border-radius: var(--radio-lg);
  overflow: hidden;
  transition: transform var(--transicion), box-shadow var(--transicion);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--nogal), var(--nogal-light), var(--nogal));
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--sombra);
}
.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--gris);
}
.card-body {
  padding: 20px;
}
.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.card-body p {
  font-size: .9rem;
  color: var(--texto-light);
  margin-bottom: 12px;
}
.card-precio {
  font-family: var(--fuente-display);
  font-size: 1.3rem;
  color: var(--verde);
  font-weight: 700;
  margin-bottom: 12px;
}
.card-precio small {
  font-size: .75rem;
  color: var(--gris);
  font-weight: 400;
}

/* Placeholder image backgrounds */
.placeholder-cocina {
  background: linear-gradient(135deg, #8D6E63 0%, #A1887F 40%, #D7CCC8 70%, #EFEBE9 100%);
}
.placeholder-closet {
  background: linear-gradient(145deg, #5D4037 0%, #795548 30%, #BCAAA4 70%, #D7CCC8 100%);
}
.placeholder-mesa {
  background: linear-gradient(120deg, #3E2723 0%, #6D4C41 40%, #A1887F 80%, #D7CCC8 100%);
}
.placeholder-librero {
  background: linear-gradient(160deg, #4E342E 0%, #8D6E63 50%, #BCAAA4 100%);
}
.placeholder-puerta {
  background: linear-gradient(135deg, #6D4C41 0%, #A1887F 50%, #D7CCC8 100%);
}
.placeholder-restauracion {
  background: linear-gradient(145deg, #33691E 0%, #558B2F 30%, #8D6E63 60%, #D7CCC8 100%);
}
.placeholder-deck {
  background: linear-gradient(170deg, #33691E 0%, #558B2F 20%, #8D6E63 50%, #D7CCC8 100%);
}
.placeholder-repisa {
  background: linear-gradient(135deg, #BCAAA4 0%, #8D6E63 50%, #5D4037 100%);
}
.placeholder-entretenimiento {
  background: linear-gradient(120deg, #4E342E 0%, #795548 40%, #A1887F 70%, #EFEBE9 100%);
}
.placeholder-barnizado {
  background: linear-gradient(135deg, #FFC107 0%, #FFB300 20%, #8D6E63 60%, #4E342E 100%);
}
.placeholder-hero {
  background:
    repeating-linear-gradient(85deg, transparent, transparent 30px, rgba(78,52,46,.06) 30px, rgba(78,52,46,.06) 32px),
    linear-gradient(160deg, #D7CCC8 0%, #A1887F 40%, #6D4C41 70%, #4E342E 100%);
}
.placeholder-galeria {
  background: linear-gradient(135deg, #4E342E, #8D6E63, #D7CCC8);
}
.placeholder-blog {
  background: linear-gradient(135deg, #33691E 0%, #6D4C41 50%, #D7CCC8 100%);
}
.placeholder-taller {
  background: linear-gradient(150deg, #3E2723 0%, #5D4037 30%, #8D6E63 60%, #BCAAA4 100%);
}
.placeholder-nosotros {
  background: linear-gradient(135deg, #33691E 0%, #4E342E 40%, #8D6E63 80%, #D7CCC8 100%);
}

/* ==========================================================================
   GALERÍA
   ========================================================================== */
.galeria-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) { .galeria-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .galeria-grid { grid-template-columns: repeat(3, 1fr); } }

.galeria-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radio-lg);
  border: 3px solid var(--beige);
  cursor: pointer;
  aspect-ratio: 4/3;
}
.galeria-item img,
.galeria-item .galeria-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.galeria-item:hover img,
.galeria-item:hover .galeria-placeholder {
  transform: scale(1.05);
}
.galeria-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(62,39,35,.85));
  color: var(--beige-light);
  font-size: .85rem;
  font-weight: 600;
  transform: translateY(100%);
  transition: transform var(--transicion);
}
.galeria-item:hover .galeria-caption,
.galeria-item:focus .galeria-caption {
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.9);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.activo { display: flex; }
.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
}
.lightbox-content img,
.lightbox-content .lightbox-placeholder {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radio-lg);
}
.lightbox-cerrar {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 8px;
}
.lightbox-caption {
  text-align: center;
  color: var(--beige);
  margin-top: 12px;
  font-size: .9rem;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 12px 16px;
  border-radius: var(--radio);
  cursor: pointer;
}
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }
@media (max-width: 768px) {
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}
.faq-item {
  border: 2px solid var(--beige);
  border-radius: var(--radio-lg);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transicion);
}
.faq-item:hover { border-color: var(--nogal-light); }
.faq-pregunta {
  width: 100%;
  background: var(--beige-warm);
  border: none;
  padding: 18px 20px;
  font-family: var(--fuente-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--nogal);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transicion);
}
.faq-pregunta:hover { background: var(--beige); }
.faq-pregunta::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--verde);
  transition: transform var(--transicion);
  flex-shrink: 0;
}
.faq-item.activo .faq-pregunta::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-respuesta {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
}
.faq-item.activo .faq-respuesta {
  max-height: 600px;
  padding: 0 20px 20px;
}
.faq-respuesta p {
  color: var(--texto-light);
  font-size: .95rem;
  line-height: 1.7;
}

/* ==========================================================================
   BLOG
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--blanco);
  border: 2px solid var(--beige);
  border-radius: var(--radio-lg);
  overflow: hidden;
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--sombra);
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.blog-card-body {
  padding: 20px;
}
.blog-card-body time {
  font-size: .8rem;
  color: var(--gris);
  display: block;
  margin-bottom: 8px;
}
.blog-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.blog-card-body h3 a { color: var(--nogal); }
.blog-card-body h3 a:hover { color: var(--verde); }
.blog-card-body p {
  font-size: .9rem;
  color: var(--texto-light);
  margin-bottom: 12px;
}
.blog-card-body .leer-mas {
  font-weight: 700;
  font-size: .9rem;
  color: var(--verde);
}

/* Artículo individual */
.articulo {
  max-width: 780px;
  margin: 0 auto;
}
.articulo h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 12px;
}
.articulo-meta {
  font-size: .85rem;
  color: var(--gris);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--beige);
}
.articulo-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radio-lg);
  margin-bottom: 32px;
  border: 3px solid var(--beige);
}
.articulo h2 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
}
.articulo h3 {
  font-size: 1.15rem;
  margin: 24px 0 12px;
}
.articulo p {
  margin-bottom: 16px;
  font-size: 1rem;
}
.articulo ul, .articulo ol {
  padding-left: 24px;
  margin-bottom: 16px;
  list-style: disc;
}
.articulo li {
  margin-bottom: 6px;
  font-size: .95rem;
}

/* ==========================================================================
   FORMULARIO DE CONTACTO
   ========================================================================== */
.form-contacto {
  max-width: 600px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: .9rem;
  color: var(--nogal);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--beige);
  border-radius: var(--radio);
  font-family: var(--fuente-body);
  font-size: 1rem;
  color: var(--texto);
  background: var(--blanco);
  transition: border-color var(--transicion), box-shadow var(--transicion);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(51,105,30,.12);
  outline: none;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group .error-msg {
  display: none;
  color: #c62828;
  font-size: .8rem;
  margin-top: 4px;
}
.form-group.error input,
.form-group.error textarea {
  border-color: #c62828;
}
.form-group.error .error-msg { display: block; }
.form-aviso {
  font-size: .8rem;
  color: var(--gris);
  margin-bottom: 20px;
}

/* ==========================================================================
   NOSOTROS — Craftsman layout
   ========================================================================== */
.nosotros-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 768px) { .nosotros-intro { grid-template-columns: 1fr 1fr; } }
.nosotros-texto h2 { margin-bottom: 16px; }
.nosotros-texto p { margin-bottom: 12px; color: var(--texto-light); }
.nosotros-img {
  aspect-ratio: 4/3;
  border-radius: var(--radio-lg);
  border: 4px solid var(--beige);
  object-fit: cover;
}
.valores-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 48px;
}
@media (min-width: 600px) { .valores-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .valores-grid { grid-template-columns: repeat(3, 1fr); } }
.valor-card {
  background: var(--beige-warm);
  padding: 28px 24px;
  border-radius: var(--radio-lg);
  border-left: 4px solid var(--verde);
  transition: transform var(--transicion);
}
.valor-card:hover { transform: translateY(-2px); }
.valor-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.valor-card p {
  font-size: .9rem;
  color: var(--texto-light);
}

/* ==========================================================================
   LEGAL PAGES
   ========================================================================== */
.legal-page { max-width: 780px; margin: 0 auto; }
.legal-page h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.legal-page .fecha { font-size: .85rem; color: var(--gris); margin-bottom: 32px; display: block; }
.legal-page h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.legal-page h3 { font-size: 1.1rem; margin: 20px 0 8px; }
.legal-page p { margin-bottom: 12px; }
.legal-page ul { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.legal-page li { margin-bottom: 6px; }
.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.legal-page th, .legal-page td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--beige);
  font-size: .9rem;
}
.legal-page th { background: var(--beige-warm); font-weight: 700; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--nogal-dark);
  color: var(--beige);
  padding: 48px 0 0;
}
.footer a { color: var(--beige); }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: var(--max-ancho);
  margin: 0 auto;
  padding: 0 20px 40px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); padding: 0 40px 40px; } }
.footer h4 {
  font-family: var(--fuente-display);
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 16px;
}
.footer p, .footer li { font-size: .9rem; line-height: 1.6; }
.footer ul li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 20px;
  text-align: center;
  font-size: .8rem;
}
.footer-legal {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.footer-redes {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.footer-redes a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  transition: background var(--transicion);
}
.footer-redes a:hover { background: var(--verde); }
.footer-redes svg { width: 18px; height: 18px; fill: #fff; }

/* ==========================================================================
   FLOATING BUTTONS — WhatsApp + Llamar
   ========================================================================== */
.flotantes {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 90;
}
.flotante-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  box-shadow: 0 4px 16px var(--sombra-fuerte);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.flotante-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px var(--sombra-fuerte);
}
.flotante-btn svg { width: 26px; height: 26px; }
.flotante-whatsapp { background: #25D366; }
.flotante-whatsapp svg { fill: #fff; }
.flotante-llamar { background: var(--verde); }
.flotante-llamar svg { fill: #fff; }

/* ==========================================================================
   COOKIE BANNER
   ========================================================================== */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--nogal-dark);
  color: var(--beige);
  padding: 16px 20px;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
.cookie-banner.visible { display: block; }
.cookie-inner {
  max-width: var(--max-ancho);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.cookie-inner p {
  flex: 1;
  font-size: .85rem;
  min-width: 200px;
}
.cookie-inner a { color: #fff; text-decoration: underline; }
.cookie-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cookie-btns button {
  padding: 8px 20px;
  border: 2px solid var(--beige);
  border-radius: var(--radio);
  font-weight: 700;
  font-size: .85rem;
  transition: all var(--transicion);
}
.btn-cookie-aceptar {
  background: var(--verde);
  color: #fff;
  border-color: var(--verde) !important;
}
.btn-cookie-aceptar:hover { background: var(--verde-dark); }
.btn-cookie-rechazar {
  background: transparent;
  color: var(--beige);
}
.btn-cookie-rechazar:hover { background: rgba(255,255,255,.1); }

/* ==========================================================================
   CHATBOT
   ========================================================================== */
.chat-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 95;
}
.chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--nogal);
  color: var(--beige-light);
  border: none;
  box-shadow: 0 4px 16px var(--sombra-fuerte);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transicion), background var(--transicion);
}
.chat-toggle:hover { transform: scale(1.1); background: var(--nogal-dark); }
.chat-toggle svg { width: 26px; height: 26px; fill: currentColor; }
.chat-window {
  display: none;
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 340px;
  max-height: 480px;
  background: var(--blanco);
  border: 2px solid var(--beige);
  border-radius: var(--radio-lg);
  box-shadow: 0 12px 40px var(--sombra-fuerte);
  flex-direction: column;
  overflow: hidden;
}
.chat-window.abierto { display: flex; }
.chat-header {
  background: var(--nogal);
  color: var(--beige-light);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header h4 { font-size: .95rem; font-family: var(--fuente-display); }
.chat-header-btns { display: flex; gap: 8px; }
.chat-header button {
  background: none;
  border: none;
  color: var(--beige);
  font-size: 1.1rem;
  padding: 2px 4px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
}
.chat-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: .88rem;
  line-height: 1.5;
  max-width: 85%;
}
.chat-msg.bot {
  background: var(--beige-warm);
  color: var(--texto);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--nogal);
  color: var(--beige-light);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg a { color: var(--verde); font-weight: 600; text-decoration: underline; }
.chat-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  border-top: 1px solid var(--beige);
}
.chat-quick-btn {
  padding: 6px 12px;
  background: var(--beige-warm);
  border: 1px solid var(--beige);
  border-radius: 16px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--nogal);
  transition: all var(--transicion);
}
.chat-quick-btn:hover {
  background: var(--nogal);
  color: var(--beige-light);
  border-color: var(--nogal);
}
.chat-input-area {
  display: flex;
  border-top: 1px solid var(--beige);
}
.chat-input-area input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-family: var(--fuente-body);
  font-size: .9rem;
  outline: none;
}
.chat-input-area button {
  background: var(--verde);
  color: #fff;
  border: none;
  padding: 12px 16px;
  font-weight: 700;
}
.chat-input-area button:hover { background: var(--verde-dark); }

/* ==========================================================================
   SEARCH
   ========================================================================== */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--beige);
  border-radius: var(--radio);
  font-family: var(--fuente-body);
  font-size: 1rem;
}
.search-bar input:focus {
  border-color: var(--verde);
  outline: none;
}
.search-bar button {
  padding: 12px 20px;
  background: var(--nogal);
  color: var(--beige-light);
  border: none;
  border-radius: var(--radio);
  font-weight: 700;
}

/* Filter tags */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.filtro-btn {
  padding: 8px 16px;
  border: 2px solid var(--beige);
  border-radius: 20px;
  background: var(--blanco);
  font-weight: 600;
  font-size: .85rem;
  color: var(--nogal);
  transition: all var(--transicion);
}
.filtro-btn.activo,
.filtro-btn:hover {
  background: var(--nogal);
  color: var(--beige-light);
  border-color: var(--nogal);
}

/* ==========================================================================
   404
   ========================================================================== */
.pagina-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.pagina-404 h1 {
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--beige);
  line-height: 1;
}
.pagina-404 h2 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-bottom: 16px;
}
.pagina-404 p {
  color: var(--texto-light);
  margin-bottom: 32px;
  max-width: 420px;
}

/* ==========================================================================
   COTIZADOR
   ========================================================================== */
.cotizador {
  background: var(--beige-warm);
  border: 2px solid var(--beige);
  border-radius: var(--radio-lg);
  padding: 32px 24px;
  max-width: 600px;
  margin: 32px auto 0;
}
.cotizador h3 { margin-bottom: 20px; text-align: center; }
.cotizador-resultado {
  margin-top: 20px;
  padding: 20px;
  background: var(--blanco);
  border: 2px solid var(--verde);
  border-radius: var(--radio);
  text-align: center;
  display: none;
}
.cotizador-resultado.visible { display: block; }
.cotizador-resultado .precio-estimado {
  font-family: var(--fuente-display);
  font-size: 2rem;
  color: var(--verde);
  font-weight: 700;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb {
  padding: 12px 0;
  font-size: .8rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb li::after { content: '/'; margin-left: 4px; color: var(--gris); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--gris); }
.breadcrumb a:hover { color: var(--nogal); }
.breadcrumb span { color: var(--nogal); font-weight: 600; }

/* ==========================================================================
   TABLA DE PRECIOS
   ========================================================================== */
.tabla-precios {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.tabla-precios th,
.tabla-precios td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--beige);
  font-size: .95rem;
}
.tabla-precios th {
  background: var(--nogal);
  color: var(--beige-light);
  font-family: var(--fuente-display);
  font-weight: 700;
}
.tabla-precios tr:hover { background: var(--beige-warm); }
.tabla-precios .precio-col {
  font-weight: 700;
  color: var(--verde);
  white-space: nowrap;
}

/* ==========================================================================
   MAPA
   ========================================================================== */
.mapa-wrapper {
  border: 3px solid var(--beige);
  border-radius: var(--radio-lg);
  overflow: hidden;
  margin-top: 32px;
}
.mapa-wrapper iframe {
  width: 100%;
  height: 300px;
  border: 0;
}
@media (min-width: 768px) { .mapa-wrapper iframe { height: 400px; } }

/* ==========================================================================
   CONFIGURAR COOKIES LINK
   ========================================================================== */
.config-cookies-link {
  cursor: pointer;
  text-decoration: underline;
  font-size: .85rem;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .header, .footer, .flotantes, .cookie-banner, .chat-widget { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
