/*
Theme Name: GuiaOrtopedica Theme
Theme URI: https://guiaortopedica.com
Author: GuiaOrtopedica
Author URI: https://guiaortopedica.com
Description: Tema base para el ecosistema de sitios ortopédicos afiliados a Amazon. Compatible con Elementor Pro. Incluye sistema de diseño completo (variables CSS, tipografía, componentes) editable por sitio via Elementor Global Settings.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guiaortopedica
Tags: affiliate, orthopedic, elementor, one-column, two-columns, custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, sticky-post, translation-ready
*/

/* ═══════════════════════════════════════════════
   DESIGN TOKENS — editar aquí para cambiar
   el tema completo por sitio
═══════════════════════════════════════════════ */
:root {
  /* Paleta principal */
  --go-navy:         #0d2340;
  --go-navy2:        #163354;
  --go-teal:         #0e7f6e;
  --go-teal2:        #12a08d;
  --go-teal-light:   #e5f5f3;
  --go-amber:        #e07b1a;
  --go-amber2:       #f59332;
  --go-amber-light:  #fef4e6;

  /* Superficies */
  --go-paper:        #faf9f7;
  --go-paper2:       #f3f1ec;
  --go-white:        #ffffff;

  /* Texto */
  --go-ink:          #111827;
  --go-ink2:         #374151;
  --go-ink3:         #6b7280;
  --go-ink4:         #9ca3af;

  /* Bordes */
  --go-border:       #e5e3dc;

  /* Radios */
  --go-r:            10px;
  --go-r-lg:         16px;
  --go-r-xl:         24px;

  /* Tipografía */
  --go-font-display: 'Fraunces', Georgia, serif;
  --go-font-body:    'Figtree', system-ui, sans-serif;

  /* Ancho máximo contenido */
  --go-max-width:    1240px;
  --go-content-padding: 2rem;

  /* Botón CTA Amazon */
  --go-cta-bg:       var(--go-amber);
  --go-cta-hover:    var(--go-amber2);
  --go-cta-color:    #ffffff;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--go-font-body);
  background: var(--go-paper);
  color: var(--go-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover { color: var(--go-teal); }

/* ═══════════════════════════════════════════════
   TIPOGRAFÍA GLOBAL
═══════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--go-font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--go-navy);
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

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

/* ═══════════════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════════════ */
.go-container {
  max-width: var(--go-max-width);
  margin: 0 auto;
  padding: 0 var(--go-content-padding);
}

.go-section {
  padding: 5rem var(--go-content-padding);
  max-width: var(--go-max-width);
  margin: 0 auto;
}

.site-main {
  min-height: 60vh;
}

/* Elementor full width override */
.elementor-section.elementor-section-stretched {
  left: 0 !important;
  width: 100% !important;
}

/* ═══════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════ */
.go-topbar {
  background: var(--go-navy);
  padding: 8px var(--go-content-padding);
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

.go-topbar strong {
  color: var(--go-amber2);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════
   HEADER / NAVEGACIÓN
═══════════════════════════════════════════════ */
.go-header {
  background: var(--go-white);
  border-bottom: 1px solid var(--go-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(13, 35, 64, 0.06);
}

.go-header-inner {
  max-width: var(--go-max-width);
  margin: 0 auto;
  padding: 0 var(--go-content-padding);
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: 68px;
}

/* Logo */
.go-logo {
  font-family: var(--go-font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--go-navy);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.go-logo .logo-accent { color: var(--go-teal); }

.go-logo .logo-tagline {
  font-size: 0.7rem;
  font-weight: 300;
  font-style: italic;
  color: var(--go-ink3);
  font-family: var(--go-font-display);
  letter-spacing: 0.01em;
}

.custom-logo-link img {
  max-height: 50px;
  width: auto;
}

/* Nav principal */
.go-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  flex-wrap: wrap;
}

.go-nav a,
.go-nav .menu-item a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--go-ink2);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: block;
}

.go-nav a:hover,
.go-nav .current-menu-item > a {
  background: var(--go-teal-light);
  color: var(--go-teal);
}

.go-nav .menu-item-ofertas a,
.go-nav .nav-ofertas > a {
  background: var(--go-amber-light);
  color: var(--go-amber);
  font-weight: 600;
}

/* WordPress nav ul/li reset */
.go-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.go-nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--go-white);
  border: 1px solid var(--go-border);
  border-radius: var(--go-r-lg);
  min-width: 200px;
  box-shadow: 0 8px 30px rgba(13, 35, 64, 0.1);
  z-index: 200;
  flex-direction: column;
  gap: 0;
  padding: 6px;
}

.go-nav li {
  position: relative;
}

.go-nav li:hover > ul {
  display: flex;
}

/* ═══════════════════════════════════════════════
   BOTONES GLOBALES
═══════════════════════════════════════════════ */
.go-btn-primary,
.elementor-button.go-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--go-cta-bg);
  color: var(--go-cta-color) !important;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--go-r);
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
  font-family: var(--go-font-body);
}

.go-btn-primary:hover {
  background: var(--go-cta-hover);
  transform: translateY(-1px);
  color: var(--go-cta-color) !important;
}

/* Botón Amazon CTA */
.go-btn-amazon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--go-amber);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--go-r);
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
  font-family: var(--go-font-body);
}

.go-btn-amazon:hover {
  background: var(--go-amber2);
  transform: translateY(-1px);
  color: #fff !important;
}

.go-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--go-navy);
  color: var(--go-navy);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 28px;
  border-radius: var(--go-r);
  transition: background 0.15s, color 0.15s;
  font-family: var(--go-font-body);
}

.go-btn-outline:hover {
  background: var(--go-navy);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   TRUST BAR
═══════════════════════════════════════════════ */
.go-trust-bar {
  background: var(--go-teal);
  padding: 14px var(--go-content-padding);
}

.go-trust-bar .go-trust-inner {
  max-width: var(--go-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.go-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
}

.go-trust-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════
   PRODUCT CARDS (AAC Pro override styles)
═══════════════════════════════════════════════ */
.go-product-card {
  background: var(--go-paper);
  border: 1px solid var(--go-border);
  border-radius: var(--go-r-xl);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.go-product-card:hover {
  box-shadow: 0 12px 40px rgba(13, 35, 64, 0.1);
  transform: translateY(-3px);
}

.go-product-img {
  background: var(--go-paper2);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  position: relative;
}

.go-product-img img {
  max-height: 150px;
  width: auto;
  object-fit: contain;
}

.go-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.go-badge-bestseller { background: var(--go-teal); color: #fff; }
.go-badge-oferta     { background: var(--go-amber); color: #fff; }
.go-badge-nuevo      { background: var(--go-navy); color: #fff; }

.go-product-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.go-product-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--go-ink4);
  margin-bottom: 6px;
}

.go-product-name {
  font-family: var(--go-font-display);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--go-navy);
  line-height: 1.3;
  margin-bottom: 8px;
}

.go-product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--go-amber);
}

.go-product-rating .rating-count {
  color: var(--go-ink3);
  font-size: 11.5px;
}

.go-product-features {
  list-style: none;
  margin-bottom: 1rem;
  flex: 1;
}

.go-product-features li {
  font-size: 12.5px;
  color: var(--go-ink2);
  padding: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.4;
}

.go-product-features li::before {
  content: '✓';
  color: var(--go-teal);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
}

.go-product-footer {
  border-top: 1px solid var(--go-border);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════════
   CATEGORY CARDS
═══════════════════════════════════════════════ */
.go-cat-card {
  background: var(--go-white);
  border: 1px solid var(--go-border);
  border-radius: var(--go-r-xl);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.go-cat-card:hover {
  box-shadow: 0 8px 30px rgba(13, 35, 64, 0.1);
  transform: translateY(-3px);
  border-color: var(--go-teal);
}

.go-cat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 0.875rem;
}

.go-cat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--go-navy);
  margin-bottom: 4px;
}

.go-cat-count {
  font-size: 11.5px;
  color: var(--go-ink3);
}

/* ═══════════════════════════════════════════════
   BLOG CARDS
═══════════════════════════════════════════════ */
.go-blog-card {
  background: var(--go-white);
  border: 1px solid var(--go-border);
  border-radius: var(--go-r-xl);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.go-blog-card:hover {
  box-shadow: 0 8px 30px rgba(13, 35, 64, 0.08);
  transform: translateY(-2px);
}

.go-blog-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--go-paper2);
}

.go-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.go-blog-card:hover .go-blog-thumb img {
  transform: scale(1.04);
}

.go-blog-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.go-blog-cat {
  display: inline-block;
  background: var(--go-navy);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.go-blog-title {
  font-family: var(--go-font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--go-navy);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.go-blog-excerpt {
  font-size: 12.5px;
  color: var(--go-ink3);
  line-height: 1.55;
  margin-bottom: 0.875rem;
}

.go-blog-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--go-teal);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ═══════════════════════════════════════════════
   STICKY CTA BAR (AAC Pro extension)
═══════════════════════════════════════════════ */
.go-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--go-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px var(--go-content-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.go-sticky-cta.is-visible {
  transform: translateY(0);
}

.go-sticky-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.go-sticky-text strong { color: #fff; }

.go-sticky-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
}

/* ═══════════════════════════════════════════════
   SECTION EYEBROW / TITLES (Elementor reuse)
═══════════════════════════════════════════════ */
.go-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--go-teal);
  display: block;
  margin-bottom: 0.5rem;
}

.go-section-title {
  font-family: var(--go-font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--go-navy);
  line-height: 1.25;
}

.go-section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--go-ink3);
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.go-footer {
  background: var(--go-navy);
  color: rgba(255, 255, 255, 0.65);
  padding: 3.5rem var(--go-content-padding) 2rem;
}

.go-footer-inner {
  max-width: var(--go-max-width);
  margin: 0 auto;
}

.go-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.go-footer-logo {
  font-family: var(--go-font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
}

.go-footer-logo .logo-accent { color: var(--go-teal2); }

.go-footer-desc {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.25rem;
  max-width: 260px;
}

.go-footer-disclaimer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.6;
  max-width: 260px;
}

.go-footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.go-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.go-footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.15s;
}

.go-footer-links a:hover {
  color: var(--go-teal2);
}

.go-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.go-footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}

.go-footer-legal {
  display: flex;
  gap: 1.5rem;
}

.go-footer-legal a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.15s;
}

.go-footer-legal a:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ═══════════════════════════════════════════════
   OVERRIDES PARA AAC PRO (cards del plugin)
═══════════════════════════════════════════════ */
.aac-card {
  border-radius: var(--go-r-xl) !important;
  border-color: var(--go-border) !important;
  font-family: var(--go-font-body) !important;
}

.aac-card .aac-btn,
.aac-card .aac-button {
  background: var(--go-amber) !important;
  border-radius: var(--go-r) !important;
  font-family: var(--go-font-body) !important;
  font-weight: 600 !important;
}

.aac-card .aac-btn:hover {
  background: var(--go-amber2) !important;
}

.aac-sticky-bar {
  background: var(--go-navy) !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .go-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --go-content-padding: 1.25rem;
  }

  .go-header-inner {
    gap: 1rem;
    height: 60px;
  }

  .go-nav {
    display: none; /* Mobile menu via Elementor o plugin de menú */
  }

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

  .go-trust-bar .go-trust-inner {
    gap: 1.25rem;
  }

  .go-trust-divider {
    display: none;
  }

  .go-sticky-cta {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════
   ANIMACIONES
═══════════════════════════════════════════════ */
@keyframes go-fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes go-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.go-fade-up { animation: go-fadeUp 0.6s ease both; }

/* ═══════════════════════════════════════════════
   ELEMENTOR OVERRIDES
═══════════════════════════════════════════════ */
.elementor-page .site-main {
  padding: 0;
}

/* Remove Elementor default widget margins cuando se usan clases go- */
.elementor-widget-wrap > .elementor-widget:last-child {
  margin-bottom: 0;
}

/* Fonts en widgets Elementor */
.elementor-widget-heading .elementor-heading-title {
  font-family: var(--go-font-display);
}
/* ═══════════════════════════════════════════════
   MOBILE NAV — se incluye en style.css via @import
   o puede ir en assets/css/mobile.css
═══════════════════════════════════════════════ */

/* Mobile toggle button */
.go-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.go-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--go-navy);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 900px) {
  .go-mobile-toggle {
    display: flex;
  }

  .go-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--go-white);
    border-top: 1px solid var(--go-border);
    border-bottom: 1px solid var(--go-border);
    padding: 1rem var(--go-content-padding);
    flex-direction: column;
    gap: 0;
    z-index: 99;
    box-shadow: 0 8px 30px rgba(13,35,64,.08);
  }

  .go-nav.is-open {
    display: flex;
  }

  .go-nav ul {
    flex-direction: column;
  }

  .go-nav a,
  .go-nav .menu-item a {
    padding: 10px 14px;
    display: block;
    font-size: 15px;
    border-radius: 8px;
  }

  .go-header {
    position: relative; /* Mobile no sticky para no solapar */
  }
}

/* ═══════════════════════════════════════════════
   MOBILE NAV — se incluye en style.css via @import
   o puede ir en assets/css/mobile.css
═══════════════════════════════════════════════ */

/* Mobile toggle button */
.go-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.go-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--go-navy);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 900px) {
  .go-mobile-toggle {
    display: flex;
  }

  .go-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--go-white);
    border-top: 1px solid var(--go-border);
    border-bottom: 1px solid var(--go-border);
    padding: 1rem var(--go-content-padding);
    flex-direction: column;
    gap: 0;
    z-index: 99;
    box-shadow: 0 8px 30px rgba(13,35,64,.08);
  }

  .go-nav.is-open {
    display: flex;
  }

  .go-nav ul {
    flex-direction: column;
  }

  .go-nav a,
  .go-nav .menu-item a {
    padding: 10px 14px;
    display: block;
    font-size: 15px;
    border-radius: 8px;
  }

  .go-header {
    position: relative; /* Mobile no sticky para no solapar */
  }
}
