/* Animaciones de la tienda: aparición al hacer scroll y respuesta a cada interacción.
   Todo se apaga si la persona pidió «reducir movimiento». */

html { scroll-behavior: smooth; }

/* ---------- Aparición al hacer scroll (la activa animaciones.js) ---------- */
.rv {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.rv.rv-ok { opacity: 1; transform: none; }

/* ---------- Barra de avance al bajar por la página ---------- */
.scroll-progreso {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3000;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--hovi-gold), #e6c79d);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* ---------- Botones: se hunden al presionar y sueltan una onda ---------- */
.tf-btn, .tf-button, .co-boton, .cf-boton, .sf-boton, .casos-cta a, .error-page-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background-color 0.25s, color 0.25s;
}
.tf-btn:active, .tf-button:active, .co-boton:active, .cf-boton:active, .sf-boton:active, .casos-cta a:active, .error-page-btn:active {
    transform: scale(0.96);
}
.onda {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    pointer-events: none;
    animation: onda 0.6s ease-out forwards;
}
@keyframes onda { to { transform: scale(1); opacity: 0; } }

/* ---------- Contadores del carrito y favoritos: rebotan al cambiar ---------- */
.tf-cart-count.rebote, .toolbar-count.rebote, .count-box.rebote { animation: rebote 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes rebote {
    0% { transform: scale(1); }
    40% { transform: scale(1.55); }
    100% { transform: scale(1); }
}

/* ---------- Iconos del encabezado ---------- */
.header-main .icon, .header-main .nav-icon-item { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.header-main .nav-icon-item:hover > .icon, .header-main .nav-icon-item:hover > i { transform: translateY(-3px) scale(1.12); }

/* ---------- Tarjetas de producto ---------- */
.card-product .product-img img { transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.card-product:hover .product-img img { transform: scale(1.05); }

/* ---------- Campos de formulario de la tienda ---------- */
.container input[type="text"]:focus, .container input[type="email"]:focus, .container input[type="tel"]:focus,
.container input[type="search"]:focus, .container textarea:focus, .container select:focus {
    transition: box-shadow 0.25s, border-color 0.25s;
}

/* ---------- Enlaces de texto del contenido ---------- */
.flat-title a, .tf-page-content a:not(.tf-btn) { transition: color 0.2s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rv { opacity: 1; transform: none; transition: none; }
    .scroll-progreso { display: none; }
    .onda, .rebote { animation: none !important; }
    .tf-btn, .tf-button, .co-boton, .cf-boton, .sf-boton { transition: none; }
}
