/* ==========================
   Кнопка авторизации (iOS-style glassmorphism)
=========================== */
.floating-auth {
    position: fixed;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(40, 40, 40, 0.5);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 2px 8px rgba(255, 255, 255, 0.06) inset;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.floating-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
                0 2px 10px rgba(255, 255, 255, 0.08) inset;
    background: rgba(50, 50, 50, 0.55);
}

.floating-auth:active {
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
                0 1px 6px rgba(255, 255, 255, 0.05) inset;
}

/* ==========================
   Кнопка корзины (мини-капля)
=========================== */
.floating-cart {
    position: fixed;
    top: 87px; /* стартовая точка: сверху кнопки авторизации */
    right: 36px;
    width: 40px;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(40,40,40,0.55);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    transform: translateY(-30px) scale(0.3); /* маленькая капля сверху */
    animation: dropFromAuth 0.7s cubic-bezier(0.68,-0.55,0.265,1.55) forwards 0.2s;
}

/* Верхний хвостик капли */
.floating-cart::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 18px;
    background: rgba(40,40,40,0.55);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

/* Внутренний блик сверху */
.floating-cart::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 70%;
    height: 40%;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Иконка корзины */
.floating-cart .cart-icon {
    font-size: 18px;
    color: #fff;
    margin-bottom: 6px;
    transition: transform 0.3s ease;
}

.floating-cart:hover .cart-icon {
    transform: scale(1.1);
}

/* Счётчик корзины */
.floating-cart .cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff4d4d, #ff1a1a);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Анимация вытекающей капли */
@keyframes dropFromAuth {
    0% {
        transform: translateY(-30px) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translateY(20px) scale(0.9, 1.2); /* растягивание вниз */
        opacity: 1;
    }
    80% {
        transform: translateY(0) scale(1.05, 0.95); /* мягкая “пружинка” */
    }
    100% {
        transform: translateY(0) scale(1); /* финальная форма */
        opacity: 1;
    }
}