/* Enhanced Navbar Icons Styles */
/* Universal styles for all navbar icons (cart, search, login/profile) */

/* Navbar Icons Layout */
.enhanced-navbar-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Base Icon Container */
.navbar-icon-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.navbar-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: rgba(125, 17, 40, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.navbar-icon-link:hover {
    background: rgba(125, 17, 40, 0.1);
    border-color: rgba(125, 17, 40, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(125, 17, 40, 0.15);
}

.navbar-icon-link:active {
    transform: translateY(0);
}

/* Icon Styling */
.navbar-icon-link i {
    font-size: 22px;
    color: #7D1128;
    transition: all 0.3s ease;
}

.navbar-icon-link:hover i {
    color: #a01636;
    transform: scale(1.1);
}

/* Icon Label */
.navbar-icon-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.navbar-icon-container:hover .navbar-icon-label {
    color: #7D1128;
    font-weight: 600;
}

/* Badge for cart/notifications */
.navbar-icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: badge-bounce 2s ease-in-out infinite;
}

@keyframes badge-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Active state indicator (dot) */
.navbar-icon-active-dot {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #7D1128;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar-icon-link:hover .navbar-icon-active-dot {
    opacity: 1;
}

/* Specific Icon Variants */
.navbar-icon-cart .navbar-icon-link {
    background: rgba(125, 17, 40, 0.05);
}

.navbar-icon-search .navbar-icon-link {
    background: rgba(125, 17, 40, 0.05);
}

.navbar-icon-user .navbar-icon-link {
    background: rgba(125, 17, 40, 0.05);
}

.navbar-icon-cart .navbar-icon-link:hover {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(255, 107, 129, 0.1) 100%);
}

.navbar-icon-search .navbar-icon-link:hover {
    background: linear-gradient(135deg, rgba(125, 17, 40, 0.1) 0%, rgba(160, 22, 54, 0.1) 100%);
}

.navbar-icon-user .navbar-icon-link:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(67, 160, 71, 0.1) 100%);
}

/* Tooltip effect (optional) */
.navbar-icon-container[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar-icon-container[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.navbar-icon-container[data-tooltip]:hover::after,
.navbar-icon-container[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Loading state */
.navbar-icon-link.loading {
    pointer-events: none;
    opacity: 0.6;
}

.navbar-icon-link.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #7D1128;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsive */
@media only screen and (max-width: 768px) {
    .navbar-icon-link {
        width: 40px;
        height: 40px;
    }

    .navbar-icon-link i {
        font-size: 20px;
    }

    .navbar-icon-label {
        font-size: 11px;
    }

    .navbar-icon-badge {
        font-size: 9px;
        min-width: 16px;
        height: 16px;
    }

    /* Hide tooltips on mobile */
    .navbar-icon-container[data-tooltip]::after,
    .navbar-icon-container[data-tooltip]::before {
        display: none;
    }
}

@media only screen and (max-width: 480px) {
    .navbar-icon-link {
        width: 38px;
        height: 38px;
    }

    .navbar-icon-link i {
        font-size: 18px;
    }
}

/* Animation for icon entrance */
@keyframes icon-entrance {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-icon-container {
    animation: icon-entrance 0.4s ease forwards;
}

.navbar-icon-container:nth-child(1) {
    animation-delay: 0.1s;
}

.navbar-icon-container:nth-child(2) {
    animation-delay: 0.2s;
}

.navbar-icon-container:nth-child(3) {
    animation-delay: 0.3s;
}

/* Focus styles for accessibility */
.navbar-icon-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 17, 40, 0.3);
}

.navbar-icon-link:focus-visible {
    outline: 2px solid #7D1128;
    outline-offset: 2px;
}
