/* Evaly Modern Animations and Final Touches */

/* ===== LOADING ANIMATIONS ===== */
@keyframes evaly-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(47, 84, 235, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(47, 84, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(47, 84, 235, 0);
    }
}

@keyframes evaly-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes evaly-scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== PRODUCT CARDS ENTRANCE ANIMATION ===== */
.product_item {
    animation: evaly-slide-up 0.6s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

/* ===== MODERN BUTTON STYLES ===== */
.add_cart_btn,
.addcartbutton,
.cart_btn a,
.pro_btn button {
    position: relative !important;
    overflow: hidden !important;
}

.add_cart_btn::before,
.addcartbutton::before,
.cart_btn a::before,
.pro_btn button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.add_cart_btn:hover::before,
.addcartbutton:hover::before,
.cart_btn a:hover::before,
.pro_btn button:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== FLOATING ACTION BUTTON EFFECT ===== */
.add_cart_btn:active,
.addcartbutton:active,
.pro_btn button:active {
    animation: evaly-pulse 0.6s ease-out;
}

/* ===== MODERN CARD INTERACTION ===== */
.product_item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(47, 84, 235, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.product_item:hover::after {
    opacity: 1;
}

/* ===== SEARCH BAR FOCUS EFFECT ===== */
.main-search form input:focus {
    animation: evaly-scale-in 0.3s ease-out;
}

/* ===== BADGE MODERN ANIMATION ===== */
.sale-badge-box,
.sale-badge-inner {
    animation: evaly-pulse 2s infinite;
}

/* ===== HEADER STICKY EFFECT ===== */
.main-header.sticky {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    transition: all 0.3s ease !important;
}

/* ===== CATEGORY MENU HOVER WAVE EFFECT ===== */
.catagory_menu ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--evaly-blue), var(--evaly-dark));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.catagory_menu ul li:hover a::before {
    width: 80%;
}

/* ===== MOBILE NAVIGATION ENHANCEMENT ===== */
.footer_nav ul li a {
    position: relative !important;
    overflow: hidden !important;
}

.footer_nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(90deg, transparent, rgba(47, 84, 235, 0.1), transparent); */
    transition: left 0.5s ease;
}

.footer_nav ul li a:hover::before {
    left: 100%;
}

/* ===== PRODUCT IMAGE OVERLAY EFFECT ===== */
.pro_img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(47, 84, 235, 0) 0%, rgba(47, 84, 235, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product_item:hover .pro_img::after {
    opacity: 1;
}

/* ===== QUICK VIEW BUTTON SLIDE EFFECT ===== */
.quick_view_btn {
    transform: translateY(100%) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.product_item:hover .quick_view_btn {
    transform: translateY(0) !important;
}

/* ===== PRICE HIGHLIGHT EFFECT ===== */
.pro_price p {
    position: relative !important;
}

.pro_price p::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--evaly-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.product_item:hover .pro_price p::after {
    width: 60%;
}

/* ===== LOADING SPINNER FOR CART ACTIONS ===== */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== MICRO-INTERACTIONS ===== */
.header-list-items ul li span {
    animation: evaly-pulse 1.5s ease-in-out infinite;
}

/* ===== SMOOTH SCROLL BEHAVIOR ===== */
html {
    scroll-behavior: smooth;
}

/* ===== ENHANCED FOCUS STATES FOR ACCESSIBILITY ===== */
*:focus {
    outline: 2px solid var(--evaly-blue) !important;
    outline-offset: 2px !important;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--evaly-blue) !important;
    outline-offset: 2px !important;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 768px) {
    .pro_name a {
        font-size: 14px !important;
    }
    
    .pro_price p {
        font-size: 16px !important;
    }
    
    .add_cart_btn,
    .addcartbutton,
    .pro_btn button {
        font-size: 13px !important;
        padding: 10px 16px !important;
    }
}

/* ===== DARK MODE SUPPORT (FUTURE READY) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --evaly-white: #1a1a1a;
        --evaly-text: #ffffff;
        --evaly-light: #2a2a2a;
        --evaly-border: #3a3a3a;
    }
}
