/* =============================================
   Desguaces BCN Latorre — Animations
   ============================================= */

:root {
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Card enter animation (scroll reveal) --- */
@keyframes desguace-card-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.desguace-card-enter {
  opacity: 0;
}

.desguace-card-enter.desguace-card-visible {
  animation: desguace-card-enter 0.4s var(--ease-out-quart) forwards;
}

/* --- Header shadow on scroll --- */
.botiga-site-header.header-scrolled {
  box-shadow: 0 2px 12px rgba(28, 25, 23, 0.12);
  transition: box-shadow 0.3s var(--ease-out-quart);
}

/* --- Product button press --- */
.products .product .button:active,
ul.products li.product .button:active {
  transform: scale(0.95) !important;
  transition: transform 0.1s ease-out !important;
}

/* --- Filter loading transition --- */
.desguace-products-area {
  transition: opacity 0.2s var(--ease-out-quart);
}

.desguace-products-area.desguace-loading {
  opacity: 0.6;
}

/* --- Sidebar filter item hover slide --- */
.desguace-filter-widget ul li a {
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.2s var(--ease-out-quart), border-color 0.2s ease;
}

.desguace-filter-widget ul li a:hover {
  padding-left: 10px;
}

.desguace-filter-widget ul li.chosen a {
  padding-left: 10px;
}

/* --- Breadcrumb hover --- */
.woocommerce-breadcrumb a {
  transition: color 0.15s ease;
}

/* --- Back to top button (Botiga) --- */
.botiga-back-to-top {
  transition: transform 0.3s var(--ease-out-quart), opacity 0.3s var(--ease-out-quart);
}

.botiga-back-to-top:hover {
  transform: translateY(-3px);
}

/* --- prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .desguace-card-enter {
    opacity: 1 !important;
  }
  
  .desguace-card-enter.desguace-card-visible {
    animation: none !important;
  }
  
  .desguace-products-area.desguace-loading {
    opacity: 1;
  }
}
