/*
Theme Name: Swiss Austral
Theme URI: https://swissaustral.com
Author: Urantiacos SpA
Author URI: https://urantiacos.cl
Description: Tema personalizado para Swiss Austral — eCommerce de compuestos bioquímicos. Stack: WordPress + ACF + Lazy Blocks + WooCommerce.
Version: 3.0.0
Requires at least: 6.4
Requires PHP: 8.1
License: Private
Text Domain: swissaustral
Tags: woocommerce, custom-blocks, biotech
*/

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Brand colors */
  --sa-red:          #C1121F;
  --sa-red-dark:     #960D18;
  --sa-red-light:    #E8353F;
  --sa-dark:         #1A1A1A;
  --sa-dark-mid:     #2B2B2B;
  --sa-gray-dark:    #4A4A4A;
  --sa-gray:         #6B6B6B;
  --sa-gray-mid:     #C0C0C0;
  --sa-gray-light:   #E8E8E8;
  --sa-gray-bg:      #F5F5F5;
  --sa-white:        #FFFFFF;

  /* Typography */
  --sa-font-primary: 'DM Sans', 'Inter', system-ui, sans-serif;
  --sa-font-serif:   'DM Serif Display', Georgia, serif;

  /* Spacing */
  --sa-gap-xs:   8px;
  --sa-gap-sm:   16px;
  --sa-gap-md:   24px;
  --sa-gap-lg:   48px;
  --sa-gap-xl:   80px;
  --sa-gap-xxl:  120px;

  /* Layout */
  --sa-container:    1200px;
  --sa-container-sm: 768px;
  --sa-radius:       8px;
  --sa-radius-lg:    12px;
  --sa-radius-full:  999px;

  /* Shadows */
  --sa-shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --sa-shadow-md:  0 4px 20px rgba(0,0,0,0.12);
  --sa-shadow-lg:  0 8px 40px rgba(0,0,0,0.16);

  /* Transitions */
  --sa-transition: 0.2s ease;

  /* Header */
  --sa-header-height: 72px;
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sa-font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--sa-dark);
  background: var(--sa-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sa-red);
  text-decoration: none;
  transition: color var(--sa-transition);
}
a:hover { color: var(--sa-red-dark); }

ul, ol { list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sa-font-primary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--sa-dark);
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: clamp(18px, 2vw, 22px); }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.sa-serif { font-family: var(--sa-font-serif); font-weight: 400; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.sa-container {
  width: 100%;
  max-width: var(--sa-container);
  margin: 0 auto;
  padding: 0 var(--sa-gap-md);
}

.sa-container--sm {
  max-width: var(--sa-container-sm);
}

.sa-section {
  padding: var(--sa-gap-xl) 0;
}

.sa-section--sm {
  padding: var(--sa-gap-lg) 0;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.sa-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sa-gap-xs);
  padding: 12px 28px;
  border-radius: var(--sa-radius-full);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--sa-transition);
  text-decoration: none;
  white-space: nowrap;
}

.sa-btn--primary {
  background: var(--sa-red);
  color: var(--sa-white);
  border-color: var(--sa-red);
}
.sa-btn--primary:hover {
  background: var(--sa-red-dark);
  border-color: var(--sa-red-dark);
  color: var(--sa-white);
}

.sa-btn--secondary {
  background: transparent;
  color: var(--sa-red);
  border-color: var(--sa-red);
}
.sa-btn--secondary:hover {
  background: var(--sa-red);
  color: var(--sa-white);
}

.sa-btn--dark {
  background: var(--sa-dark);
  color: var(--sa-white);
  border-color: var(--sa-dark);
}
.sa-btn--dark:hover {
  background: var(--sa-dark-mid);
  border-color: var(--sa-dark-mid);
  color: var(--sa-white);
}

.sa-btn svg,
.sa-btn .arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── FORMS ──────────────────────────────────────────────────── */
.sa-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--sa-gray-light);
  border-radius: var(--sa-radius);
  font-size: 15px;
  color: var(--sa-dark);
  background: var(--sa-white);
  transition: border-color var(--sa-transition);
  outline: none;
}
.sa-input:focus { border-color: var(--sa-red); }
.sa-input::placeholder { color: var(--sa-gray-mid); }

.sa-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--sa-gray);
  margin-bottom: 6px;
}

/* ─── CARDS ──────────────────────────────────────────────────── */
.sa-card {
  background: var(--sa-white);
  border-radius: var(--sa-radius-lg);
  overflow: hidden;
  box-shadow: var(--sa-shadow-sm);
  transition: box-shadow var(--sa-transition), transform var(--sa-transition);
}
.sa-card:hover {
  box-shadow: var(--sa-shadow-md);
  transform: translateY(-2px);
}

/* ─── SECTION HEADINGS ───────────────────────────────────────── */
.sa-section-header {
  text-align: center;
  margin-bottom: var(--sa-gap-lg);
}

.sa-section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
  margin-bottom: var(--sa-gap-sm);
}

.sa-section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--sa-red);
  border-radius: 2px;
}

.sa-section-header p {
  color: var(--sa-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── BADGES / TAGS ──────────────────────────────────────────── */
.sa-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--sa-radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.sa-badge--red     { background: rgba(193,18,31,0.1); color: var(--sa-red); border: 1px solid rgba(193,18,31,0.2); }
.sa-badge--gray    { background: var(--sa-gray-bg); color: var(--sa-gray); border: 1px solid var(--sa-gray-light); }
.sa-badge--dark    { background: var(--sa-dark); color: var(--sa-white); }

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.sa-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--sa-gray);
  padding: var(--sa-gap-sm) 0;
}
.sa-breadcrumb a { color: var(--sa-gray); }
.sa-breadcrumb a:hover { color: var(--sa-red); }
.sa-breadcrumb .sep { color: var(--sa-gray-mid); }
.sa-breadcrumb .current { color: var(--sa-red); font-weight: 500; }

/* ─── DIVIDER ────────────────────────────────────────────────── */
.sa-divider {
  border: none;
  border-top: 1px solid var(--sa-gray-light);
  margin: var(--sa-gap-lg) 0;
}

/* ─── OVERLAY ────────────────────────────────────────────────── */
.sa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sa-transition);
}
.sa-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── UTILITY ────────────────────────────────────────────────── */
.sa-text-red     { color: var(--sa-red); }
.sa-text-gray    { color: var(--sa-gray); }
.sa-text-center  { text-align: center; }
.sa-mt-sm        { margin-top: var(--sa-gap-sm); }
.sa-mt-md        { margin-top: var(--sa-gap-md); }
.sa-mt-lg        { margin-top: var(--sa-gap-lg); }
.sa-hidden       { display: none !important; }
.sa-sr-only      { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --sa-gap-xl: 48px;
    --sa-gap-xxl: 80px;
  }
}

/* ─── FIGMA TITLE SIZES (homologados) ────────────────────────── */
/* Hero: DM Sans 48px Bold */
.sa-hero-slider__title { font-size: clamp(32px, 5vw, 48px) !important; font-weight: 700; font-family: var(--sa-font-primary); }

/* Section titles: DM Serif Display 36px */
.sa-section-title {
  font-family: var(--sa-font-serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 400;
  color: var(--sa-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.sa-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--sa-red);
  border-radius: 2px;
}
.sa-section-title--left::after { left: 0; transform: none; }
.sa-section-title--no-underline::after { display: none; }
.sa-section-title--white { color: #fff; }

/* Feature/card titles: DM Sans 20px Bold */
.sa-card-title { font-size: 20px; font-weight: 700; font-family: var(--sa-font-primary); }

/* Sub-card titles: DM Sans 16px Bold */
.sa-card-title--sm { font-size: 16px; }

/* ─── HERO TOP GRADIENT (degradé blanco superior) ────────────── */
.sa-hero-slider__slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* ─── HERO TEXT: alineado al borde izquierdo del container ───── */
.sa-hero-slider__content {
  max-width: 640px;
  padding-left: 0;
}

/* ─── BOOTSTRAP OVERRIDE: evitar conflictos ──────────────────── */
.sa-header .container,
.sa-footer .container { max-width: 1200px; }

/* Fix: Bootstrap resets que podrían afectar */
.sa-btn { text-decoration: none !important; }
a.sa-btn:hover { color: inherit; }
a.sa-btn--primary:hover,
a.sa-btn--secondary:hover,
a.sa-btn--dark:hover { color: var(--sa-white) !important; }

/* ─── SCROLL REVEAL ANIMATIONS ───────────────────────────────── */
.sa-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.sa-reveal.sa-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Variantes */
.sa-reveal--fade { transform: none; }
.sa-reveal--left { transform: translateX(-40px); }
.sa-reveal--left.sa-revealed { transform: translateX(0); }
.sa-reveal--right { transform: translateX(40px); }
.sa-reveal--right.sa-revealed { transform: translateX(0); }
.sa-reveal--scale { transform: scale(0.92); }
.sa-reveal--scale.sa-revealed { transform: scale(1); }

/* Delays para elementos en secuencia (grids, columnas) */
.sa-reveal-delay-1 { transition-delay: 0.1s; }
.sa-reveal-delay-2 { transition-delay: 0.2s; }
.sa-reveal-delay-3 { transition-delay: 0.3s; }
.sa-reveal-delay-4 { transition-delay: 0.4s; }
.sa-reveal-delay-5 { transition-delay: 0.5s; }
.sa-reveal-delay-6 { transition-delay: 0.6s; }

/* Respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .sa-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── LOGIN BUTTON: Outline style (Figma) ────────────────────── */
.sa-header__login {
  background: transparent !important;
  color: var(--sa-dark, #1A1A1A) !important;
  border: 2px solid #1A1A1A !important;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: 999px;
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
}
.sa-header__login:hover {
  background: #1A1A1A !important;
  color: #fff !important;
}

/* ─── CONTACT FORM 7 STYLES ──────────────────────────────────── */
.wpcf7 label { display: block; font-size: 14px; font-weight: 600; color: #1A1A1A; margin-bottom: 6px; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--sa-font-primary);
  background: #fff;
  color: #1A1A1A;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 8px;
}
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus {
  outline: none;
  border-color: #C1121F;
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.1);
}
.wpcf7 textarea { min-height: 140px; resize: vertical; }
.wpcf7 select { appearance: auto; cursor: pointer; }
.wpcf7 input::placeholder, .wpcf7 textarea::placeholder { color: #B0B0B0; }
.wpcf7 .row { display: flex; flex-wrap: wrap; gap: 16px; }
.wpcf7 .col-md-6 { flex: 1 1 calc(50% - 8px); min-width: 200px; }
.wpcf7 .col-12 { flex: 0 0 100%; }
.wpcf7-form .wpcf7-submit,
.wpcf7 input[type="submit"] {
  background: #C1121F !important;
  color: #fff !important;
  border: none !important;
  padding: 14px 32px !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}
.wpcf7 input[type="submit"]:hover { background: #960D18 !important; }
.wpcf7-response-output { border-radius: 8px !important; font-size: 14px; margin-top: 16px !important; }
.wpcf7-not-valid-tip { font-size: 12px; color: #C1121F; }
