:root {
  --cafe: #9c5a2a;
  --cafe-osc: #7d4520;
  --cafe-claro: #c98a55;
  --beige: #f7efe6;
  --beige-2: #efe2d3;
  --texto: #1f1b17;
  --suave: #5c544c;
  --linea: #e4d8cb;
  --oscuro: #2b2724;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(60, 35, 15, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; font-family: "Outfit", system-ui, sans-serif; color: var(--texto); background: #fff; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.contenedor { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cafe); color: #fff; border: 0; border-radius: 8px;
  padding: 12px 22px; font: 600 16px "Outfit", sans-serif; cursor: pointer;
  box-shadow: 0 4px 14px rgba(156, 90, 42, .35); transition: background .2s, transform .2s;
}
.btn:hover { background: var(--cafe-osc); transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-sm svg { width: 18px; height: 18px; }
.btn-lg { padding: 14px 30px; font-size: 18px; border-radius: 10px; }
.btn-borde { background: #fff; color: var(--cafe); border: 1.5px solid var(--cafe); box-shadow: none; }
.btn-borde:hover { background: var(--beige); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linea); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.marca { margin-right: auto; }
.marca img { height: 88px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav > a:not(.btn) { position: relative; padding: 6px 0; }
.nav > a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--cafe); transform: scaleX(0); transition: transform .2s; }
.nav > a:not(.btn):hover::after { transform: scaleX(1); }
.nav .btn { margin-left: 10px; }
.redes-top { display: flex; gap: 6px; margin-left: 18px; }
.redes-top a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--cafe); border: 1px solid var(--linea); transition: background .2s, color .2s; }
.redes-top a:hover { background: var(--cafe); color: #fff; border-color: var(--cafe); }
.redes-top svg { width: 19px; height: 19px; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--texto); margin: 5px 0; }

/* Hero */
.hero {
  min-height: 520px; display: flex; align-items: center; color: #fff;
  background: linear-gradient(90deg, rgba(25, 20, 15, .78) 0%, rgba(25, 20, 15, .45) 45%, rgba(25, 20, 15, .05) 75%), url("assets/hero.webp") center / cover;
}
.hero h1 { font-size: clamp(42px, 6vw, 72px); font-weight: 600; letter-spacing: -.5px; margin-bottom: 22px; }
.hero p { max-width: 470px; font-size: 19px; border-left: 2px solid rgba(255, 255, 255, .7); padding-left: 16px; margin: 0 0 30px; }

/* Cotizador */
#cotizar { position: relative; z-index: 2; margin-top: -40px; }
.cotiza { display: grid; grid-template-columns: 270px 1fr; background: linear-gradient(120deg, #fbf6f0, var(--beige-2)); border: 1px solid #fff; border-radius: 20px; box-shadow: var(--sombra); overflow: hidden; }
.cotiza-foto { background: url("assets/medida.webp") center / cover; clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%); }
.cotiza-cuerpo { padding: 28px 34px 22px 10px; }
.cotiza-titulo { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.icono-caja { display: grid; place-items: center; width: 54px; height: 54px; border: 2px solid var(--cafe); border-radius: 10px; color: var(--cafe); }
.icono-caja svg { width: 32px; height: 32px; }
.cotiza h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; }
.cotiza-titulo p { margin: 4px 0 0; color: var(--suave); }
.filas-cab, .fila { display: grid; grid-template-columns: 22px 1fr 1fr 2.4fr 92px 30px; gap: 10px; align-items: center; }
.filas-cab { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; padding-bottom: 6px; }
#filas { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.fila-num { font-weight: 600; color: var(--cafe); text-align: center; }
.fila-valor { font-weight: 600; text-align: right; font-size: 15px; white-space: nowrap; }
.fila-quitar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--linea); background: #fff; color: var(--suave); font-size: 18px; line-height: 1; cursor: pointer; }
.fila-quitar:hover { color: var(--cafe); border-color: var(--cafe); }
.campo { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--linea); border-radius: 8px; padding: 0 10px; height: 44px; color: var(--suave); }
.campo svg { width: 18px; height: 18px; }
.campo:focus-within { border-color: var(--cafe); box-shadow: 0 0 0 3px rgba(156, 90, 42, .15); }
.campo input, .campo select { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 400 15px "Outfit", sans-serif; color: var(--texto); height: 100%; }
.agregar { display: flex; align-items: center; gap: 14px; margin: 12px 0 18px; }
.btn-agregar { background: none; border: 1.5px dashed var(--cafe-claro); color: var(--cafe); border-radius: 8px; padding: 9px 16px; font: 600 15px "Outfit", sans-serif; cursor: pointer; }
.btn-agregar:hover { background: #fff; }
.btn-agregar:disabled { opacity: .45; cursor: default; }
#contador { font-size: 13px; color: var(--suave); }
.cotiza-pie { display: flex; align-items: center; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
.ppto { text-align: center; background: linear-gradient(135deg, #f5e3cf, #ecd2b4); border: 1px solid var(--cafe-claro); border-radius: 12px; padding: 10px 22px; min-width: 210px; }
.ppto-label { display: block; font-size: 13px; color: var(--suave); }
.ppto strong { font-size: 30px; color: var(--cafe-osc); }
.ppto-detalle { display: block; font-size: 12px; color: var(--suave); }
.ppto-detalle:empty { display: none; }
.btn.inactivo { opacity: .55; }
.nota { margin: 12px 0 0; text-align: right; font-size: 13px; color: var(--suave); }

/* Secciones */
.seccion { padding: 70px 0 50px; }
.titulo-seccion { text-align: center; margin-bottom: 30px; }
.titulo-seccion h2 { display: inline-flex; align-items: center; gap: 26px; font-size: clamp(28px, 3.4vw, 36px); font-weight: 600; }
.titulo-seccion h2::before, .titulo-seccion h2::after { content: ""; width: 70px; height: 1.5px; background: var(--cafe); }
.titulo-seccion p { margin: 8px 0 0; color: var(--suave); }

/* Productos */
.productos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.producto { position: relative; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); transition: transform .25s; }
.producto:hover { transform: translateY(-4px); }
.producto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.producto-info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .96); padding: 12px 14px; color: var(--cafe); }
.producto-info svg { width: 28px; height: 28px; }
.producto h3 { font-size: 17px; color: var(--texto); }
.producto p { margin: 2px 0 0; font-size: 13px; color: var(--suave); line-height: 1.3; }
.flecha { margin-left: auto; display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; background: var(--beige-2); font-size: 14px; }

/* Por qué elegirnos */
.porque { background: var(--beige); padding: 26px 0; }
.porque-in { display: grid; grid-template-columns: 1.1fr repeat(4, 1fr); gap: 0; align-items: center; }
.porque h2 { font-size: 26px; font-weight: 600; }
.beneficio { display: flex; gap: 12px; padding: 4px 22px; border-left: 1px solid var(--linea); }
.beneficio svg { width: 36px; height: 36px; color: var(--cafe); }
.beneficio h3 { font-size: 16px; }
.beneficio p { margin: 4px 0 0; font-size: 14px; color: var(--suave); line-height: 1.35; }

/* CTA */
.cta { color: #fff; padding: 34px 0; background: linear-gradient(90deg, rgba(43, 39, 36, .55), var(--oscuro) 40%), url("assets/cta.webp") left center / auto 100% no-repeat, var(--oscuro); }
.cta-in { display: flex; align-items: center; justify-content: flex-end; gap: 50px; }
.cta-in > div { border-right: 1px solid rgba(255, 255, 255, .25); padding-right: 50px; max-width: 520px; }
.cta h2 { font-size: 26px; font-weight: 600; }
.cta p { margin: 8px 0 0; color: #ddd3c9; }

/* Footer */
.footer { background: #1f1c1a; color: #e8e0d8; padding: 40px 0 0; }
.footer-in { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr .8fr; gap: 30px; }
.footer-in > div + div { border-left: 1px solid rgba(255, 255, 255, .15); padding-left: 30px; }
.footer-marca img { height: 110px; width: auto; }
.footer-marca p { font-size: 14px; color: #bdb3a9; margin: 12px 0 0; }
.footer h3 { font-size: 17px; margin-bottom: 14px; color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.footer li a, .ubic { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 0; }
.footer svg { width: 18px; height: 18px; }
.footer a:hover { color: var(--cafe-claro); }
.ubic small { color: #bdb3a9; font-size: 13px; }
.redes { display: flex; gap: 16px; }
.redes svg { width: 26px; height: 26px; }
.copy { text-align: center; font-size: 13px; color: #8f857c; border-top: 1px solid rgba(255, 255, 255, .1); margin: 34px 0 0; padding: 16px; }

.wa-flotante { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.wa-flotante svg { width: 30px; height: 30px; }

/* Responsive */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .productos { grid-template-columns: repeat(2, 1fr); }
  .porque-in { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .porque h2 { grid-column: 1 / -1; text-align: center; }
  .beneficio { border-left: 0; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .footer-in > div + div { border-left: 0; padding-left: 0; }
}
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .redes-top { margin-left: auto; margin-right: 6px; }
  .nav { position: absolute; top: 96px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--linea); padding: 8px 16px 16px; display: none; }
  .nav.abierto { display: flex; }
  .nav > a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--linea); }
  .nav .btn { margin: 14px 0 0; justify-content: center; }
  .cotiza { grid-template-columns: 1fr; }
  .cotiza-foto { height: 140px; clip-path: none; background-position: left center; }
  .cotiza-cuerpo { padding: 22px 18px; }
  .filas-cab { display: none; }
  #filas { max-height: none; overflow: visible; gap: 12px; }
  .fila { position: relative; grid-template-columns: 1fr 1fr; gap: 8px; background: rgba(255, 255, 255, .55); border: 1px solid var(--linea); border-radius: 10px; padding: 10px; }
  .fila-num { grid-column: 1 / -1; text-align: left; }
  .fila-num::before { content: "Cortina "; }
  .campo-ancho { grid-column: 1 / -1; }
  .fila-quitar { position: absolute; top: 6px; right: 6px; }
  .cotiza-pie { flex-direction: column; align-items: stretch; }
  .cotiza-pie .btn { justify-content: center; }
  .nota { text-align: center; }
  .cta-in { flex-direction: column; align-items: flex-start; gap: 20px; }
  .cta-in > div { border: 0; padding: 0; }
  .cta { background: var(--oscuro); }
}
@media (max-width: 600px) {
  .header-in { height: 76px; }
  .marca img { height: 68px; }
  .nav { top: 76px; }
  .hero { min-height: 460px; background-position: 70% center; }
  .hero p { font-size: 17px; }
  .cotiza-titulo { align-items: flex-start; }
  .icono-caja { display: none; }
  .productos { grid-template-columns: 1fr; }
  .porque-in { grid-template-columns: 1fr; }
  .titulo-seccion h2::before, .titulo-seccion h2::after { width: 24px; }
  .footer-in { grid-template-columns: 1fr; }
}
