﻿.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1090;
}

body.drawer-open .mobile-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 290px;
    height: 100vh;
    background: var(--bg);
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.25);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1091;
    display: flex;
    flex-direction: column;
}

body.drawer-open .mobile-drawer {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
    font-weight: 900;
}

.drawer-logo {
    height: 34px;
    width: auto;
}

.drawer-close {
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    cursor: pointer;
    font-size: 18px;
    color: var(--text);
    transition: 0.25s ease;
}

    .drawer-close:hover {
        transform: translateY(-1px);
    }

.drawer-nav {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

    .drawer-nav a {
        padding: 12px 14px;
        border-radius: 14px;
        text-decoration: none;
        color: var(--text);
        font-weight: 900;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: 0.25s ease;
        border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
        background: color-mix(in srgb, var(--bg) 85%, transparent);
    }

        .drawer-nav a:hover {
            transform: translateY(-1px);
            border-color: color-mix(in srgb, var(--primary) 22%, transparent);
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
        }

.drawer-cart-link {
    position: relative;
}

.drawer-cart-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    display: none;
    align-items: center;
    justify-content: center;
}

    .drawer-cart-badge.show {
        display: inline-flex;
    }

.site-mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid color-mix(in srgb, var(--primary) 14%, transparent);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1500;
}

    .site-mobile-bottom-nav .mobile-nav-item {
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 11px;
        font-weight: 900;
        color: var(--text);
        text-decoration: none;
        transition: color 0.2s ease, transform 0.2s ease, filter 0.2s ease;
        position: relative;
    }

    .site-mobile-bottom-nav .nav-icon {
        font-size: 18px;
        line-height: 1;
    }

    .site-mobile-bottom-nav .mobile-nav-item.active,
    .site-mobile-bottom-nav .mobile-nav-item:hover {
        color: var(--primary);
        transform: translateY(-2px);
        filter: drop-shadow(0 0 10px color-mix(in srgb, var(--primary) 45%, transparent));
    }

@media (min-width: 1025px) {
    .site-mobile-bottom-nav {
        display: none !important;
    }
}

.site-mobile-bottom-nav::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.08), transparent);
    pointer-events: none;
}

.mobile-cart-item {
    position: relative;
}

#DrawerCartBadge {
    position: absolute;
    top: 4px;
    right: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
}

    #DrawerCartBadge.bounce {
        animation: cartBadgeBounce 0.35s ease-out;
    }

@keyframes cartBadgeBounce {
    0% {
        transform: scale(0.8);
    }

    40% {
        transform: scale(1.35);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 1024px) {
    body.has-mobile-nav {
        padding-bottom: 90px;
    }
}

@media (min-width: 1025px) {
    body.has-mobile-nav {
        padding-bottom: 0;
    }
}
