/* ============================= */
/* RESET + VARIABLES             */
/* ============================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --azul-principal: #2157AE;
  --rojo-secundario: #A31130;
  --gris-claro: #f2f2f2;
  --gris-texto: #333333;
}

html { overflow-x: hidden; }

body {
  font-family: "Roboto", sans-serif;
  color: var(--gris-texto);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* IMPORTANTE:
   Evitar violeta por "visited" sin romper estilos.
   Luego definimos colores específicos por componente. */
a,
a:visited {
  color: inherit;
}

/* ============================= */
/* TOPBAR                        */
/* ============================= */

.topbar {
  height: 28px;
  background: var(--gris-claro);
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
}

.topbar-left { color: #555; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .sep { color: #888; }

.topbar-right a { text-decoration: none; }

/* Rojo forzado: Contacto + Trabajá con nosotros + Clientes */
.topbar-right a.topbar-jobs,
.topbar-right a.topbar-work,
.topbar-right a.nav-red,
.topbar-right a.topbar-jobs:visited,
.topbar-right a.topbar-work:visited,
.topbar-right a.nav-red:visited {
  color: var(--rojo-secundario) !important;
  font-weight: 700;
  text-decoration: none;
}

.topbar-right a.topbar-jobs:hover,
.topbar-right a.topbar-work:hover,
.topbar-right a.nav-red:hover {
  text-decoration: underline;
}

/* ============================= */
/* HEADER + NAV                  */
/* ============================= */

.site-header {
  width: 100%;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 2px solid var(--rojo-secundario);
  background: #fff;
  flex-wrap: wrap;
}

.logo {
  height: 70px;
  max-width: 320px;
}

.logo-link {
  display: inline-flex;
  text-decoration: none;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 14px;
  color: var(--azul-principal);
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover { color: var(--rojo-secundario); }

.search-form input {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: clamp(140px, 18vw, 240px);
}

.search-form input:focus {
  border-color: var(--azul-principal);
  outline: none;
}

/* ============================= */
/* CATALOGO / PRODUCTOS          */
/* ============================= */

.catalogo {
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
}

.catalogo__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 25px;
}

.catalogo__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rojo-secundario);
  margin-bottom: 6px;
}

.catalogo__titulo {
  font-size: 34px;
  line-height: 1.1;
}

.catalogo__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #e6e6e6;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: #444;
}

.chip.is-active {
  background: rgba(33, 87, 174, 0.08);
  border-color: rgba(33, 87, 174, 0.35);
  color: var(--azul-principal);
  font-weight: 600;
}

/* Grid */
.catalogo__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1050px) {
  .catalogo__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 780px) {
  .catalogo__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .catalogo__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  .catalogo__grid { grid-template-columns: 1fr; }
}

/* Card */
.producto {
  border: 1px solid #ededed;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.producto:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.10);
}

.producto__imgWrap {
  height: 280px;
  background: #f3f3f3;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.producto__img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.producto__nombre {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

/* ============================= */
/* MAPA FULL WIDTH               */
/* ============================= */

#map {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 50px;
  text-align: center;
}

#map h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

#map p { margin-bottom: 14px; }

#map iframe {
  width: 100vw;
  height: 450px;
  border: 0;
  display: block;
}

/* ============================= */
/* FOOTER FULL WIDTH             */
/* ============================= */

.footer {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: #f1f1f1;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 30px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 28px;
}

.footer__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer__link {
  display: block;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  margin: 8px 0;
}

.footer__link:hover { color: var(--azul-principal); }

.footer__text {
  font-size: 13px;
  color: #555;
  margin: 0;
}

.footer__center { text-align: center; }

.footer__logo {
  height: 54px;
  margin: 0 auto 10px;
}

.footer__copy {
  font-size: 12px;
  color: #777;
  margin-top: 16px;
}

.footer__social,
.footer__social:visited {
  color: #555;
  font-weight: normal;
}

.footer__social:hover { text-decoration: underline; }

@media (max-width: 850px) {
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/* ============================= */
/* UTILIDADES                    */
/* ============================= */

.hidden { display: none; }

/* ============================= */
/* PRODUCTO (producto.html)      */
/* ============================= */

.product-page { padding: 24px; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 18px;
}

.breadcrumb__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  text-decoration: none;
  color: var(--azul-principal);
}

.breadcrumb__back:visited { color: var(--azul-principal); }

.breadcrumb__sep { opacity: 0.4; }

.breadcrumb__current { font-weight: 600; }

/* Layout */
.product-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Galería */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-img-frame {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #eee;
  overflow: hidden;
  background: #fff;
}

.product-main-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.product-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumb-btn {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.75;
}

.thumb-btn.is-active {
  opacity: 1;
  border-color: var(--azul-principal);
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info + Specs */
.product-desc {
  margin: 12px 0 20px;
  line-height: 1.5;
}

.specs {
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

.spec-row:last-child { border-bottom: none; }

.spec-k { opacity: 0.7; }
.spec-v { font-weight: 600; }

/* WhatsApp */
.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid #1FA855;
  background: #25D366;
  color: #0b2b16;
  font-weight: 700;
}

.wa-btn:hover { filter: brightness(0.98); }

.wa-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.wa-btn:hover .wa-icon { transform: scale(1.05); }

/* ============================= */
/* BOTÓN AR (tipo WhatsApp)      */
/* ============================= */

.ar-btn{
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  margin-top: 12px;
  padding: 14px 18px;

  border-radius: 14px;
  border: 1px solid #1b8fd6;
  background: #2bb0ff;

  color: #062235;
  font-weight: 800;
  cursor: pointer;

  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.ar-btn:hover{
  filter: brightness(0.98);
}

.ar-icon{
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

/* ============================= */
/* MODAL QR RA                   */
/* ============================= */

.ra-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}

.ra-modal.is-open{
  display: block;
}

.ra-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.ra-modal-content{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px);
  background: #fff;
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.28);
}

.ra-modal-close{
  position: absolute;
  right: 12px;
  top: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: #f2f2f2;
  font-size: 18px;
  line-height: 34px;
}

.ra-modal-title{
  margin: 4px 0 6px;
  font-size: 20px;
  color: #222;
}

.ra-modal-text{
  margin: 0 0 12px;
  color: #444;
  font-size: 14px;
}

.ra-qr{
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto 10px;
  border-radius: 14px;
  border: 1px solid #eee;
}

.ra-modal-hint{
  margin: 0;
  color: #666;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1100px) {
  .product-main-img { max-height: 340px; }
}

@media (max-width: 900px) {
  .product-wrap { grid-template-columns: 1fr; }
}

/* Ocultar buscador en páginas de producto y legales */
.page-product .search-form,
.page-legal .search-form {
  display: none;
}

/* Techsheet (si usás ficha técnica PDF) */
.techsheet { margin-top: 40px; }

.techsheet h3 { margin: 22px 0 10px; }

.techsheet-actions { margin-bottom: 14px; }

.pdf-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  text-decoration: none;
  font-weight: 600;
  color: var(--azul-principal);
}

.pdf-btn:visited { color: var(--azul-principal); }

.pdf-btn:hover {
  border-color: var(--azul-principal);
  text-decoration: underline;
}

/* ============================= */
/* PAGINAS "TRABAJA..." (page)   */
/* ============================= */

.page{
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 16px 60px;
}

.page-hero h1{
  margin: 0 0 10px;
  font-size: 32px;
}

.page-hero p{
  margin: 0;
  line-height: 1.6;
  color: #333;
}

.page-block{
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #e6e6e6;
}

.list{
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.7;
}

.contacts-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-card{
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 14px;
}

.contact-card h3{ margin: 0 0 6px; }

.muted{
  margin: 0 0 10px;
  color: #666;
}

.note{
  margin-top: 14px;
  color: #333;
}

@media (max-width: 700px){
  .contacts-grid{ grid-template-columns: 1fr; }
}

/* ============================= */
/* CONTENIDO LEGALES             */
/* ============================= */

.legal-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}

.legal-content h1 {
  text-align: center;
  margin-bottom: 30px;
}

.legal-content h3 { margin-top: 26px; }

.legal-content .product-desc { line-height: 1.7; }

/* ============================= */
/* CLIENTES                      */
/* ============================= */

.clients-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px){
  .clients-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .clients-grid{ grid-template-columns: 1fr; }
}

.client-card{
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 24px;
  background: #fff;
  text-align: center;
  font-weight: 600;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-logo{
  max-width: 140px;
  max-height: 70px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.85;
  transition: filter .2s ease, opacity .2s ease;
}

.client-card:hover .client-logo{
  filter: grayscale(0%);
  opacity: 1;
}

/* ===== HEADER RESPONSIVE FIX ===== */
@media (max-width: 760px) {

  .site-header{
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
  }

  .logo{
    height: 56px;
    max-width: 260px;
  }

  .header-right{
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .main-nav{
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .search-form{
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .search-form input{
    width: min(520px, 100%);
  }
}

/* Extra ajuste para pantallas MUY chicas */
@media (max-width: 420px) {
  .main-nav{
    gap: 12px;
  }
  .main-nav a{
    font-size: 13px;
  }
}

/* ===== TOPBAR: que no se corten los links ===== */
.topbar-right a {
  white-space: nowrap;
}

@media (max-width: 420px) {
  .topbar {
    font-size: 11px;
  }
  .topbar-right {
    gap: 8px;
  }
  .topbar .sep {
    margin: 0 2px;
  }
}

/* ===== Igualar ancho WA y AR ===== */
.wa-btn,
.ar-btn{
  width: auto;              /* en vez de 100% */
  display: inline-flex;     /* ambos iguales */
  align-self: flex-start;   /* evita que se estiren */
}

/* por si algún contenedor los fuerza */
.product-info .wa-btn,
.product-info .ar-btn{
  max-width: 100%;
}


/* Ocultar buscador solo en páginas estáticas (no afecta layout) */
.page-static .search-form{
  display: none !important;
}

/* Igualar tamaño EXACTO entre WhatsApp y AR */
.wa-btn,
.ar-btn{
  box-sizing: border-box;

  height: 56px;          /* altura fija igual */
  padding: 0 22px;      /* mismo padding horizontal */

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  font-size: 15px;      /* mismo tamaño de texto */
  line-height: 1;       /* clave: evita que uno sea más alto */
  font-weight: 800;
}

/* Justificado para textos institucionales y legales */
.legal-content p,
.legal-content li,
.page p{
  text-align: justify;
  text-justify: inter-word;
}

.page{
  hyphens: auto;
}


/* ============================= */
/* HEADER STICKY + TOPBAR HIDE   */
/* ============================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
}

/* transición suave */
.topbar {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* cuando se oculta */
.topbar.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* ============================= */
/* FLECHAS GALERÍA PRODUCTO      */
/* ============================= */

.product-img-frame{
  position: relative;
}

.gallery-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;

  border: 1px solid #e6e6e6;
  background: rgba(255,255,255,0.85);

  font-size: 26px;
  line-height: 40px;
  text-align: center;

  cursor: pointer;
  user-select: none;

  box-shadow: 0 8px 18px rgba(0,0,0,0.10);
  opacity: 0.75;
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}

.gallery-arrow:hover{
  opacity: 1;
  background: rgba(255,255,255,0.95);
  transform: translateY(-50%) scale(1.03);
}

.gallery-arrow--left{ left: 10px; }
.gallery-arrow--right{ right: 10px; }

/* En desktop: solo aparecen al hover (se ve más limpio) */
@media (hover: hover) and (pointer: fine){
  .gallery-arrow{ opacity: 0; }
  .product-img-frame:hover .gallery-arrow{ opacity: 0.95; }
}

/* En mobile: siempre visibles */
@media (max-width: 900px){
  .gallery-arrow{ opacity: 0.95; }
}


/* ============================= */
/* CLIENTES: tamaños por logo     */
/* (agregá esto al FINAL del CSS) */
/* ============================= */

/* default ya existe en tu CSS:
.client-logo { max-width: 140px; max-height: 70px; ... }
*/

/* Un poquito más grande */
.client-logo.is-lg{
  max-width: 170px;
  max-height: 85px;
}

/* Bastante más grande (para los que se veían MUY chicos) */
.client-logo.is-xl{
  max-width: 200px;
  max-height: 100px;
}

/* En mobile, para que no se desborde y siga prolijo */
@media (max-width: 520px){
  .client-logo.is-lg{ max-width: 160px; max-height: 80px; }
  .client-logo.is-xl{ max-width: 185px; max-height: 95px; }
}
