/* UTF-8 Encoding */
@charset "UTF-8";

/* ============================================
   CATÁLOGO TÉCNICO MINIMALISTA - ICONAGRO
   Paleta: Verde Oscuro (#1e5631), Verde Claro (#a4c639), 
           Ocre (#fdb913), Crema (#fdf5e6)
   ============================================ */

:root {
  --color-verde-oscuro: #1e5631;
  --color-verde-claro: #a4c639;
  --color-ocre: #fdb913;
  --color-crema: #fdf5e6;
  --color-blanco: #ffffff;
  --color-gris-claro: #f8f7f4;
  --color-gris-texto: #333333;
  --color-gris-suave: #888888;
  --shadow-suave: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medio: 0 4px 12px rgba(0, 0, 0, 0.12);
  --espaciado-base: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--color-crema);
  color: var(--color-gris-texto);
  line-height: 1.6;
}

/* ============ ENCABEZADO ============ */
header {
  background: var(--color-blanco);
  padding: 2rem var(--espaciado-base);
  box-shadow: var(--shadow-suave);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-section img {
  height: 105px;
  max-height: 105px;
  width: auto;
  border-radius: 8px;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.15));
  transition: transform 0.25s ease;
}

.logo-section img:hover {
  transform: scale(1.03);
}

.header-text h1 {
  font-size: 1.8rem;
  color: var(--color-verde-oscuro);
  font-weight: 700;
}

.header-text p {
  font-size: 0.9rem;
  color: var(--color-gris-suave);
  margin-top: 0.25rem;
}

.header-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--color-gris-texto);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-verde-oscuro);
  border-bottom-color: var(--color-ocre);
}

/* ============ HERO/PORTADA ============ */
.portada {
  background: linear-gradient(135deg, var(--color-verde-oscuro) 0%, #2d7a47 100%);
  color: var(--color-blanco);
  padding: 6rem var(--espaciado-base);
  text-align: center;
}

.portada-contenido {
  max-width: 800px;
  margin: 0 auto;
}

.portada h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.portada p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.portada-badge {
  display: inline-block;
  background: var(--color-ocre);
  color: var(--color-verde-oscuro);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  margin-top: 1rem;
}

/* ============ SECCIONES CON MARCA DE AGUA ============ */
section {
  padding: 4rem var(--espaciado-base);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.categoria-seccion::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('imagenes/logo.webp');
  background-repeat: space;
  background-size: 280px auto;
  opacity: 0.022;
  pointer-events: none;
  z-index: 0;
}
.categoria-seccion > * {
  position: relative;
  z-index: 1;
}

section h2 {
  font-size: 2rem;
  color: var(--color-verde-oscuro);
  margin-bottom: 1rem;
  font-weight: 700;
}

section h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 2rem;
  background: var(--color-ocre);
  margin-right: 0.75rem;
  border-radius: 2px;
}

.section-intro {
  color: var(--color-gris-suave);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* ============ GRID DE PRODUCTOS ============ */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.producto-card {
  background: var(--color-blanco);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  content-visibility: auto;
  contain-intrinsic-size: 300px 500px;
  box-shadow: var(--shadow-suave);
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* Marca de Agua Anti-Copia con Logo Iconagro */
.producto-card::before {
  content: '';
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  width: 170px;
  height: 170px;
  background-image: url('imagenes/logo.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.085;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.25));
}

/* Sello de Autenticidad en la Imagen */
.producto-card::after {
  content: 'ICONAGRO • CATÁLOGO OFICIAL';
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(14, 59, 28, 0.82);
  color: #ffffff;
  font-family: var(--fuente-titulos);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 6;
  text-transform: uppercase;
  border: 1px solid rgba(253, 185, 19, 0.45);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.producto-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medio);
}

.producto-imagen {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--color-gris-claro);
}

/* Ajuste específico para Sabueso */
.sabueso-imagen {
  object-position: top;
}

.producto-contenido {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.producto-marca {
  font-size: 0.85rem;
  color: var(--color-ocre);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.producto-titulo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-verde-oscuro);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.producto-badge {
  display: inline-block;
  background: var(--color-verde-claro);
  color: var(--color-blanco);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  width: fit-content;
}

.producto-badge-sudes {
  display: inline-block;
  background: var(--color-ocre);
  color: var(--color-gris-texto);
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  width: fit-content;
}

.producto-specs {
  list-style: none;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.producto-specs li {
  font-size: 0.9rem;
  color: var(--color-gris-texto);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-gris-claro);
}

.producto-specs li:last-child {
  border-bottom: none;
}

.specs-label {
  font-weight: 600;
  color: var(--color-gris-texto);
}

.specs-valor {
  color: var(--color-gris-suave);
}

.producto-beneficio {
  background: var(--color-crema);
  border-left: 3px solid var(--color-ocre);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--color-verde-oscuro);
  font-style: italic;
}

/* ============ BROCHURES (BOVINOS) ============ */
.brochure-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
}

/* Nueva clase para lechería especializada - columna única */
.lecheria-especializada {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
}

.brochure-item {
  background: var(--color-blanco);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-suave);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.lecheria-especializada .brochure-item {
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  page-break-after: always;
}

.brochure-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medio);
}

.lecheria-especializada .brochure-item:hover {
  transform: none;
  box-shadow: none;
}

.brochure-imagen {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--color-gris-claro);
  padding: 1.5rem;
  min-height: 350px;
}

.lecheria-especializada .brochure-imagen {
  max-width: 100%;
  height: auto;
  padding: 0;
  min-height: 600px;
  background: var(--color-blanco);
}

.brochure-titulo {
  padding: 1.5rem;
  background: var(--color-blanco);
  border-top: 2px solid var(--color-ocre);
}

.brochure-titulo h4 {
  font-size: 1rem;
  color: var(--color-verde-oscuro);
  font-weight: 700;
  margin: 0;
}

/* ============ CONTRAPORTADA / FOOTER ============ */
.contraportada {
  background: linear-gradient(135deg, var(--color-verde-oscuro) 0%, #2d7a47 100%);
  color: var(--color-blanco);
  padding: 4rem var(--espaciado-base);
}

.contraportada-contenido {
  max-width: 1000px;
  margin: 0 auto;
}

/* Frase destacada */
.contraportada-frase {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--color-ocre);
  border-radius: 4px;
}

.frase-destacada {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--color-blanco);
  margin: 0;
  letter-spacing: 0.3px;
}

/* Contenedor de contacto + QR */
.contacto-qr-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 2rem;
}

.contacto-datos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.contacto-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-ocre);
}

.contacto-item p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
}

.contacto-item a {
  color: var(--color-ocre);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.contacto-item a:hover {
  opacity: 0.8;
}

/* Sección QR */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
}

/* QR Robusto para PDF e Impresión */
.qr-box {
  background: var(--color-blanco);
  padding: 20px;
  border: 3px solid var(--color-ocre);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.qr-box:hover {
  box-shadow: 0 6px 16px rgba(253, 185, 19, 0.4);
  transform: translateY(-2px);
  border-color: var(--color-verde-claro);
}

.qr-box a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.qr-codigo {
  display: block;
  width: 150px;
  height: 150px;
  transition: transform 0.3s ease;
  filter: none;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.qr-box:hover .qr-codigo {
  transform: scale(1.05);
}

/* Botón CTA Inteligente (Hybrid Web/PDF) */
.whatsapp-cta-button {
  display: inline-block;
  background-color: #25D366;
  color: white;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid #25D366;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  cursor: pointer;
  text-align: center;
}

.whatsapp-cta-button:hover {
  background-color: #1FA855;
  border-color: #1FA855;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.whatsapp-cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.qr-texto {
  font-size: 0.95rem;
  color: var(--color-ocre);
  text-align: center;
  font-weight: 600;
  margin: 0;
}

.qr-hint-print {
  font-size: 0.7rem;
  color: var(--color-gris-suave);
  text-align: center;
  margin: 0;
  font-style: italic;
  opacity: 0.75;
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .logo-section img {
    height: 80px;
    max-height: 80px;
  }

  .header-nav {
    gap: 1rem;
    justify-content: flex-start;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .portada h1 {
    font-size: 2rem;
  }

  .portada p {
    font-size: 1rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  .productos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .brochure-container {
    flex-direction: column;
  }

  .contacto-qr-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

@media (max-width: 480px) {
  .header-container {
    flex-direction: column;
  }

  .logo-section img {
    height: 65px;
    max-height: 65px;
  }

  .header-text h1 {
    font-size: 1.4rem;
  }

  .portada {
    padding: 3rem var(--espaciado-base);
  }

  .portada h1 {
    font-size: 1.5rem;
  }

  section {
    padding: 2rem var(--espaciado-base);
  }

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

  .producto-card {
    flex-direction: column;
  }

  .producto-imagen {
    height: 200px;
    width: 100%;
    flex-shrink: 0;
  }

  .producto-contenido {
    padding: 1.25rem;
  }
}

/* ============ IMPRESIÓN ============ */
@media print {
  body {
    background: var(--color-blanco);
  }

  /* Marca de Agua en Impresión y PDF */
  body::before {
    content: 'CATÁLOGO OFICIAL ICONAGRO • PROHIBIDA SU COPIA O REPRODUCCIÓN • WWW.ICONAGRO.CO';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 2.4rem;
    font-weight: 900;
    color: rgba(20, 69, 32, 0.08);
    text-align: center;
    z-index: 99999;
    pointer-events: none;
    white-space: nowrap;
    font-family: var(--fuente-titulos);
  }

  header {
    position: static;
  }

  .portada {
    page-break-after: always;
  }

  .producto-card,
  .brochure-item {
    page-break-inside: avoid;
  }

  section {
    page-break-inside: avoid;
  }

  /* Botón CTA adaptado para PDF: Visible pero sin interactividad */
  .whatsapp-cta-button {
    background-color: var(--color-blanco);
    color: var(--color-verde-oscuro);
    border: 2px solid var(--color-verde-oscuro);
    box-shadow: none;
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  /* QR optimizado para impresión */
  .qr-box {
    box-shadow: none;
    border-width: 2px;
  }

  .qr-hint-print {
    display: block;
  }

}

.footer-credit {
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-top: 0.5rem;
  font-style: italic;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-credit a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-primary);
  transition: opacity 0.3s ease;
}

.footer-credit a:hover {
  opacity: 0.6;
}
  .contraportada {
    page-break-before: always;
  }
}

/* ============ OPTIMIZACIÓN DE IMÁGENES - WPO ============ */
picture {
  display: block;
  width: 100%;
}

picture img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  display: block;
}

