/* ============================================================
   PREMIUM BOTTOM NAVIGATION (MOBILE ONLY)
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    height: 68px;
    background: rgba(10, 15, 25, 0.9);
    backdrop-filter: blur(30px) saturate(210%);
    -webkit-backdrop-filter: blur(30px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 99999;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    padding: 0 12px;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
    
    /* Hide top logo on scroll if needed, or adjust padding */
    body {
        padding-bottom: 100px; /* Space for bottom nav */
    }

    /* Hide the old top navigation buttons if they overlap or feel redundant */
    /* .nav-btn { display: none; } */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 10px;
    cursor: pointer;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: #fb923c; /* Orange-400 */
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: -5px;
    width: 4px;
    height: 4px;
    background: #fb923c;
    border-radius: 50%;
    box-shadow: 0 0 10px #fb923c;
}

.nav-item:active {
    transform: scale(0.9);
}

/* Hide original hamburger in App Mode ONLY on phones */
@media (max-width: 768px) {
    .hamburger.app-mode-hide {
        display: none !important;
    }
    
    .mobile-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
        transition: 0.3s;
    }
}

/* ===== MOBILE SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 100000;
    display: none;
}

.search-overlay.active {
    display: block !important;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    z-index: 100001;
}

.search-container {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.search-title {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 25px;
}



.search-input-wrap {
    position: relative;
    display: flex;
    gap: 10px;
}

.search-input-wrap i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
}

.search-input-wrap input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 18px 20px 18px 55px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

.search-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fb923c;
}

.search-input-wrap button {
    background: #fb923c;
    border: none;
    border-radius: 15px;
    padding: 0 25px;
    color: #000;
    font-weight: 800;
    cursor: pointer;
}

.quick-tags {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.quick-tags span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.quick-tags a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 15px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.quick-tags a:hover {
    background: #fb923c;
    color: #000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== ADMIN SWITCH STYLES ===== */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #fb923c;
}

input:focus + .slider {
  box-shadow: 0 0 1px #fb923c;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.navbar {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
    will-change: transform;
}

body {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    padding-bottom: calc(85px + env(safe-area-inset-bottom)) !important;
}

input, textarea, [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
}

/* Hide scrollbar for cleaner app look */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* ===== MOBILE HEADER ICONS VISIBILITY ===== */
.header-app-icons {
    display: none !important;
}

.tablet-search-bar {
    display: none;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 0 15px;
    height: 42px;
    width: 220px;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.tablet-search-bar i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.tablet-search-bar input {
    background: none;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 0 10px;
    width: 100%;
    outline: none;
}

.tablet-search-bar:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: #fb923c;
    width: 250px;
}

@media (max-width: 1180px) {
    .header-app-icons {
        display: flex !important;
        align-items: center;
        gap: 12px;
        margin-left: 10px;
    }
}

/* TABLET SPECIFIC SWAP: Show Bar, Hide Icon */
@media (min-width: 769px) and (max-width: 1180px) {
    .tablet-search-bar {
        display: flex;
    }
    .mobile-search-btn {
        display: none !important;
    }
}


/* ===== PRODUCT PAGE STICKY OVERRIDES ===== */
@media (max-width: 991px) {
    .mobile-sticky-bar {
        bottom: 105px !important;
        z-index: 9998 !important;
    }
}

/* Common Header Action Buttons */
.mobile-search-btn, .mobile-bag-btn, .hamburger, .close-btn, .search-overlay-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    font-size: 19px;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    outline: none;
    padding: 0;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.menu-trigger {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.mobile-bag-btn {
    position: relative;
}

.bag-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #fb923c;
    border-radius: 50%;
    box-shadow: 0 0 10px #fb923c;
    animation: pulseBag 2s infinite;
}

@keyframes pulseBag {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== PREMIUM DEALS POPUP ===== */
.deals-sidebar {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -45%) scale(0.95);
    width: 92% !important;
    max-width: 440px !important;
    height: auto !important;
    max-height: 80vh !important;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    z-index: 100001 !important;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 35px 25px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.08);
    border-radius: 40px !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
}

.deals-sidebar.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 20px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header h3 i {
    color: #fb923c;
    filter: drop-shadow(0 0 10px rgba(251, 146, 60, 0.5));
}

.close-sidebar {
    width: 40px; height: 40px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%;
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; transition: 0.3s;
}
.close-sidebar:hover { background: #f97316; transform: rotate(90deg); }

.sidebar-info {
    background: linear-gradient(135deg, rgba(251,146,60,0.1), rgba(251,146,60,0.02));
    border: 1px solid rgba(251, 146, 60, 0.2);
    padding: 18px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.sidebar-info p {
    font-size: 14px;
    color: #fff;
    margin: 0;
    line-height: 1.5;
    font-weight: 700;
}

/* DEALS GRID (2x2) */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-bottom: 20px;
}

.deal-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    transition: 0.4s;
}

.deal-card:hover { border-color: #fb923c; transform: translateY(-3px); }

.deal-badge {
    position: absolute; top: 10px; left: 10px; background: #fb923c; color: #fff; font-size: 8px; font-weight: 950;
    padding: 4px 10px; border-radius: 100px; z-index: 2; text-transform: uppercase;
}

.deal-img { height: 110px; background: #000; position: relative; }
.deal-img img { width: 100%; height: 100%; object-fit: cover; }

.deal-details { padding: 12px; }
.deal-details h4 { 
    margin: 0 0 8px 0; font-size: 11px; font-weight: 800; color: #fff; height: 32px; 
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4;
}

.deal-footer { display: flex; align-items: center; justify-content: space-between; }
.deal-price { font-size: 15px; font-weight: 950; color: #fb923c; }

.deal-btn {
    width: 35px; height: 35px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; transition: 0.3s;
}
.deal-btn i { font-size: 14px; }
.deal-btn:hover { background: #fb923c; color: #000; border-color: #fb923c; }

.empty-bag {
    grid-column: span 2; text-align: center; padding: 60px 20px; color: #94a3b8;
}
.empty-bag i { font-size: 40px; color: #fb923c; margin-bottom: 15px; display: block; }

}

/* ===== LIVE SEARCH RESULTS ===== */
.live-search-results {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px;
    margin-top: 15px;
    display: none;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.live-search-results.active {
    display: block;
}

.live-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    text-decoration: none;
    transition: 0.2s;
}

.live-item:last-child { border-bottom: none; }

.live-item:hover {
    background: rgba(255,255,255,0.05);
}

.live-img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    background: #000;
}

.live-info {
    flex: 1;
}

.live-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.live-meta {
    font-size: 11px;
    color: #fb923c;
    font-weight: 700;
}

.live-no-result {
    padding: 30px;
    text-align: center;
    color: rgba(255,255,255,0.4);
}

.live-no-result i {
    font-size: 30px;
    margin-bottom: 10px;
    display: block;
}
