:root {
  --brand-h: 0px;
  /* se actualizará con JS si hay .brand-band */
}

:root {
  --top-h: 64px;
  --head-h: 96px;
  --head-h-shrink: 68px;

  --red: #b80000;
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-100: #f6f6f6;
  --gray-200: #ececec;
  --header-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

/* Reset */
* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #222;
  background: var(--red);
  line-height: 1.6;
  padding-top: calc(var(--top-h) + var(--head-h));
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: calc(var(--top-h) + var(--head-h) + 12px)
}

/* ===== Top header ===== */
.top-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--top-h);
  background: #000;
  color: #fff;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.top-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.th-info {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center
}

.th-info span {
  white-space: nowrap
}

.th-social {
  display: flex;
  gap: 16px;
  align-items: center
}

.th-social img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1)
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  inset: var(--top-h) 0 auto 0;
  height: var(--head-h);
  background: #fff;
  color: #000;
  box-shadow: var(--header-shadow);
  transition: height .3s ease;
  z-index: 999;
}

.site-header.shrink {
  height: var(--head-h-shrink)
}

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

/* Logo: sin deformar */
.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  max-height: 72px;
  /* alto máximo visible */
  width: auto;
  /* mantiene proporción */
  height: auto;
  /* evita estirar */
  object-fit: contain;
  transition: max-height .3s ease;
}

.site-header.shrink .brand-logo {
  max-height: 56px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px
}

.nav a {
  text-decoration: none;
  color: #000;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase
}

.nav-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: 0;
  cursor: pointer
}

/* ===== Mobile header / top header ===== */
@media (max-width:960px) {
  :root {
    --top-h: 108px;
    --head-h: 78px;
    --head-h-shrink: 60px;
  }

  .top-header__inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px 14px;
    padding-inline: max(18px, env(safe-area-inset-left)), max(18px, env(safe-area-inset-right));
  }

  .th-info {
    gap: 6px 14px;
    flex-wrap: wrap
  }

  .th-info span {
    display: block;
    line-height: 1.28;
    white-space: normal;
    word-break: break-word
  }

  .th-social {
    align-self: stretch;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2px
  }

  .th-social a {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    display: inline-flex;
    align-items: center;
    justify-content: center
  }

  .th-social img {
    width: 22px;
    height: 22px
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: calc(var(--top-h) + var(--head-h));
    background: #fff;
    flex-direction: column;
    padding: 24px;
    gap: 12px;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }

  .site-header.shrink .nav {
    top: calc(var(--top-h) + var(--head-h-shrink))
  }

  .nav.is-open {
    opacity: 1;
    pointer-events: auto
  }

  .nav a {
    font-size: 18px;
    padding: 12px 4px
  }

  .nav-toggle {
    display: inline-flex;
    z-index: 2100;
    padding: 8px;
    margin-right: -8px
  }
}

body.menu-open {
  overflow: hidden
}

/* ===== Hero ===== */
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--top-h) - var(--head-h) - var(--brand-h));
  min-height: 560px;
  background: #fff;
}

@media (max-width:960px) {
  .hero {
    height: calc(100vh - var(--top-h) - var(--head-h) - var(--brand-h));
    min-height: 520px;
  }
}

.swiper {
  height: 100%
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .55));
  z-index: 1;
}

.slide-caption {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 0 24px;
  color: #fff;
  width: min(1100px, 92vw);
}

.slide-caption h1 {
  font-family: "Anton", sans-serif;
  font-size: clamp(26px, 5vw, 56px);
  margin: 0 0 8px;
  color: var(--red);
}

.slide-caption p {
  font-size: clamp(14px, 2vw, 20px);
  margin: 0 0 14px;
  color: #fff
}

.btn-primary {
  display: inline-block;
  padding: 10px 18px;
  background: #fff;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none
}

/* ===== Brand band ===== */
.brand-band {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  padding: 24px 16px
}

.milwaukee-wordmark {
  width: min(88%, 300px);
  display: block
}

/* ===== Servicios ===== */
#servicios {
  padding: 56px 20px;
  background: var(--red)
}

.section-title {
  text-align: center;
  font-family: "Anton", sans-serif;
  font-size: clamp(26px, 4vw, 40px);
  color: #fff;
  margin-bottom: 26px;
  text-transform: uppercase
}

.services-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, 1fr)
}

@media (max-width:1000px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:640px) {
  .services-grid {
    grid-template-columns: 1fr
  }
}

.service-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 26px 22px 34px;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .10), 0 2px 6px rgba(0, 0, 0, .06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  min-height: 320px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.service-card:hover {
  transform: translateY(-6px) scale(1.02)
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .5px
}

.service-card p {
  margin: 0 auto 18px;
  color: #444;
  font-size: 15px;
  line-height: 1.55;
  max-width: 95%
}

.service-card .btn-more {
  margin: 0 auto;
  background: #0a0a0a;
  color: #fff;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none
}

.service-card .wm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  width: clamp(160px, 42%, 240px);
  height: clamp(160px, 42%, 240px);
  opacity: .10;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

/* ===== Modal servicios ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 24px
}

.modal.is-open {
  display: flex
}

.modal-box {
  position: relative;
  width: min(1100px, 96vw);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35)
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  height: 100%
}

@media (max-width:860px) {
  .modal-grid {
    grid-template-columns: 1fr
  }

  .modal-media {
    height: 40vh
  }
}

.modal-media {
  background: #f6f6f6;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  min-height: 320px
}

.modal-body {
  padding: clamp(18px, 2.5vw, 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px
}

.modal-title {
  font-family: "Anton", sans-serif;
  color: var(--red);
  font-size: clamp(24px, 3.2vw, 36px);
  margin: 0 0 12px
}

.modal-content {
  color: #222;
  font-size: 16px;
  line-height: 1.6;
  text-align: justify
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .06);
  color: #333;
  cursor: pointer
}

/* ===== Productos ===== */
#productos {
  background: #fff;
  padding: 20px 0 40px
}

.titulo-productos {
  text-align: center;
  font-size: 32px;
  color: #c92020;
  margin: 40px 0 30px;
  font-weight: 700
}

.producto-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
  color: #333;
  margin-bottom: 24px
}

.btn-whatsapp {
  display: inline-block;
  padding: 10px 20px;
  background: #25d366;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none
}

.productos-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: nowrap;
}

.filtro-lateral {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.buscador-productos {
  margin-bottom: 6px
}

.buscador-productos input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ddd
}

.subtitulo-filtro {
  font-weight: 700;
  color: #c92020
}

.filtro-btn {
  padding: 10px 15px;
  background: #f5f5f5;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left
}

.filtro-btn.active {
  background: #c92020;
  color: #fff
}

.lista-productos {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px
}

@media (min-width:1100px) {
  .lista-productos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.producto-card {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
  text-align: center;
  cursor: pointer;
  transition: transform .2s
}

.producto-card:hover {
  transform: translateY(-4px)
}

.producto-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 10px
}

.producto-card h4 {
  margin-top: 10px;
  font-weight: 600;
  font-size: 18px;
  color: #1e1e1e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

@media (max-width:900px) {
  .productos-container {
    flex-direction: column;
    gap: 18px
  }

  .filtro-lateral {
    flex: 0 0 auto;
    width: 100%
  }

  .lista-productos {
    width: 100%
  }
}

@media (max-width:640px) {
  .lista-productos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px
  }

  .producto-card img {
    height: 150px
  }
}

/* ===== Contacto ===== */
#contacto {
  padding: 56px 20px;
  background: var(--red)
}

.contact-title {
  text-align: center;
  font-family: "Anton", sans-serif;
  font-size: clamp(26px, 4vw, 40px);
  color: #fff;
  margin-bottom: 26px;
  text-transform: uppercase
}

.contact-wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width:900px) {
  .contact-wrap {
    grid-template-columns: 1fr 1fr
  }
}

.contact-form {
  background: #fff;
  padding: 22px;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12)
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 15px
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical
}

.contact-form button {
  background: #b80000;
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer
}

.contact-form button:hover {
  background: #c40000
}

.map-box iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12)
}

/* ===== WhatsApp FAB ===== */
.whatsapp-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 8px
}

.whatsapp-text {
  background: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .2s, transform .2s
}

.whatsapp-button {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none
}

.whatsapp-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: pulse 1.5s infinite;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25)
}

.whatsapp-button img {
  position: relative;
  width: 32px;
  height: 32px;
  z-index: 1
}

.whatsapp-container:hover .whatsapp-text {
  opacity: 1;
  transform: translateX(0)
}

@keyframes pulse {
  0% {
    transform: scale(1)
  }

  70% {
    transform: scale(1.1)
  }

  100% {
    transform: scale(1)
  }
}

/* ===== Footer ===== */
footer {
  background: #141414;
  color: #fff;
  text-align: center;
  padding: 22px;
  font-size: 14px
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s, transform .6s
}

.reveal.in-view {
  opacity: 1;
  transform: none
}

.stagger>* {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s, transform .6s
}

.stagger.in-view>* {
  opacity: 1;
  transform: none
}

/* ===========================
   Lightbox / visor de productos
   =========================== */
.prod-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  padding: 24px;
}

.prod-modal.open {
  display: flex
}

.prod-box {
  position: relative;
  width: min(920px, 94vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  padding: 16px 16px 12px;
  overflow: hidden;
}

.prod-media {
  position: relative;
  width: 100%;
  max-height: 72vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #fafafa;
  z-index: 1;
}

.prod-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  transition: transform .25s ease;
  cursor: zoom-in
}

.prod-media img.zoomed {
  transform: scale(1.8);
  cursor: zoom-out
}

.prod-caption {
  text-align: center;
  margin: 10px 4px 6px;
  font-weight: 700;
  color: #222
}

.prod-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
  z-index: 5;
}

.prod-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 5;
}

.prod-nav.prev {
  left: 8px
}

.prod-nav.next {
  right: 8px
}

.prod-nav:hover,
.prod-close:hover {
  background: rgba(0, 0, 0, .75)
}

@media (max-width:640px) {
  .prod-box {
    padding: 12px
  }

  .prod-nav {
    width: 38px;
    height: 38px
  }

  .prod-media {
    max-height: 64vh
  }
}

/* Blur del resto de la página cuando el lightbox está abierto */
body.blur-page>*:not(.prod-modal) {
  filter: blur(6px);
  transition: filter .2s ease
}