/* Marka Grid Menü Stilleri - GÜNCELLENMİŞ */
.marka-grid-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 800px;
    max-width: 1000px;
    max-height: 80vh; /* Maksimum yükseklik ekranın %80'i */
    overflow-y: auto; /* Dikey kaydırma */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 0 0 12px 12px;
    padding: 25px 20px 15px 20px;
    display: none;
    z-index: 1000;
    border-top: 3px solid #ff6b6b;
    scrollbar-width: thin; /* İnce scrollbar (Firefox) */
    scrollbar-color: #ff6b6b #f0f0f0; /* Scrollbar renkleri (Firefox) */
}

/* Webkit tarayıcılar için scrollbar stilleri (Chrome, Safari, Edge) */
.marka-grid-menu::-webkit-scrollbar {
    width: 8px;
}

.marka-grid-menu::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.marka-grid-menu::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 10px;
}

.marka-grid-menu::-webkit-scrollbar-thumb:hover {
    background: #ff5252;
}

.menu-item-has-children:hover .marka-grid-menu {
    display: block;
    animation: fadeInMenu 0.3s ease;
}

/* Menü içindeki grid yapısı */
.marka-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.marka-grid-item {
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.marka-grid-link {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 15px 10px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fff;
}

.marka-grid-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,107,107,0.2);
    border-color: #ff6b6b;
}

.marka-grid-logo {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.marka-grid-logo img {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.marka-grid-link:hover .marka-grid-logo img {
    transform: scale(1.05);
}

.marka-grid-logo i {
    font-size: 30px;
    color: #ff6b6b;
    transition: all 0.3s ease;
}

.marka-grid-link:hover .marka-grid-logo i {
    transform: scale(1.1);
    color: #ff5252;
}

.marka-grid-adi {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.marka-grid-link:hover .marka-grid-adi {
    color: #ff6b6b;
}

.marka-grid-footer {
    text-align: center;
    padding: 15px 0 5px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    position: sticky; /* Footer'ı altta sabitle */
    bottom: 0;
    background: #fff;
    z-index: 2;
}

.btn-marka-tumu {
    display: inline-block;
    padding: 8px 25px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-marka-tumu:hover {
    background: #ff6b6b;
    color: #fff;
}

.btn-marka-tumu i {
    margin-left: 5px;
    font-size: 11px;
}

/* Menüde marka sayısı çoksa grid sütun sayısını azalt */
@media (max-width: 1200px) {
    .marka-grid-menu {
        min-width: 700px;
    }
    
    .marka-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .marka-grid-menu {
        min-width: 100%;
        width: 100%;
        max-height: 60vh; /* Mobilde biraz daha küçük */
        position: static;
        box-shadow: none;
        display: none;
    }
    
    .menu-item-has-children.active .marka-grid-menu {
        display: block;
    }
    
    .marka-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .marka-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .marka-grid-menu {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .marka-grid-container {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}