/* Bottom Navigation Styles */
.bottom-nav .nav-icon { position: relative; }
.bottom-nav .database-new {
    position: absolute;
    left: 12px;
    top: -7px;
    padding: 2px 4px;
    border-radius: 4px;
    background: #46a6ff;
    color: #071425;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    box-shadow: 0 0 0 2px #080e1a;
}
.bottom-nav .database-new[hidden] { display: none; }
.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 430px;
    z-index: 1100 !important;
    padding: 10px 14px max(10px, var(--safe-bottom));
    background: linear-gradient(180deg, rgba(7, 13, 25, 0) 0%, rgba(7, 13, 25, 0.5) 20%, rgba(7, 13, 25, 0.92) 100%);
}

.nav-shell {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
    border-radius: 18px;
}

.nav-shell,
.support-fab {
    background: rgba(8, 14, 26, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.nav-item {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    min-height: 52px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #8fa3c7;
    font-size: 9.5px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.7;
    position: relative;
    transition: color 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
    .nav-item:not(:disabled):not(.active):hover {
        color: #fff;
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.03);
    }
}

.nav-item:disabled {
    cursor: default;
}

.nav-item:disabled:active {
    transform: none;
    background: transparent;
}

.support-fab {
    position: absolute;
    right: 16px;
    bottom: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 17px;
    color: #8fa3c7;
    transition: bottom 0.2s ease, transform 0.16s ease, color 0.16s ease;
}

.support-fab::before {
    content: '';
    position: absolute;
    inset: -1px;
}

.support-fab svg {
    display: block;
    flex-shrink: 0;
    opacity: 0.7;
}

.support-fab:hover,
.support-fab:focus-visible {
    color: #fff;
}

.support-fab:hover svg,
.support-fab:focus-visible svg {
    opacity: 1;
}

.support-fab:active {
    transform: scale(0.96);
}

.support-fab:focus-visible {
    outline: 2px solid var(--blue, #46a6ff);
    outline-offset: 3px;
}

.support-fab-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff6a8e;
    box-shadow: 0 0 0 2px #080e1a;
    visibility: hidden;
    pointer-events: none;
}

.support-fab-badge.is-visible {
    visibility: visible;
}

/* Keep support clear of the temporary product cart panel. */
body:has(.sticky-buy.is-visible) .support-fab {
    bottom: calc(100% + 82px); /* 72px panel + 10px */
}

@media (prefers-reduced-motion: reduce) {
    .nav-item,
    .support-fab {
        transition: none;
    }
}

.nav-item.active {
    color: white;
    opacity: 1;
}

.nav-item:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active:active,
.nav-item.active:focus,
.nav-item.active:focus-visible,
.nav-item.nav-item-context-active:active,
.nav-item.nav-item-context-active:focus,
.nav-item.nav-item-context-active:focus-visible {
    transform: none;
    background: transparent;
    opacity: 1;
    filter: none;
    outline: none;
}

.active-indicator {
    position: absolute;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12); /* Thinner/Softer outline */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px; /* Back to original size radius */
    overflow: hidden;
    box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.12),
            inset 0 1px 1px rgba(255, 255, 255, 0.15),
            inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), width 0.35s ease, height 0.35s ease;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.active-indicator.is-ready {
    opacity: 1;
}

/* Luxury Glass Glint Animation */
.active-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.0) 30%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.0) 70%,
            transparent 100%
    );
    transform: skewX(-20deg);
    animation: active-glass-glint 6s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes active-glass-glint {
    0% { left: -150%; opacity: 0; }
    15% { opacity: 0.6; } /* Softer entry */
    45%, 100% { left: 150%; opacity: 0; }
}

.nav-icon, .nav-item > span:not(.nav-badge) {
    position: relative;
    z-index: 5; /* Higher to stay above the glint */
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: transform 0.2s ease;
}

.nav-icon svg {
    display: block;
}

.nav-badge {
    position: absolute;
    top: 8px;
    right: 18px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    box-shadow: 0 0 10px rgba(70, 166, 255, 0.6), 0 0 0 2px rgba(8, 14, 26, 0.88);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 20;
}

.nav-badge.is-visible {
    opacity: 1;
    transform: scale(1);
    animation: cartBadgePulse 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-badge.is-pulsing {
    animation: cartBadgePulse 0.55s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.nav-badge.danger {
    background: linear-gradient(135deg, #ff6a8e, #ff4070);
    box-shadow: 0 0 12px rgba(255, 106, 142, 0.8), 0 0 0 2px rgba(8, 14, 26, 0.88);
}

@keyframes cartBadgePulse {
    0% {
        opacity: 0;
        transform: scale(0.55);
    }

    45% {
        opacity: 1;
        transform: scale(1.45);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseGiftBadge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 106, 142, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(255, 106, 142, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 106, 142, 0);
    }
}

.nav-badge.danger.is-visible {
    animation: pulseGiftBadge 2.4s infinite;
    opacity: 1;
    transform: scale(1);
}

.nav-item.active .nav-icon {
    transform: translateY(0);
}

