/* --- UI/UX SIMULATION: COMPONENT LIBRARY --- */

/* 1. MOBILE BOTTOM NAVIGATION */
.mobile-bottom-nav {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--light);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 60px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -5px;
    border-radius: 8px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active {
    color: #2563eb;
    /* Primary Blue */
    font-weight: 600;
}

.nav-item.active i {
    transform: translateY(-2px);
}

.nav-badge-wrapper {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 13px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* 2. SKELETON LOADING ANIMATION */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 80%;
}

.skeleton-rect {
    width: 100%;
    height: 100%;
    display: block;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}


/* 3. MICRO-INTERACTIONS & ANIMATIONS */

/* Add to Cart Bounce */
@keyframes cartBounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.animate-bounce {
    animation: cartBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 100%;
    align-items: center;
}

.toast {
    background: var(--white);
    color: var(--dark);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 90vw;
    max-width: 350px;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
    pointer-events: auto;
    border-left: 4px solid #2563eb;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #22c55e;
}

.toast.error {
    border-left-color: #ef4444;
}


/* 4. EMPTY STATES */
.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: var(--gray);
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.empty-state-modern h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state-modern p {
    color: #64748b;
    margin-bottom: 24px;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* 5. SMART CART & CHECKOUT */
.cart-group {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border: 1px solid var(--light);
}

.cart-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--dark);
}

.sticky-cart-footer {
    display: none;
    position: fixed;
    bottom: 60px;
    /* Above bottom nav */
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    z-index: 999;
    border-top: 1px solid var(--light);
    align-items: center;
    justify-content: space-between;
}

.trust-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    opacity: 0.8;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: #64748b;
    gap: 5px;
}

/* 6. GROWTH PACK: LOYALTY & PRIVACY */
.loyalty-badge {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.loyalty-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2);
}

.privacy-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.privacy-warning {
    color: #ef4444;
    font-size: 16px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 7. CONSOLIDATED RESPONSIVE OVERRIDES */
@media (max-width: 768px) {

    /* Bottom Navigation Display */
    .mobile-bottom-nav {
        display: block;
    }

    /* Sticky Cart Footer Display */
    .sticky-cart-footer {
        display: flex;
    }

    /* Layout Adjustments */
    body {
        padding-bottom: 70px;
    }

    .cart-summary {
        display: none;
        /* Hide default sidebar summary on mobile */
    }

    .cart-section {
        padding-bottom: 80px;
        /* Space for sticky footer */
    }
}

/* 8. COMMON MOBILE COMPATIBILITY FIXES */
.glass {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.rounded-clip {
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}