/* =============================================================
   Bulón Ferretería — demo de ferretería / comercio (Yardak)
   Fondo claro de mostrador, azul eléctrico y etiquetas de precio amarillas
   (como las de las góndolas). Letra condensada fuerte (Roboto Condensed).
   ============================================================= */
:root {
  --fondo: #f4f5f7;
  --blanco: #ffffff;
  --tinta: #12161c;
  --mute: #5b6472;
  --azul: #1f4fff;
  --azul-2: #1438c9;
  --amarillo: #ffd84d;
  --verde: #12924b;
  --naranja: #e07b00;
  --rojo: #c8322b;
  --borde: rgba(18, 22, 28, .1);
  --borde-2: rgba(18, 22, 28, .2);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --titulos: "Roboto Condensed", "Arial Narrow", sans-serif;
  --letra: "Roboto", system-ui, sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;

  --k-acento: var(--azul);
  --k-acento-2: #5b7cff;
  --k-texto: var(--tinta);
  --k-mute: var(--mute);
  --k-superficie: var(--blanco);
  --k-borde: var(--borde);
  --k-titulos: var(--titulos);
  --k-radio: 12px;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.067, 1.099 24.3%, 1.108 26%, 1.101, 1.075 32.2%, 1.01 38.4%, .994, .987 45.4%, .991 53.2%, 1.001 66.9%, 1); }
}
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { font-family: var(--letra); font-size: 16px; line-height: 1.6; color: var(--tinta); background: var(--fondo); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
::selection { background: var(--amarillo); color: var(--tinta); }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; border-radius: 6px; }
.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.angosto { width: min(780px, 100% - 2.5rem); }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 999; padding: .6rem 1rem; background: var(--azul); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.demo-bar { background: var(--tinta); color: #fff; text-align: center; font-weight: 500; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding: .45rem 1rem; }

.titulo { font-family: var(--titulos); font-weight: 800; text-transform: uppercase; line-height: .92; letter-spacing: -.005em; font-size: clamp(2.4rem, 9.4vw, 5rem); margin-bottom: 1rem; }
.titulo .l1, .titulo .l2 { display: block; }
.titulo .l2 { color: var(--azul); }
.kicker { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--azul-2); margin-bottom: .9rem; }
.kicker::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--amarillo); box-shadow: inset 0 0 0 2px var(--tinta); }
.lead { font-size: 1.05rem; color: var(--mute); max-width: 62ch; margin-inline: auto; }
.sec-head { text-align: center; margin-bottom: 2.4rem; }
.izq { text-align: left; margin-inline: 0; }
.fine { font-size: .82rem; color: var(--mute); margin-top: .8rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .75rem 1.3rem; border-radius: 10px; font-family: var(--titulos); font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase;
  transition: transform .5s var(--spring), box-shadow .35s var(--ease), background-color .25s, border-color .25s, color .25s; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:active { transform: scale(.96); transition-duration: .12s; }
.btn-azul { background: var(--azul); color: #fff; box-shadow: 0 10px 24px -12px rgba(31, 79, 255, .8); }
.btn-line { border: 1.5px solid var(--borde-2); background: var(--blanco); }
.btn-wa { background: #25d366; color: #06210f; }
.btn-sm { min-height: 44px; padding: .45rem .95rem; font-size: .98rem; }
.btn-lg { min-height: 54px; padding: .9rem 1.5rem; font-size: 1.15rem; }
.btn-block { width: 100%; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn-azul:hover { background: var(--azul-2); }
  .btn-line:hover { border-color: var(--azul); color: var(--azul); }
}

.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--borde); }
.nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-family: var(--titulos); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; min-height: 44px; }
.brand small { font-size: .78rem; font-weight: 700; color: var(--mute); letter-spacing: .08em; }
.brand-ic { width: 32px; height: 32px; fill: var(--amarillo); stroke: var(--tinta); stroke-width: 3; stroke-linejoin: round; }
.nav-links { display: none; gap: 1.6rem; font-weight: 500; font-size: .95rem; color: var(--mute); }
.nav-links a { padding-block: .5rem; }
.nav-links a:hover { color: var(--azul); }

/* Inicio y buscador */
.hero { padding: 2.4rem 0 3.2rem; background: linear-gradient(180deg, var(--blanco), var(--fondo)); }
.hero-grid { display: grid; gap: 2.2rem; align-items: start; }
.hero-grid > * { min-width: 0; }
.hero .titulo { font-size: clamp(2.8rem, 12.6vw, 6.2rem); }
.hero-sub { font-size: 1.06rem; color: #3b4350; max-width: 54ch; margin-bottom: 1.3rem; }
.hero-sub strong { color: var(--tinta); }
.buscador { position: relative; }
.buscador svg { position: absolute; left: 1rem; top: 50%; width: 22px; height: 22px; margin-top: -11px; fill: none; stroke: var(--mute); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.buscador input { width: 100%; font: inherit; font-size: 17px; color: var(--tinta); background: var(--blanco); border: 2px solid var(--tinta); border-radius: 14px; padding: .95rem 1rem .95rem 3rem; min-height: 58px; box-shadow: 0 6px 0 var(--tinta); transition: box-shadow .2s, transform .2s; }
.buscador input:focus { outline: none; border-color: var(--azul); box-shadow: 0 6px 0 var(--azul); }
.rapidos { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0 .9rem; }
.rapidos button { min-height: 40px; padding: .35rem .85rem; border-radius: 999px; border: 1.5px solid var(--borde-2); background: var(--blanco); font-weight: 500; font-size: .9rem; }
.resultados { list-style: none; padding: 0; display: grid; gap: .5rem; }
.res { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "info precio" "stock boton"; align-items: center; gap: .4rem .8rem; padding: .75rem .85rem; border-radius: 12px; background: var(--blanco); border: 1px solid var(--borde); animation: aparece .3s var(--ease) backwards; }
.res:nth-child(2) { animation-delay: .03s; } .res:nth-child(3) { animation-delay: .06s; } .res:nth-child(n+4) { animation-delay: .09s; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } }
.res-info { grid-area: info; display: grid; min-width: 0; }
.res-info b { font-weight: 500; line-height: 1.3; }
.res-info small { color: var(--mute); font-size: .8rem; }
.res .etiqueta { grid-area: precio; }
.res .stock { grid-area: stock; }
.res .btn { grid-area: boton; }
.etiqueta { position: relative; display: inline-block; font-family: var(--titulos); font-weight: 800; font-size: 1.2rem; line-height: 1; padding: .35rem .6rem .35rem .85rem; background: var(--amarillo); color: var(--tinta); border-radius: 4px; clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); white-space: nowrap; justify-self: end; }
.stock { font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; justify-self: start; }
.st-hay { background: rgba(18, 146, 75, .12); color: var(--verde); }
.st-pocas { background: rgba(224, 123, 0, .14); color: #a75c00; }
.st-sin { background: rgba(200, 50, 43, .1); color: var(--rojo); }
.sin-resultados { margin-top: .6rem; color: var(--mute); }
.sin-resultados a { color: var(--azul); font-weight: 700; text-decoration: underline; }

/* Lo más pedido */
.top { background: var(--tinta); color: #fff; border-radius: 18px; padding: 1.2rem; box-shadow: 0 30px 60px -36px rgba(18, 22, 28, .7); }
.top-tit { font-family: var(--titulos); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; margin-bottom: .7rem; }
.top-lista { list-style: none; padding: 0; display: grid; gap: .45rem; }
.top-lista li { display: grid; grid-template-columns: 30px 1fr auto; gap: .7rem; align-items: center; padding: .6rem .7rem; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.top-n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--azul); font-family: var(--titulos); font-weight: 800; }
.top-info { display: grid; min-width: 0; }
.top-info b { font-weight: 500; font-size: .92rem; line-height: 1.3; }
.top-info small { color: #aab3c2; font-size: .78rem; }
.top-nota { font-size: .76rem; color: #aab3c2; margin-top: .7rem; }

.tira { overflow: hidden; background: var(--azul); color: #fff; padding: .65rem 0; }
.tira-track { display: flex; width: max-content; animation: tira 32s linear infinite; }
.tira span { font-family: var(--titulos); font-weight: 800; text-transform: uppercase; font-size: 1.4rem; padding-inline: 1.3rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 2.6rem; }
.tira span::after { content: ""; width: 12px; height: 12px; background: var(--amarillo); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); margin-left: 1.3rem; }
@keyframes tira { to { transform: translateX(-50%); } }

.section { padding: 4.2rem 0; }
.section-alt { background: var(--blanco); border-block: 1px solid var(--borde); }

.rubros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.rubro { display: grid; gap: .2rem; justify-items: start; text-align: left; padding: 1.1rem; border-radius: 14px; background: var(--blanco); border: 1px solid var(--borde); transition: transform .5s var(--spring), border-color .25s, box-shadow .3s; }
.rubro svg { width: 44px; height: 44px; padding: 9px; border-radius: 10px; background: rgba(31, 79, 255, .1); fill: none; stroke: var(--azul); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .4rem; }
.rubro b { font-family: var(--titulos); font-weight: 800; font-size: 1.3rem; text-transform: uppercase; line-height: 1.05; }
.rubro small { color: var(--mute); font-size: .82rem; }
.servicios { display: grid; gap: 1rem; }
.servicio { padding: 1.3rem; border-radius: 14px; border: 1.5px solid var(--tinta); background: var(--fondo); box-shadow: 0 5px 0 var(--tinta); }
.servicio b { display: inline-block; font-family: var(--titulos); font-weight: 800; font-size: .95rem; text-transform: uppercase; background: var(--amarillo); padding: .15rem .5rem; border-radius: 4px; margin-bottom: .6rem; }
.servicio h3 { font-family: var(--titulos); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; line-height: 1; margin-bottom: .35rem; }
.servicio p { color: var(--mute); }

/* Para el dueño */
.duenos { background: radial-gradient(60% 70% at 85% 40%, rgba(31, 79, 255, .08), transparent 70%); }
.duenos-grid { display: grid; gap: 2.2rem; align-items: center; }
.duenos-lista { list-style: none; padding: 0; display: grid; gap: .5rem; margin: 0 0 1.5rem; }
.duenos-lista li { position: relative; padding-left: 1.6rem; color: #3b4350; }
.duenos-lista li::before { content: ""; position: absolute; left: 0; top: .4em; width: 13px; height: 13px; border-radius: 3px; background: var(--amarillo); box-shadow: inset 0 0 0 2px var(--tinta); }
.vista-sis { background: var(--tinta); color: #fff; border-radius: 16px; padding: 1.1rem; transform: rotate(1deg); box-shadow: 0 30px 60px -30px rgba(18, 22, 28, .7); }
.vs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .8rem; }
.vs-kpis p { padding: .7rem; border-radius: 10px; background: rgba(255, 255, 255, .07); display: grid; }
.vs-kpis small { font-size: .76rem; color: #aab3c2; line-height: 1.2; }
.vs-kpis b { font-family: var(--titulos); font-weight: 800; font-size: clamp(1.05rem, 4vw, 1.4rem); white-space: nowrap; }
.vs-kpis .alerta b { color: var(--amarillo); }
.vs-barras { display: flex; align-items: end; gap: 4px; height: 90px; padding: .5rem; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.vs-barras span { flex: 1; height: var(--h); border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, #6f8dff, var(--azul)); }
.vs-barras span:last-child { background: var(--amarillo); }
.vs-pie { font-size: .76rem; color: #aab3c2; margin-top: .5rem; }

.k-faq summary { font-weight: 500; }
.k-contacto .titulo { margin: 0; }

.footer { padding: 2.2rem 0 7.5rem; color: var(--mute); font-size: .9rem; border-top: 1px solid var(--borde); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; }
.footer a { color: var(--azul); font-weight: 700; }

/* Pedido */
.pedido-barra { position: fixed; left: 1rem; right: 5.4rem; bottom: 1rem; z-index: 55; }
.pedido-barra.salta { animation: salta .5s var(--spring); }
@keyframes salta { 0% { transform: translateY(12px) scale(.96); } }
.pedido-abrir { width: 100%; min-height: 58px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "c t" "v v"; gap: 0 .6rem; align-items: center; padding: .5rem 1rem; border-radius: 14px; background: var(--azul); color: #fff; text-align: left; box-shadow: 0 16px 34px -12px rgba(31, 79, 255, .8); }
.pedido-abrir span { grid-area: c; font-size: .86rem; }
.pedido-abrir b { grid-area: t; font-family: var(--titulos); font-weight: 800; font-size: 1.35rem; }
.pedido-abrir em { grid-area: v; font-style: normal; font-weight: 700; font-size: .84rem; color: var(--amarillo); }
.hoja { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; }
.hoja-fondo { position: absolute; inset: 0; background: rgba(18, 22, 28, .6); }
.hoja-caja { position: relative; width: 100%; max-width: 540px; max-height: 90svh; overflow-y: auto; margin-inline: auto; padding: 1.4rem 1.2rem 1.2rem; background: var(--blanco); border-radius: 20px 20px 0 0; animation: sube .4s var(--ease); }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } }
.hoja-x { position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; color: var(--mute); }
.hoja-tit { font-family: var(--titulos); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; margin-bottom: .8rem; padding-right: 2.5rem; }
.pedido-lista { list-style: none; padding: 0; display: grid; gap: .45rem; margin-bottom: .8rem; }
.pedido-lista li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n n" "c p"; gap: .3rem .6rem; align-items: center; padding: .6rem .7rem; border-radius: 10px; background: var(--fondo); }
.pl-nombre { grid-area: n; font-size: .92rem; }
.pl-cant { grid-area: c; display: inline-flex; align-items: center; gap: .3rem; }
.pl-cant button { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--borde-2); background: var(--blanco); font-size: 1.2rem; font-weight: 700; }
.pl-cant button:disabled { opacity: .35; cursor: not-allowed; }
.pl-cant b { min-width: 2ch; text-align: center; font-family: var(--mono); }
.pl-precio { grid-area: p; font-family: var(--mono); font-weight: 500; }
.pedido-total { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem 0 1rem; border-top: 2px solid var(--tinta); }
.pedido-total b { font-family: var(--titulos); font-weight: 800; font-size: 1.7rem; }
.campo { display: grid; gap: .3rem; margin-bottom: .8rem; }
.campo label { font-weight: 700; font-size: .9rem; }
.campo input { font: inherit; font-size: 16px; color: var(--tinta); background: var(--blanco); border: 1.5px solid var(--borde-2); border-radius: 10px; padding: .7rem .9rem; min-height: 48px; }
.campo input:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(31, 79, 255, .18); }
.form-error { color: var(--rojo); font-size: .9rem; margin-bottom: .6rem; }

/* Asistente */
.chat-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--amarillo); border: 2px solid var(--tinta); box-shadow: 0 5px 0 var(--tinta); transition: transform .5s var(--spring); }
.chat-fab svg { width: 26px; height: 26px; fill: var(--tinta); }
.chat { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 70; max-height: min(620px, calc(100svh - 2rem)); display: flex; flex-direction: column; background: var(--blanco); border: 1.5px solid var(--tinta); border-radius: 16px; box-shadow: 0 40px 80px -30px rgba(18, 22, 28, .55); }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--borde); }
.chat-name { font-family: var(--titulos); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; }
.chat-status { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--mute); }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.chat-close { width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; min-height: 180px; }
.msg { max-width: 85%; padding: .7rem .95rem; border-radius: 14px; font-size: .95rem; line-height: 1.45; white-space: pre-line; }
.msg-bot { background: var(--fondo); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--azul); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-typing { color: var(--mute); font-style: italic; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem .8rem; }
.chat-suggest button { min-height: 40px; padding: .4rem .85rem; border-radius: 999px; border: 1.5px solid var(--borde-2); font-size: .86rem; }
.chat-form { display: flex; gap: .5rem; padding: .8rem 1.1rem; border-top: 1px solid var(--borde); }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--tinta); background: var(--fondo); border: 1.5px solid var(--borde-2); border-radius: 999px; padding: .7rem 1rem; }
.chat-form button { width: 46px; height: 46px; border-radius: 50%; background: var(--azul); color: #fff; font-weight: 800; flex-shrink: 0; }
.chat-wa { display: block; text-align: center; padding: .85rem; font-weight: 700; color: var(--azul); border-top: 1px solid var(--borde); }

@media (hover: hover) {
  .rubro:hover { transform: translateY(-4px); border-color: var(--azul); box-shadow: 0 16px 30px -20px rgba(31, 79, 255, .6); }
  .rapidos button:hover { border-color: var(--azul); color: var(--azul); }
  .chat-fab:hover { transform: translateY(-2px); }
}
@media (min-width: 560px) {
  .res { grid-template-columns: 1fr auto auto auto; grid-template-areas: "info stock precio boton"; }
  .rubros { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .servicios { grid-template-columns: repeat(2, 1fr); }
  .pedido-barra { left: auto; right: 5.4rem; width: 330px; }
}
@media (min-width: 640px) {
  .chat { left: auto; width: 380px; }
  .hoja { align-items: center; padding: 1rem; }
  .hoja-caja { border-radius: 20px; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .hero { padding: 4rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1.25fr .75fr; gap: 3rem; }
  .section { padding: 5.5rem 0; }
  .servicios { grid-template-columns: repeat(4, 1fr); }
  .duenos-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .top { margin-top: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tira-track, .res, .pedido-barra.salta, .hoja-caja { animation: none; }
}
