﻿.header {
    display: flex;
    flex-direction: column;
}

.header-top, .header-middle, .header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.header .dropdown {
    position: relative;
    display: inline-block;
}

.header .dropdown-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.header .dropdown:hover .dropdown-menu {
    display: block;
}

.header .dropdown-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

    .header .dropdown-menu a:hover {
        background-color: #f1f1f1;
    }

.cart-dropdown {
    position: relative;
}

    .cart-dropdown .dropdown-box {
        opacity: 1;
        transition: all 0.1s ease-in-out;
        top: 0;
        position: absolute;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        min-width: 200px;
        border-radius: 5px;
        overflow: hidden;
        padding: 10px 0;
    }

        .cart-dropdown .cart-toggle:hover + .dropdown-box,
        .cart-dropdown .dropdown-box:hover {
            display: block;
        }

    .cart-dropdown .cart-toggle {
        display: flex;
        align-items: center;
        color: #333;
        text-decoration: none;
    }

        .cart-dropdown .cart-toggle i {
            margin-right: 5px;
        }

    .cart-dropdown .dropdown-box a {
        
        padding: 10px 20px;
        color: #333;
        text-decoration: none;
    }

        .cart-dropdown .dropdown-box a:hover {
            background-color: #f5f5f5;
        }

.dropdown-box.show {
    display: block !important;
}
/* =====================================================
   MEGA MENU REDESIGN — light theme, orange accent
   ===================================================== */

.main-nav {
    position: relative;
    width: 100%;
}

/* ----- Top nav strip ----- */
.main-nav .mega-top-menu,
.mega-top-menu {
    display: flex !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    position: relative;
    z-index: 20;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow: hidden;
}

    .main-nav .mega-top-menu > .mega-item,
    .mega-top-menu > .mega-item {
        list-style: none !important;
        position: relative !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: stretch !important;
        justify-content: center !important;
    }

.main-nav .mega-top-menu .mega-top-link,
.mega-top-menu .mega-top-link,
.mega-top-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 60px !important;
    padding: 10px 8px !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    text-decoration: none !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
    line-height: 1.25 !important;
    text-align: center !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    box-shadow: none !important;
    background: transparent !important;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.main-nav .mega-top-menu .mega-top-link span,
.mega-top-menu .mega-top-link span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    max-width: 100%;
}

.main-nav .mega-top-menu .mega-top-link:hover,
.main-nav:hover .mega-top-menu .mega-item.active .mega-top-link,
.main-nav .mega-top-menu .mega-item.current .mega-top-link,
.mega-top-link:hover {
    color: #ef5526 !important;
    border-bottom-color: #ef5526 !important;
    background: #fff5f0 !important;
}

/* Demo1'in eski ::before / ::after çizgilerini kapat */
.main-nav .mega-top-menu .mega-item::before,
.main-nav .mega-top-menu .mega-item::after,
.main-nav .mega-top-menu .mega-top-link::before,
.main-nav .mega-top-menu .mega-top-link::after {
    content: none !important;
    display: none !important;
}

/* ----- Dropdown shell ----- */
.mega-fixed-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 520px;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .18),
                0 8px 16px -8px rgba(15, 23, 42, .06);
    z-index: 9999;
    display: none;
}

.main-nav:hover .mega-fixed-dropdown,
.main-nav:focus-within .mega-fixed-dropdown {
    display: block;
}

.mega-group-panel {
    display: none;
    width: 100%;
    padding: 24px 0 28px;
    animation: megaFadeIn .18s cubic-bezier(.22, 1, .36, 1);
}

    .mega-group-panel.active {
        display: block;
    }

@keyframes megaFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mega-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    box-sizing: border-box;
}

/* ----- Header (title + filter) ----- */
.mega-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.mega-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.mega-group-title {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    letter-spacing: -.01em;
}

.mega-group-count {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}

.mega-filter {
    position: relative;
    flex: 0 1 320px;
    min-width: 220px;
}

    .mega-filter i {
        position: absolute;
        top: 50%;
        left: 14px;
        transform: translateY(-50%);
        font-size: 12px;
        color: #9ca3af;
        pointer-events: none;
    }

.mega-filter-input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 36px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #1f2937;
    background: #f7f8fa;
    border: 1px solid transparent;
    border-radius: 999px;
    outline: none;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}

    .mega-filter-input::placeholder {
        color: #9ca3af;
    }

    .mega-filter-input:hover {
        background: #f1f3f5;
    }

    .mega-filter-input:focus {
        background: #fff;
        border-color: #ef5526;
        box-shadow: 0 0 0 3px rgba(239, 85, 38, .12);
    }

/* ----- Multi-column grid ----- */
.mega-fixed-dropdown:has(> .mega-group-panel.active[data-cols="1"]) {
    width: 520px;
}

.mega-fixed-dropdown:has(> .mega-group-panel.active[data-cols="2"]) {
    width: 660px;
}

.mega-fixed-dropdown:has(> .mega-group-panel.active[data-cols="3"]) {
    width: 920px;
}

.mega-fixed-dropdown:has(> .mega-group-panel.active[data-cols="4"]) {
    width: 1180px;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    justify-content: start;
    gap: 24px 28px;
    padding: 4px 0;
}

.mega-col[hidden] { display: none !important; }

.mega-col {
    min-width: 0;
}

.mega-col-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
    padding: 0 0 10px 0;
    margin-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    line-height: 1.3;
    transition: color .15s ease, border-color .15s ease;
}

    .mega-col-title span {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .mega-col-title i {
        font-size: 10px;
        color: #cbd5e1;
        transition: color .15s ease, transform .15s ease;
        flex: 0 0 auto;
    }

    .mega-col-title:hover {
        color: #ef5526;
        border-bottom-color: #ef5526;
    }

    .mega-col-title:hover i {
        color: #ef5526;
        transform: translateX(2px);
    }

.mega-col-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .mega-col-links li[hidden] { display: none !important; }

    .mega-col-links li {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mega-col-links a {
        display: inline-block;
        position: relative;
        font-family: 'Inter', sans-serif;
        font-size: 13px;
        font-weight: 400;
        color: #4b5563;
        text-decoration: none;
        padding: 5px 0;
        transition: color .15s ease, transform .15s ease, padding-left .15s ease;
        line-height: 1.45;
    }

        .mega-col-links a:hover {
            color: #ef5526;
            padding-left: 8px;
        }

        .mega-col-links a::before {
            content: "";
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 0;
            height: 4px;
            background: #ef5526;
            border-radius: 2px;
            transition: width .15s ease;
        }

        .mega-col-links a:hover::before {
            width: 4px;
        }

/* ----- Empty state ----- */
.mega-empty[hidden],
.mega-col-links li[hidden] { display: none !important; }

.mega-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 16px;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

    .mega-empty i {
        font-size: 14px;
        color: #cbd5e1;
    }

/* ----- Footer "tümünü gör" ----- */
.mega-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f1f3f5;
    display: flex;
    justify-content: flex-end;
}

.mega-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #ef5526;
    text-decoration: none;
    background: #fff5f0;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

    .mega-view-all i {
        font-size: 11px;
        transition: transform .15s ease;
    }

    .mega-view-all:hover {
        background: #ffe8d8;
        border-color: rgba(239, 85, 38, .35);
        color: #d8451f;
    }

        .mega-view-all:hover i {
            transform: translateX(3px);
        }

/* ----- Responsive ----- */
@media (max-width: 1023.98px) {
    .mega-container {
        padding: 0 20px;
    }

    .mega-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }

    .mega-header {
        flex-direction: column;
        align-items: stretch;
    }

    .mega-filter {
        flex-basis: auto;
        width: 100%;
    }
}

