/*
Theme Name: LoDigital Editorial
Theme URI: https://lodigital.net
Author: LoDigital Editorial Team
Author URI: https://lodigital.net
Description: Tema ligero de alta conversión y cumplimiento normativo para LoDigital (Guías y Manuales Digitales de Bienestar y Enriquecimiento Ambiental Canino).
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Proprietary
Text Domain: lodigital-theme
*/

:root {
  --bg-cream: #FAF7F2;
  --bg-white: #FFFFFF;
  --bg-sand: #F2ECE1;
  --bg-dark: #141413;
  --bg-slate: #1C1D21;
  --text-main: #18181B;
  --text-muted: #52525B;
  --text-light: #A1A1AA;
  --accent-amber: #D97724;
  --accent-amber-dark: #B55D13;
  --accent-coral: #E04F3E;
  --accent-teal: #0F766E;
  --accent-green: #15803D;
  --border-subtle: #E4DFD5;
  --border-dark: #2E2F36;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(20, 20, 19, 0.05);
  --shadow-md: 0 12px 32px -4px rgba(20, 20, 19, 0.08);
  --shadow-lg: 0 24px 48px -12px rgba(20, 20, 19, 0.16);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-cream);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.ld-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.ld-container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   TOP ANNOUNCEMENT BAR & HEADER (Native header.php)
   ========================================================================== */
.ld-topbar {
  background-color: var(--bg-dark);
  color: #F4F4F5;
  font-size: 0.82rem;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ld-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ld-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ld-badge-pill {
  background: rgba(217, 119, 36, 0.22);
  color: #FDBA74;
  border: 1px solid rgba(251, 146, 60, 0.35);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.ld-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #D4D4D8;
}

.ld-topbar-right a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.ld-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.ld-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

.ld-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--bg-dark);
}

.ld-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-coral));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(217, 119, 36, 0.3);
}

.ld-brand-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: -2px;
}

.ld-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ld-nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ld-nav-link:hover,
.ld-nav-link.active {
  color: var(--bg-dark);
  background: rgba(20, 20, 19, 0.06);
}

.ld-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-dark);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 999px;
}

.ld-header-cta:hover {
  background: var(--accent-amber);
  transform: translateY(-1px);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.ld-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
}

.ld-btn-primary {
  background: linear-gradient(135deg, #D97724 0%, #C2410C 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 25px -5px rgba(194, 65, 12, 0.45);
}

.ld-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -6px rgba(194, 65, 12, 0.55);
  filter: brightness(1.05);
}

.ld-btn-emerald {
  background: linear-gradient(135deg, #0F766E 0%, #047857 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 25px -5px rgba(15, 118, 110, 0.4);
}

.ld-btn-emerald:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.ld-btn-dark {
  background: var(--bg-dark);
  color: #FFFFFF;
  box-shadow: 0 10px 24px -6px rgba(20, 20, 19, 0.3);
}

.ld-btn-dark:hover {
  background: #27272A;
  transform: translateY(-2px);
}

.ld-btn-outline {
  background: transparent;
  border: 2px solid var(--bg-dark);
  color: var(--bg-dark);
}

.ld-btn-outline:hover {
  background: var(--bg-dark);
  color: #FFFFFF;
}

.ld-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 6px 14px;
  border-radius: 999px;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  margin-bottom: 16px;
}

/* ==========================================================================
   HERO & PRODUCT SHOWCASE COMPONENTS
   ========================================================================== */
.ld-hero {
  padding: 68px 0 76px;
  position: relative;
}

.ld-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.ld-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.45rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--bg-dark);
  margin-bottom: 20px;
}

.ld-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.ld-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.ld-price-strip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.ld-price-current {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--bg-dark);
  letter-spacing: -0.03em;
}

.ld-price-currency {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.ld-price-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border-subtle);
  padding-left: 14px;
  line-height: 1.35;
}

/* 3D Book Mockup Frame */
.ld-book-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.ld-book-3d {
  position: relative;
  max-width: 380px;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: -18px 24px 44px rgba(0, 0, 0, 0.26), 0 4px 12px rgba(0,0,0,0.12);
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
  transition: transform 0.35s ease;
  border: 3px solid rgba(255,255,255,0.65);
}

.ld-book-3d:hover {
  transform: perspective(1000px) rotateY(-2deg) rotateX(0deg) translateY(-4px);
}

/* ==========================================================================
   CATALOG CARDS (Home / Catalog Page)
   ========================================================================== */
.ld-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.ld-product-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ld-product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.ld-card-media {
  position: relative;
  background: var(--bg-sand);
  padding: 28px 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.ld-card-media img {
  width: 220px;
  height: 280px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: -10px 14px 28px rgba(0,0,0,0.22);
}

.ld-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--bg-dark);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
}

.ld-card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ld-card-title {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--bg-dark);
}

.ld-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.ld-card-specs {
  list-style: none;
  margin-bottom: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.86rem;
  color: var(--text-main);
}

.ld-card-specs li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.ld-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.ld-card-price {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--bg-dark);
}

.ld-card-price span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTIONS, GRIDS & FEATURE BLOCKS
   ========================================================================== */
.ld-section {
  padding: 80px 0;
}

.ld-section-white {
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.ld-section-dark {
  background-color: var(--bg-slate);
  color: #F4F4F5;
}

.ld-section-sand {
  background-color: var(--bg-sand);
}

.ld-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.ld-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.ld-feature-box {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.ld-section-dark .ld-feature-box {
  background: #25262B;
  border-color: var(--border-dark);
  color: #F4F4F5;
}

.ld-feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #FEF3C7;
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 18px;
}

/* Animated Sniffing Loop Visual Component (Product 1) */
.ld-sniff-animation-card {
  background: #1E1B18;
  color: #FFF;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid rgba(251, 146, 60, 0.3);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

@keyframes pulseSniff {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.14); opacity: 1; }
}

@keyframes scentWave {
  0% { stroke-dashoffset: 60; opacity: 0.2; }
  50% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.2; }
}

@keyframes brainCalm {
  0%, 100% { width: 32%; background: #F59E0B; }
  50% { width: 92%; background: #10B981; }
}

.ld-sniff-pulse {
  animation: pulseSniff 1.5s infinite ease-in-out;
}

.ld-scent-path {
  stroke-dasharray: 12 8;
  animation: scentWave 3s infinite linear;
}

.ld-meter-bar {
  height: 10px;
  border-radius: 999px;
  background: #10B981;
  animation: brainCalm 3s infinite ease-in-out;
}

/* Device Mockups (iPad & iPhone for Product 2) */
.ld-devices-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.ld-ipad-frame {
  background: #111113;
  border: 10px solid #27272A;
  border-radius: 26px;
  padding: 24px;
  width: 100%;
  max-width: 540px;
  color: #F4F4F5;
  box-shadow: var(--shadow-lg);
}

.ld-iphone-frame {
  background: #111113;
  border: 8px solid #27272A;
  border-radius: 32px;
  padding: 20px 18px;
  width: 100%;
  max-width: 280px;
  color: #F4F4F5;
  box-shadow: var(--shadow-lg);
}

/* Difficulty & Prep Indicators (Product 3) */
.ld-challenge-card {
  background: var(--bg-white);
  border: 2px solid var(--bg-dark);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: 6px 6px 0px var(--bg-dark);
}

.ld-dots {
  display: inline-flex;
  gap: 4px;
}

.ld-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #D4D4D8;
}

.ld-dot.filled {
  background: var(--accent-amber);
}

/* ==========================================================================
   LEGAL & POLICY PAGES
   ========================================================================== */
.ld-legal-header {
  background: var(--bg-dark);
  color: #FFFFFF;
  padding: 56px 0;
  border-bottom: 1px solid var(--border-dark);
}

.ld-legal-content {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px;
  margin: -32px auto 64px;
  box-shadow: var(--shadow-md);
}

.ld-legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 32px 0 12px;
  color: var(--bg-dark);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.ld-legal-content h2:first-of-type {
  margin-top: 0;
}

.ld-legal-content h3 {
  font-size: 1.1rem;
  margin: 20px 0 8px;
  color: var(--bg-dark);
}

.ld-legal-content p,
.ld-legal-content li {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 12px;
}

.ld-legal-content ul,
.ld-legal-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

/* ==========================================================================
   NATIVE FOOTER (footer.php)
   ========================================================================== */
.ld-site-footer {
  background-color: var(--bg-dark);
  color: #D4D4D8;
  padding: 72px 0 36px;
  border-top: 4px solid var(--accent-amber);
  font-size: 0.92rem;
}

.ld-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ld-footer-title {
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.ld-footer-links {
  list-style: none;
}

.ld-footer-links li {
  margin-bottom: 10px;
}

.ld-footer-links a {
  color: #A1A1AA;
}

.ld-footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.ld-ethology-disclaimer {
  margin-top: 32px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 4px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  color: #A1A1AA;
  font-size: 0.84rem;
  line-height: 1.6;
}

.ld-footer-bottom {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: #71717A;
}

/* ==========================================================================
   CHECKOUT MODAL (Trigger on # buttons)
   ========================================================================== */
.ld-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 18, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ld-modal-backdrop.active {
  display: flex;
}

.ld-modal-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  position: relative;
}

/* Responsive */
@media (max-width: 960px) {
  .ld-hero-grid,
  .ld-catalog-grid,
  .ld-grid-2,
  .ld-grid-3,
  .ld-footer-grid {
    grid-template-columns: 1fr;
  }
  .ld-header-inner {
    flex-direction: column;
    padding: 14px 0;
  }
  .ld-legal-content {
    padding: 28px 20px;
  }
}
