/*
 * Efectos visuales integrados para General Ecuador.
 * Se cargan despues del CSS principal del tema.
 */

:root {
  --general-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --general-effect-shadow: 0 18px 34px rgba(16, 20, 24, 0.13);
  --general-effect-ring: 0 0 0 1px rgba(34, 151, 211, 0.22);
}

.general-effects-ready .hero-copy .eyebrow,
.general-effects-ready .hero-copy .hero-title,
.general-effects-ready .hero-copy .hero-description,
.general-effects-ready .hero-copy .hero-actions {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  animation: generalHeroEnter 0.58s var(--general-ease-out) both;
}

.general-effects-ready .hero-copy .hero-title {
  animation-delay: 90ms;
}

.general-effects-ready .hero-copy .hero-description {
  animation-delay: 170ms;
}

.general-effects-ready .hero-copy .hero-actions {
  animation-delay: 250ms;
}

@keyframes generalHeroEnter {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.general-reveal-ready .general-reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.55s var(--general-ease-out),
    transform 0.55s var(--general-ease-out);
}

.general-reveal-ready .general-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.general-reveal-ready .general-reveal-d1 {
  transition-delay: 70ms;
}

.general-reveal-ready .general-reveal-d2 {
  transition-delay: 130ms;
}

.general-reveal-ready .general-reveal-d3 {
  transition-delay: 190ms;
}

.general-reveal-ready .general-reveal-d4 {
  transition-delay: 250ms;
}

.product-card,
.shop-product-card {
  transition:
    transform 0.24s var(--general-ease-out),
    box-shadow 0.24s var(--general-ease-out),
    border-color 0.24s ease;
}

.product-card:hover,
.product-card:focus-within,
.shop-product-card:hover,
.shop-product-card:focus-within {
  border-color: rgba(34, 151, 211, 0.42);
  box-shadow: var(--general-effect-shadow), var(--general-effect-ring);
  transform: translateY(-5px);
}

.product-media,
.shop-product-media {
  isolation: isolate;
}

.product-media img,
.shop-product-media img {
  transition: transform 0.34s var(--general-ease-out);
}

.product-card:hover .product-media img,
.product-card:focus-within .product-media img {
  transform: scale(1.025);
}

.shop-product-card:hover .shop-product-media img,
.shop-product-card:focus-within .shop-product-media img {
  transform: translateY(var(--shop-product-image-offset-y, -8%))
    scale(calc(var(--shop-product-image-scale, 1.2) * 1.025));
}

.product-media::after,
.shop-product-media::after {
  content: "Ver producto";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: flex;
  min-height: 72px;
  align-items: flex-end;
  justify-content: center;
  padding: 0 14px 14px;
  background: linear-gradient(to top, rgba(6, 96, 142, 0.72), rgba(6, 96, 142, 0));
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 6px, 0);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.product-card:hover .product-media::after,
.product-card:focus-within .product-media::after,
.shop-product-card:hover .shop-product-media::after,
.shop-product-card:focus-within .shop-product-media::after {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.product-body > a,
.shop-buy-link,
.shop-view-link,
.primary-link,
.secondary-link,
.general-button {
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s var(--general-ease-out);
}

.product-body > a:hover,
.product-body > a:focus-visible,
.shop-buy-link:hover,
.shop-buy-link:focus-visible,
.shop-view-link:hover,
.shop-view-link:focus-visible,
.primary-link:hover,
.primary-link:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible,
.general-button:hover,
.general-button:focus-visible {
  box-shadow: 0 10px 22px rgba(34, 151, 211, 0.2);
  transform: translateY(-2px);
}

.feature-tile {
  transition:
    transform 0.24s var(--general-ease-out),
    box-shadow 0.24s var(--general-ease-out),
    filter 0.24s ease;
}

.feature-tile:hover,
.feature-tile:focus-within {
  box-shadow: 0 20px 38px rgba(16, 20, 24, 0.18);
  filter: brightness(1.035);
  transform: translateY(-4px);
}

.feature-tile a {
  transition: gap 0.2s ease;
}

.feature-tile:hover a,
.feature-tile:focus-within a {
  gap: 10px;
}

.benefit-grid strong {
  display: inline-block;
}

.benefit-grid article.is-visible strong {
  animation: generalPopIn 0.46s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes generalPopIn {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(5px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.benefit-grid article,
.category-image,
.b2b-steps li,
.b2b-benefits li {
  transition:
    transform 0.22s var(--general-ease-out),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.benefit-grid article:hover,
.benefit-grid article:focus-within {
  box-shadow: 0 16px 30px rgba(16, 20, 24, 0.14);
  transform: translateY(-3px);
}

.category-item:hover .category-image,
.category-item:focus-visible .category-image {
  box-shadow:
    0 0 0 4px rgba(34, 151, 211, 0.12),
    0 16px 28px rgba(16, 20, 24, 0.14);
  transform: scale(1.035);
}

.b2b-steps li:hover,
.b2b-benefits li:hover {
  transform: translateX(3px);
}

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.whatsapp-float-label {
  max-width: 180px;
  border: 1px solid rgba(199, 208, 206, 0.8);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 20, 24, 0.13);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.whatsapp-float:hover .whatsapp-float-label,
.whatsapp-float:focus-visible .whatsapp-float-label {
  opacity: 1;
  transform: translateX(0);
}

.whatsapp-float-btn {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.32);
  transition:
    box-shadow 0.22s ease,
    transform 0.22s var(--general-ease-out);
}

.whatsapp-float-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(37, 211, 102, 0.28);
  animation: generalWhatsappPulse 2.5s ease-out infinite;
}

.whatsapp-float-btn svg {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  fill: #fff;
}

.whatsapp-float:hover .whatsapp-float-btn,
.whatsapp-float:focus-visible .whatsapp-float-btn {
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.42);
  transform: scale(1.04);
}

@keyframes generalWhatsappPulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.62);
  }
}

@media (max-width: 760px) {
  .product-media::after,
  .shop-product-media::after {
    content: none;
  }

  .whatsapp-float {
    right: 14px;
    bottom: 14px;
  }

  .whatsapp-float-label {
    display: none;
  }

  .whatsapp-float-btn {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .general-effects-ready .hero-copy .eyebrow,
  .general-effects-ready .hero-copy .hero-title,
  .general-effects-ready .hero-copy .hero-description,
  .general-effects-ready .hero-copy .hero-actions,
  .general-reveal-ready .general-reveal,
  .benefit-grid article.is-visible strong,
  .whatsapp-float-btn::before {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .product-card:hover,
  .product-card:focus-within,
  .shop-product-card:hover,
  .shop-product-card:focus-within,
  .feature-tile:hover,
  .feature-tile:focus-within,
  .benefit-grid article:hover,
  .benefit-grid article:focus-within,
  .category-item:hover .category-image,
  .category-item:focus-visible .category-image {
    transform: none;
  }
}
