/* ==========================================================================
   TX4 Cintas de Teflón — Editorial Technical Design System
   Visual Identity: TX4 Packaging & Logo (White, Cyan #00A8CC, Navy #0A2540)
   Layout Reference: Editorial Technical (Inter, Fluid Clamp Scale, Precise Tokens)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand Palette (Strictly derived from TX4 Logo and Packaging) */
  --color-navy-dark: #071526;
  --color-navy: #0A2540;
  --color-navy-light: #1E3A8A;
  
  --color-cyan: #00A8CC;
  --color-cyan-bright: #00B4D8;
  --color-cyan-hover: #0096C7;
  --color-cyan-light: #E6F7FF;
  --color-cyan-border: rgba(0, 168, 204, 0.22);

  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #1DA851;
  --color-whatsapp-glow: rgba(37, 211, 102, 0.22);

  --color-instagram: #E1306C;

  /* Neutral Canvas */
  --bg-main: #FFFFFF;
  --bg-surface: #F8FAFC;
  --bg-surface-alt: #F1F5F9;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --border-light: #E2E8F0;
  --border-subtle: rgba(15, 23, 42, 0.08);

  /* Typography Reference (Single Inter Font Family) */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Fluid Type Scale Tokens (using clamp()) */
  --text-display-hero: clamp(2.5rem, 5vw + 1rem, 4rem); /* 40px to 64px */
  --text-display-section: clamp(1.875rem, 3.5vw + 0.5rem, 2.5rem); /* 30px to 40px */
  --text-heading-card: clamp(1.25rem, 1.8vw + 0.5rem, 1.375rem); /* 20px to 22px */
  --text-body-lg: clamp(1.0625rem, 1vw + 0.5rem, 1.125rem); /* 17px to 18px */
  --text-body-md: 1rem; /* 16px */
  --text-label: clamp(0.75rem, 0.5vw + 0.5rem, 0.8125rem); /* 12px to 13px */
  --text-button: 1rem; /* 16px */

  /* Spacing Scale Tokens */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 72px;
  --space-4xl: 112px;

  /* Layout & Component Proportions */
  --content-max-width: min(1180px, calc(100% - 40px));
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-button: 12px;

  /* Restrained Shadows & Transitions */
  --shadow-subtle: 0 1px 3px rgba(10, 37, 64, 0.05), 0 4px 12px rgba(10, 37, 64, 0.04);
  --shadow-card: 0 4px 16px rgba(10, 37, 64, 0.06);
  --shadow-card-hover: 0 12px 28px rgba(10, 37, 64, 0.1);
  --transition-fast: 180ms ease;
  --transition-smooth: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--text-body-md);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

/* Container Width */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Sparse & Abstract Wave Dividers */
.wave-divider {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.wave-divider svg {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
}

.contact-wave-divider {
  background-color: var(--bg-main);
  margin-bottom: -1px;
}

.contact-wave-divider path {
  fill: var(--color-navy-dark);
}

@media (min-width: 768px) {
  .wave-divider svg {
    height: 64px;
  }
}

/* ==========================================================================
   1. Header (Compact, Breathing Room around Logo)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

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

/* Header Button */
.btn-whatsapp-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--text-button);
  padding: 0 var(--space-lg);
  height: 48px; /* Technical touch target requirement */
  border-radius: var(--radius-button);
  box-shadow: 0 2px 8px var(--color-whatsapp-glow);
  transition: var(--transition-smooth);
}

.btn-whatsapp-header:hover, .btn-whatsapp-header:focus-visible {
  background-color: var(--color-whatsapp-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-header svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 440px) {
  .btn-whatsapp-header .btn-text-full {
    display: none;
  }
  .btn-whatsapp-header .btn-text-short {
    display: inline;
  }
  .header-container {
    height: 64px;
  }
  .logo-img {
    height: 42px;
  }
}
@media (min-width: 441px) {
  .btn-whatsapp-header .btn-text-short {
    display: none;
  }
}

/* ==========================================================================
   2. Hero Section (Confident, Technical Editorial Layout)
   ========================================================================== */
.hero-section {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl) 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  overflow: hidden;
}

@media (min-width: 992px) {
  .hero-section {
    padding: var(--space-4xl) 0 var(--space-3xl) 0;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-3xl);
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Small Contextual Label Above Hero */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background-color: var(--color-cyan-light);
  color: var(--color-navy);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-xxs) var(--space-md);
  border-radius: var(--radius-button);
  border: 1px solid var(--color-cyan-border);
  margin-bottom: var(--space-md);
}

.badge-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-cyan);
}

/* Hero Title: Heavy Inter 800, Assertive Headline */
.hero-title {
  font-family: var(--font-family);
  font-size: var(--text-display-hero);
  line-height: 1.02;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.04em;
  margin-bottom: var(--space-md);
}

.hero-title span {
  color: var(--color-cyan);
  display: inline;
}

/* Body Copy: Concise, Professional */
.hero-description {
  font-size: var(--text-body-lg);
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-xl);
  max-width: 540px;
}

/* Highlights */
.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin-bottom: var(--space-xl);
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9375rem; /* 15px */
  font-weight: 600;
  color: var(--color-navy);
}

.highlight-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-cyan);
}

/* Hero Primary CTA Button */
.btn-whatsapp-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--text-body-lg);
  padding: 0 var(--space-xl);
  height: 54px; /* Generous touch target */
  border-radius: var(--radius-button);
  box-shadow: 0 4px 16px var(--color-whatsapp-glow);
  transition: var(--transition-smooth);
  width: 100%;
}

@media (min-width: 576px) {
  .btn-whatsapp-hero {
    width: auto;
  }
}

.btn-whatsapp-hero:hover {
  background-color: var(--color-whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-hero svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Hero Media Showcase */
.hero-media {
  display: flex;
  justify-content: center;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #FFFFFF;
  padding: var(--space-xs);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.hero-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 4px);
  transition: transform var(--transition-smooth);
}

.hero-image-wrapper:hover .hero-image {
  transform: scale(1.015);
}

/* Floating Technical Tag */
.hero-floating-tag {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-floating-tag svg {
  color: var(--color-cyan-bright);
}

/* ==========================================================================
   3. Product Grid (Clean, Consistent Technical Cards)
   ========================================================================== */
.products-section {
  padding: var(--space-3xl) 0 var(--space-4xl) 0;
  background-color: var(--bg-main);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-subtitle {
  color: var(--color-cyan);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--text-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
  display: block;
}

.section-title {
  font-family: var(--font-family);
  font-size: var(--text-display-section);
  font-weight: 700;
  line-height: 1.08;
  color: var(--color-navy);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-sm);
}

.section-desc {
  font-size: var(--text-body-lg);
  color: var(--text-secondary);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile default: 1 column */
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Product Card Component */
.product-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

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

.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-surface);
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image {
  transform: scale(1.04);
}

.product-card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-family: var(--font-family);
  font-size: var(--text-heading-card);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-navy);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-xs);
}

.product-description {
  font-size: 0.9375rem; /* 15px */
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.btn-card-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  background-color: var(--bg-surface);
  color: var(--color-navy);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--text-button);
  height: 48px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.product-card:hover .btn-card-whatsapp,
.btn-card-whatsapp:hover {
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  border-color: var(--color-whatsapp);
  box-shadow: 0 4px 12px var(--color-whatsapp-glow);
}

.btn-card-whatsapp svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   4. Final Contact Section
   ========================================================================== */
.contact-section {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-4xl) 0;
  background-color: var(--color-navy-dark);
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
}

.contact-card {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.03);
  padding: var(--space-2xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
  .contact-card {
    padding: var(--space-3xl) var(--space-2xl);
  }
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(0, 168, 204, 0.18);
  color: var(--color-cyan-bright);
  font-family: var(--font-family);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-xxs) var(--space-sm);
  border-radius: var(--radius-button);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(0, 168, 204, 0.3);
}

.contact-title {
  font-family: var(--font-family);
  font-size: var(--text-display-section);
  font-weight: 700;
  line-height: 1.08;
  color: #FFFFFF;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-sm);
}

.contact-text {
  font-size: var(--text-body-lg);
  color: #94A3B8;
  margin-bottom: var(--space-xl);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
}

@media (min-width: 576px) {
  .contact-buttons {
    flex-direction: row;
    gap: var(--space-lg);
  }
}

/* Large WhatsApp CTA */
.btn-whatsapp-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--text-body-lg);
  padding: 0 var(--space-2xl);
  height: 56px;
  border-radius: var(--radius-button);
  box-shadow: 0 4px 20px var(--color-whatsapp-glow);
  transition: var(--transition-smooth);
  width: 100%;
}

@media (min-width: 576px) {
  .btn-whatsapp-large {
    width: auto;
  }
}

.btn-whatsapp-large:hover {
  background-color: var(--color-whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp-large svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Instagram Secondary Link */
.btn-instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--text-button);
  padding: 0 var(--space-xl);
  height: 56px;
  border-radius: var(--radius-button);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: var(--transition-smooth);
  width: 100%;
}

@media (min-width: 576px) {
  .btn-instagram-link {
    width: auto;
  }
}

.btn-instagram-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.btn-instagram-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   5. Minimal Footer
   ========================================================================== */
.site-footer {
  background-color: var(--color-navy-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-xl) 0;
  color: #94A3B8;
  font-size: 0.875rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  background: #FFFFFF;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  color: #CBD5E1;
  font-weight: 500;
  padding: var(--space-xs);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-cyan-bright);
}

.footer-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-copy {
  color: #64748B;
  font-size: 0.8125rem;
}

/* ==========================================================================
   Floating WhatsApp Button (Bottom-Right, Functional & Unobtrusive)
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 9999;
  width: 56px;
  height: 56px;
  background-color: var(--color-whatsapp);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: var(--transition-smooth);
}

.whatsapp-float:hover {
  transform: scale(1.08);
  background-color: var(--color-whatsapp-hover);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Motion Accessibility: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
