/* ============================================
   Digikala Mega Menu - Animations
   ============================================ */

/* Fade */
.dmm-anim-fade .dmm-panel.active {
    animation: dmmFade .3s ease both;
}
@keyframes dmmFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Slide */
.dmm-anim-slide .dmm-panel.active {
    animation: dmmSlide .3s cubic-bezier(.4,0,.2,1) both;
}
@keyframes dmmSlide {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: none; }
}

/* Scale */
.dmm-anim-scale .dmm-panel.active {
    animation: dmmScale .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes dmmScale {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: none; }
}

/* None */
.dmm-anim-none .dmm-panel.active { animation: none; }

/* ========== Focus (A11y) ========== */
.dmm-wrapper *:focus-visible {
    outline: 2px solid var(--dmm-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Screen Reader */
.dmm-wrapper .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Badges */
.dmm-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.dmm-badge-sale { background: #ef4056; color: #fff; }
.dmm-badge-new  { background: #00bfd6; color: #fff; }
.dmm-badge-out  { background: #999;    color: #fff; }

/* Prefetch */
.dmm-prefetch { display: none; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .dmm-wrapper *,
    .dmm-wrapper *::before,
    .dmm-wrapper *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}