/* =========================================
   WARAP MOBILE FIRST TWEAKS v1.0
   ========================================= */

/* 1. TOUCH TARGETS & ERGONOMICS */
button,
a.btn,
.nav-item,
.category-card {
    min-height: 48px;
    /* Minimum ergonomic touch size */
    min-width: 48px;
    touch-action: manipulation;
    /* Avoid double-tap zoom delay */
}

/* 2. BOTTOM NAVIGATION BAR (Visible only on mobile) */
.mobile-bottom-nav {
    display: none;
    /* Hidden by default (Desktop) */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    height: 65px;
    /* Fixed height */
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* Hide WhatsApp Float on very small screens if it overlaps, or move it up */
    .wa-float {
        bottom: 80px !important;
        /* Move above navbar */
    }

    /* Adjust main content padding to not be hidden by navbar */
    body {
        padding-bottom: 80px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    flex: 1;
    /* Distribute space */
    height: 100%;
    transition: color 0.3s ease;
}

.nav-item i {
    font-size: 1.25rem;
    margin-bottom: 4px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active {
    color: #4f46e5;
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Special SELL Button */
.nav-item.sell-btn {
    position: relative;
    top: -15px;
    /* Pop out effect */
}

.sell-icon-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    border: 4px solid white;
    /* Cutout effect */
}

.nav-item.sell-btn i {
    margin-bottom: 0;
    font-size: 1.2rem;
}

/* 3. BOTTOM SHEETS vs MODALS */
/* Transform centered modals to bottom sheets on mobile */
@media (max-width: 768px) {

    .auth-modal-content,
    .modal-content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: translateY(100%);
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
        max-height: 90vh;
        overflow-y: auto;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .auth-modal.show .auth-modal-content,
    .modal.show .modal-content,
    .modal-overlay.active .auth-modal-content,
    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* 4. PERFORMANCE & DATA SAVER */
/* Blur placeholders for images (basic implementation helper class) */
.lazy-blur {
    filter: blur(10px);
    transition: filter 0.3s ease-in-out;
}

.lazy-loaded {
    filter: blur(0);
}