/* =========================================================
   TiendaFácil — capa de estilos y animaciones
   Cargar DESPUÉS de styles.css (Bootstrap 5.2.3)
   ========================================================= */

/* ---------- 1. Marca: colores y re-tema de Bootstrap ---------- */
:root {
  /* Paleta tomada de tus clases en styles.css */
  --tf-pink: #ca4497;          /* .custom-text-primary */
  --tf-pink-dark: #a3307a;
  --tf-pink-soft: #ff95f6;     /* inicio de .custom-bg-gradient-x */
  --tf-orange: #ffab5c;        /* fin de .custom-bg-gradient-x */
  --tf-gold: #d4af37;          /* .text-gold */
  --tf-dark: #17131a;
  --tf-gradient: linear-gradient(135deg, #ca4497 0%, #ff95f6 50%, #ffab5c 100%);
  /* Versión más oscura para fondos con texto blanco (mejor contraste) */
  --tf-gradient-deep: linear-gradient(135deg, #8d2a69 0%, #ca4497 55%, #f0739f 100%);
  --tf-radius: 1rem;
  --tf-ease: cubic-bezier(.22, .61, .36, 1);

  /* Bootstrap usa estas variables en bg-primary, text-primary, links, etc. */
  --bs-primary: #ca4497;
  --bs-primary-rgb: 202, 68, 151;
  --bs-link-color: #ca4497;
  --bs-link-hover-color: #a3307a;
}

.btn-primary {
  --bs-btn-bg: var(--tf-pink);
  --bs-btn-border-color: var(--tf-pink);
  --bs-btn-hover-bg: var(--tf-pink-dark);
  --bs-btn-hover-border-color: var(--tf-pink-dark);
  --bs-btn-active-bg: #8d2a69;
  --bs-btn-active-border-color: #8d2a69;
  --bs-btn-focus-shadow-rgb: 202, 68, 151;
  --bs-btn-disabled-bg: var(--tf-pink);
  --bs-btn-disabled-border-color: var(--tf-pink);
}

.text-pink { color: var(--tf-pink) !important; }
.bg-dark   { background-color: var(--tf-dark) !important; }

.tf-gradient-text {
  background: var(--tf-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.tf-gradient-bg { background-image: var(--tf-gradient); }

/* Evita scroll horizontal en móvil mientras los elementos entran desde los lados
   (clip no rompe la navbar sticky, a diferencia de overflow:hidden) */
main { overflow-x: clip; }

/* Las secciones con id quedan visibles bajo la navbar fija */
section[id], header[id] { scroll-margin-top: 80px; }

/* ---------- 2. Botones con brillo y elevación ---------- */
.tf-btn-shine {
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--tf-ease), box-shadow .25s var(--tf-ease), background-color .2s;
}
.tf-btn-shine:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(202, 68, 151, .6);
}
.tf-btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--tf-ease);
}
.tf-btn-shine:hover::after { transform: translateX(120%); }

/* ---------- 3. Navbar fija que cambia al hacer scroll ---------- */
.tf-navbar {
  transition: padding .3s var(--tf-ease), background-color .3s, box-shadow .3s;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.tf-navbar.is-scrolled {
  padding-top: .5rem;
  padding-bottom: .5rem;
  background-color: rgba(23, 19, 26, .88) !important;
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.tf-brand { font-weight: 800; letter-spacing: -.02em; font-size: 1.4rem; }
.tf-brand span { background: var(--tf-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tf-navbar .nav-link { position: relative; }
@media (min-width: 992px) {
  .tf-navbar .navbar-nav .nav-link { padding-left: .75rem; padding-right: .75rem; }
  .tf-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: .75rem; right: .75rem; bottom: .2rem;
    height: 2px;
    background: var(--tf-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--tf-ease);
  }
  .tf-navbar .nav-link:hover::after,
  .tf-navbar .nav-link.active::after { transform: scaleX(1); }
}

/* ---------- 4. Hero ---------- */
.tf-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.tf-hero::before,
.tf-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .45;
  animation: tf-blob 14s ease-in-out infinite alternate;
}
.tf-hero::before { width: 420px; height: 420px; background: var(--tf-pink); top: -120px; left: -120px; }
.tf-hero::after  { width: 360px; height: 360px; background: var(--tf-orange); bottom: -140px; right: -80px; animation-delay: -6s; opacity: .25; }

@keyframes tf-blob {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-30px, 70px) scale(.95); }
}

.tf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  border-radius: 50rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
  font-size: .9rem;
}
.tf-eyebrow .tf-dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61,220,132,.7);
  animation: tf-ping 2s infinite;
}
@keyframes tf-ping {
  0%   { box-shadow: 0 0 0 0 rgba(61,220,132,.7); }
  70%  { box-shadow: 0 0 0 10px rgba(61,220,132,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); }
}

/* Palabra que rota (Shopify / WooCommerce / PrestaShop) */
.tf-rotator {
  display: inline-block;
  font-weight: 700;
  color: var(--tf-orange);
  transition: opacity .35s, transform .35s var(--tf-ease);
}
.tf-rotator.is-out { opacity: 0; transform: translateY(-8px); }

/* Entrada escalonada del hero al cargar */
.tf-hero-in > * {
  opacity: 0;
  transform: translateY(20px);
  animation: tf-fade-up .8s var(--tf-ease) forwards;
}
.tf-hero-in > *:nth-child(1) { animation-delay: .05s; }
.tf-hero-in > *:nth-child(2) { animation-delay: .2s; }
.tf-hero-in > *:nth-child(3) { animation-delay: .35s; }
.tf-hero-in > *:nth-child(4) { animation-delay: .5s; }
@keyframes tf-fade-up { to { opacity: 1; transform: none; } }

/* Imágenes que flotan suavemente */
.tf-float { animation: tf-float 6s ease-in-out infinite; }
@keyframes tf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.tf-hero-img {
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
}

/* ---------- 5. Aparición al hacer scroll ---------- */
/* Solo se ocultan si JS está activo (clase tf-js en <html>) */
.tf-js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--tf-ease), transform .8s var(--tf-ease);
  transition-delay: var(--tf-delay, 0s);
  will-change: opacity, transform;
}
.tf-js [data-reveal="left"]  { transform: translateX(-40px); }
.tf-js [data-reveal="right"] { transform: translateX(40px); }
.tf-js [data-reveal="zoom"]  { transform: scale(.92); }
.tf-js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 6. Tarjetas de servicios ---------- */
.tf-card {
  border-radius: var(--tf-radius) !important;
  transition: transform .35s var(--tf-ease), box-shadow .35s var(--tf-ease);
  position: relative;
}
.tf-card::before {
  /* borde degradado que aparece al pasar el mouse */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--tf-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.tf-card:hover,
.tf-card:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 22px 40px -18px rgba(202, 68, 151, .45) !important;
}
.tf-card:hover::before,
.tf-card:focus-within::before { opacity: 1; }

.tf-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .85rem;
  background: var(--tf-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform .4s var(--tf-ease);
}
.tf-card:hover .tf-icon { transform: rotate(-8deg) scale(1.1); }

.tf-link-arrow i { transition: transform .25s var(--tf-ease); display: inline-block; }
.tf-link-arrow:hover i { transform: translateX(5px); }

/* ---------- 7. Planes ---------- */
.tf-plan {
  border-radius: var(--tf-radius) !important;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08) !important;
  transition: transform .35s var(--tf-ease), box-shadow .35s var(--tf-ease);
}
.tf-plan:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 50px -20px rgba(202, 68, 151, .5) !important;
}
.tf-plan-header {
  background-image: var(--tf-gradient-deep);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #fff;
  transition: background-position .8s var(--tf-ease);
}
.tf-plan:hover .tf-plan-header { background-position: 100% 50%; }
.tf-plan-header .tf-plan-logo {
  width: 56px; height: 56px;
  background: #fff;
  border-radius: .75rem;
  padding: .4rem;
  object-fit: contain;
  box-shadow: 0 6px 14px rgba(0,0,0,.15);
}
.tf-plan-price { font-size: 1.75rem; font-weight: 800; line-height: 1; }

.tf-checklist { list-style: none; padding-left: 0; }
.tf-checklist li {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .45rem 0;
  border-bottom: 1px dashed rgba(0,0,0,.08);
}
.tf-checklist li:last-child { border-bottom: 0; }
.tf-checklist i { color: var(--tf-pink); font-size: 1.15rem; line-height: 1.3; }

/* ---------- 8. Listas con viñeta rosa ---------- */
.custom-pink-list li { transition: transform .25s var(--tf-ease); }
.custom-pink-list li:hover { transform: translateX(6px); }
.custom-pink-list .bi { flex-shrink: 0; }

/* Tarjetas de hosting sobre fondo oscuro */
.tf-dark-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--tf-radius);
  padding: 1.25rem 1.5rem;
  transition: border-color .3s, background-color .3s, transform .3s var(--tf-ease);
}
.tf-dark-card:hover {
  border-color: rgba(202, 68, 151, .6);
  background: rgba(202, 68, 151, .08);
  transform: translateY(-4px);
}

/* ---------- 9. Proceso de trabajo ---------- */
.tf-step {
  border-radius: var(--tf-radius) !important;
  transition: transform .35s var(--tf-ease), box-shadow .35s var(--tf-ease);
}
.tf-step:hover { transform: translateY(-6px); }
.tf-step-num {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: var(--tf-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  opacity: .9;
}
@media (min-width: 992px) {
  /* línea que conecta los pasos */
  .tf-steps { position: relative; }
  .tf-steps::before {
    content: "";
    position: absolute;
    top: 3.4rem;
    left: 12%;
    right: 12%;
    height: 2px;
    background: var(--tf-gradient);
    opacity: .35;
    z-index: 0;
  }
  .tf-steps > * { position: relative; z-index: 1; }
}

/* ---------- 10. Bloque del fundador ---------- */
.tf-quote { position: relative; }
.tf-quote .bi-quote {
  font-size: 4rem;
  line-height: 1;
  background: var(--tf-gradient);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.tf-avatar {
  width: 56px; height: 56px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--tf-pink);
}

/* ---------- 11. Preguntas frecuentes (acordeón) ---------- */
.tf-faq .accordion {
  --bs-accordion-border-color: rgba(0,0,0,.08);
  --bs-accordion-active-color: var(--tf-pink-dark);
  --bs-accordion-active-bg: rgba(202, 68, 151, .07);
  --bs-accordion-btn-focus-border-color: var(--tf-pink-soft);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(202, 68, 151, .2);
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23a3307a'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
.tf-faq .accordion-item {
  border-radius: .85rem !important;
  overflow: hidden;
  margin-bottom: .85rem;
  border: 1px solid rgba(0,0,0,.08) !important;
  transition: box-shadow .3s;
}
.tf-faq .accordion-item:hover { box-shadow: 0 10px 24px -14px rgba(0,0,0,.25); }
.tf-faq .accordion-button { font-weight: 600; gap: .85rem; }
.tf-faq .tf-faq-num {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--tf-gradient);
  color: #fff;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 12. Llamada a la acción final ---------- */
.tf-cta {
  background-image: var(--tf-gradient-deep);
  background-size: 200% 200%;
  animation: tf-gradient-move 10s ease infinite;
  border-radius: 1.5rem;
}
@keyframes tf-gradient-move {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- 13. Botones flotantes ---------- */
.tf-whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 10px 25px -5px rgba(37, 211, 102, .6);
  transition: transform .25s var(--tf-ease);
  text-decoration: none;
}
.tf-whatsapp:hover { color: #fff; transform: scale(1.1); }
.tf-whatsapp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: tf-ring 2.2s ease-out infinite;
}
@keyframes tf-ring {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.tf-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 5.75rem;
  z-index: 1040;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--tf-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s var(--tf-ease), visibility .3s, background-color .2s;
}
.tf-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.tf-to-top:hover { background: var(--tf-pink); }

/* ---------- 14. Accesibilidad: sin animaciones si el usuario lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .tf-js [data-reveal],
  .tf-hero-in > * { opacity: 1 !important; transform: none !important; }
}
