/* Shirtify PHP Theme Bridge Overrides */

/* Stronger logo handling against legacy CSS */
#main-header .logo,
#main-header .logo img {
    display: flex;
    align-items: center;
}

#main-header .logo img {
    height: 54px !important;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
}

.footer-brand-logo {
    max-height: 58px;
    width: auto;
    object-fit: contain;
}

/* Keep header/menu layers above legacy theme styles */
#main-header {
    z-index: 1200;
}

/* Desktop products dropdown: force html-theme style */
@media (min-width: 901px) {
    #main-header,
    #main-header .container,
    #main-header .header-inner,
    #main-header .main-nav,
    #main-header .main-nav > ul,
    #main-header .main-nav > ul > li,
    #main-header .simple-products-dropdown {
        overflow: visible !important;
    }

    #main-header .simple-products-dropdown {
        position: relative !important;
        z-index: 1300;
    }

    #main-header .simple-dropdown-panel {
        position: absolute !important;
        top: calc(100% + 10px) !important;
        left: 0 !important;
        width: 340px !important;
        max-height: none !important;
        overflow: visible !important;
        background: var(--white);
        border: 1px solid var(--gray-100);
        border-radius: 14px;
        box-shadow: var(--shadow-lg);
        padding: 8px;
        display: none;
        z-index: 1310 !important;
    }

    #main-header .simple-products-dropdown.open .simple-dropdown-panel {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    #main-header .main-nav .simple-menu-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    #main-header .simple-menu-list > li {
        border: 1px solid var(--gray-100);
        border-radius: 10px;
        background: var(--white);
        overflow: hidden;
    }

    #main-header .simple-main-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        text-align: left;
    }
}

/* Mobile menu still needs explicit display */
.main-nav.mobile-open {
    display: flex !important;
}

/* Video section styles taken from html theme inline styles */
.manufacturing-videos-section .manufacturing-video-header {
    margin-bottom: 30px;
}

.manufacturing-videos-section .manufacturing-video-header h2 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.08;
    margin-bottom: 0;
}

.manufacturing-videos-section .manufacturing-video-header h2 span {
    color: inherit;
}

.manufacturing-videos-section .manufacturing-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    position: relative;
    z-index: 2;
}

.manufacturing-videos-section .manufacturing-video-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(6px);
    aspect-ratio: 16 / 9;
}

.manufacturing-videos-section .manufacturing-video-card video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0b1024;
}

@media (max-width: 900px) {
    #main-header .logo img {
        height: 44px !important;
    }

    .manufacturing-videos-section .manufacturing-video-grid {
        gap: 18px;
    }
}

@media (max-width: 640px) {
    .manufacturing-videos-section .manufacturing-video-grid {
        grid-template-columns: 1fr;
    }

    .manufacturing-videos-section .manufacturing-video-header {
        margin-bottom: 22px;
    }
}


/* Genspark header/footer logo normalization */
#main-header .logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 0 0 auto !important;
    min-width: 180px !important;
    margin: 0 24px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    z-index: 5 !important;
}

#main-header .logo:before,
#main-header .logo:after,
#main-header .logo .navbar-brand:before,
#main-header .logo .navbar-brand:after {
    content: none !important;
    display: none !important;
}

#main-header .logo .navbar-brand {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    background: transparent !important;
}

#main-header .theme-site-logo,
#main-header .logo img {
    display: block !important;
    height: 68px !important;
    max-height: 68px !important;
    max-width: 230px !important;
    width: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 2 !important;
    object-fit: contain !important;
}

#main-header .header-inner {
    min-height: 88px !important;
}

.footer-brand-logo {
    display: block !important;
    max-height: 72px !important;
    max-width: 230px !important;
    width: auto !important;
    object-fit: contain !important;
}

@media (max-width: 900px) {
    #main-header .theme-site-logo,
    #main-header .logo img {
        height: 52px !important;
        max-height: 52px !important;
    }
}


/* Mobile header usability improvements */
@media (max-width: 900px) {
    #main-header .header-inner {
        gap: 12px;
    }

    #main-header .header-actions {
        margin-left: auto;
        gap: 8px;
    }

    #main-header .btn-quote {
        display: none;
    }

    #main-header .hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid var(--gray-200);
        border-radius: 10px;
        background: var(--white);
        position: relative;
        z-index: 1205;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    #main-header .main-nav.mobile-open {
        display: flex !important;
    }
}

body.mobile-menu-active {
    overflow: hidden;
}
