/**
 * Optimized Inline Styles Consolidation
 * Deduplicated and standardized from inline <style> blocks
 * 
 * Organization:
 * 1. Font Utilities
 * 2. Header Components (Consolidated)
 * 3. App Layout System
 * 4. Sidebar Components
 * 5. Main Content & Footer
 * 6. Responsive Breakpoints (Consolidated)
 */

/* ============================================
   1. FONT UTILITIES
   ============================================ */

.arial {
    font-family: Arial, sans-serif;
}

.helvetica {
    font-family: Helvetica, Arial, sans-serif;
}

.impact {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.impact-condensed {
    font-family: 'Impact Condensed', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-stretch: condensed;
}

.impact-bold-condensed {
    font-family: 'Impact Bold Condensed', 'Impact Condensed', Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-weight: bold;
    font-stretch: condensed;
}

.regular {
    font-weight: normal;
    font-weight: 400;
}

.narrow {
    font-stretch: condensed;
    letter-spacing: -0.5px;
}

.text-uppercase {
    text-transform: uppercase;
}

/* ============================================
   2. HEADER COMPONENTS (CONSOLIDATED)
   ============================================ */

/* Base header styles */
header {
    background: transparent;
    overflow: visible;
    position: relative;
}

header .topbar {
    background: #912;
    border-bottom: 1px solid #000;
    height: 1.3rem;
}

header .warehouse-wrap {
    background: #bb0011;
    overflow: visible;
    position: relative;
}

header .warehouse {
    width: 100%;
    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0)), url('assets/img/warehouse.png') center/cover;
    height: 133px;
    border-bottom: 1px solid #000;
    overflow: visible;
    position: relative;
}

header .warehouse .model {
    width: 7.5rem;
    z-index: 5;
}

header .warehouse .ribbon {
    width: 100%;
    max-width: 12rem;
    z-index: 5;
    position: absolute;
    right: 0;
}

header .slogan {
    background: #912;
    border-bottom: 1px solid #000;
}

header .phone {
    margin: 0 .5rem 0 0;
}

header .hours .phone-number {
    font-size: 30px;
    line-height: 2rem;
}

header .hours .operation {
    margin: auto;
}

header .hours.lg {
    background: #fff;
}

header .hours.sm {
    background: #b01;
    border-bottom: 1px solid #000;
}

header .hours.sm .copy {
    background: #fff;
    border-radius: 50%;
    padding: .25rem 1.75rem .5rem;
}

header .hours.sm .portrait {
    width: 4.0625rem;
    margin: -0.65rem 0 -0.65rem -0.65rem;
}

/* Modern header components */
.header {
    position: relative;
}

.header .header-container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.header .header-link-wrapper {
    display: block;
}

.header .header-img {
    margin: 0 auto;
    display: block;
    width: 100%;
    max-width: 1600px;
}

/* Navigation bar */
.header .header-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #b01;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    width: 100%;
    padding: 0.5rem 1rem;
    position: relative;
}

/* Mobile navigation controls */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #fff;
    font-size: 18px;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
}

/* Mobile search toggle - HIDDEN FOR NOW */
.mobile-search-toggle {
    display: none !important;
}

.mobile-menu-toggle {
    flex-direction: column;
    gap: 5px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation menu container */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-primary,
.nav-secondary {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header .header-nav-bar .nav-item {
    color: #fff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 4px;
}

.header .header-nav-bar .nav-item:hover {
    background: #912;
    color: yellow;
}

/* Mobile search overlay - HIDDEN FOR NOW */
/*
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
}

.mobile-search-overlay.active {
    display: flex;
}

.mobile-search-container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-search-container input {
    width: 100%;
    padding: 1rem;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.mobile-search-container input:focus {
    border-color: #b01;
}

.close-search {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
*/

/* Shared form elements */
#email_address_field_0 {
    margin: 0;
}

/* ============================================
   3. APP LAYOUT SYSTEM
   ============================================ */

#app {
    display: grid;
    grid-template-columns: 106px auto;
    grid-template-rows: auto 1fr;
    background: #fff;
    background-clip: padding-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: clip;
}

.header,
#app,
footer.app {
    border-left: .0125rem solid #05f;
    border-right: .0125rem solid #05f;
    background-clip: content-box;
}

/* ============================================
   4. SIDEBAR COMPONENTS
   ============================================ */

aside {
    display: flex;
    flex-direction: column;
}

aside.left #aside-search {
    cursor: pointer;
    font-size: .75rem;
    padding: .25rem;
}

aside.left .aside-search-wrap input {
    width: 69px;
}

aside.left .aside-search-wrap .btn {
    width: 22px;
}

aside.left #aside-left {
    padding: 0.3rem 0 0.3rem 0.3rem;
    gap: 0.3rem;
}

aside.right {
    grid-column: 1 / 2;
    gap: .3rem;
    padding: 0 0 .3rem .3rem;
}

aside search:after,
aside ul:after {
    content: '';
    background: #b02;
    display: flex;
    height: .5rem;
}

/* Sidebar navigation */
aside nav ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    background: var(--color-genie-blue);}

aside nav ul li {
    padding: .125rem .25rem;
    text-align: center;
    font: 700 .75rem sans-serif;
    background: #05f;
    color: #fff;
    border-top: 2px solid #69f;
    border-right: 2px solid #322dac;
    border-bottom: 2px solid #322dac;
    border-left: 2px solid #69f;
    box-shadow: none;
}

aside nav ul li a {
    color: #fff;
}

/* ============================================
   5. MAIN CONTENT & FOOTER
   ============================================ */

main {
    grid-column: 2;
    grid-row: 1 / 3;
    padding: 0;
    gap: 8px;
    display: flex;
    flex-direction: column;
}

main #unit-ads {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

/* Responsive grid for different screen sizes */
@media (min-width: 480px) and (max-width: 767px) {
    main #unit-ads {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Tablet grid layout (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    main #unit-ads {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Footer components */
footer.app {
    background: #f4f4f4;
    color: #008;
    border-top: none;
    padding: 2rem 1rem 2rem;
}

footer.app .copy {
    max-width: 68.7%;
    margin: auto;
    gap: .25rem;
}

.search-results {
    width: 100%;
}

.content-footer {
    margin-top: auto;
    width: 100%;
    grid-column: 1 / -1;
    max-width: none;
}

.content-footer .gray {
    color: #666;
    text-align: center;
    padding: 1rem;
}

.content-footer .top-wrap-bar {
    background: #b5001f;
    color: #fff;
    text-align: center;
    padding: 1rem;
    border: none;
}

.content-footer .top-wrap-bar a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
}

.content-footer .top-wrap-bar a:hover {
    color: #ffdd00;
}

.content-footer .top-wrap-bar address {
    font-style: normal;
    margin: 0;
}

.content-footer .top-wrap-bar i {
    margin-right: 0.5rem;
}

/* ============================================
   6. RESPONSIVE BREAKPOINTS (CONSOLIDATED)
   ============================================ */

/* Hide navigation menu below 1280px (xl breakpoint) */
@media (max-width: 1279px) {
    header nav.lg {
        display: none;
    }
}

/* Mobile/Small tablet adjustments */
@media screen and (max-width: 767px) {
    .header,
    #app,
    footer.app {
        border-left: .0125rem solid #05f;
        border-right: .0125rem solid #05f;
        background-clip: content-box;
    }

    /* Mobile navigation layout */
    .header .header-nav-bar {
        justify-content: space-between;
        padding: 0.5rem;
    }

    /* Show mobile controls */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Keep search hidden */
    .mobile-search-toggle {
        display: none !important;
    }

    /* Hide secondary navigation by default, show only on toggle */
    .nav-secondary {
        display: none;
    }

    /* Mobile nav menu layout */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #bb0011;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu.active .nav-secondary {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .nav-primary,
    .nav-secondary {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-menu .nav-item {
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 14px;
    }

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

    /* Hide original nav sections on mobile, show mega menu */
    .nav-primary,
    .nav-secondary {
        display: none;
    }

    /* Mega menu mobile styles */
    .mega-menu-mobile {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-bottom: 30px;
    }

    .mega-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: #003366;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }

    .mega-menu-header h3 {
        color: white;
        margin: 0;
        font-size: 18px;
        font-weight: bold;
    }

    .mega-menu-close {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 0.5rem;
        line-height: 1;
        position: relative;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Create symmetrical X using pseudo-elements */
    .mega-menu-close::before,
    .mega-menu-close::after {
        content: '';
        position: absolute;
        width: 16px;
        height: 2px;
        background-color: white;
        top: 50%;
        left: 50%;
        transform-origin: center;
    }

    .mega-menu-close::before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .mega-menu-close::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    /* Hover effect */
    .mega-menu-close:hover::before,
    .mega-menu-close:hover::after {
        background-color: #ff4444;
    }

    .mega-menu-section {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mega-menu-section-title {
        background: #912;
        color: white;
        padding: 1rem;
        margin: 0;
        font-size: 16px;
        font-weight: bold;
        border: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mega-menu-section-title.expandable:hover {
        background: #701;
    }

    .expand-icon {
        transition: transform 0.3s ease;
    }

    .mega-menu-section-title.expanded .expand-icon {
        transform: rotate(180deg);
    }

    .mega-menu-items {
        background: #bb0011;
    }

    .mega-menu-item {
        display: flex;
        align-items: center;
        padding: 0.75rem 1.5rem;
        color: white;
        text-decoration: none;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 52px;
        transition: background-color 0.2s ease;
    }

    .mega-menu-item:hover,
    .mega-menu-item:active {
        background: rgba(255, 255, 255, 0.1);
    }

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

    /* Products accordion */
    .products-items {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .products-items.expanded {
        max-height: 600px;
        overflow-y: auto;
    }
}

/* Hide mega menu on desktop, show original nav */
@media (min-width: 768px) {
    .mega-menu-mobile {
        display: none;
    }

    .nav-primary,
    .nav-secondary {
        display: flex !important;
    }
}

/* Tablet responsive using Tailwind md breakpoint */
@media (min-width: 768px) and (max-width: 1023px) {
    #app {
        grid-template-columns: 180px minmax(0, 1fr);
    }
}

/* Mobile and tablet screens - hide left sidebar */
@media (max-width: 767px) {
    #app {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr 1fr auto;
    }

    /* Hide sidebar navigation completely on mobile and tablet */
    aside.left {
        display: none;
    }

    main {
        grid-row: 2;
        grid-column: 1;
    }

    aside.right {
        grid-row: 3;
        grid-column: 1;
    }

    .content-footer .top-wrap-bar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .content-footer .top-wrap-bar a {
        margin: 0.25rem 0;
    }
}

/* Tablet responsive */
@media (min-width: 768px) {
    .header .header-nav-bar {
        gap: 0.1rem;
        padding: 0.2rem 0;
    }
    
    .header .header-nav-bar .nav-item {
        font-size: 13px;
        padding: 0.3rem 0.6rem;
    }
}

/* Desktop responsive - CONSOLIDATED */
@media (min-width: 768px) {
    /* Header desktop styles */
    header {
        max-width: 1600px;
        margin: 2rem auto 0;
    }
    
    header .balloon {
        margin-left: 40rem;
    }
    
    header .warehouse {
        position: relative;
        display: flex;
        justify-content: space-between;
    }
    
    header .warehouse .model {
        position: absolute;
        width: auto;
        height: 11rem;
        top: -4rem;
        left: 0.5rem;
    }
    
    header .warehouse .ribbon {
        position: absolute;
        top: -3.5rem;
        left: 7rem;
        width: 100%;
        max-width: 22rem;
        height: auto;
        max-height: 19rem;
    }
    
    header .header-hours-top {
        margin-bottom: 0rem;
    }
    
    header .header-hours-bot {
        background: #912;
    }
    
    /* Navigation desktop styles */
    .header .header-nav-bar {
        flex-wrap: nowrap;
        gap: 0.25rem;
        padding: 0.25rem 0;
    }
    
    .header .header-nav-bar .nav-item {
        font-size: 14px;
        padding: 0.35rem 0.75rem;
    }
    
    /* Sidebar desktop styles */
    aside.left {
        padding-right: 1rem;
    }
    
    aside.left search:before {
        content: '';
        background: #b02;
        display: flex;
        height: .5rem;
    }
    
    aside.left #model-number-search {
        flex-grow: 1;
    }
    
    aside.left #aside-left {
        padding: 0.6rem 0 0.6rem 0.6rem;
        gap: 0.5rem;
    }
    
    aside.left:after {
        content: url('assets/genie/img/footer-a.png');
        margin: auto -17px -5px 17px;
        text-align: right;
    }
    
    aside.right {
        grid-column: 3 / 4;
        gap: 0.5rem;
        padding: 0.6rem 0.6rem 0;
    }
    
    aside.right:after {
        content: url('assets/genie/img/footer-aa.png');
        margin: auto 17px -5px -17px;
    }
    
    aside nav ul li {
        padding: 0.3rem 0;
        border: none;
        display: flex;
        flex-direction: column;
        font-family: Arial, sans-serif;
        font-size: 1.125rem;
        font-weight: bold;
        text-align: left;
        background: #05f;
        color: #fff;
    }
    
    aside nav ul li .sm {
        font-size: 1rem;
    }
    
    aside nav ul li span {
        height: 1.5rem;
        /*display: flex;*/
        align-items: center;
        padding-left: .25rem;
    }
    
    aside nav ul li a:hover {
        color: yellow;
        cursor: pointer;
    }
    
    aside nav ul li a:hover span .heat {
        color: #ff0c0c;
    }
    
    aside nav ul li+li:before {
        content: '';
        background: none;
        height: 4px;
    }
    
    aside nav ul:after {
        content: '';
        background: #b02;
        height: .5rem;
    }
    
    /* Main content desktop */
    main {
        grid-column: 2;
        grid-row: 1;
        padding: 0;
        gap: 1rem;
    }
    
    main #unit-ads {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    main footer {
        align-self: flex-end;
        display: flex;
        flex-direction: column;
        margin-top: auto;
    }
    
    main footer .top-wrap-bar {
        margin: 1px 0;
        background: #b5001f;
        color: #fff;
    }
    
    main footer .top-wrap-bar a {
        color: #fff;
    }
    
    /* Footer desktop */
    footer.app {
        max-width: 1600px;
        margin: 0 auto;
    }
}

/* Intermediate breakpoints using standard Tailwind breakpoints */
@media (min-width: 1024px) and (max-width: 1279px) {
    #app {
        grid-template-columns: 200px minmax(0, 1fr) 200px;
        max-width: 1600px;
        margin: 0 auto;
    }
    
    .header,
    #app,
    footer.app {
        border-left: 3rem solid #05f;
        border-right: 3rem solid #05f;
    }
    
    header .balloon {
        margin-left: 30rem;
    }
}

/* Large desktop - CONSOLIDATED (xl breakpoint and above) */
@media (min-width: 1280px) {
    #app {
        grid-template-columns: 260px minmax(0, 1fr) 260px;
        max-width: 1600px;
        margin: 0 auto;
    }
    
    .header,
    #app,
    footer.app {
        border-left: 4rem solid #05f;
        border-right: 4rem solid #05f;
    }
    
    /* Header navigation large desktop */
    header nav {
        display: flex;
        background: #b01;
        border-bottom: 1px solid #000;
    }
    
    header nav a {
        padding: 0.325rem 1rem;
        cursor: pointer;
        color: #fff;
        z-index: 1;
    }
    
    header nav a:hover {
        background: #912;
        color: yellow;
        -webkit-transition: background 1s ease;
        -moz-transition: background 1s ease;
        -ms-transition: background 1s ease;
        transition: background 1s ease;
    }
    
    header nav .portrait {
        margin: -5rem 2.7rem -2.5rem 0rem;
        z-index: 1;
    }
    
    /* Modern navigation large desktop */
    .header .header-nav-bar {
        gap: 0.5rem;
    }
    
    .header .header-nav-bar .nav-item {
        font-size: 15px;
        padding: 0.4em 1rem;
    }
}