/* 
   MOBILE-FIRST UI DESIGN SYSTEM
   Premium App-like experience for Pricilio
*/

:root {
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-height: 72px;
    --mobile-accent: #ea580c;
    --mobile-bg: #fdfbf7;
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-blur: blur(18px);
}

/* Base Body Adjustments */
body {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 20px);
    background-color: var(--mobile-bg);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-bottom);
    z-index: 5000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 20%;
    height: 100%;
    transition: all 0.2s ease;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item.active {
    color: var(--mobile-accent);
}

.bottom-nav-item.active i {
    transform: translateY(-4px);
}

/* Floating Search Button */
.nav-search-btn {
    width: 52px;
    height: 52px;
    background: var(--mobile-accent);
    color: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -30px;
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.3);
    border: 4px solid var(--mobile-bg);
    transition: all 0.2s ease;
}

.nav-search-btn:active {
    transform: scale(0.9);
}

.nav-search-btn i {
    font-size: 22px;
    margin-bottom: 0 !important;
}

/* Mobile Header */
@media (max-width: 768px) {
    .navbar-modern {
        background: var(--glass-bg) !important;
        backdrop-filter: var(--glass-blur) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
        height: 64px;
    }

    .navbar-toggler {
        display: none !important; /* Hide hamburger menu */
    }

    .app-brand {
        font-size: 1.1rem;
    }

    .app-main {
        padding-top: 74px;
    }
}

/* Immersive Cards */
.mobile-card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-bottom: 16px;
}

/* Sticky Action Bar for Product Pages */
.sticky-actions {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px);
    left: 12px;
    right: 12px;
    z-index: 4500;
    display: none; /* Only show on mobile product pages */
}

@media (max-width: 768px) {
    .product-detail-page .sticky-actions {
        display: flex;
        gap: 10px;
    }
}

.btn-immersive {
    flex: 1;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border: none;
}

.btn-immersive-primary {
    background: #0f172a;
    color: #fff;
}

.btn-immersive-secondary {
    background: #fff;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Typography Optimizations */
h1 { font-size: 28px; line-height: 1.2; font-weight: 800; }
h2 { font-size: 22px; line-height: 1.3; font-weight: 700; }

/* Hide Desktop Elements on Mobile */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    
    .ui-layer {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 20px !important;
    }
    
    .main-search-container {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .glass-card {
        border-radius: 20px !important;
        border: none !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
        margin-bottom: 12px !important;
    }
    
    .mobile-homepage-wrapper .ui-layer,
    .mobile-homepage-wrapper .ui-layer-static {
        padding-left: 15px !important;
        padding-right: 15px !important;
        padding-top: 15px !important;
        margin-left: 0 !important;
    }
    
    .bottom-nav-item span {
        margin-top: 2px;
    }
    
    /* Premium Shopping Assistant - Minimal Redesign */
    .stitch-hero-title {
        font-size: 2.2rem !important;
        font-weight: 800 !important;
        margin-bottom: 8px !important;
        color: #fff !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .stitch-hero-subtitle {
        font-size: 1.1rem !important;
        font-weight: 500 !important;
        color: rgba(255, 255, 255, 0.8) !important;
        margin-bottom: 30px !important;
    }
    
    .minimal-search-form {
        display: flex !important;
        align-items: center !important;
        background: rgba(255, 255, 255, 0.15) !important;
        backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 14px !important;
        height: 52px !important; 
        padding: 0 16px !important;
        width: 100% !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
    }
    
    .minimal-search-input {
        background: transparent !important;
        border: none !important;
        color: #fff !important;
        font-size: 1rem !important;
        text-align: left !important;
        padding: 0 !important;
        flex: 1 !important;
    }
    
    .minimal-search-input::placeholder {
        color: rgba(255, 255, 255, 0.6) !important;
    }
    
    .minimal-search-submit {
        background: rgba(255,255,255,0.2) !important;
        color: #fff !important;
        border: none !important;
        padding: 0 8px !important;
        font-size: 1.1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: auto !important;
        min-width: unset !important;
        flex-shrink: 0 !important;
        border-radius: 10px !important;
        height: 38px !important;
    }
    
    /* Ensure sidebar is visible but clean on Home */
    .homepage-cinematic #side-panel.minimized {
        display: flex !important;
        width: 25px !important;
        background: rgba(15, 23, 42, 0.4) !important;
        backdrop-filter: blur(10px) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
        height: auto !important;
        min-height: unset !important;
    }
}
