/* SIASA Costa Rica — estilos del sitio */

:root {
  --paper: #F3F1EC;
  --white: #FFFFFF;
  --photo: #F4F4F4;
  --ink: #141414;
  --ink-2: #3A3A38;
  --muted: #6E6C66;
  --rule: #D9D5CC;
  --rule-dark: #2A2A2A;
  --orange: #FF6600;
  --orange-dark: #D95500;
  --max: 1240px;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --head: "Archivo", "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 700px) { .wrap { padding: 0 16px; } }

.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 15px/1 var(--sans);
  padding: 15px 22px; border: 1.5px solid var(--ink); border-radius: 3px;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-black { background: var(--ink); color: #fff; }
.btn-black:hover { background: var(--orange); border-color: var(--orange); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn svg { width: 16px; height: 16px; }

.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.link-arrow:hover { color: var(--orange); border-color: var(--orange); }

/* ---------- Barra superior y encabezado ---------- */
.topbar { background: var(--ink); color: #BDBAB2; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; height: 38px; align-items: center; }
.topbar a { text-decoration: none; color: #fff; }
.topbar a:hover { color: var(--orange); }
.topbar .right { display: flex; gap: 22px; }
@media (max-width: 760px) { .topbar .left { display: none; } .topbar .wrap { justify-content: center; } }

.site-header { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 120px; transition: height .25s ease; }
.brand img { height: 84px; width: auto; mix-blend-mode: multiply; transition: height .25s ease; }
/* Al bajar, el encabezado se compacta para no tapar el contenido */
.site-header.compacto .wrap { height: 78px; }
.site-header.compacto .brand img { height: 56px; }
@media (max-width: 860px) {
  .site-header .wrap { height: 110px; }
  .brand img { height: 84px; }
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--orange); }
.nav .btn { padding: 12px 18px; }
.menu-btn { display: none; background: none; border: 1.5px solid var(--ink); border-radius: 3px; width: 44px; height: 44px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: grid; place-items: center; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px 16px 20px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: 16px; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: end; }
.hero h1 { font-size: clamp(42px, 6.4vw, 88px); }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .sub { font-size: 19px; color: var(--ink-2); max-width: 560px; margin: 28px 0 36px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { position: relative; background: var(--photo); aspect-ratio: 1 / 1.05; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.hero-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between;
  padding: 14px 18px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 13px;
}
.hero-photo figcaption span:last-child { color: var(--orange); }
@media (max-width: 900px) {
  .hero { padding-top: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { aspect-ratio: 4 / 3; }
}

/* Franja de datos */
.facts { margin-top: 72px; border-top: 1.5px solid var(--ink); display: grid; grid-template-columns: repeat(4, 1fr); }
.facts div { padding: 22px 24px 26px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.facts strong { display: block; font-family: var(--head); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.facts span { font-size: 14px; color: var(--muted); }
@media (max-width: 800px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .facts div, .facts div + div { padding-right: 12px; }
  .facts strong { font-size: 23px; line-height: 1.15; }
}

/* ---------- Secciones ---------- */
.section { padding: 110px 0; }
.section.tight { padding-top: 0; }
@media (max-width: 700px) { .section { padding: 72px 0; } }
.sec-top { display: grid; grid-template-columns: 220px 1fr auto; gap: 32px; align-items: end; padding-bottom: 28px; border-bottom: 1.5px solid var(--ink); margin-bottom: 40px; }
.sec-top h2 { font-size: clamp(32px, 4.2vw, 56px); max-width: 760px; }
@media (max-width: 900px) { .sec-top { grid-template-columns: 1fr; gap: 14px; } }

.dark { background: var(--ink); color: #EDEBE6; }
.dark .label { color: #8F8C85; }
.dark .sec-top { border-color: #EDEBE6; }

/* ---------- Categorías ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.cat {
  display: grid; grid-template-columns: 1fr 140px; gap: 16px; align-items: center;
  padding: 26px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  text-decoration: none; background: var(--paper); transition: background .15s;
}
.cat:hover { background: var(--white); }
.cat:hover h3 { color: var(--orange); }
.cat h3 { font-size: 24px; margin: 6px 0 8px; transition: color .15s; }
.cat p { font-size: 14px; color: var(--muted); }
.cat .thumb { background: var(--photo); aspect-ratio: 1; }
.cat .thumb img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 1000px) { .cats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cats { grid-template-columns: 1fr; } .cat { grid-template-columns: 1fr 110px; } }

/* ---------- Tarjetas de producto ---------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 24px; }
@media (max-width: 1100px) { .grid-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid-products { grid-template-columns: repeat(2, 1fr); gap: 32px 14px; } }
.card { text-decoration: none; display: flex; flex-direction: column; }
.card .ph { background: var(--photo); aspect-ratio: 1; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card:hover .ph img { transform: scale(1.04); }
.card .meta { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 4px; }
.card h3 { font-size: 21px; letter-spacing: -0.02em; }
.card:hover h3 { color: var(--orange); }
.card p { font-size: 14.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 760px) { .card h3 { font-size: 17px; } .card p { font-size: 13.5px; } }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.svc-list { list-style: none; }
.svc-list li { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 26px 0; border-top: 1px solid var(--rule-dark); }
.svc-list li:last-child { border-bottom: 1px solid var(--rule-dark); }
.svc-list .n { font-family: var(--mono); color: var(--orange); font-size: 14px; padding-top: 6px; }
.svc-list h3 { font-size: 26px; margin-bottom: 8px; }
.svc-list p { color: #B5B2AA; font-size: 16px; }
.svc-photo { position: sticky; top: 110px; }
.svc-photo img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.svc-photo p { margin-top: 16px; font-size: 15px; color: #B5B2AA; }
.also { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 32px; font-size: 15px; }
.also span::before { content: "— "; color: var(--orange); }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; gap: 40px; } .svc-photo { position: static; } }

/* ---------- Marcas ---------- */
.brands-img { width: 100%; max-width: 1080px; margin: 0 auto; mix-blend-mode: multiply; filter: grayscale(1); opacity: .85; transition: filter .3s, opacity .3s; }
.brands-img:hover { filter: none; opacity: 1; }

/* ---------- Nosotros ---------- */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; }
.about .big { font-family: var(--head); font-size: clamp(26px, 2.8vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.about .big mark { background: none; color: var(--orange); }
.about .body { color: var(--ink-2); margin-top: 24px; max-width: 620px; }
.mv dt { margin-top: 28px; }
.mv dt:first-child { margin-top: 0; }
.mv dd { margin-top: 8px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 72px; }
.contact-list { list-style: none; }
.contact-list li { padding: 20px 0; border-top: 1px solid var(--rule); }
.contact-list li:last-child { border-bottom: 1px solid var(--rule); }
.contact-list a { display: block; font-family: var(--head); font-weight: 700; font-size: 24px; text-decoration: none; letter-spacing: -0.02em; margin-top: 4px; }
.contact-list a:hover { color: var(--orange); }
.contact-list small { display: block; color: var(--muted); font-size: 14px; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.field { display: flex; flex-direction: column; margin-bottom: 22px; }
.field label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  font: 17px var(--sans); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; padding: 10px 0;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23141414' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") right 4px center no-repeat; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.form-note { font-size: 14px; color: var(--muted); margin-top: 14px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 48px; } }
@media (max-width: 560px) { form .row { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #A9A69E; font-size: 15px; padding: 72px 0 28px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.foot-logo { display: inline-block; background: #fff; padding: 10px 14px; margin-bottom: 18px; }
.foot-logo img { height: 68px; }
.disclaimer { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule-dark); font-size: 12.5px; line-height: 1.7; max-width: 980px; }
.copy { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px;
  background: #1FAF55; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
  border-radius: 40px; box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.wa-float:hover { background: #17964A; }
.wa-float svg { width: 22px; height: 22px; }
@media (max-width: 560px) { .wa-float span { display: none; } .wa-float { padding: 14px; } }

/* ---------- Catálogo ---------- */
.page-head { padding: 56px 0 36px; border-bottom: 1.5px solid var(--ink); }
.page-head h1 { font-size: clamp(40px, 5.6vw, 76px); }
.page-head p { color: var(--ink-2); font-size: 18px; max-width: 680px; margin-top: 18px; }
.crumbs { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--orange); }

.toolbar { position: sticky; top: 78px; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); }
.toolbar .wrap { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  font: 500 14px var(--sans); white-space: nowrap; cursor: pointer;
  padding: 9px 14px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; color: var(--ink);
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters button sup { font-family: var(--mono); font-size: 11px; margin-left: 4px; opacity: .6; }
.search { position: relative; flex: none; width: 240px; }
.search input { width: 100%; font: 15px var(--sans); padding: 9px 12px 9px 34px; border: 1px solid var(--rule); border-radius: 3px; background: var(--white); }
.search input:focus { outline: none; border-color: var(--ink); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
@media (max-width: 800px) {
  .toolbar { top: 78px; }
  .toolbar .wrap { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .search { width: 100%; }
}
.cat-block { padding-top: 56px; scroll-margin-top: 160px; }
.cat-block h2 { font-size: 30px; display: flex; align-items: baseline; gap: 12px; padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
.cat-block h2 .label { font-size: 13px; }
.empty { padding: 80px 0; text-align: center; color: var(--muted); }

/* ---------- Ficha de producto ---------- */
.pdp { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; padding: 40px 0 96px; }
.pdp .ph { background: var(--photo); aspect-ratio: 1; position: sticky; top: 100px; }
.pdp .ph img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.pdp h1 { font-size: clamp(38px, 4.8vw, 64px); margin: 10px 0 18px; }
.pdp .lead { font-size: 20px; color: var(--ink-2); }
.pdp .desc { margin-top: 18px; color: var(--ink-2); }
.specs { width: 100%; border-collapse: collapse; margin-top: 36px; }
.specs th, .specs td { text-align: left; padding: 13px 0; border-top: 1px solid var(--rule); vertical-align: top; font-size: 15.5px; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 1px solid var(--rule); }
.specs th { font-family: var(--mono); font-weight: 400; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); width: 38%; padding-right: 16px; padding-top: 16px; }
.pdp .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.pdp .incl { margin-top: 36px; padding: 22px 24px; background: var(--white); border-left: 3px solid var(--orange); font-size: 15px; color: var(--ink-2); }
.pdp .incl strong { color: var(--ink); }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; } .pdp .ph { position: static; } }

/* Aparición suave */
.fade { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.fade.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }
