/*
Theme Name: JVAA Export
Theme URI: https://exportjvaa.com/
Author: Import & Export JVAA
Author URI: https://exportjvaa.com/
Description: Tema personalizado para Import & Export JVAA, exportadora ecuatoriana de frutas, cacao, pesca y granos. Diseño propio inspirado en catálogos de comercio agrícola internacional. Las páginas de Productos y Contacto existentes se conservan tal cual (creadas con Elementor); este tema aporta una nueva cabecera, pie de página y una página de inicio rediseñada.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: jvaa-export
*/

/* -------------------------------------------------
   0. RESET
------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; }

/* -------------------------------------------------
   1. DESIGN TOKENS
   Paleta inspirada en la materia prima real del negocio:
   verde hoja de banano (profundo), oro de mango/plátano maduro,
   azul de contenedores refrigerados y arena de saco de arroz/cacao.
------------------------------------------------- */
:root{
  --bg-sand:       #F6EFDD; /* fondo general, tono arena/saco de grano */
  --surface:       #FFFDF8; /* tarjetas y superficies claras */
  --ink:           #1E2A1C; /* texto principal, verde-carbón */
  --ink-soft:      #4B5A45; /* texto secundario */
  --green-deep:    #163A2E; /* cabecera, pie, secciones oscuras */
  --green-deep-2:  #102922; /* franja más oscura dentro de verde */
  --green:         #2F5D45; /* verde medio, enlaces, íconos */
  --gold:          #E4A339; /* acento principal: mango / plátano maduro */
  --gold-dark:     #C6852A;
  --teal:          #1D5C6B; /* acento logística marítima */
  --line:          rgba(30,42,28,.14);
  --line-on-dark:  rgba(246,239,221,.18);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1200px;
  --radius-none: 0;
}

body{
  background: var(--bg-sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, h4{
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1{ font-size: clamp(2.4rem, 4.6vw, 3.9rem); font-weight: 500; }
h2{ font-size: clamp(1.9rem, 3vw, 2.6rem); }
h3{ font-size: 1.35rem; }

p{ color: var(--ink-soft); }
.lede{ font-size: 1.15rem; line-height: 1.55; }

:focus-visible{
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* -------------------------------------------------
   2. BOTONES Y ENLACES
------------------------------------------------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--gold);
  color: var(--green-deep-2);
}
.btn-primary:hover{ background: var(--gold-dark); }

.btn-outline-dark{
  border-color: var(--green-deep);
  color: var(--green-deep);
}
.btn-outline-dark:hover{ background: var(--green-deep); color: var(--bg-sand); }

.btn-outline-light{
  border-color: var(--line-on-dark);
  color: var(--bg-sand);
}
.btn-outline-light:hover{ background: rgba(246,239,221,.1); }

.text-link{
  font-weight: 600;
  color: var(--green-deep);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.text-link:hover{ color: var(--gold-dark); }

/* -------------------------------------------------
   3. TOPBAR + HEADER
------------------------------------------------- */
.topbar{
  background: var(--green-deep-2);
  color: rgba(246,239,221,.85);
  font-size: 0.85rem;
}
.topbar .wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-contact{ display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-contact a{ color: inherit; }
.topbar-contact a:hover{ color: var(--gold); }
.topbar-social{ display: flex; gap: 14px; align-items: center; }
.topbar-social a{ color: inherit; opacity: .85; }
.topbar-social a:hover{ opacity: 1; color: var(--gold); }
.topbar-social svg{ width: 16px; height: 16px; display: block; }

.site-header{
  background: var(--green-deep);
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line-on-dark);
}
body.admin-bar .site-header{ top: 32px; }
@media (max-width: 600px){ body.admin-bar .site-header{ top: 46px; } }

.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand{ display: flex; align-items: center; gap: 12px; }
.brand img{ height: 52px; width: auto; }
.brand-name{
  font-family: var(--font-display);
  color: var(--bg-sand);
  font-size: 1.15rem;
  line-height: 1.1;
}
.brand-name span{ display: block; font-family: var(--font-body); font-size: .68rem; color: var(--gold); font-weight: 600; margin-top: 2px; }

.main-nav ul{ display: flex; gap: 32px; align-items: center; }
.main-nav a{
  color: rgba(246,239,221,.88);
  font-weight: 500;
  font-size: .98rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav li.current-menu-item > a{ color: var(--bg-sand); border-bottom-color: var(--gold); }

.header-actions{ display: flex; align-items: center; gap: 18px; }
.header-actions .btn-primary{ padding: 11px 22px; }
.menu-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.menu-toggle span{ width: 24px; height: 2px; background: var(--bg-sand); display: block; }

@media (max-width: 900px){
  .main-nav{
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--green-deep);
    border-bottom: 1px solid var(--line-on-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .main-nav.is-open{ max-height: 420px; }
  .main-nav ul{ flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 28px 20px; }
  .main-nav a{ display: block; padding: 12px 0; width: 100%; }
  .menu-toggle{ display: flex; }
  .header-actions .btn-primary span.btn-full-label{ display: none; }
  .topbar-hide-mobile{ display: none; }
}

/* -------------------------------------------------
   4. HERO
------------------------------------------------- */
.hero{
  background: linear-gradient(180deg, var(--green-deep) 0%, var(--green-deep) 62%, var(--bg-sand) 62%);
  padding: 76px 0 0;
}
.hero .wrap{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}
.hero-copy h1{ color: var(--bg-sand); }
.hero-copy p.lede{ color: rgba(246,239,221,.82); margin-top: 18px; max-width: 46ch; }
.hero-actions{ display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.hero-media{ position: relative; }
.hero-media .frame{
  clip-path: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
  overflow: hidden;
  background: var(--green-deep-2);
  aspect-ratio: 4 / 3.1;
}
.hero-media img{ width: 100%; height: 100%; object-fit: cover; }

.trust-strip{
  margin-top: 54px;
  padding: 30px 0 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.trust-item{ display: flex; gap: 12px; align-items: flex-start; }
.trust-item svg{ flex: none; width: 22px; height: 22px; color: var(--gold-dark); margin-top: 2px; }
.trust-item span{ font-weight: 600; color: var(--ink); font-size: .97rem; }

@media (max-width: 900px){
  .hero .wrap{ grid-template-columns: 1fr; }
  .hero{ background: linear-gradient(180deg, var(--green-deep) 0%, var(--green-deep) 78%, var(--bg-sand) 78%); }
  .trust-strip{ grid-template-columns: 1fr; }
}

/* -------------------------------------------------
   5. CATEGORÍAS (tarjetas grandes)
------------------------------------------------- */
.categories{ padding: 10px 0 90px; }
.section-head{ max-width: 62ch; margin-bottom: 40px; }
.section-head p{ margin-top: 12px; }
.section-head.center{ margin-left: auto; margin-right: auto; text-align: center; }

.cat-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cat-card{
  position: relative;
  display: block;
  aspect-ratio: 3.5/4.3;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 92% 100%, 0 100%);
  color: var(--bg-sand);
}
.cat-card img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-card:hover img{ transform: scale(1.06); }
.cat-card::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(16,41,34,.35) 10%, rgba(16,41,34,.92) 100%);
}
.cat-card-body{ position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 26px 28px; z-index: 2; }
.cat-card-body h3{ color: var(--bg-sand); margin-bottom: 8px; }
.cat-card-body p{ color: rgba(246,239,221,.82); font-size: .93rem; margin-bottom: 16px; }
.cat-card-cta{ font-weight: 600; font-size: .92rem; color: var(--gold); border-bottom: 1px solid var(--gold); padding-bottom: 3px; display: inline-block; }

@media (max-width: 900px){ .cat-grid{ grid-template-columns: 1fr; } }

/* -------------------------------------------------
   6. HISTORIA
------------------------------------------------- */
.historia{ padding: 20px 0 90px; }
.historia .wrap{
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.historia-media{ clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%, 0 12%); overflow: hidden; }
.historia-media img{ width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/4.6; }
.historia-body p{ margin-top: 16px; }
.checklist{ margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.checklist li{ display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.checklist svg{ flex: none; width: 20px; height: 20px; color: var(--green); margin-top: 2px; }

@media (max-width: 900px){ .historia .wrap{ grid-template-columns: 1fr; } }

/* -------------------------------------------------
   7. LOGÍSTICA (4 modos)
------------------------------------------------- */
.logistica{ background: var(--surface); padding: 86px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logistica-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 46px;
}
.logistica-item{ padding-top: 22px; border-top: 2px solid var(--green-deep); }
.logistica-item svg{ width: 30px; height: 30px; color: var(--teal); margin-bottom: 16px; }
.logistica-item h4{ font-size: 1.08rem; margin-bottom: 8px; }
.logistica-item p{ font-size: .94rem; }

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

/* -------------------------------------------------
   8. CATÁLOGO DE PRODUCTOS
------------------------------------------------- */
.catalogo{ padding: 90px 0; }
.cat-tabs{
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.cat-tab{
  padding: 10px 2px 16px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  font-size: .98rem;
}
.cat-tab:hover{ color: var(--ink); }
.cat-tab.is-active{ color: var(--green-deep); border-bottom-color: var(--gold); }

.prod-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 24px;
}
.prod-card{ background: var(--surface); }
.prod-card figure{ aspect-ratio: 1/1; overflow: hidden; background: var(--bg-sand); }
.prod-card img{ width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.prod-card:hover img{ transform: scale(1.05); }
.prod-card-body{ padding: 16px 4px 4px; border-bottom: 3px solid var(--gold); }
.prod-card-body h4{ font-size: 1.02rem; margin-bottom: 10px; font-weight: 600; font-family: var(--font-body); }
.prod-card-cta{ font-size: .86rem; font-weight: 600; color: var(--green-deep); }
.prod-card-cta:hover{ color: var(--gold-dark); }
.prod-card[hidden]{ display: none; }

@media (max-width: 980px){ .prod-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px){ .prod-grid{ grid-template-columns: repeat(2, 1fr); gap: 20px 16px; } }

/* -------------------------------------------------
   9. PROCESO / EXCELENCIA (secuencia real -> numerada)
------------------------------------------------- */
.proceso{ background: var(--green-deep); color: var(--bg-sand); padding: 90px 0; }
.proceso .section-head h2{ color: var(--bg-sand); }
.proceso .section-head p{ color: rgba(246,239,221,.78); }
.proceso-list{ margin-top: 50px; display: flex; flex-direction: column; }
.proceso-step{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--line-on-dark);
}
.proceso-step:last-child{ border-bottom: 1px solid var(--line-on-dark); }
.proceso-num{ font-family: var(--font-display); font-size: 2.4rem; color: var(--gold); font-weight: 500; }
.proceso-step h3{ color: var(--bg-sand); margin-bottom: 8px; font-size: 1.2rem; }
.proceso-step p{ color: rgba(246,239,221,.78); max-width: 68ch; }

@media (max-width: 640px){
  .proceso-step{ grid-template-columns: 1fr; gap: 8px; }
}

/* -------------------------------------------------
   10. CERTIFICACIONES
------------------------------------------------- */
.certificaciones{ padding: 70px 0; }
.certificaciones .wrap{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
}
.certificaciones img{ height: 92px; width: auto; object-fit: contain; }
.certificaciones .cert-text{ max-width: 30ch; color: var(--ink-soft); font-size: .95rem; }

/* -------------------------------------------------
   11. CTA FINAL
------------------------------------------------- */
.cta-final{ background: var(--gold); padding: 70px 0; }
.cta-final .wrap{ display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-final h2{ color: var(--green-deep-2); max-width: 22ch; }
.cta-final .btn-primary{ background: var(--green-deep); color: var(--bg-sand); }
.cta-final .btn-primary:hover{ background: var(--green-deep-2); }

/* -------------------------------------------------
   12. PÁGINAS INTERNAS (Productos / Contacto / Nosotros)
   El contenido de Elementor se muestra intacto; solo se
   asegura que use todo el ancho disponible.
------------------------------------------------- */
#site-content{ width: 100%; }
#site-content.has-fallback{ padding: 90px 0; }
#site-content.has-fallback .wrap{ max-width: 780px; }

/* -------------------------------------------------
   13. FOOTER
------------------------------------------------- */
.site-footer{ background: var(--green-deep-2); color: rgba(246,239,221,.82); }
.footer-top{ padding: 74px 0 50px; }
.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-brand .brand{ margin-bottom: 16px; }
.footer-brand p{ color: rgba(246,239,221,.68); max-width: 34ch; }
.footer-col h5{ color: var(--bg-sand); font-family: var(--font-body); font-size: .92rem; font-weight: 700; margin-bottom: 18px; letter-spacing: .01em; }
.footer-col ul{ display: flex; flex-direction: column; gap: 11px; }
.footer-col a{ color: rgba(246,239,221,.72); font-size: .95rem; }
.footer-col a:hover{ color: var(--gold); }
.footer-social{ display: flex; gap: 14px; margin-top: 4px; }
.footer-social a{ width: 36px; height: 36px; border: 1px solid var(--line-on-dark); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover{ border-color: var(--gold); }
.footer-social svg{ width: 16px; height: 16px; }
.footer-bottom{ border-top: 1px solid var(--line-on-dark); padding: 22px 0; }
.footer-bottom .wrap{ display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: rgba(246,239,221,.6); }

@media (max-width: 900px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }

/* -------------------------------------------------
   14. WHATSAPP FLOTANTE
------------------------------------------------- */
.wa-float{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-deep);
  color: var(--bg-sand);
  padding: 13px 18px;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 88% 100%, 0 100%);
  transition: background .18s ease;
}
.wa-float:hover{ background: var(--green-deep-2); }
.wa-float svg{ width: 20px; height: 20px; color: var(--gold); }
.wa-float span{ font-weight: 600; font-size: .9rem; }
@media (max-width: 560px){ .wa-float span{ display: none; } .wa-float{ padding: 13px; } }

/* -------------------------------------------------
   15. UTIL
------------------------------------------------- */
.sr-only{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
