/* =========================================================
   GRUPO IGMA — Hoja de estilos principal
   Todo el color de marca vive en :root como variables CSS.
   Si algún día cambian el logo o la paleta, se ajusta aquí
   y se actualiza en todo el sitio automáticamente.
   ========================================================= */

:root {
  /* Paleta de marca (tomada del logotipo oficial) */
  --navy: #16284a;
  --navy-dark: #0c1830;
  --navy-soft: #1f3760;
  --gold: #c79a56;
  --gold-dark: #a97f3e;
  --gold-light: #e3c988;
  --white: #ffffff;
  --off-white: #f8f7f4; /* mismo tono que el fondo del logo, para que no se note el recorte */
  --gray-100: #f1f1ee;
  --gray-300: #d9d9d4;
  --gray-600: #5b6270;
  --gray-800: #2b2f38;

  /* Tipografía */
  --font-heading: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  /* Layout */
  --max-width: 1180px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(12, 24, 48, 0.12);
  --header-height: 96px;
}

/* ---------- Reset básico ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 16px;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
  scroll-margin-top: var(--header-height);
}

.section-label {
  display: inline-block;
  color: var(--gold-dark);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.section-heading {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  max-width: 640px;
}

.section-intro {
  max-width: 620px;
  color: var(--gray-600);
  font-size: 1.05rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
  box-shadow: 0 8px 20px rgba(199, 154, 86, 0.35);
}

.btn-primary:hover {
  background: var(--gold-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-soft);
}

.btn-whatsapp {
  background: #25d366;
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #1ebe5b;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(12, 24, 48, 0.08);
  z-index: 500;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 62px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.2s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: var(--header-height);
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, var(--navy-dark) 40%, var(--navy) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/images/stock/hero-warehouse.jpg") center/cover no-repeat;
  opacity: 0.32;
}

/* Franja dorada: una banda inclinada cuyo centro coincide con el centro de la
   columna derecha del Hero (77.5% del ancho = centro del 45% derecho), así
   siempre pasa por detrás del logo y lo enmarca. */
.hero::after {
  content: "";
  position: absolute;
  top: min(50%, calc((100vh - var(--header-height)) / 2));
  left: 73%;
  width: 17%;
  height: 230%;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  transform: translate(-50%, -50%) rotate(33deg);
  opacity: 0.9;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 620px);
}

.hero-eyebrow {
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--gold-light);
}

.hero p.lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 540px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.hero-stats div strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--gold-light);
}

.hero-stats div span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Columna derecha del Hero: 46% del ancho, toda la altura, con un margen
   del 4% a la derecha (centro = 73%); el logo se centra con flexbox. */
.hero-logo-container {
  position: absolute;
  top: 0;
  right: 4%;
  width: 46%;
  height: min(100%, calc(100vh - var(--header-height)));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

.hero-logo-container img {
  display: block;
  width: min(96%, 800px);
  height: auto;
  max-height: 78vh;
  object-fit: contain;
}

/* ---------- Nosotros ---------- */
.nosotros {
  background: var(--white);
}

.nosotros .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.nosotros-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.nosotros-media > img {
  height: 420px;
  width: 100%;
  object-fit: cover;
}

.nosotros-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 22px 12px 12px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow);
}

.nosotros-badge-logo {
  height: 46px;
  width: 46px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.nosotros-badge strong {
  display: block;
  font-size: 1.4rem;
  color: var(--gold-light);
}

.nosotros-badge span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.checklist li {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--gray-800);
}

.checklist li::before {
  content: "✓";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Categorías de producto ---------- */
.productos {
  background: var(--gray-100);
}

.productos-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(12, 24, 48, 0.06);
  border: 1px solid var(--gray-300);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}

.product-photo {
  position: relative;
  height: 210px;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, var(--gray-100) 100%);
  border-bottom: 1px solid var(--gray-300);
}

.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -18px 24px -20px rgba(12, 24, 48, 0.25);
  pointer-events: none;
}

/* Foto de producto sobre fondo blanco (Stretch film): se muestra completa,
   sin recorte, y el marco es blanco para que el fondo del PNG se integre. */
.product-photo--contain {
  background: #fefefe; /* mismo tono que el fondo del PNG */
  padding: 10px 0;
}

.product-photo--contain img {
  object-fit: contain;
}

.product-photo--contain::after {
  display: none;
}

.product-body {
  padding: 24px 26px 28px;
}

.product-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.product-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- Por qué elegirnos ---------- */
.ventajas {
  background: var(--navy-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.ventajas::after {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -30%;
  width: 45%;
  height: 140%;
  background: var(--navy-soft);
  transform: rotate(-14deg);
  opacity: 0.5;
}

.ventajas .container {
  position: relative;
  z-index: 1;
}

.ventajas .section-heading,
.ventajas .section-label {
  color: var(--white);
}

.ventajas .section-label {
  color: var(--gold-light);
}

.ventajas .section-intro {
  color: rgba(255, 255, 255, 0.75);
}

.ventajas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.ventaja-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 26px 22px;
}

.ventaja-card .num {
  font-family: var(--font-heading);
  color: var(--gold-light);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.ventaja-card h3 {
  color: var(--white);
  font-size: 1.05rem;
}

.ventaja-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* ---------- Contacto ---------- */
.contacto {
  background: var(--white);
}

.contacto .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-info-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px;
}

.contact-info-card h3 {
  color: var(--white);
}

.contact-line {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  align-items: flex-start;
}

.contact-line .ic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-line .ic svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold-light);
}

.contact-line strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  margin-bottom: 3px;
}

.contact-line a,
.contact-line span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
}

.whatsapp-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- Formulario ---------- */
.form-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--gray-300);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--navy);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  font-family: var(--font-body);
  font-size: 0.96rem;
  background: var(--white);
  color: var(--gray-800);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 154, 86, 0.2);
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--gray-600);
  margin-bottom: 22px;
}

.field-check input {
  margin-top: 3px;
}

.form-note {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-top: 14px;
}

/* honeypot field, oculto para humanos, visible para bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand img {
  height: 96px;
  margin-bottom: 18px;
  border-radius: 10px;
}

.footer-brand p {
  max-width: 320px;
  font-size: 0.92rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.footer-col li {
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
}

.footer-bottom a:hover {
  color: var(--gold-light);
}

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  z-index: 400;
  transition: transform 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: var(--white);
}

/* ---------- Páginas simples (privacidad / gracias) ---------- */
.simple-page {
  margin-top: var(--header-height);
  padding: 72px 0;
  min-height: 60vh;
}

.simple-page h1 {
  font-size: 2rem;
}

.simple-page h2 {
  font-size: 1.25rem;
  margin-top: 32px;
}

.simple-page .disclaimer {
  background: var(--gray-100);
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--gray-600);
  margin-bottom: 32px;
}

/* ---------- Documentos legales (aviso de privacidad, cookies) ---------- */
.legal-doc {
  max-width: 860px;
  overflow-wrap: break-word;
}

.legal-doc h3 {
  font-size: 1.02rem;
  margin: 22px 0 10px;
}

/* el reset global quita las viñetas; aquí se restauran para legibilidad */
.legal-doc ul,
.legal-doc ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-doc ul {
  list-style: disc;
}

.legal-doc ol {
  list-style: decimal;
}

.legal-doc li {
  margin-bottom: 8px;
}

.legal-doc li::marker {
  color: var(--gold-dark);
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 8px 0 20px;
}

.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-doc th,
.legal-doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
}

.legal-doc th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
}

.legal-doc tbody tr:nth-child(even) {
  background: var(--gray-100);
}

.gracias-box {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.gracias-box .icon-ok {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.gracias-box .icon-ok svg {
  width: 40px;
  height: 40px;
  stroke: var(--navy-dark);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1180px) {
  /* Tablet / desktop angosto: el texto reserva el 45% derecho para el logo,
     que se reduce proporcionalmente con su columna. */
  .hero .container {
    padding-right: 45vw;
  }

  .hero-logo-container {
    right: 0;
    width: 45%;
  }

  .hero::after {
    left: 77.5%;
  }
}

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

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

  .nosotros .container,
  .contacto .container {
    grid-template-columns: 1fr;
  }

  .nosotros-media > img {
    height: 320px;
  }

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

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--off-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 20px;
    box-shadow: 0 12px 20px rgba(12, 24, 48, 0.1);
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
  }

  .main-nav a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--gray-300);
  }

  .header-actions .btn-primary span.label-full {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  section {
    padding: 64px 0;
  }

  .hero {
    flex-direction: column;
    padding: 48px 0 40px;
    text-align: left;
  }

  .hero .container {
    padding-right: 24px;
  }

  /* En móvil la franja se dibuja solo detrás del logo (dentro de su
     contenedor) para no pasar por debajo del texto. */
  .hero::after {
    display: none;
  }

  .hero-logo-container {
    position: relative;
    right: auto;
    width: 100%;
    height: auto;
    margin-top: 28px;
    padding: 12px;
    overflow: hidden;
  }

  .hero-logo-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36%;
    height: 260%;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    transform: translate(-50%, -50%) rotate(33deg);
    opacity: 0.9;
  }

  .hero-logo-container img {
    position: relative;
    width: min(100%, 460px);
    max-height: none;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-card,
  .contact-info-card {
    padding: 28px 22px;
  }
}
