@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* OPTION B: SOFT PAPER (Light Theme) */
    --bg-color: #FDFCF8;
    --text-color: #2D2D2D;
    --muted-color: #5F5F5F;
    --accent-color: #F97316;
    --border-color: #EDEBE6;

    /* Modern UI Variables (Light Mode) */
    --bg-gradient: #FDFCF8;
    --primary-purple: #F97316;
    /* Using Orange as the primary brand color for this theme */
    --primary-dark: #2D2D2D;
    --text-main: #2D2D2D;

    /* Light Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);

    /* Soft Paper Shadows */
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);

    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- SHARED UI COMPONENTS --- */

/* Glassmorphism Classes (Light) */
.glass-card {
    background: #FFFFFF;
    /* Solid white for better readability in light mode, slight transparency if needed */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    /* Softer radius for "Soft Paper" */
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    color: var(--text-color);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-color: #E0E0E0;
}

/* Modern Navbar (Light) */
.navbar-modern {
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.95) !important;
    /* Unified with base_modern */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    /* Maximum z-index to stay above everything */
    width: 100% !important;
}

.navbar-brand-modern {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-color) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000 !important;
    /* Even higher than navbar */
    position: relative !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.nav-link-modern {
    font-weight: 600;
    color: var(--muted-color) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 4px;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.nav-link-modern:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-color) !important;
}

/* Search Input (Light) */
.search-input-modern {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 16px 25px;
    font-size: 1rem;
    color: var(--text-color);
    border-radius: 50px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.search-input-modern:focus {
    background: #FFFFFF;
    border-color: var(--accent-color);
    box-shadow: 0 5px 20px rgba(249, 115, 22, 0.15);
    /* Orange glow */
}

.search-input-modern::placeholder {
    color: #999;
}

/* --- INDEX.HTML SPECIFIC STYLES --- */

/* Sign Up Button Enhanced */
.btn-primary {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 10px 25px !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #e8630c !important;
    /* Darker orange */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* Main Container - Adjust for side panel */
.container-main-offset {
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: margin-left 0.5s cubic-bezier(0.19, 1, 0.22, 1), width 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

body.panel-minimized .container-main-offset {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* Immersive Canvas */
#cloud-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    background-color: var(--bg-color);
    /* Matches light theme bg */
}

/* HUD / UI Layer */
.ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 60px;
}

/* Top Navigation (Premium Light) */
.premium-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.nav-group {
    display: flex;
    gap: 30px;
    flex: 1;
}

.nav-group.right {
    justify-content: flex-end;
}

.nav-item {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: var(--text-color);
}

/* Centered Branding */
.brand-center {
    flex: 2;
    text-align: center;
}

.site-logo-link {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.site-subtext {
    font-size: 9px;
    letter-spacing: 0.3em;
    color: #888;
    text-transform: uppercase;
}

/* Bottom Search Section */
.bottom-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
}

.search-wrapper {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.premium-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid #DDD;
    padding: 18px 30px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    border-radius: 8px;
    /* Soft paper radius */
    color: var(--text-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    outline: none;
}

.premium-search-input:focus {
    background: #FFF;
    border-color: var(--accent-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    max-width: 600px;
}

.scroll-hint {
    font-size: 8px;
    letter-spacing: 0.4em;
    color: var(--text-color);
    text-transform: uppercase;
    animation: pulse 2s infinite;
    margin-bottom: 20px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Fallback Grid Layout (Light) */
#fallback-grid-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    z-index: 50;
    background-color: var(--bg-color);
    padding: 160px 60px 100px;
    overflow-y: auto;
}

.fallback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.fallback-card {
    background: #FFF;
    border: 1px solid var(--border-color);
    padding: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.fallback-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.fallback-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: contain;
    background: #FFF;
}

.fallback-card-info {
    width: 100%;
    text-align: center;
}

.fallback-card-title {
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Live Notification Popup (Light) */
.notification-popup {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    padding: 20px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.notification-popup.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.notification-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #FFF;
    border-radius: 4px;
}

.notification-content {
    flex: 1;
}

.notification-tag {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 5px;
    display: block;
}

.notification-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-color);
}

.notification-btn {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted-color);
    text-decoration: underline;
    opacity: 0.7;
}

/* Side Panel Styles (Light) */
/* Side Panel Styles (Light - Merged) */
#side-panel {
    position: fixed;
    left: 0;
    left: 0;
    top: 74px;
    /* Adjusted to sit below the navbar */
    width: 280px;
    height: calc(100vh - 74px);
    background: var(--bg-color) !important;
    /* Match body background exactly */
    /* Remove backdrop filter to avoid color shifts */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-right: none;
    /* Remove border to merge */
    z-index: 1000;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    transition: width 0.5s cubic-bezier(0.19, 1, 0.22, 1), padding 0.5s ease;
    /* Ensure no blur effects */
    filter: none !important;
    opacity: 1 !important;
    box-shadow: none;
    /* Remove shadow to look flat/merged */
}

#side-panel.minimized {
    width: 60px;
    padding: 30px 10px;
}

#side-panel.minimized .side-panel-header {
    justify-content: center;
    padding: 0;
    margin-bottom: 20px;
    border: none;
}

#side-panel.minimized .side-panel-title,
#side-panel.minimized .side-panel-body,
#side-panel.minimized .search-progress-container,
#side-panel.minimized .panel-results,
#side-panel.minimized .blog-feed-section {
    display: none !important;
    opacity: 0;
}

/* Vertical Text for Minimized State */
.minimized-label {
    display: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: var(--muted-color);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 30px;
    align-self: center;
    white-space: nowrap;
    animation: fadeIn 0.5s ease 0.3s forwards;
    opacity: 0;
    cursor: pointer;
    /* Better touch target for mobile */
    padding: 12px 4px;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.minimized-label:hover,
.minimized-label:active {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

#side-panel.minimized .minimized-label {
    display: flex;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}



.side-panel-header {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.side-panel-title {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-color);
}

.close-panel {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    padding: 8px;
    color: var(--text-color);
}

.close-panel:hover {
    opacity: 1;
}

.side-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 15px 15px 15px;
    overscroll-behavior: contain;
    /* Fix scroll poisoning */
}

/* Progress States - Compact */
.search-progress-container {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
}

.progress-status {
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--muted-color);
    text-transform: uppercase;
}

.progress-bar-bg {
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    transition: width 0.5s ease;
}

/* Results UI in Panel */
.panel-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.panel-item-card {
    background: #FFF;
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.panel-item-card:hover {
    background: #FCFCFC;
    border-color: #E0E0E0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.panel-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #FFF;
    border-radius: 4px;
}

.panel-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-item-name {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-color);
}

.panel-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
}

/* Blog Feed Specific Styles - Compact */
.blog-feed-section {
    margin-top: 10px;
    transition: transform 0.5s ease, opacity 0.5s ease;
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    pointer-events: auto;
    min-height: 0;
    overscroll-behavior: contain;
    /* Fix scroll poisoning */
}

/* Scrollbar Light */
.blog-feed-section::-webkit-scrollbar {
    width: 6px;
}

.blog-feed-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.blog-feed-section::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.blog-feed-section::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.blog-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.blog-search-wrapper {
    margin-bottom: 15px;
}

.blog-search-input {
    width: 100%;
    background: #FFF;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    color: var(--text-color);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: none;
    outline: none;
    border-radius: 6px;
}

.blog-search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}

.blog-list-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.blog-list-item:hover {
    background: #FCFCFC;
    padding-left: 5px;
    /* Slight movement to indicate interaction */
}

.blog-list-title {
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.blog-list-meta {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-color);
}

/* Pagination */
.panel-pagination {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.pagination-btn {
    background: #FFF;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 8px;
    padding: 8px 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.pagination-btn:hover:not(:disabled) {
    background: #F0F0F0;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: default;
    background: #F9F9F9;
}

/* Feed Toggle Styles - Compact */
.feed-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--muted-color);
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.3s ease;
    position: relative;
    font-weight: 500;
}

.toggle-btn:hover {
    color: var(--text-color);
}

.toggle-btn.active {
    color: var(--accent-color);
    font-weight: 700;
}

.toggle-btn.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

/* Deals Feed Styles */
#panel-deals-feed {
    display: none;
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    pointer-events: auto;
    min-height: 0;
}

#panel-deals-feed.active {
    display: block;
}

#panel-blog-feed {
    display: none;
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    pointer-events: auto;
    min-height: 0;
}

#panel-blog-feed.active {
    display: block;
}

/* --- MOBILE & TABLET OPTIMIZATIONS --- */

/* Mobile backdrop overlay when panel is expanded */
@media (max-width: 1024px) {

    /* Create backdrop overlay for mobile when panel is expanded */
    body:not(.panel-minimized)::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1400;
        /* Below panel but above everything else */
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        animation: fadeIn 0.3s ease;
    }

    /* Ensure panel is above backdrop */
    #side-panel:not(.minimized) {
        z-index: 1500;
    }
}

/* Mobile Detection and Auto-minimize Side Panel */
@media (max-width: 1024px) {

    /* Auto-minimize side panel on tablets and mobile - but allow expansion */
    #side-panel {
        width: 60px;
        padding: 20px 8px;
    }

    /* When minimized on mobile, hide content but allow expansion */
    #side-panel.minimized .side-panel-header {
        justify-content: center;
        padding: 15px 0;
        margin-bottom: 15px;
        border: none;
    }

    #side-panel.minimized .side-panel-title,
    #side-panel.minimized .side-panel-body,
    #side-panel.minimized .search-progress-container,
    #side-panel.minimized .panel-results,
    #side-panel.minimized .blog-feed-section {
        display: none !important;
        opacity: 0;
    }

    /* When expanded on mobile, show optimized mobile panel */
    #side-panel:not(.minimized) {
        width: 90vw;
        /* Use viewport width for better mobile fit */
        max-width: 320px;
        /* Maximum width cap */
        padding: 15px;
        /* Reduced padding to maximize content space */
        height: 95vh;
        /* Use almost full height */
        max-height: calc(100vh - 40px);
        /* Leave minimal space for navbar */
        top: 40px;
        /* Move much closer to navbar */
        border-radius: 12px 0 0 12px;
        /* Rounded corners on the right */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        /* Add shadow for mobile overlay feel */
        z-index: 1000 !important;
        /* Much lower than navbar */
        position: fixed;
        /* Ensure proper positioning */
        background: #FDFCF8 !important;
        /* Solid background - no transparency */
        backdrop-filter: none !important;
        /* Remove any blur */
        -webkit-backdrop-filter: none !important;
        /* Remove any blur */
    }

    #side-panel:not(.minimized) .side-panel-header {
        display: none;
        /* Hide header completely to save space */
    }

    #side-panel:not(.minimized) .side-panel-title,
    #side-panel:not(.minimized) .side-panel-body,
    #side-panel:not(.minimized) .search-progress-container,
    #side-panel:not(.minimized) .panel-results,
    #side-panel:not(.minimized) .blog-feed-section {
        display: block !important;
        opacity: 1;
    }

    /* Mobile-optimized panel content */
    #side-panel:not(.minimized) .side-panel-body {
        padding-top: 0;
        /* Remove top padding since header is hidden */
    }

    #side-panel:not(.minimized) .blog-search-input {
        font-size: 14px;
        padding: 12px 15px;
        letter-spacing: 0.05em;
        text-transform: none;
    }

    #side-panel:not(.minimized) .blog-list-title {
        font-size: 13px;
        line-height: 1.4;
    }

    #side-panel:not(.minimized) .blog-list-meta {
        font-size: 11px;
    }

    #side-panel .minimized-label {
        display: block;
        animation: fadeIn 0.5s ease 0.3s forwards;
        opacity: 0;
        font-size: 13px;
        /* Increased from 12px for better readability */
        letter-spacing: 0.15em;
        min-height: 44px;
        /* Ensure minimum touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hide minimized label when panel is expanded */
    #side-panel:not(.minimized) .minimized-label {
        display: none;
    }

    /* Adjust main content for minimized panel */
    .container-main-offset {
        margin-left: 60px;
        width: calc(100% - 60px);
    }

    /* When panel is expanded on mobile, don't adjust main content (overlay mode) */
    body:not(.panel-minimized) .container-main-offset {
        margin-left: 60px;
        /* Keep same as minimized - panel becomes overlay */
        width: calc(100% - 60px);
    }

    /* Mobile-optimized UI layer - reduce padding to prevent overlap */
    .ui-layer {
        padding: 20px 25px;
        padding-left: 65px;
        /* Reduced from 80px to prevent content overlap */
    }

    /* When panel is expanded, don't adjust UI layer (overlay mode) */
    body:not(.panel-minimized) .ui-layer {
        padding-left: 65px;
        /* Keep same padding - panel is overlay */
    }

    /* Larger touch targets for mobile */
    .premium-search-input {
        padding: 20px 22px;
        /* Increased from 18px 20px for better touch targets */
        font-size: 16px;
        /* Prevent zoom on iOS */
        border-radius: 12px;
        letter-spacing: 0.05em;
        /* Reduced letter spacing for mobile */
        text-transform: none;
        /* Remove uppercase for better readability */
        min-height: 44px;
        /* Ensure minimum touch target size */
    }

    /* Mobile-friendly scroll hint */
    .scroll-hint {
        font-size: 12px;
        /* Increased from 10px */
        margin-bottom: 15px;
        letter-spacing: 0.15em;
        /* Reduced letter spacing */
    }

    /* Optimize 3D globe for mobile */
    #cloud-canvas {
        touch-action: pan-x pan-y;
    }

    /* Mobile notification popup */
    .notification-popup {
        max-width: 90%;
        padding: 15px;
        bottom: 20%;
    }

    .notification-img {
        width: 60px;
        height: 60px;
    }

    .notification-title {
        font-size: 13px;
        /* Increased from default */
    }

    .notification-btn {
        font-size: 11px;
        /* Increased from 10px */
    }

    /* Mobile fallback grid */
    #fallback-grid-container {
        padding: 120px 20px 60px;
    }

    .fallback-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 20px;
    }

    .fallback-card-title {
        font-size: 11px;
        /* Increased from 9px */
        letter-spacing: 0.05em;
        /* Reduced letter spacing */
    }
}

@media (max-width: 768px) {

    /* Phone-specific optimizations */
    .ui-layer {
        padding: 15px 20px;
        padding-left: 60px;
        /* Reduced from 70px to prevent overlap */
    }

    /* When panel is expanded on phone, keep same padding (overlay mode) */
    body:not(.panel-minimized) .ui-layer {
        padding-left: 60px;
        /* Keep same - panel is overlay */
    }

    .premium-search-input {
        padding: 18px 20px;
        /* Increased padding for better touch targets */
        font-size: 16px;
        text-align: left;
        /* Left align on mobile for better UX */
        letter-spacing: 0.02em;
        /* Minimal letter spacing */
        min-height: 48px;
        /* Larger touch target for phones */
    }

    .premium-search-input::placeholder {
        text-transform: none;
        /* Remove uppercase from placeholder */
        letter-spacing: 0.02em;
    }

    /* Smaller side panel on phones when minimized */
    #side-panel.minimized {
        width: 50px;
        padding: 15px 6px;
        top: 45px;
        /* Position just below navbar */
        height: calc(100vh - 50px);
        /* Use available height */
        z-index: 1000 !important;
        /* Lower than navbar */
    }

    .container-main-offset {
        margin-left: 50px;
        width: calc(100% - 50px);
    }

    /* When expanded on phone - optimized mobile overlay */
    #side-panel:not(.minimized) {
        width: 95vw;
        /* Almost full width on phones */
        max-width: 300px;
        height: 96vh;
        /* Use almost full height on phones */
        max-height: calc(100vh - 35px);
        /* Leave minimal space for navbar */
        top: 35px;
        /* Move very close to navbar on phones */
        left: 2.5vw;
        /* Center horizontally */
        border-radius: 12px;
        /* Rounded on all sides for phones */
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        /* Stronger shadow for phones */
        z-index: 1000 !important;
        /* Much lower than navbar */
        position: fixed;
        background: #FDFCF8 !important;
        /* Solid background - no transparency */
        backdrop-filter: none !important;
        /* Remove any blur */
        -webkit-backdrop-filter: none !important;
        /* Remove any blur */
    }

    /* Keep main content unchanged when panel expands (full overlay) */
    body:not(.panel-minimized) .container-main-offset {
        margin-left: 50px;
        width: calc(100% - 50px);
    }

    /* Mobile panel content optimizations for phones */
    #side-panel:not(.minimized) .side-panel-header {
        padding: 15px 0;
        margin-bottom: 10px;
    }

    #side-panel:not(.minimized) .side-panel-title {
        font-size: 12px;
    }

    #side-panel:not(.minimized) .blog-search-input {
        font-size: 16px;
        /* Prevent zoom */
        padding: 12px 15px;
    }

    #side-panel:not(.minimized) .blog-list-item {
        padding: 12px 8px;
        /* Increased padding and added horizontal padding */
        margin: 4px 0;
        /* Added margin for better separation */
        border-radius: 6px;
        /* Added border radius */
        transition: background-color 0.2s ease;
    }

    #side-panel:not(.minimized) .blog-list-item:hover {
        background-color: rgba(249, 115, 22, 0.05);
    }

    #side-panel:not(.minimized) .blog-list-title {
        font-size: 12px;
        line-height: 1.3;
    }

    #side-panel:not(.minimized) .blog-list-meta {
        font-size: 10px;
    }

    #side-panel:not(.minimized) .toggle-btn {
        font-size: 11px;
        /* Increased from 10px */
        letter-spacing: 0.1em;
        padding: 8px 12px;
        /* Added horizontal padding for better touch targets */
        min-height: 36px;
        /* Minimum touch target */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    #side-panel:not(.minimized) .toggle-btn:hover {
        background-color: rgba(249, 115, 22, 0.1);
    }

    /* Improved minimized label for phones */
    #side-panel .minimized-label {
        font-size: 11px;
        /* Increased from 10px */
        letter-spacing: 0.1em;
        padding: 12px 4px;
        /* Increased padding */
        min-width: 44px;
        /* Minimum touch target */
        min-height: 44px;
        /* Minimum touch target */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }

    #side-panel .minimized-label:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Mobile navbar adjustments */
    .navbar-modern {
        padding: 1rem 0;
    }

    .navbar-brand-modern {
        font-size: 1rem;
    }

    /* Optimize fallback grid for phones */
    .fallback-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .fallback-card {
        padding: 10px;
    }

    .fallback-card-title {
        font-size: 12px;
        /* Larger on phones */
        line-height: 1.3;
    }

    /* Mobile notification */
    .notification-popup {
        padding: 12px;
        gap: 12px;
    }

    .notification-img {
        width: 50px;
        height: 50px;
    }

    .notification-title {
        font-size: 14px;
        /* Larger on phones */
        line-height: 1.3;
    }

    .notification-btn {
        font-size: 12px;
    }

    /* Improve scroll hint visibility */
    .scroll-hint {
        font-size: 12px;
        /* Larger on phones */
        letter-spacing: 0.15em;
        margin-bottom: 20px;
    }
}

/* Landscape phone optimizations */
@media (max-width: 896px) and (orientation: landscape) {
    .ui-layer {
        padding: 10px 20px;
    }

    .scroll-hint {
        font-size: 8px;
        margin-bottom: 10px;
    }

    .premium-search-input {
        padding: 15px 20px;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {

    /* Touch device optimizations */
    .close-panel {
        padding: 15px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .minimized-label {
        padding: 15px 5px;
        min-width: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Larger touch targets */
    .nav-item {
        padding: 10px 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    .glass-card:hover,
    .fallback-card:hover,
    .panel-item-card:hover,
    .blog-list-item:hover {
        transform: none;
        box-shadow: inherit;
    }

    /* Touch-friendly search input */
    .premium-search-input:focus {
        transform: none;
        max-width: 100%;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Crisp rendering for high DPI */
    #cloud-canvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* --- END MOBILE OPTIMIZATIONS --- */
.navbar-brand-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    /* Reduced size */
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.navbar-brand-modern:hover {
    color: var(--accent-color);
}

.navbar-brand-modern .bg-primary {
    padding: 0.35rem !important;
    /* Reduce padding around icon */
}

.navbar-brand-modern i {
    font-size: 0.9rem;
    /* Smaller icon */
}

.bg-primary {
    background-color: var(--accent-color) !important;
}

.text-primary {
    color: var(--accent-color) !important;
}

.btn-primary {
    background-color: var(--accent-color) !important;
    color: #FFF !important;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 6px rgba(249, 115, 22, 0.2);
}

.btn-primary:hover {
    background-color: #E86000 !important;
    box-shadow: 0 6px 12px rgba(249, 115, 22, 0.3);
}

.btn-dark {
    background: #2D2D2D !important;
    color: #FFF !important;
}

.btn-dark:hover {
    background: #111 !important;
}

.border-secondary {
    border-color: var(--border-color) !important;
}

.table-dark {
    background-color: #FFF !important;
    color: var(--text-color) !important;
}

.table-dark th,
.table-dark td,
.table-dark thead th,
.table-dark tbody+tbody {
    border-color: var(--border-color) !important;
}

/* Reverting table-dark text colors because we are light now */
.table-dark th {
    color: var(--muted-color) !important;
}

.bg-black {
    background-color: #FFF !important;
    /* Invert black to white for light theme */
}

.text-muted {
    color: var(--muted-color) !important;
}

.form-control,
.form-select {
    background-color: #FFF !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #FFF !important;
    border-color: var(--accent-color) !important;
    color: var(--text-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25) !important;
}

/* --- BLOG CONTENT TYPOGRAPHY (LIGHT THEME) --- */
.blog-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: #000;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.8em;
    letter-spacing: -0.02em;
}

.blog-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

.blog-content h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.blog-content h3 {
    font-size: 1.4rem;
    color: var(--accent-color);
}

.blog-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: #444;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.blog-content a:hover {
    color: #000;
}

.blog-content strong {
    color: #000;
    font-weight: 600;
}

.blog-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    font-style: italic;
    color: #666;
    margin: 2rem 0;
    background: rgba(249, 115, 22, 0.05);
    /* Very light orange bg */
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-premium);
}

/* Product Cards within Blog (Light) */
.blog-content .product-preview {
    background: #FFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-content .product-preview:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.blog-content .price-badge {
    color: #2E7D32;
    /* Strong Green for price */
    font-size: 1.25rem;
    font-weight: 700;
}