/**
 * Footer Sticky Menu - Design Premium Fluido
 * Interface moderna com animações orgânicas
 */

/* Container principal com glassmorphism */
.mfn-footer-stickymenu-custom {
    display: none;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 9999;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    box-shadow: 
        0 -2px 20px rgba(0, 0, 0, 0.08),
        0 -1px 6px rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* Efeito de luz suave no topo */
.mfn-footer-stickymenu-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.8) 50%, 
        transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Lista com espaçamento fluido */
.mfn-footer-stickymenu-custom ul {
    padding: 0 15px;
    margin: 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 420px;
    margin: 0 auto;
}

/* Items com área de toque generosa */
.mfn-footer-stickymenu-custom ul li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
}

/* Links com transições suaves */
.mfn-footer-stickymenu-custom ul li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6b7280;
    width: 100%;
    height: 100%;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-tap-highlight-color: transparent;
    padding: 4px 8px;
    border-radius: 16px;
}

/* Ícones com animação suave */
.mfn-footer-stickymenu-custom svg {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 4px !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05)) !important;
}

.mfn-footer-stickymenu-custom .path {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    vector-effect: non-scaling-stroke !important;
    transition: all 0.4s ease !important;
}

/* Texto elegante */
.mfn-footer-stickymenu-custom .sm-item {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    display: block !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    line-height: 1;
    opacity: 0.9;
}

/* Hover com glow suave */
.mfn-footer-stickymenu-custom li:not(.menu-item-cart) a:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-1px);
}

.mfn-footer-stickymenu-custom li:not(.menu-item-cart) a:hover svg {
    transform: translateY(-2px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.25));
}

.mfn-footer-stickymenu-custom li:not(.menu-item-cart) a:hover .sm-item {
    opacity: 1;
}

/* Active state com bounce */
.mfn-footer-stickymenu-custom li a:active {
    transform: scale(0.94);
}

/* Item ativo com indicador fluido */
.mfn-footer-stickymenu-custom li.current-menu-item:not(.menu-item-cart) a {
    color: #3b82f6;
}

.mfn-footer-stickymenu-custom li.current-menu-item:not(.menu-item-cart) a .sm-item {
    opacity: 1;
}


/* Cart - Design de destaque fluido */
.mfn-footer-stickymenu-custom .menu-item-cart {
    position: relative;
    margin: 0 -8px;
    z-index: 2;
}

/* Anel de luz animado */
.mfn-footer-stickymenu-custom .menu-item-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85px;
    height: 85px;
    background: radial-gradient(circle, 
        rgba(99, 102, 241, 0.15) 0%, 
        rgba(99, 102, 241, 0.05) 40%,
        transparent 70%);
    border-radius: 50%;
    animation: pulse-ring 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-ring {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.mfn-footer-stickymenu-custom .menu-item-cart a {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 24px;
    width: 66px;
    height: 66px;
    color: #ffffff;
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.35),
        0 2px 8px rgba(99, 102, 241, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    top: -18px;
    padding: 6px 0 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

/* Brilho animado no cart */
.mfn-footer-stickymenu-custom .menu-item-cart a::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 70%);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: rotate(45deg) translateY(100%); }
    100% { transform: rotate(45deg) translateY(-100%); }
}

.mfn-footer-stickymenu-custom .menu-item-cart a:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 30px rgba(99, 102, 241, 0.45),
        0 4px 12px rgba(99, 102, 241, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mfn-footer-stickymenu-custom .menu-item-cart a:active {
    transform: translateY(0) scale(0.98);
}

.mfn-footer-stickymenu-custom .menu-item-cart .cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.mfn-footer-stickymenu-custom .menu-item-cart svg {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 4px !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)) !important;
}

.mfn-footer-stickymenu-custom .menu-item-cart .path {
    stroke: #ffffff !important;
    stroke-width: 2 !important;
}

.mfn-footer-stickymenu-custom .menu-item-cart .sm-item {
    display: block !important;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    margin-top: 0;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

/* Contadores com animação */
.mfn-footer-stickymenu-custom .header-wishlist-count,
.mfn-footer-stickymenu-custom .header-cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 6px;
    box-shadow: 
        0 2px 8px rgba(239, 68, 68, 0.5),
        0 1px 3px rgba(0, 0, 0, 0.1);
    animation: badge-intro 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
}

.mfn-footer-stickymenu-custom .menu-item-cart .header-cart-count {
    background: #ffffff;
    color: #6366f1;
    box-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.1);
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    font-size: 9px;
}

@keyframes badge-intro {
    0% { 
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% { 
        transform: scale(1.2) rotate(90deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Animação do contador wishlist */
.mfn-footer-stickymenu-custom .menu-item-wishlist .header-wishlist-count {
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 2px 12px rgba(239, 68, 68, 0.7);
    }
}

/* Micro-interações fluidas */
.mfn-footer-stickymenu-custom li:not(.menu-item-cart) {
    position: relative;
}

/* Ripple melhorado */
.mfn-footer-stickymenu-custom li:not(.menu-item-cart) a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.mfn-footer-stickymenu-custom li:not(.menu-item-cart) a:active::after {
    width: 80px;
    height: 80px;
    opacity: 1;
}

/* Animação de entrada orgânica */
@keyframes slideUpFade {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile only com animação suave */
@media only screen and (max-width: 767px) {
    .mfn-footer-stickymenu-custom {
        display: block;
        animation: slideUpFade 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* Disabled state elegante */
.mfn-footer-stickymenu-custom a.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(100%);
}

/* Dark mode sofisticado */
@media (prefers-color-scheme: dark) {
    .mfn-footer-stickymenu-custom {
        background: rgba(23, 23, 23, 0.92);
        backdrop-filter: blur(30px) saturate(180%);
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 -2px 20px rgba(0, 0, 0, 0.4),
            0 -1px 6px rgba(0, 0, 0, 0.2);
    }
    
    .mfn-footer-stickymenu-custom::before {
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(255, 255, 255, 0.1) 50%, 
            transparent 100%);
    }
    
    .mfn-footer-stickymenu-custom ul li a {
        color: #9ca3af;
    }
    
    .mfn-footer-stickymenu-custom li:not(.menu-item-cart) a:hover {
        color: #60a5fa;
        background: rgba(96, 165, 250, 0.1);
    }
    
    .mfn-footer-stickymenu-custom li.current-menu-item:not(.menu-item-cart) a {
        color: #60a5fa;
    }
    
    .mfn-footer-stickymenu-custom .menu-item-cart a {
        background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
        box-shadow: 
            0 4px 20px rgba(124, 58, 237, 0.4),
            0 2px 8px rgba(124, 58, 237, 0.3);
    }
    
    .mfn-footer-stickymenu-custom .menu-item-cart::before {
        background: radial-gradient(circle, 
            rgba(124, 58, 237, 0.2) 0%, 
            rgba(124, 58, 237, 0.05) 40%,
            transparent 70%);
    }
}

/* Animação sequencial dos itens */
.mfn-footer-stickymenu-custom li {
    opacity: 0;
    animation: itemSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.mfn-footer-stickymenu-custom li:nth-child(1) { animation-delay: 0.05s; }
.mfn-footer-stickymenu-custom li:nth-child(2) { animation-delay: 0.1s; }
.mfn-footer-stickymenu-custom li:nth-child(3) { animation-delay: 0.15s; }
.mfn-footer-stickymenu-custom li:nth-child(4) { animation-delay: 0.2s; }
.mfn-footer-stickymenu-custom li:nth-child(5) { animation-delay: 0.25s; }

@keyframes itemSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Telas pequenas otimizadas */
@media only screen and (max-width: 360px) {
    .mfn-footer-stickymenu-custom ul {
        height: 56px;
        padding: 0 10px;
    }
    
    .mfn-footer-stickymenu-custom svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .mfn-footer-stickymenu-custom .sm-item {
        font-size: 10px;
    }
    
    .mfn-footer-stickymenu-custom .menu-item-cart a {
        width: 60px;
        height: 60px;
        top: -16px;
    }
    
    .mfn-footer-stickymenu-custom .menu-item-cart svg {
        width: 20px !important;
        height: 20px !important;
    }
}