/* ==========================================================================
   TopLEDshop Custom Header & Footer
   Version: 1.0.0
   ========================================================================== */

:root {
    --tls-green: #94CF39;
    --tls-green-dark: #7ab52e;
    --tls-dark: #333333;
    --tls-gray: #666666;
    --tls-light: #f5f5f5;
    --tls-white: #ffffff;
    --tls-border: #e0e0e0;
    --tls-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    --tls-max-width: 1200px;
    --tls-header-height: 90px;
}

/* Reset for our elements */
.tls-topbar *,
.tls-header *,
.tls-footer *,
.tls-mobile-menu * {
    box-sizing: border-box;
}

/* ==========================================================================
   Container
   ========================================================================== */

.tls-container {
    max-width: var(--tls-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.tls-topbar {
    background: var(--tls-green);
    color: var(--tls-white);
    font-size: 13px;
    line-height: 1.4;
    padding: 6px 0;
    font-family: var(--tls-font);
}

.tls-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.tls-topbar a,
.tls-topbar-link {
    color: var(--tls-white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s;
}

.tls-topbar a:hover {
    opacity: 0.85;
}

.tls-topbar-left,
.tls-topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tls-topbar-center {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tls-topbar svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Main Header
   ========================================================================== */

.tls-header {
    background: var(--tls-white);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 9999;
    font-family: var(--tls-font);
}

.tls-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--tls-header-height);
    gap: 30px;
}

/* Logo */
.tls-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tls-logo img {
    height: 65px;
    width: auto;
    display: block;
}

/* ==========================================================================
   Desktop Navigation
   ========================================================================== */

.tls-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.tls-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.tls-nav-item > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 28px 18px;
    color: var(--tls-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.tls-nav-item > a:hover,
.tls-nav-item.tls-active > a {
    color: var(--tls-green);
}

.tls-chevron {
    transition: transform 0.3s;
}

.tls-has-mega:hover .tls-chevron,
.tls-has-mega.tls-mega-open .tls-chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   Mega Menu
   ========================================================================== */

.tls-mega {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--tls-white);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-top: 3px solid var(--tls-green);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 9998;
}

.tls-has-mega:hover .tls-mega,
.tls-has-mega.tls-mega-open .tls-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tls-mega-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 30px 20px;
}

.tls-mega-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tls-white);
    background: var(--tls-green);
    padding: 8px 14px;
    margin: 0 0 12px 0;
    border-radius: 4px;
}

.tls-mega-heading--extra {
    margin-top: 20px;
}

.tls-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tls-mega-list li {
    position: relative;
}

.tls-mega-list li > a:hover {
    color: var(--tls-green);
}

/* Sub-menus (fittingen children) */
.tls-has-sub {
    position: relative;
}

.tls-has-sub > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-right: 5px !important;
}

.tls-sub-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
}

.tls-has-sub:hover > a .tls-sub-arrow {
    opacity: 0.8;
    transform: translateX(2px);
}

.tls-mega-list li > a {
    display: flex;
    align-items: center;
    padding: 7px 0;
    color: var(--tls-dark);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    line-height: 1.4;
}

.tls-sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px 14px;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--tls-white);
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-5px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 10;
}

.tls-has-sub:hover > .tls-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.tls-sub-menu li a {
    display: block;
    padding: 5px 0;
    color: var(--tls-dark);
    text-decoration: none;
    font-size: 13px;
}

.tls-sub-menu li a:hover {
    color: var(--tls-green);
}

/* ==========================================================================
   Header Icons
   ========================================================================== */

.tls-header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tls-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--tls-dark);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    position: relative;
}

.tls-icon-btn:hover {
    background: var(--tls-light);
    color: var(--tls-green);
}

.tls-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--tls-green);
    color: var(--tls-white);
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ==========================================================================
   Search Overlay
   ========================================================================== */

.tls-search-overlay {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--tls-white);
    padding: 20px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-top: 3px solid var(--tls-green);
    display: none;
    z-index: 9997;
}

.tls-search-overlay.tls-active {
    display: block;
}

.tls-search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.tls-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--tls-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: var(--tls-font);
    outline: none;
    transition: border-color 0.2s;
}

.tls-search-input:focus {
    border-color: var(--tls-green);
}

.tls-search-submit {
    padding: 12px 20px;
    background: var(--tls-green);
    color: var(--tls-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.tls-search-submit:hover {
    background: var(--tls-green-dark);
}

/* ==========================================================================
   Hamburger (mobile only)
   ========================================================================== */

.tls-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    gap: 5px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px;
}

.tls-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--tls-dark);
    transition: transform 0.3s, opacity 0.3s;
    border-radius: 2px;
}

.tls-hamburger.tls-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.tls-hamburger.tls-active span:nth-child(2) {
    opacity: 0;
}

.tls-hamburger.tls-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.tls-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.tls-mobile-overlay.tls-active {
    opacity: 1;
    visibility: visible;
}

.tls-mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--tls-white);
    z-index: 99999;
    overflow-y: auto;
    transition: right 0.3s ease;
    font-family: var(--tls-font);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
}

.tls-mobile-menu.tls-active {
    right: 0;
}

.tls-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--tls-border);
}

.tls-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--tls-dark);
    border-radius: 50%;
}

.tls-mobile-close:hover {
    background: var(--tls-light);
}

.tls-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tls-mobile-nav > li > a,
.tls-mobile-nav > li > .tls-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: var(--tls-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--tls-light);
    cursor: pointer;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    font-family: var(--tls-font);
}

.tls-mobile-nav > li > a:hover,
.tls-mobile-toggle:hover {
    color: var(--tls-green);
    background: #fafafa;
}

.tls-mobile-chevron {
    transition: transform 0.3s;
    flex-shrink: 0;
}

.tls-mobile-has-sub.tls-open .tls-mobile-chevron {
    transform: rotate(180deg);
}

.tls-mobile-sub {
    display: none;
    padding: 0 20px 10px;
    background: #fafafa;
}

.tls-mobile-has-sub.tls-open .tls-mobile-sub {
    display: block;
}

.tls-mobile-sub-section {
    padding: 10px 0;
    border-bottom: 1px solid var(--tls-border);
}

.tls-mobile-sub-section:last-child {
    border-bottom: none;
}

.tls-mobile-sub-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tls-green);
    margin: 0 0 6px 0;
    padding: 4px 0;
}

.tls-mobile-sub a {
    display: block;
    padding: 5px 0;
    color: var(--tls-gray);
    text-decoration: none;
    font-size: 14px;
}

.tls-mobile-sub a:hover {
    color: var(--tls-green);
}

.tls-mobile-footer {
    padding: 20px;
    border-top: 1px solid var(--tls-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tls-mobile-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tls-dark);
    text-decoration: none;
    font-size: 14px;
}

.tls-mobile-footer a:hover {
    color: var(--tls-green);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.tls-footer {
    background: var(--tls-dark);
    color: #ccc;
    font-family: var(--tls-font);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 40px;
}

.tls-footer-main {
    padding: 50px 0 30px;
}

.tls-footer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.tls-footer-heading {
    color: var(--tls-white);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tls-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tls-footer-col ul li {
    margin-bottom: 6px;
}

.tls-footer-col ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 13px;
}

.tls-footer-col ul li a:hover {
    color: var(--tls-green);
}

.tls-footer-logos img {
    max-width: 100%;
    height: auto;
    opacity: 0.85;
}

.tls-footer-contact {
    font-style: normal;
    font-size: 13px;
}

.tls-footer-contact p {
    margin: 0 0 4px 0;
}

.tls-footer-contact a {
    color: #bbb;
    text-decoration: none;
}

.tls-footer-contact a:hover {
    color: var(--tls-green);
}

.tls-footer-bottom {
    border-top: 1px solid #444;
    padding: 15px 0;
}

.tls-footer-bottom-inner {
    text-align: center;
    font-size: 12px;
    color: #888;
}

.tls-footer-bottom a {
    color: #aaa;
    text-decoration: none;
}

.tls-footer-bottom a:hover {
    color: var(--tls-green);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .tls-mega-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Topbar */
    .tls-topbar {
        font-size: 11px;
        padding: 5px 0;
    }

    .tls-topbar-inner {
        justify-content: center;
    }

    .tls-topbar-center,
    .tls-topbar-right .tls-topbar-link {
        display: none;
    }

    /* Header */
    .tls-header-inner {
        height: 60px;
        gap: 10px;
    }

    .tls-logo img {
        height: 36px;
    }

    /* Hide desktop nav, show hamburger */
    .tls-nav {
        display: none;
    }

    .tls-hamburger {
        display: flex;
    }

    .tls-icon-btn.tls-search-toggle {
        display: flex;
    }

    /* Hide account icon on mobile */
    .tls-header-icons .tls-icon-btn:nth-child(2) {
        display: none;
    }

    /* Footer */
    .tls-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .tls-topbar-left {
        gap: 10px;
    }

    .tls-topbar-right {
        display: none;
    }

    .tls-footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tls-mobile-menu {
        width: 280px;
    }
}
