/* ===== MOBILE & TABLET RESPONSIVE STYLES ===== */
/* Comprehensive responsive design for entire website */

/* ===== HEADER RESPONSIVE ===== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .header-grid {
        padding: 0.5rem 1rem;
    }

    .header-center {
        gap: 0.75rem;
    }

    .nav-btn {
        font-size: 13px;
        padding: 5px 6px;
    }

    .nav-item-grid {
        min-width: 350px;
        padding: 12px;
    }

    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px 12px;
    }
}

/* ===== CRITICAL MOBILE FIXES ===== */
@media (max-width: 1024px) {

    /* Force header to fit screen */
    #mainHeader {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* Hide side UFO panels and covers on tablets and mobile - Avoid "stray cats" */
    #ufoControlPanel,
    .ufo-control-panel,
    #ufoControlPanelLeft,
    .ufo-left-control-panel,
    .ufo-panel-cover,
    /* .ufo-cover-screen, */
    /* DISABLED - Allow mobile strip */
    .ufo-left-cover,
    .ufo-right-cover,
    #ufoCover,
    #ufoCoverLeft,
    .ufo-3d-bar,
    .ufo-pin-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: -1 !important;
        height: 0 !important;
        width: 0 !important;
    }

    /* NUCLEAR RULE: Absolutely remove UFO panel on mobile to prevent blocking overlays */
    #ufoControlPanel:not(.mobile-summoned),
    div#ufoControlPanel:not(.mobile-summoned),
    .ufo-control-panel:not(.mobile-summoned) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: fixed !important;
        left: -9999px !important;
        top: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        z-index: -999999 !important;
    }

    /* Ensure all children are also hidden */
    #ufoControlPanel:not(.mobile-summoned) *,
    div#ufoControlPanel:not(.mobile-summoned) * {
        display: none !important;
        pointer-events: none !important;
    }

    /* ABSOLUTE NUCLEAR: Hide ALL UFO panel covers on mobile */
    #ufoControlPanelLeft,
    div#ufoControlPanelLeft,
    .ufo-left-control-panel,
    #ufoCoverLeft,
    div#ufoCoverLeft,
    .ufo-left-cover,
    #ufoCover,
    div#ufoCover,
    .ufo-right-cover,
    .ufo-panel-cover {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: fixed !important;
        left: -99999px !important;
        top: -99999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        z-index: -999999 !important;
    }

    /* Hide all children too */
    #ufoControlPanelLeft *,
    #ufoCoverLeft *,
    #ufoCover *,
    .ufo-left-cover *,
    .ufo-right-cover * {
        display: none !important;
        pointer-events: none !important;
    }


    /* Ensure main header has enough height for both rows on mobile */
    #mainHeader {
        height: auto !important;
        min-height: 100px !important;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {

    /* ===== COMPACT MOBILE LAYOUT ===== */
    /* Reduce all spacing to fit more content */

    /* Global spacing reduction */
    * {
        letter-spacing: -0.01em;
    }

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1rem;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.4;
    }



    /* ===== MOBILE HEADER - Simple Vertical Layout ===== */

    /* NUCLEAR OPTION (DISABLED): Unhided standard header elements for restored header.php */
    /* SAFE FIX: Ensure header content is visible when menu is open */
    body.ccc-no-scroll #mainHeader,
    body:has(.mobile-summoned) #mainHeader {
        overflow: visible !important;
        /* Allow content to be seen if pushed */
        z-index: 900000 !important;
    }

    body.ccc-no-scroll #mainHeader>*,
    body:has(.mobile-summoned) #mainHeader>* {
        visibility: visible !important;
        opacity: 1 !important;
        /* Do NOT touch display property to avoid layout breakage */
    }


    /* Header container as column - STRICT WIDTH LIMITS */
    #mainHeader {
        display: flex !important;
        flex-direction: column !important;
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 5px !important;
        margin: 0 !important;
        min-height: auto !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        box-sizing: border-box !important;
    }

    /* Mobile search bar - first row - FIT VIEWPORT */
    #mobileHeaderSearch {
        width: 100% !important;
        max-width: 100% !important;
        order: 1 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        box-sizing: border-box !important;
    }

    /* Ensure search row content is visible */
    #mobileHeaderSearch .mobile-search-row,
    #mobileHeaderSearch .mobile-search-box,
    #mobileHeaderSearch input,
    #mobileHeaderSearch select,
    #mobileHeaderSearch button {
        visibility: visible !important;
        opacity: 1 !important;
        display: flex !important;
    }

    /* Hide three-line topic text on mobile; keep logo with tooltip only */
    .logo-expanded-title {
        display: none !important;
    }

    /* Navigator - second row - FIT VIEWPORT */
    #navigator-container {
        width: 100% !important;
        max-width: 100% !important;
        order: 2 !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 5px !important;
        gap: 4px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        box-sizing: border-box !important;
        padding: 0 5px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Ensure nav buttons are visible */
    #navigator-container .nav-item,
    #navigator-container .nav-btn {
        visibility: visible !important;
        opacity: 1 !important;
        display: inline-flex !important;
    }






    /* DISABLED: Unhiding specific header components for restored header.php */
    /* .ufo-middle-cover,
    .header-grid,
    .header-row1,
    .header-row2,
    .header-second-row,
    .header-left,
    .header-right,
    .header-center,
    .header-middle-panel,
    #headerMiddlePanel,
    .search-filter-container,
    .row1-right-icons {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
        z-index: -1 !important;
        pointer-events: none !important;
    } */




    /* Shrink Desktop Search Row on Mobile (24px-28px) */
    .header-row1 {
        padding: 4px 8px !important;
        min-height: 28px !important;
        margin-top: 4px !important;
        gap: 8px !important;
    }

    .header-row1 .search-box {
        height: 28px !important;
        min-height: 28px !important;
        padding: 0 10px !important;
        border-radius: 14px !important;
    }

    .header-row1 #oldSearchInput {
        height: 100% !important;
        line-height: normal !important;
        font-size: 12px !important;
    }

    .header-row1 #searchCategory {
        height: 100% !important;
        font-size: 11px !important;
        padding: 0 4px !important;
    }

    .header-row1 .filter-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
    }

    /* Reduce spacing for header utility icons (Profile, Mail, etc) */
    .row1-right-icons {
        gap: 4px !important;
    }

    .row1-right-icons a,
    .row1-right-icons div,
    .row1-right-icons button {
        padding: 2px !important;
        margin: 0 !important;
    }

    .row1-right-icons i {
        font-size: 14px !important;
    }

    /* Mobile logo: show only the icon, hide three-line title */
    .logo-wrapper {
        position: relative !important;
        left: 0 !important;
        bottom: auto !important;
        top: 0 !important;
        margin: 4px 0 !important;
    }

    .logo-wrapper img {
        height: 28px !important;
    }

    .logo-expanded-title {
        display: none !important;
    }

    /* Shrink Desktop Navigator Row on Mobile */
    .header-second-row {
        height: 32px !important;
        min-height: 32px !important;
        padding: 2px 8px !important;
        margin-top: 6px !important;
    }

    #navigator-container .nav-btn i {
        font-size: 14px !important;
        margin: 0 !important;
    }


    /* Compact spacing */
    .header-center {
        gap: 8px !important;
    }

    /* Navigation row - Inside header, below search */
    .header-second-row,
    #navigator-container {
        order: 4 !important;
        /* Force to bottom of flex column if needed */
        width: 100% !important;
        flex: 1 1 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        margin-top: 10px !important; /* leave clear gap under search */
        padding: 2px 4px !important;
        display: flex !important;
        justify-content: center !important;
    }

    #navigator-container::-webkit-scrollbar {
        display: none;
    }

    /* Navigation - compact text buttons instead of icon-only */
    .nav-btn,
    .header-center .nav-btn,
    .nav-item a,
    .nav-item button {
        font-size: 10px !important;
        padding: 4px 6px !important;
        min-width: 0 !important;
        height: 28px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 2px !important;
        line-height: 1.2 !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
    }

    /* Show labels inside navigation buttons on mobile */
    .header-center .nav-btn span,
    .header-center .nav-btn .btn-text,
    .header-center .nav-btn b {
        display: inline-block !important;
    }

    /* Hide only if a dedicated mobile icon-only style is set elsewhere */

    .nav-item {
        margin: 0 !important;
        display: inline-flex !important;
    }

    .nav-item-grid {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        min-width: 100%;
        max-width: 100%;
        margin-top: 0;
        border-radius: 0;
        max-height: 70vh;
        overflow-y: auto;
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Search - COMPACT */
    #searchWrapper {
        width: 100%;
        max-width: 100%;
    }

    /* Make search input much smaller */
    #oldSearchInput,
    #searchInput,
    input[type="search"],
    .search-input {
        height: 28px !important;
        min-height: 28px !important;
        font-size: 12px !important;
        padding: 4px 8px !important;
        line-height: 1.2 !important;
        flex: 1 1 70% !important;
        /* Give search input MORE space */
        max-width: 70% !important;
    }

    /* Search category dropdown - SMALLER */
    #searchCategory,
    .search-category {
        height: 28px !important;
        font-size: 11px !important;
        padding: 4px 6px !important;
        flex: 0 0 25% !important;
        /* Give category LESS space */
        max-width: 25% !important;
    }

    /* Search button */
    .search-btn,
    button[type="submit"] {
        height: 28px !important;
        padding: 4px 10px !important;
        font-size: 11px !important;
    }

    #searchResults {
        width: 100%;
        left: 0;
        right: 0;
        max-width: 100%;
    }

    /* Consolidated UFO Panel Hiding on Mobile */
    #ufoControlPanel,
    .ufo-control-panel,
    #ufoControlPanelLeft,
    .ufo-left-control-panel,
    #universalRemote {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Navigation Container - Prevent overflow */
    #navigator-container {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #navigator-container::-webkit-scrollbar {
        display: none;
    }

    /* Make nav items wrap or scroll horizontally */
    .nav-item {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Logo/branding - Smaller */
    .header-logo img {
        max-height: 32px;
    }

    .glrcf-logo {
        font-size: 0.9rem !important;
        padding: 2px 6px !important;
    }

    /* Ultra-compact GLRelief Mission text to fit donation icon */
    .header-logo,
    .logo-text,
    .glrcf-title,
    .site-title,
    a[href*="index.php"] {
        font-size: 9px !important;
        max-width: 60px !important;
        line-height: 1.1 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    /* If logo is an image + text combo */
    .header-logo img+span,
    .header-logo img+div {
        font-size: 9px !important;
        max-width: 50px !important;
    }


    /* Horizontal + bottom padding only. Top inset = adjustHeaderSpacer() — do not stack 210px. */
    body,
    body.mobile-view {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-bottom: 90px !important;
        overflow-x: hidden !important;
    }
    .main-content,
    main {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-top: 0 !important;
        padding-bottom: 90px !important;
        overflow-x: hidden !important;
    }

    /* Reduce section spacing */
    section {
        padding: 15px 10px !important;
        margin-bottom: 15px !important;
    }

    /* Compact buttons */
    button,
    .btn,
    a.btn {
        padding: 6px 12px !important;
        font-size: 0.85rem !important;
    }

    /* Compact cards across site */
    .card {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }

    /* Icons */
    .header-icon-btn {
        padding: 6px;
        font-size: 16px;
    }

    .holo-btn {
        min-width: 55px !important;
        /* Width can vary */
        max-width: none !important;
        /* Allow flexible width */
        height: 50px !important;
        /* Fixed height for uniformity */
        padding: 6px 9px !important;
        /* Reduced by half: was 12px 18px */
        font-size: 9px !important;
        /* Reduced: was 13px */
    }

    .holo-btn-icon {
        font-size: 10px !important;
        /* Reduced by half: was 20px */
    }

    /* Pagination - COMPACT, ONE ROW ONLY */
    .pagination {
        padding: 3px 6px !important;
        gap: 2px !important;
        flex-wrap: nowrap !important;
        /* Don't wrap */
        overflow-x: auto !important;
        /* Scroll if needed */
        margin: 15px auto !important;
        max-width: 100% !important;
    }

    .pagination button,
    .pagination a,
    .pagination span {
        min-width: auto !important;
        height: auto !important;
        font-size: 12px !important;
        padding: 3px 6px !important;
        /* Compact padding */
        flex-shrink: 0 !important;
        line-height: 1.2 !important;
        border-radius: 12px !important;
        /* Rounded shape */
    }

    /* Show page jump but make it compact */
    .pagination .page-jump {
        display: flex !important;
        gap: 4px !important;
        padding: 3px 8px !important;
        font-size: 11px !important;
        border-radius: 16px !important;
        /* Rounded container */
    }

    .pagination .page-jump input {
        width: 40px !important;
        height: 24px !important;
        padding: 3px 6px !important;
        font-size: 11px !important;
        border-radius: 12px !important;
        /* Rounded input */
    }

    .pagination .page-jump button {
        height: 24px !important;
        padding: 3px 10px !important;
        font-size: 10px !important;
        border-radius: 12px !important;
        /* Rounded Go button */
    }

    /* Shop/Sales buttons - compact */
    .add-to-cart-btn,
    .bid-btn,
    .buy-now-btn {
        font-size: 9px !important;
        padding: 4px 6px !important;
        white-space: nowrap !important;
    }

    .add-to-cart-btn i,
    .bid-btn i,
    .buy-now-btn i {
        font-size: 8px !important;
        margin-right: 2px !important;
    }

}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .header-grid {
        padding: 0.4rem;
    }

    .nav-btn {
        font-size: 11px;
        padding: 3px 4px;
    }

    .header-icon-btn {
        padding: 5px;
        font-size: 14px;
    }

    .nav-item-grid {
        padding: 10px;
    }

    .mega-menu-category {
        font-size: 11px;
    }

    .nav-item-grid a {
        font-size: 13px;
        padding: 6px 8px;
    }
}

/* ===== MAIN CONTENT RESPONSIVE ===== */

@media (max-width: 768px) {
    main {
        padding: 1rem 0.5rem;
    }

    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Cards */
    .card,
    .product-card,
    .auction-card {
        margin-bottom: 1rem;
    }

    /* Grids */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .row>* {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
        font-size: 0.9rem;
    }

    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        width: 100%;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ===== MODALS RESPONSIVE ===== */

@media (max-width: 768px) {
    .modal {
        padding: 0.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        border-radius: 0.5rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }
}

/* ===== FOOTER RESPONSIVE ===== */

@media (max-width: 768px) {
    footer {
        padding: 1.5rem 0.75rem;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-section {
        width: 100%;
    }

    /* Social icons - compact and in one row */
    .social-icons,
    .footer-social,
    .social-links {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        /* Further reduced gap */
        justify-content: center !important;
        padding: 0 4px !important;
    }

    .social-icons a,
    .footer-social a,
    .social-links a {
        width: 21px !important;
        /* Even smaller to fit 8+ icons */
        height: 21px !important;
        font-size: 10px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
}

/* ===== UTILITY CLASSES ===== */

/* Hide on mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .hide-tablet {
        display: none !important;
    }
}

/* Show only on mobile */
.show-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block !important;
    }
}

/* Full width on mobile */
@media (max-width: 768px) {
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Stack on mobile */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column !important;
    }

    .mobile-stack>* {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }
}

/* ===== TOUCH FRIENDLY ===== */

@media (max-width: 768px) {

    /* Larger touch targets */
    a,
    button,
    .btn,
    .nav-btn,
    .header-icon-btn {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Prevent text selection on buttons */
    button,
    .btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        user-select: none;
    }
}

/* ===== IMAGES RESPONSIVE ===== */

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    img {
        width: 100%;
        height: auto;
    }
}

/* ===== TEXT RESPONSIVE ===== */

@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* ===== SCROLLING ===== */

@media (max-width: 768px) {

    /* Smooth scrolling */
    html {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }

    * {
        max-width: 100%;
    }
}


/* ===== NEW MOBILE STRUCTURE FIXES (Restored Header) - V2 ===== */
@media (max-width: 1024px) {

    /* 1. Hide Skip to Content Link */
    a.skip-link,
    a[href="#main-content"],
    .skip-to-content,
    .skip-link {
        display: none !important;
    }

    /* 2. Container Width & Clean Layout */
    #mainHeader {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
    }

    /* Remove "below two layers" / overlays / debris */
    .ufo-middle-cover,
    .ufo-panel-cover,
    #headerMiddlePanel::before,
    #headerMiddlePanel::after,
    .ufo-3d-bar

    /* ,
    .ufo-cover-screen */
    /* DISABLED - Allow mobile strip */
        {
        display: none !important;
    }

    /* 3. Top Panel (Icons) - "Our Panel" - 11 ICONS VISIBLE */
    /* ORDER: 1 */
    .ufo-mode-bar,
    /* 3. TOP ROW: 11 ICONS (UFO MODE BAR) */
    /* Target via ID and Class for max specificity */
    #mainHeader .ufo-mode-bar,
    .ufo-mode-bar,
    .header-mode-icons {
        order: 1 !important;
        display: grid !important;
        grid-template-columns: repeat(11, 1fr) !important;
        /* STRICT 11 COLS */
        gap: 0px !important;
        padding: 2px 0px !important;
        width: 100% !important;
        height: auto !important;
        min-height: 25px !important;
        margin: 0 !important;
        justify-content: space-between !important;
    }

    .ufo-mode-btn {
        min-width: 0 !important;
        padding: 0 !important;
        /* ZERO PADDING */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
    }

    .ufo-mode-btn i {
        font-size: 13px !important;
        /* SMALLER ICONS requested */
        margin: 0 !important;
    }

    .ufo-mode-btn span {
        display: block !important;
        font-size: 8px !important;
        line-height: 1 !important;
    }

    /* 4. Second Row (Search) - VISIBLE - BETWEEN ICONS AND NAV */
    /* ORDER: 2 */
    .header-row1 {
        order: 2 !important;
        display: flex !important;
        width: 100% !important;
        padding: 2px 4px !important;
        box-sizing: border-box !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        justify-content: center !important;
    }

    /* Ensure search box itself is visible */
    .header-row1 .search-box,
    .search-filter-container {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 5. Third Row (Navigators) - SMALLER & CLOSER */
    /* ORDER: 3 */
    /* 5. BOTTOM ROW: NAVIGATION BUTTONS (The difficult one) */
    #mainHeader .header-second-row,
    .header-second-row {
        order: 3 !important;
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        overflow-x: auto !important;
        padding: 2px !important;
        gap: 0px !important;
        justify-content: space-between !important;
        margin: 0 !important;
    }

    /* Hide ALL text nodes inside nav buttons */
    .nav-btn span,
    .nav-btn b,
    .nav-btn strong,
    .nav-btn .btn-text,
    .nav-btn:not(:has(i)) {
        /* Text-only nodes? */
        display: none !important;
    }

    /* Ensure flex container doesn't show text nodes */
    /* CRITICAL: Override inline styles for Nav Buttons */
    /* Use ID selector #mainHeader for supreme specificity */
    #mainHeader .header-center .nav-btn,
    .header-center .nav-btn,
    .nav-btn {
        font-size: 0 !important;
        /* NUCLEAR TEXT HIDING */
        padding: 6px 4px !important;
        /* Reduce padding */
        gap: 0 !important;
        display: inline-flex !important;
        flex-direction: row !important;
        width: auto !important;
    }

    /* Icon size */
    #mainHeader .header-center .nav-btn i,
    .nav-btn i {
        font-size: 16px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Specially hide "Home" text if it persists */
    #mainHeader .header-center .nav-btn:first-child,
    .nav-btn[href*="index"] {
        font-size: 0 !important;
        color: transparent !important;
        /* Extra backup */
    }

    .nav-btn i {
        font-size: 16px !important;
        /* Specific icon size */
        margin: 0 !important;
        display: block !important;
    }

    .nav-btn {
        padding: 4px 6px !important;
        /* Smaller buttons */
        flex-shrink: 0 !important;
        min-width: 30px !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 6. REMOVE HIGHLIGHTER (Hamburger & Rocket) */
    .nav-btn:has(.fa-bars),
    .nav-btn:has(.fa-rocket),
    #sidebarToggle,
    #sidebarToggleBtn,
    .rocket-btn,
    #appLauncherBtn {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* 7. Hide Home Text specifically if persistent */
    .nav-btn[href*="index.php"] span {
        display: none !important;
    }

    /* 8. FORCE VISIBILITY & CLICKS for Hamburger/Rocket */
    #sidebarToggleBtn,
    #appLauncherBtn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        z-index: 999999 !important;
    }

    /* 9. LAYOUT CHANGE: Search on Top */
    /* Hide 11 Icons (UFO Mode Bar) */
    .ufo-mode-bar,
    .header-mode-icons {
        display: none !important;
    }

    /* Search Bar - TOP ROW (Order 1) */
    #mainHeader .header-row1,
    .header-row1 {
        order: 1 !important;
        margin-top: 0 !important;
        padding-top: 4px !important;
    }

    /* Navigation - BOTTOM ROW (Order 2) */
    #mainHeader .header-second-row,
    .header-second-row {
        order: 2 !important;
    }

    /* 10. SIDEBAR POSITIONING */
    /* Ensure Sidebar opens BELOW the header */
    #ufoControlPanelLeft {
        top: 120px !important;
        height: calc(100vh - 120px) !important;
        z-index: 9999 !important;
        position: fixed !important;
    }

    /* CRITICAL: Allow Panels to show when Active (Overriding Consolidated Hiding) */
    #ufoControlPanel.active,
    #ufoControlPanelLeft.active,
    #appLauncherDraggable.active,
    #smartphoneLauncherWrapper.active,
    .mobile-summoned {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 900000 !important;
    }

    /* Footer Social Icons - Single Row Fix */
    .layer-social>div {
        gap: 8px !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
        padding: 0 10px !important;
    }

    .social-bubble {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
}
/* Mobile Optimization Styles */

/* Touch-friendly buttons and links */
@media (max-width: 768px) {

    /* Minimum touch target size: 44px */
    button,
    .btn,
    a.button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }

    /* Larger tap targets for navigation */
    nav a,
    .nav-link,
    .menu-item {
        min-height: 48px;
        display: flex;
        align-items: center;
        padding: 12px 16px;
    }

    /* Form inputs */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 12px 16px;
    }

    /* MOBILE HEADER SPECIFIC OVERRIDES - Must come after generic input styles */
    #oldSearchInput {
        min-height: 24px !important;
        height: 24px !important;
        line-height: 24px !important;
        font-size: 13px !important;
        padding: 0 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    #searchCategory {
        min-height: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
        padding: 0 6px !important;
        max-width: 100px !important;
        flex-shrink: 0 !important;
    }

    .search-box {
        padding: 2px 8px !important;
        border-radius: 12px !important;
        flex: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        gap: 4px !important;
    }

    .header-row1 {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .search-filter-container {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 !important;
        order: 1 !important;
    }

    #searchWrapper {
        flex: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #searchForm {
        flex: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
    }

    /* Filter button should be on the right */
    .filter-toggle-btn,
    #filterToggle,
    .search-filter-btn {
        order: 2 !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    /* Ensure header container is full width */
    .header-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Redundant toggle styles removed - controlled by header.php */
    /* .mobile-sidebar-toggle { ... } */

    /* Larger font sizes for readability */
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 18px;
    }

    /* Spacing improvements */
    .container,
    .content {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Cards and sections */
    .card,
    .section {
        margin-bottom: 16px;
        padding: 16px;
    }

    /* Tables - make scrollable */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Images responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }

    /* Show mobile-only elements */
    .mobile-only {
        display: block !important;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 720px;
    }

    /* Adjust grid layouts */
    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Landscape phone optimizations */
@media (max-width: 768px) and (orientation: landscape) {

    /* Reduce header height in landscape */
    header {
        min-height: 60px;
    }

    /* Adjust modal heights */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Prevent text selection on buttons (better mobile UX) */
button,
.btn,
a.button {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling on mobile */
html {
    -webkit-overflow-scrolling: touch;
}

/* Fix viewport issues */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* ==========================================================================
   NUCLEAR MOBILE COMBAT STYLES (Ported from index-mobile.php - User Request)
   "So this devil will not flash or come out without asking"
   ========================================================================== */
@media (max-width: 980px) {

    /* 1. Global Reset & Tightening */
    body,
    html,
    .main-content,
    main {
        margin: 0 !important;
        padding-top: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden !important;
    }

    /* 2. Remove Header Gaps & Fix Banner */
    #mainHeader {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    #redCrisisBanner {
        margin-top: 10px !important;
        /* Removed negative margin that caused overlap */
        position: relative !important;
        z-index: 995 !important;
    }

    /* 3. Center and Compact the Navigator (Tight Layout) */
    #navigator-container {
        display: flex !important;
        justify-content: center !important;
        gap: 1px !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 1px !important;
        pointer-events: auto !important;
        z-index: 20002 !important;
        position: relative !important;
    }

    #navigator-container .nav-item {
        margin: 0 !important;
        padding: 0 !important;
        pointer-events: auto !important;
        z-index: 20003 !important;
    }

    #navigator-container .nav-btn {
        padding: 1px 3px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        z-index: 20003 !important;
        font-size: 8px !important;
        color: #111827 !important;
        font-weight: 600 !important;
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        line-height: 1 !important;
        text-align: center !important;
        gap: 2px !important;
    }

    #navigator-container .nav-btn i:not(.fa-caret-down) {
        font-size: 13px !important;
        width: 14px !important;
        height: 14px !important;
        line-height: 14px !important;
        display: block !important;
        visibility: visible !important;
        margin: 0 auto !important;
        text-align: center !important;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
    }

    #navigator-container .nav-btn .fa-caret-down {
        display: none !important;
    }

    #navigator-container .nav-btn i.fa-clock { color: #0ea5e9 !important; }
    #navigator-container .nav-btn i.fa-book-quran { color: #2563eb !important; }
    #navigator-container .nav-btn i.fa-star-and-crescent { color: #7c3aed !important; }
    #navigator-container .nav-btn i.fa-kaaba { color: #0d9488 !important; }
    #navigator-container .nav-btn i.fa-hand-holding-usd { color: #16a34a !important; }
    #navigator-container .nav-btn i.fa-utensils { color: #f97316 !important; }
    #navigator-container .nav-btn i.fa-images { color: #6366f1 !important; }

    /* Legacy icon colors */
    #navigator-container .nav-btn i.fa-home {
        color: #3b82f6 !important;
    }

    #navigator-container .nav-btn i.fa-heart {
        color: #ec4899 !important;
    }

    #navigator-container .nav-btn i.fa-images {
        color: #6366f1 !important;
    }

    #navigator-container .nav-btn i.fa-gavel {
        color: #f97316 !important;
    }

    #navigator-container .nav-btn i.fa-shopping-bag {
        color: #10b981 !important;
    }

    #navigator-container .nav-btn i.fa-chart-line {
        color: #8b5cf6 !important;
    }

    #navigator-container .nav-btn i.fa-globe {
        color: #14b8a6 !important;
    }

    #navigator-container .nav-btn i.fa-tools {
        color: #ef4444 !important;
    }

    /* Show text labels below icons on mobile */
    #navigator-container .nav-btn span.nav-text,
    #navigator-container .nav-text {
        display: block !important;
        font-size: 8px !important;
        line-height: 1 !important;
        text-align: center !important;
        white-space: nowrap !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 4. KILL THE FLASHING DEVIL (UFO Panel)
       But allow it if .mobile-summoned (The Strip) is active. */
    /* DISABLED - Relying on .ufo-mobile-hidden class
    #ufoControlPanel:not(.mobile-summoned),
    .ufo-right-control-panel:not(.mobile-summoned) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    */

    /* 5. Sanity Bar (Visual Confidence) */
    .sanity-bar {
        height: 3px !important;
        background: #39ff14 !important;
        /* Neon Green */
        width: 100% !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 2147483647 !important;
    }
}
/**
 * Aeris public storefront mobile pass (Step 8).
 * Loads after layout.css + mobile-enhancements on all division sites.
 * Breakpoint aligns with panel chrome (992px).
 */

@media (max-width: 992px) {
    body {
        overflow-x: clip;
        max-width: 100%;
    }

    /* Header layout: aeris_storefront_header_mobile.css + .js (loaded end of #mainHeader) */

    /* Override page-specific inline 3-column grids (index.php, vendor_shop.php, etc.) */
    .main-layout-wrapper {
        display: block !important;
        grid-template-columns: none !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 8px 6px 16px !important;
        gap: 0 !important;
        box-sizing: border-box !important;
    }

    .main-layout-wrapper > [style*="grid-column"] {
        grid-column: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }

    .content-area {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        grid-column: auto !important;
        overflow-x: hidden !important;
        border-radius: 6px !important;
    }

    .global-pagination-strip {
        max-width: 100% !important;
        padding: 0 6px !important;
        box-sizing: border-box !important;
    }

    /* Home commerce dashboard (Gtrado index) */
    .unified-dashboard {
        padding: 10px !important;
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }

    .unified-dashboard .dash-main {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .unified-dashboard .dash-price-group {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .unified-dashboard .tfd-mini-grid {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        max-width: 100%;
        padding-bottom: 4px;
    }

    .banner-carousel {
        height: 200px !important;
        margin-bottom: 12px !important;
        border-radius: 6px !important;
    }

    /* Shared card grids */
    .card-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    /* Cart */
    .cart-shell {
        padding: 16px 0 48px !important;
    }

    .cart-container {
        padding: 0 8px !important;
    }

    .cart-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .cart-item {
        grid-template-columns: 72px 1fr !important;
    }

    .cart-item img {
        width: 72px !important;
        height: 72px !important;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Vendor shop */
    .vendor-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .vendor-3d-container .main-layout-wrapper {
        padding: 8px 4px !important;
    }

    .vendor-header-card {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .vendor-stats {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    /* Wide tables scroll inside content */
    .content-area table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Common product listing grids */
    .products-grid,
    .sales-products-grid,
    .listing-grid,
    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .main-layout-wrapper {
        padding: 6px 4px 12px !important;
    }

    .card-grid-4,
    .vendor-items-grid,
    .products-grid,
    .sales-products-grid,
    .listing-grid,
    .shop-grid {
        grid-template-columns: 1fr !important;
    }

    .banner-carousel {
        height: 160px !important;
    }

    .unified-dashboard .price-val {
        font-size: 1rem !important;
    }

    .cart-item {
        grid-template-columns: 1fr !important;
    }

    .cart-item img {
        width: 100% !important;
        height: 140px !important;
    }

}

/* ============================================
   SMOOTH PAGE TRANSITIONS
   Eliminates shake, jerk, and wave-like movements
   ============================================ */

/* Prevent layout shifts and reflow */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    /* Prevent jerky movements */
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    /* Smooth rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    /* Prevent text selection causing shifts */
    -webkit-tap-highlight-color: transparent;
}

/* Smooth page transition overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9998;
    /* Below header overlays but still high */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Smooth fade transition for page content */
.page-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-content.loading {
    opacity: 0;
    transform: translateY(10px);
}

.page-content.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Prevent layout shifts during load */
* {
    box-sizing: border-box;
}

/* Smooth image loading */
img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Prevent layout shift */
    opacity: 1;
    /* FIXED: Default to visible to prevent invisible images if JS fails */
    transition: opacity 0.3s ease;
}

img, img.loaded { opacity: 1 !important; visibility: visible !important; }

/* Smooth link transitions */
a {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

a:hover {
    transform: translateY(-1px);
}

a:active {
    transform: translateY(0);
}

/* Smooth button transitions */
button,
.button,
input[type="submit"],
input[type="button"] {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-2px) translateZ(0);
    -webkit-transform: translateY(-2px) translateZ(0);
}

button:active,
.button:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: translateY(0) translateZ(0);
    -webkit-transform: translateY(0) translateZ(0);
}

/* Smooth form element transitions */
input,
textarea,
select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

input:focus,
textarea:focus,
select:focus {
    transform: translateZ(0) scale(1.01);
    -webkit-transform: translateZ(0) scale(1.01);
}

/* Prevent jerky scroll */
* {
    scroll-behavior: smooth;
}

/* Smooth container transitions */
.container,
.container-fluid,
main,
section,
article {
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Eliminate wave-like animations */
@keyframes smoothFadeIn {
    from {
        opacity: 0;
        transform: translateY(0) translateZ(0);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

@keyframes smoothSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px) translateZ(0);
    }

    to {
        opacity: 1;
        transform: translateX(0) translateZ(0);
    }
}

/* Smooth modal transitions */
.modal,
.popup,
.overlay {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Prevent layout shifts from dynamic content */
.dynamic-content {
    min-height: 50px;
    transition: opacity 0.3s ease, min-height 0.3s ease;
}

/* Smooth navigation transitions */
nav,
.navbar,
.navigation {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Smooth header transitions */
header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* Smooth footer transitions */
footer {
    transition: opacity 0.3s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Eliminate shake on hover */
*:hover {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Smooth table transitions */
table {
    transition: opacity 0.3s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Smooth card transitions */
.card,
.panel,
.box {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.card:hover,
.panel:hover,
.box:hover {
    transform: translateY(-4px) translateZ(0);
    -webkit-transform: translateY(-4px) translateZ(0);
}

/* Prevent jerky animations */
@keyframes noShake {
    from {
        transform: translateZ(0);
    }

    to {
        transform: translateZ(0);
    }
}

/* Smooth loading states */
.loading,
.spinner {
    animation: smoothSpin 0.8s linear infinite;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

@keyframes smoothSpin {
    from {
        transform: rotate(0deg) translateZ(0);
    }

    to {
        transform: rotate(360deg) translateZ(0);
    }
}

/* GPU acceleration for smooth transitions */
.smooth-transition {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Prevent reflow on page load */
body.loading {
    overflow: hidden;
}

body.loaded {
    overflow: auto;
}

/* Smooth page change indicator */
.page-change-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    z-index: 10000;
    transition: width 0.3s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Mobile optimizations */
@media (max-width: 768px) {

    /* Reduce transitions on mobile for better performance */
    * {
        transition-duration: 0.2s !important;
    }

    /* Prevent layout shifts */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Print styles - no transitions */
@media print {
    * {
        transition: none !important;
        animation: none !important;
    }
}
/* Form Validation CSS - Stub file to prevent 404 errors */
/* This file can be populated with actual validation styles if needed */

.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.form-success {
    color: #28a745;
    font-size: 12px;
    margin-top: 4px;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

