.nav-cart-item {
    margin-left: auto; /* Zarovnání košíku doprava */
    position: relative;
}

.nav-cart-item .cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.nav-cart-item .cart-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.nav-cart-item .cart-icon {
    font-size: 18px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-cart-item .cart-link:hover .cart-icon {
    transform: scale(1.1);
}

.nav-cart-item .cart-count {
    background: linear-gradient(45deg, var(--primary-color), #ffac00);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 22px;
}

.nav-cart-item .cart-count.empty {
    opacity: 0;
    transform: scale(0.8);
}

.nav-cart-item .cart-count:not(.empty) {
    animation: cartBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Pulzující efekt při přidání */
.cart-pulse {
    animation: cartPulse 0.8s ease;
}

@keyframes cartPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 215, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* === RESPONZIVNÍ DESIGN === */
@media (max-width: 1024px) {
    .nav-cart-item {
        margin-left: 15px;
    }
    
    .nav-cart-item .cart-link {
        padding: 8px 12px !important;
    }
    
    .nav-cart-item .cart-icon {
        font-size: 16px;
    }
    
    .nav-cart-item .cart-count {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .nav-cart-item {
        margin-left: 0;
        margin-top: 10px;
        order: 999; /* Košík na konec v mobile menu */
    }
    
    .nav-cart-item .cart-link {
        justify-content: center;
        padding: 12px 20px !important;
        background: rgba(255, 215, 0, 0.15);
    }
    
    /* Mobile menu aktivní stav */
    .nav-links.active .nav-cart-item {
        display: block;
        text-align: center;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 480px) {
    .nav-cart-item .cart-icon {
        font-size: 14px;
    }
    
    .nav-cart-item .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

/* === KOMPAKTNÍ IKONA KOŠÍKU V NAVIGACI === */
.nav-cart-item {
    margin-left: 20px; /* Menší mezera */
}

.nav-cart-item .cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px !important; /* Menší padding */
    border-radius: 8px; /* Méně zaoblené rohy */
    transition: all 0.3s ease;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    min-width: 45px; /* Pevná minimální šířka */
}

.nav-cart-item .cart-link:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}

.nav-cart-item .cart-icon {
    font-size: 16px; /* Menší ikona */
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-cart-item .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(45deg, var(--primary-color), #ffac00);
    color: #000;
    font-size: 10px; /* Menší text */
    font-weight: 700;
    border-radius: 50%;
    width: 18px; /* Menší velikost */
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-cart-item .cart-count.empty {
    display: none; /* Úplně skrýt když je prázdný */
}

.nav-cart-item .cart-count:not(.empty) {
    animation: cartBounce 0.5s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* === RESPONZIVNÍ DESIGN === */
@media (max-width: 1200px) {
    .nav-cart-item {
        margin-left: 15px;
    }
    
    .nav-cart-item .cart-link {
        padding: 6px 10px !important;
        min-width: 40px;
    }
    
    .nav-cart-item .cart-icon {
        font-size: 15px;
    }
    
    .nav-cart-item .cart-count {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: -4px;
        right: -4px;
    }
}

@media (max-width: 768px) {
    /* V mobilním menu */
    .nav-cart-item {
        margin: 15px 0 0 0;
        text-align: center;
        order: -1; /* Košík nahoru v mobile menu */
    }
    
    .nav-cart-item .cart-link {
        display: inline-flex;
        padding: 12px 20px !important;
        background: rgba(255, 215, 0, 0.15);
        border-radius: 25px;
        min-width: auto;
        gap: 8px; /* Mezera mezi ikonou a textem */
    }
    
    /* Přidat text v mobile menu */
    .nav-cart-item .cart-link::after {
        content: "Košík";
        color: var(--primary-color);
        font-weight: 600;
        font-size: 14px;
    }
    
    .nav-cart-item .cart-count {
        position: relative;
        top: auto;
        right: auto;
        margin-left: 5px;
    }
}