/* Ferretera JM La Solucin  blanco / negro / amarillo */
:root {
  --negro: #0d0d0d;
  --amarillo: #ffd200;
  --amarillo-oscuro: #e6bc00;
  --blanco: #ffffff;
  --gris: #f4f4f2;
  --texto: #1a1a1a;
  --sombra: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radio: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(7.5rem + 16px);
}

body {
  margin: 0;
  font-family: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--texto);
  background: #f0f2f5;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  font-family: Oswald, "Segoe UI Semibold", "Helvetica Neue", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a {
  color: inherit;
}

.contenedor {
  width: min(1200px, 92%);
  margin-left: auto;
  margin-right: auto;
}

/* Barra superior tipo Tooldic (contacto rapido) */
.preheader {
  background: #111;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 2px solid var(--amarillo);
}

.preheader-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  padding: 0.5rem 0;
}

.preheader-tag {
  opacity: 0.9;
}

.preheader-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.preheader-a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--amarillo);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.preheader-a:hover {
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cabecera (clara, acorde a portada blanco / amarillo) */
.cabecera {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #fffbeb 42%,
    #ffe963 100%
  );
  border-bottom: 4px solid var(--negro);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.cabecera-inner {
  display: grid;
  grid-template-columns: auto minmax(12rem, 1fr) auto;
  grid-template-areas: "marca busqueda nav";
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 0.85rem 0;
}

.marca {
  grid-area: marca;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--negro);
}

.marca-logo-borde {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.marca-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.busqueda-cab {
  grid-area: busqueda;
  position: relative;
  display: flex;
  flex: 1;
  max-width: 420px;
  width: 100%;
  min-width: 0;
  border: 2px solid #e2e2e2;
  border-radius: 8px;
  overflow: hidden;
  background: var(--blanco);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.busqueda-cab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.busqueda-cab-input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  font-family: inherit;
  background: transparent;
}

.busqueda-cab-input:focus {
  outline: none;
}

.busqueda-cab:focus-within {
  border-color: var(--amarillo);
  box-shadow: 0 0 0 2px rgba(255, 210, 0, 0.35);
}

.busqueda-cab-btn {
  flex-shrink: 0;
  border: 0;
  padding: 0 1rem;
  background: var(--negro);
  color: var(--amarillo);
  font-weight: 800;
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.busqueda-cab-btn:hover {
  background: #222;
}

.marca-texto span {
  display: block;
  font-size: 0.92rem;
  opacity: 0.82;
  font-weight: 600;
  color: #2a2410;
}

.marca-texto strong {
  display: block;
  font-family: Oswald, sans-serif;
  font-size: 1.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .marca-texto span {
    display: none;
  }
}

.nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--negro);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 3px solid transparent;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  border-color: var(--negro);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.btn:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 2px;
}

.btn-amarillo {
  background: var(--amarillo);
  color: var(--negro);
}

.btn-amarillo:hover {
  background: var(--blanco);
  box-shadow: var(--sombra);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.92);
  color: var(--negro);
  border-color: var(--amarillo);
}

.btn-ghost:hover {
  background: var(--amarillo);
}

.btn-wa svg {
  flex-shrink: 0;
}

.cabecera .btn-amarillo {
  border: 2px solid var(--negro);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.cabecera .btn-amarillo:hover {
  box-shadow: var(--sombra);
}

.cabecera-bottom {
  background: #e05c0b;
  border-top: 2px solid var(--negro);
}

.cabecera-bottom-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.45rem 0;
}

.cat-pill {
  background: var(--negro);
  color: var(--amarillo);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
}

.subnav {
  display: flex;
  justify-content: center;
  gap: 0.85rem 1.5rem;
  flex-wrap: wrap;
}

.subnav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
}

.subnav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.promo-envio {
  background: var(--amarillo);
  color: var(--negro);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-align: center;
}

/* Hero / portada */
.hero {
  padding: 0;
  margin: 0;
  border-bottom: none;
}

.portada {
  margin: 0;
  padding: 0;
  background: var(--negro);
  line-height: 0;
}

.portada-imagen {
  width: 100%;
  height: auto;
  display: block;
}

/* Franja de valores (tipo iconos de confianza Tooldic) */
.valores-faja {
  background: linear-gradient(92deg, #090909 0%, #1c1c1c 45%, #090909 100%);
  border-top: 3px solid var(--amarillo);
  border-bottom: 3px solid var(--amarillo);
  padding: clamp(1rem, 3vw, 1.35rem) 0;
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.valor-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #fff;
}

.valor-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--amarillo);
  border-radius: 50%;
  background: rgba(255, 210, 0, 0.06);
  color: var(--amarillo);
}

.valor-tit {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Banners promocionales (categorias destacadas) */
.promos-bloque {
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
}

.grid-promos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.promo-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.45rem 1.35rem;
  min-height: 156px;
  border-radius: var(--radio);
  text-decoration: none;
  color: #fff;
  border: 2px solid rgba(255, 210, 0, 0.55);
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease;
}

.promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.promo-card--a {
  background: linear-gradient(142deg, #161616 0%, #2d2d2d 100%);
}

.promo-card--b {
  background: linear-gradient(142deg, #252010 0%, #3d3518 100%);
}

.promo-card--c {
  background: linear-gradient(142deg, #daa900 0%, var(--amarillo) 72%);
  color: var(--negro);
  border-color: var(--negro);
}

.promo-card--c .promo-link {
  color: var(--negro);
}

.promo-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}

.promo-tit {
  font-family: Oswald, sans-serif;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  margin: 0.4rem 0 auto;
  padding-bottom: 1rem;
  line-height: 1.2;
}

.promo-link {
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 820px) {
  .valores-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-promos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .valores-grid {
    grid-template-columns: 1fr;
  }
}

.portada-acciones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 700px) {
  .portada-acciones {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .portada-acciones {
    grid-template-columns: 1fr;
  }
}

.accion-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid var(--negro);
  border-radius: 10px;
  background: rgba(255, 210, 0, 0.22);
  color: var(--negro);
  transition:
    background 0.18s ease,
    transform 0.15s ease;
}

.accion-mini:hover {
  background: var(--amarillo);
}

.accion-mini:focus-visible {
  outline: 3px solid var(--negro);
  outline-offset: 2px;
}

.hero-post-portada {
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(2.75rem, 6vw, 4rem);
  background:
    radial-gradient(ellipse 140% 100% at 50% -20%, rgba(255, 210, 0, 0.4), transparent 55%),
    #f5f5f2;
  border-bottom: 4px dashed var(--negro);
}

.hero-texto {
  text-align: center;
}

.hero-badge {
  display: inline-block;
  margin: 0 auto 1rem;
  padding: 0.35rem 0.95rem;
  background: var(--negro);
  color: var(--amarillo);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.95rem);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.titulo-accento {
  color: var(--amarillo);
  text-shadow: 2px 2px 0 var(--negro);
}

.hero-lead {
  font-size: 1.105rem;
  margin: 0 auto 1.5rem;
  max-width: 44ch;
}

.hero-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0;
}

.hero-texto .hero-botones {
  justify-content: center;
}

article[id^="servicio-"] {
  scroll-margin-top: 1rem;
}

@media (max-width: 1024px) {
  .cabecera-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "marca nav"
      "busqueda busqueda";
  }

  .marca {
    grid-area: marca;
  }

  .busqueda-cab {
    grid-area: busqueda;
    max-width: none;
  }

  .nav {
    grid-area: nav;
    justify-content: flex-end;
  }
}

@media (max-width: 840px) {
  .cabecera-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "marca"
      "busqueda"
      "nav";
  }

  .marca {
    justify-content: center;
    text-align: center;
  }

  .marca-texto span {
    display: none;
  }

  .nav {
    justify-content: center;
  }

  .hero-lead {
    max-width: none;
  }

  .hero-botones {
    justify-content: center;
  }

  .hero-texto {
    text-align: center;
  }
}

/* Secciones */
.seccion {
  padding: clamp(2.75rem, 6vw, 4.25rem) 0;
}

.seccion-servicios {
  background: var(--blanco);
  box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.04);
}

.seccion-productos {
  background: #f7f8fa;
}

.seccion.alt {
  background: #eaecef;
}

.seccion-cab {
  margin-bottom: 2.25rem;
  text-align: center;
}

.seccion-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #666;
}

.seccion-title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0 0 0.65rem;
  text-transform: uppercase;
}

.lead-centro {
  text-align: center;
  margin: 0 auto 2.25rem;
  max-width: 52ch;
  font-size: 1.085rem;
  color: #333;
}

.grid-tres {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tarjeta {
  background: var(--blanco);
  border-radius: var(--radio);
  border: 1px solid #e0e0e0;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease;
}

.cat-grid .tarjeta:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.11);
}

.tarjeta-meta {
  margin: -0.2rem 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
}

.tarjeta-ico {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--amarillo);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  border: 2px solid var(--negro);
}

.tarjeta h3 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.tarjeta p {
  margin: 0;
  font-size: 0.965rem;
  color: #333;
}

.grid-productos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.producto-card {
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
  padding: 1.1rem 1rem;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
}

.producto-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
  background: var(--amarillo);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.producto-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.producto-card p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .grid-tres {
    grid-template-columns: 1fr;
  }

  .grid-productos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Contacto */
.contacto-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.caja-contacto {
  border-radius: var(--radio);
  border: 4px solid var(--negro);
  background: linear-gradient(165deg, #fff 0%, #fff8d4 100%);
  padding: 1.75rem 1.5rem;
}

.caja-contacto h2 {
  margin: 0 0 1rem;
  font-size: 1.65rem;
  text-transform: uppercase;
}

.lista-datos {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lista-datos li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
  font-size: 1rem;
}

.lista-datos li:last-child {
  border-bottom: 0;
}

.label {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #444;
  min-width: 6.5rem;
}

.horario ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.horario li {
  margin-bottom: 0.35rem;
}

.mapa-wrap {
  border-radius: var(--radio);
  border: 4px solid var(--negro);
  overflow: hidden;
  min-height: 320px;
  background: var(--gris);
  box-shadow: var(--sombra);
}

.mapa-wrap iframe {
  width: 100%;
  border: 0;
  height: clamp(260px, 45vw, 380px);
  display: block;
}

.redes-contacto {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 760px) {
  .contacto-inner {
    grid-template-columns: 1fr;
  }

  .lista-datos li {
    grid-template-columns: 1fr;
  }

  .label {
    margin-bottom: 0.25rem;
  }
}

/* Pie tipo tienda (columnas + barra legal) */
.pie {
  background: var(--negro);
  color: rgba(255, 255, 255, 0.9);
  padding: 2.5rem 0 5.75rem;
  font-size: 0.9rem;
}

.pie a {
  color: var(--amarillo);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.pie a:hover {
  opacity: 0.92;
}

.pie-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 2rem 2.5rem;
  padding-bottom: 2rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 210, 0, 0.22);
}

.pie-marca {
  margin: 0 0 0.5rem;
  font-family: Oswald, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amarillo);
  text-transform: uppercase;
}

.pie-texto {
  margin: 0;
  max-width: 34ch;
  line-height: 1.55;
  opacity: 0.9;
}

.pie-tit {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amarillo);
}

.pie-lista {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pie-lista li {
  margin-bottom: 0.45rem;
}

.pie-barra.pie-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.75;
  line-height: 1.45;
}

.pie-barra span {
  max-width: 48rem;
}

.pie-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 820px) {
  .cabecera-bottom-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .subnav {
    justify-content: center;
  }

  .pie-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pie-texto {
    max-width: none;
  }
}

/* Flotante WhatsApp */
.wa-flotante {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  background: #25d366;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  border: 3px solid #fff;
  transition: transform 0.15s ease;
}

.wa-flotante:hover {
  transform: scale(1.05);
}

.wa-flotante svg {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .grid-productos {
    grid-template-columns: 1fr;
  }

  .wa-flotante span {
    display: none;
  }

  .wa-flotante {
    padding: 0.85rem;
  }
}
