/**
 * YouParfum Haute Luxury Micro-Interactions & Animation Engine
 * Fast, Snappy, Elegant & Delightful (0.2s - 0.38s cubic-bezier curves).
 * Inspired by Brunello Cucinelli, Chanel & Apple High-End Digital Experiences.
 * Strict WCAG 2.2 AA compliant with full prefers-reduced-motion support.
 */

/* ==========================================================================
   1. NAVBAR & NAVIGATION HAIRLINE UNDERLINE SLIDE
   ========================================================================== */
.woodmart-navigation .item-level-0 > a,
.fml-nav-links a,
.yp-nav-links a,
.fml-main-nav-link {
    position: relative !important;
    transition: color 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.woodmart-navigation .item-level-0 > a::after,
.fml-nav-links a::after,
.yp-nav-links a::after,
.fml-main-nav-link::after {
    content: '' !important;
    position: absolute !important;
    bottom: 20px !important;
    left: clamp(4px, 0.45vw, 8px) !important;
    right: clamp(4px, 0.45vw, 8px) !important;
    width: auto !important;
    height: 2px !important;
    background: #000000 !important;
    border-radius: 1px !important;
    transform: scaleX(0) !important;
    transform-origin: center !important;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 15 !important;
}

.woodmart-navigation .item-level-0 > a:hover::after,
.fml-nav-links a:hover::after,
.yp-nav-links a:hover::after,
.fml-main-nav-link:hover::after,
.woodmart-navigation .item-level-0.current-menu-item > a::after,
.fml-main-nav-item.is-active .fml-main-nav-link::after,
.fml-main-nav-item.is-active > .fml-main-nav-link::after,
.fml-main-nav-link.is-active::after,
.fml-nav-links a.active::after {
    transform: scaleX(1) !important;
    transform-origin: center !important;
}

/* ==========================================================================
   2. NAVBAR ACTION ICONS & CART BADGE DELIGHT
   ========================================================================== */
.fml-nav-actions a,
.fml-nav-actions button,
.fml-hamburger-btn,
.fml-header-boutique-link {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
}

.fml-nav-actions a:hover,
.fml-nav-actions button:hover,
.fml-hamburger-btn:hover,
.fml-header-boutique-link:hover {
    transform: translateY(-2px) scale(1.08) !important;
    color: #b59d6a !important;
}

.fml-nav-actions a:active,
.fml-nav-actions button:active,
.fml-hamburger-btn:active,
.fml-header-boutique-link:active {
    transform: translateY(0) scale(0.95) !important;
}

/* Cart Badge Spring Pop Animation */
@keyframes ypCartBadgeBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.35); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.fml-cart-badge.yp-badge-updated,
.wd-cart-number.yp-badge-updated,
.fml-cart-badge:hover {
    animation: ypCartBadgeBounce 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

/* ==========================================================================
   3. PRODUCT CARDS & PEDESTALS SILKY ZOOM & ELEVATION
   ========================================================================== */
.product-grid-item,
.yp-pedestal-card,
.yp-novita-card,
.yp-luxury-card,
.yp-card-wrapper,
.bc-store-card,
.yp-format-card,
.fml-editorial-block,
.fml-review-card,
.fml-faq-card,
.fml-legal-card,
.fml-legal-concierge-card,
.yp-franchise-pillar-card {
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease !important;
    will-change: transform, box-shadow;
}

:is(.product-grid-item, .yp-pedestal-card, .yp-novita-card, .yp-luxury-card, .yp-card-wrapper):hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 16px 36px rgba(32, 28, 22, 0.08) !important;
    border-color: #c7b69c !important;
}

:is(.bc-store-card, .yp-format-card, .fml-review-card, .fml-faq-card, .fml-legal-card):hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 14px 30px rgba(32, 28, 22, 0.07) !important;
    border-color: #c7b69c !important;
}

/* Flacon & Image Silky Zoom */
.product-grid-item .product-element-top,
.yp-catalog-img-wrap,
.yp-card-image-wrap,
.yp-card-thumb-link,
.fml-editorial-img-wrap {
    overflow: hidden !important;
}

.product-grid-item img,
.yp-pedestal-card .yp-catalog-img,
.yp-novita-card img,
.yp-card-thumb-link img,
.fml-editorial-img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform;
}

:is(.product-grid-item, .yp-pedestal-card, .yp-novita-card, .yp-card-thumb-link, .fml-editorial-block):hover img {
    transform: scale(1.045) !important;
}

/* Quick Add Button Smooth Fade on Card */
.product-grid-item .woodmart-add-btn,
.product-grid-item .wd-add-btn,
.yp-luxury-card .yp-btn-quick-add,
.yp-catalog-btn {
    transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.22s ease, border-color 0.22s ease !important;
}

/* ==========================================================================
   4. VINTAGE & OFFERTA BADGES MICRO-INTERACTION
   ========================================================================== */
.yp-catalog-badge {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease !important;
    will-change: transform;
}

.yp-pedestal-card:hover .yp-catalog-badge,
.product-grid-item:hover .yp-catalog-badge {
    transform: translateY(-2px) scale(1.06) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.yp-pedestal-card:hover .yp-catalog-badge.yp-badge-vintage {
    border-color: #b59d6a !important;
}

/* ==========================================================================
   5. HAUTE LUXURY BUTTONS & TACTILE PRESS
   ========================================================================== */
button:not(.bc-modal-close):not(.fml-slider-bullet),
.btn,
.button,
.yp-catalog-btn,
.fml-slide-cta-btn,
.yp-ed-buy-btn,
.yp-novita-btn,
.yp-btn-primary-pill,
.yp-btn-secondary-pill,
.yp-btn-whatsapp-pill,
#place_order,
.yp-empty-cart-btn,
.yp-btn-focus,
.bc-btn-submit,
.bc-btn-book,
.fml-btn-gold,
.yp-btn-submit-franchise {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease !important;
    will-change: transform, box-shadow;
}

button:not(.bc-modal-close):not(.fml-slider-bullet):hover,
.btn:hover,
.button:hover,
.yp-catalog-btn:hover,
.fml-slide-cta-btn:hover,
.yp-ed-buy-btn:hover,
.yp-novita-btn:hover,
.yp-btn-primary-pill:hover,
.yp-btn-secondary-pill:hover,
.yp-btn-whatsapp-pill:hover,
#place_order:hover,
.yp-empty-cart-btn:hover,
.yp-btn-focus:hover,
.bc-btn-submit:hover,
.bc-btn-book:hover,
.fml-btn-gold:hover,
.yp-btn-submit-franchise:hover {
    transform: translateY(-2px) scale(1.015) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16) !important;
}

button:not(.bc-modal-close):not(.fml-slider-bullet):active,
.btn:active,
.button:active,
.yp-catalog-btn:active,
.fml-slide-cta-btn:active,
.yp-ed-buy-btn:active,
.yp-novita-btn:active,
.yp-btn-primary-pill:active,
.yp-btn-secondary-pill:active,
.yp-btn-whatsapp-pill:active,
#place_order:active,
.yp-empty-cart-btn:active,
.yp-btn-focus:active,
.bc-btn-submit:active,
.bc-btn-book:active,
.fml-btn-gold:active,
.yp-btn-submit-franchise:active {
    transform: translateY(0) scale(0.985) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

/* ==========================================================================
   6. FAST & SILKY SCROLL REVEAL (SNAPPY 0.38s CASCADES)
   ========================================================================== */
.yp-anim-reveal {
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.yp-anim-reveal.is-revealed {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Staggered cascades with fast 0.05s steps */
.yp-anim-reveal:nth-child(2) { transition-delay: 0.05s; }
.yp-anim-reveal:nth-child(3) { transition-delay: 0.10s; }
.yp-anim-reveal:nth-child(4) { transition-delay: 0.15s; }
.yp-anim-reveal:nth-child(5) { transition-delay: 0.20s; }
.yp-anim-reveal:nth-child(6) { transition-delay: 0.25s; }

/* ==========================================================================
   7. MODAL, DRAWER & FLOATING AUDIO WIDGET
   ========================================================================== */
.bc-booking-modal-backdrop,
.cart-widget-side,
.wd-cart-opened,
#fmlDrawerBackdrop {
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
                backdrop-filter 0.28s ease !important;
}

.bc-booking-modal-box {
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.28s ease !important;
    animation: ypModalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ypModalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Audio Widget Pill Subtle Hover Glow */
#ypAudioPill,
.yp-audio-pill {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s ease, 
                border-color 0.25s ease !important;
}

#ypAudioPill:hover,
.yp-audio-pill:hover {
    transform: translateY(-2px) scale(1.03) !important;
    border-color: rgba(181, 157, 106, 0.6) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

/* Review Stars Micro-Scale */
.fml-review-card:hover .fml-review-stars {
    transform: scale(1.06);
    transition: transform 0.25s ease;
}

/* ==========================================================================
   8. ACCESSIBILITY: WCAG 2.2 AA PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .yp-anim-reveal {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}
