/*
 * animations.css — American Standard Products
 * All animation definitions using updated golden amber color scheme
 */

/* 1. Scroll-triggered fade-up */
.animate-fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children delays */
.animate-fade-up:nth-child(1) { transition-delay: 0s; }
.animate-fade-up:nth-child(2) { transition-delay: 0.08s; }
.animate-fade-up:nth-child(3) { transition-delay: 0.16s; }
.animate-fade-up:nth-child(4) { transition-delay: 0.24s; }
.animate-fade-up:nth-child(5) { transition-delay: 0.32s; }
.animate-fade-up:nth-child(6) { transition-delay: 0.40s; }

/* 2. Hero text reveal (staggered keyframes) */
.hero-eyebrow  { animation: slideUp 0.8s ease 0.05s both; }
.hero-title    { animation: slideUp 0.9s ease 0.2s  both; }
.hero-subtitle { animation: slideUp 0.8s ease 0.4s  both; }
.hero-cta      { animation: slideUp 0.8s ease 0.6s  both; }
.hero-stats    { animation: slideUp 0.8s ease 0.8s  both; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* 3. Card hover lift (Global default, overridden by high-fidelity templates) */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
    border-color: #f2c94c;
}

/* 4. Product image zoom on card hover */
.product-card .product-card__image-wrap img,
.product-card .wp-block-post-featured-image img {
    transition: transform 0.55s ease;
    will-change: transform;
}
.product-card:hover .product-card__image-wrap img,
.product-card:hover .wp-block-post-featured-image img {
    transform: scale(1.05);
}

/* 5. Button hover lift */
.wp-block-button__link,
.btn {
    transition: background-color 0.25s ease, color 0.25s ease,
                border-color 0.25s ease, transform 0.2s ease,
                box-shadow 0.2s ease;
}
.wp-block-button__link:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(242, 201, 76, 0.3);
}

/* 6. Nav link golden underline slide */
.site-header__nav .wp-block-navigation-item__content {
    position: relative;
    padding-bottom: 2px;
}
.site-header__nav .wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C9A84C;
    transition: width 0.3s ease;
}
.site-header__nav .wp-block-navigation-item__content:hover::after,
.site-header__nav .current-menu-item .wp-block-navigation-item__content::after {
    width: 100%;
}

/* 7. Sticky header background blur on scroll */
.site-header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.scrolled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07), 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* 8. Brand logo grayscale → full color on hover */
.brand-logo-item img,
.brand-logo-item .wp-block-post-featured-image img {
    filter: grayscale(100%);
    opacity: 0.55;
    transition: filter 0.35s ease, opacity 0.35s ease;
}
.brand-logo-item:hover img,
.brand-logo-item:hover .wp-block-post-featured-image img {
    filter: grayscale(0%);
    opacity: 1;
}

/* 9. Brand card hover */
.brand-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    border-color: #C9A84C;
}

/* 10. Feature card hover */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
}

/* 11. Stat number pulse when counter finishes */
@keyframes goldPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.stat-number.animated {
    animation: goldPulse 0.5s ease 0.1s;
}

/* 12. Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.catalog-loading__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #E8E2D6;
    border-top-color: #C9A84C;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

/* 13. Form field focus glow */
.form-field__input:focus,
.form-field__textarea:focus,
.form-field__select:focus,
.filter-group__select:focus,
.filter-group__search:focus {
    outline: none;
    border-color: #C9A84C;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 14. Lightbox backdrop fade */
.lightbox-backdrop {
    animation: fadeIn 0.25s ease;
}
.lightbox-inner {
    animation: scaleIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1);    }
}

/* 15. Mobile menu slide-in */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0);   }
}
