/**
 * landing/assets/css/ecommerce.css
 * Estilos específicos para la landing de E-Commerce a Medida (B2B, B2C e Integraciones ERP)
 * Troop Software Factory
 */

:root {
  --eco-primary: #00bf80;
  --eco-primary-hover: #00a870;
  --eco-cyan: #00e5ff;
  --eco-cyan-glow: rgba(0, 229, 255, 0.25);
  --eco-dark-bg: #070c14;
  --eco-card-bg: rgba(13, 22, 38, 0.85);
  --eco-border: rgba(255, 255, 255, 0.08);
  --eco-light-bg: #f8fafc;
  --eco-light-card: #ffffff;
  --eco-light-border: #e2e8f0;
  --eco-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   Contenedor Principal y Secciones
   ========================================================================== */
.landing-ecommerce {
  background-color: var(--eco-dark-bg);
  color: #94a3b8;
  font-family: inherit;
  overflow-x: hidden;
}

.eco-section-dark {
  background-color: var(--eco-dark-bg);
  position: relative;
  border-bottom: 1px solid var(--eco-border);
}

.section-eco-light {
  background-color: var(--eco-light-bg);
  color: #334155;
  position: relative;
  border-bottom: 1px solid #cbd5e1;
}

/* Overrides estrictamente scopeados a la sección clara (§0.17) */
.section-eco-light .text-white {
  color: #0f172a !important;
}

.section-eco-light .text-secondary {
  color: #64748b !important;
}

.section-eco-light h2,
.section-eco-light h3,
.section-eco-light h4,
.section-eco-light h5 {
  color: #0f172a !important;
}

.section-eco-light .section-lead {
  color: #475569 !important;
}

.section-eco-light .eco-badge {
  background: rgba(0, 191, 128, 0.12);
  color: #00875a;
  border: 1px solid rgba(0, 191, 128, 0.3);
}

/* ==========================================================================
   Badges y Tipografía
   ========================================================================== */
.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 191, 128, 0.12);
  color: var(--eco-primary);
  border: 1px solid rgba(0, 191, 128, 0.28);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.eco-badge svg {
  width: 1.1em;
  height: 1.1em;
}

.section-lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #94a3b8;
}

/* ==========================================================================
   1. HERO SECTION & FONDO ANIMADO "CHECKOUT & DATA FLOW" (§0.14 Opción 1)
   ========================================================================== */
.hero-ecommerce {
  padding-top: 160px; /* Despeje obligatorio header fijo §0.14 */
  padding-bottom: 90px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 15%, rgba(0, 229, 255, 0.08) 0%, rgba(7, 12, 20, 0) 70%),
              var(--eco-dark-bg);
}

@media (max-width: 768px) {
  .hero-ecommerce {
    padding-top: 120px;
    padding-bottom: 60px;
  }
}

.hero-ecommerce-circuits {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 80%);
}

.eco-circuits-desktop {
  width: 100%;
  height: 100%;
  display: block;
}

.eco-circuits-mobile {
  width: 100%;
  height: 100%;
  display: none;
}

@media (max-width: 768px) {
  .eco-circuits-desktop {
    display: none;
  }
  .eco-circuits-mobile {
    display: block;
  }
}

/* Trazas y Pulsos SVG */
.eco-circuit-base {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eco-circuit-node-base {
  fill: #070c14;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1.5;
}

.eco-circuit-pulse {
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 80 920;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
  will-change: stroke-dashoffset;
}

.eco-pulse-green {
  stroke: var(--eco-primary);
  filter: drop-shadow(0 0 5px rgba(0, 191, 128, 0.6));
}

.eco-pulse-cyan {
  stroke: var(--eco-cyan);
  filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.6));
}

/* Delays negativos para arranque instantáneo en Frame 0 */
.eco-pulse-anim-1 { animation: ecoDash 3.2s -0.8s infinite linear; }
.eco-pulse-anim-2 { animation: ecoDash 3.6s -1.7s infinite linear; }
.eco-pulse-anim-3 { animation: ecoDash 2.9s -2.4s infinite linear; }
.eco-pulse-anim-4 { animation: ecoDash 3.4s -1.1s infinite linear; }
.eco-pulse-anim-5 { animation: ecoDash 3.1s -2.1s infinite linear; }
.eco-pulse-anim-6 { animation: ecoDash 3.8s -0.4s infinite linear; }

@keyframes ecoDash {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .eco-circuit-pulse {
    animation: none !important;
  }
}

/* ==========================================================================
   Botones de Acción
   ========================================================================== */
.btn-eco-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background-color: var(--eco-primary);
  color: #070c14 !important;
  font-weight: 700;
  padding: 0.85rem 1.85rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--eco-primary);
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 18px rgba(0, 191, 128, 0.25);
}

.btn-eco-primary:hover {
  background-color: var(--eco-primary-hover);
  border-color: var(--eco-primary-hover);
  color: #070c14 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 191, 128, 0.4);
}

.btn-eco-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.85rem 1.85rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease-in-out;
}

.btn-eco-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.hero-trust-bullets {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.hero-trust-bullets li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: #cbd5e1;
}

.hero-trust-bullets svg {
  color: var(--eco-primary);
  width: 1.15em;
  height: 1.15em;
}

/* ==========================================================================
   2. TARJETAS DE DICOTOMÍA DEL MERCADO (Sección 3 Dark)
   ========================================================================== */
.eco-comparison-card {
  background: var(--eco-card-bg);
  border: 1px solid var(--eco-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.eco-comparison-card.highlight {
  border-color: rgba(0, 191, 128, 0.45);
  background: linear-gradient(180deg, rgba(0, 191, 128, 0.08) 0%, rgba(13, 22, 38, 0.95) 100%);
  box-shadow: 0 10px 30px rgba(0, 191, 128, 0.1);
}

.eco-comparison-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.eco-comparison-card.highlight:hover {
  border-color: var(--eco-primary);
}

.eco-card-header {
  margin-bottom: 1.25rem;
}

.eco-card-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.eco-card-tag.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.eco-card-tag.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.eco-card-tag.success {
  background: rgba(0, 191, 128, 0.18);
  color: var(--eco-primary);
  border: 1px solid rgba(0, 191, 128, 0.4);
}

.eco-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.eco-feature-list li {
  padding: 0.6rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.eco-feature-list li:last-child {
  border-bottom: none;
}

.eco-feature-list li svg {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* ==========================================================================
   3. TICKER / SLIDER INTERACTIVO DE CAPACIDADES (Sección 4 Light)
   ========================================================================== */
.eco-ticker-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 1rem 0.5rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.eco-ticker-track::-webkit-scrollbar {
  height: 6px;
}

.eco-ticker-track::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 999px;
}

.eco-ticker-track::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 999px;
}

.eco-ticker-item {
  flex: 0 0 320px;
  background: var(--eco-light-card);
  border: 1px solid var(--eco-light-border);
  border-radius: 14px;
  padding: 1.5rem;
  scroll-snap-align: start;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eco-ticker-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.eco-ticker-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 191, 128, 0.12);
  color: #00875a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   4. ARQUITECTURA ERP DESACOPLADA & ARCA (Sección 5 Dark)
   ========================================================================== */
.eco-arch-card {
  background: var(--eco-card-bg);
  border: 1px solid var(--eco-border);
  border-radius: 16px;
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
}

.eco-arch-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--eco-primary) 0%, var(--eco-cyan) 100%);
}

.eco-connector-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Diagrama visual de colas de eventos */
.eco-pipeline-diagram {
  background: #040810;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 14px;
  padding: 1.5rem;
  font-family: var(--eco-font-mono);
  font-size: 0.88rem;
  margin-top: 1.5rem;
}

.pipeline-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.pipeline-step:last-child {
  border-bottom: none;
}

.pipeline-tag {
  color: var(--eco-cyan);
  font-weight: 700;
}

.pipeline-status {
  color: var(--eco-primary);
  font-size: 0.8rem;
}

/* ==========================================================================
   5. APP MOBILE DEDICADA PESADA (Sección 6 Dark)
   ========================================================================== */
.eco-mobile-preview {
  background: linear-gradient(145deg, #0e1726 0%, #070c14 100%);
  border: 1px solid var(--eco-border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.eco-mobile-phone-frame {
  max-width: 320px;
  margin: 0 auto;
  background: #000000;
  border: 4px solid #1e293b;
  border-radius: 36px;
  padding: 1.25rem 1rem;
  box-shadow: 0 20px 50px rgba(0, 229, 255, 0.15);
  position: relative;
}

.eco-phone-notch {
  width: 120px;
  height: 18px;
  background: #1e293b;
  border-radius: 0 0 12px 12px;
  margin: 0 auto 1rem;
}

.eco-phone-push-card {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.65rem;
  font-size: 0.8rem;
}

.eco-phone-push-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--eco-primary);
  color: #070c14;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   6. SOLUCIONES VERTICALES (Sección 7 Light)
   ========================================================================== */
.eco-vertical-card {
  background: var(--eco-light-card);
  border: 1px solid var(--eco-light-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.eco-vertical-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.eco-vertical-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(0, 191, 128, 0.12);
  color: #00875a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   7. SOPORTE DE EMERGENCIA & TRAYECTORIA (Sección 8 Dark)
   ========================================================================== */
.eco-support-box {
  background: linear-gradient(135deg, rgba(13, 22, 38, 0.9) 0%, rgba(7, 12, 20, 0.95) 100%);
  border: 1px solid rgba(0, 191, 128, 0.35);
  border-radius: 20px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.eco-support-badge-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 191, 128, 0.15);
  color: var(--eco-primary);
  border: 1px solid var(--eco-primary);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.eco-support-badge-pulse::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--eco-primary);
  box-shadow: 0 0 8px var(--eco-primary);
  animation: ecoPulseDot 1.6s infinite ease-in-out;
}

@keyframes ecoPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* ==========================================================================
   8. FAQ ACCORDION (Sección 10 Light)
   ========================================================================== */
.eco-faq-accordion .accordion-item {
  background-color: var(--eco-light-card);
  border: 1px solid var(--eco-light-border);
  border-radius: 12px !important;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.eco-faq-accordion .accordion-button {
  background-color: var(--eco-light-card);
  color: #0f172a;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1.25rem 1.5rem;
  box-shadow: none;
}

.eco-faq-accordion .accordion-button:not(.collapsed) {
  color: #00875a;
  background-color: rgba(0, 191, 128, 0.06);
  border-bottom: 1px solid var(--eco-light-border);
}

.eco-faq-accordion .accordion-body {
  padding: 1.25rem 1.5rem;
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ==========================================================================
   9. FORMULARIO DE CONTACTO (Sección 11 Dark)
   ========================================================================== */
.eco-contact-wrapper {
  background: var(--eco-card-bg);
  border: 1px solid var(--eco-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .eco-contact-wrapper {
    padding: 2rem 1.25rem;
  }
}

.eco-contact-guarantee {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #94a3b8;
  font-size: 0.88rem;
  margin-top: 1.5rem;
}

.eco-contact-guarantee svg {
  color: var(--eco-primary);
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}
