/* Mega Menü Genel Konumlandırma */
.has-wmm-mega-menu {
    position: relative !important; /* Menünün başlangıç noktasını bu elemana sabitler */
}

.wmm-mega-wrapper {
    position: absolute;
    top: 100%; /* li elemanının tam altına konumlandırır */
    left: 50%; /* li elemanının ortasına alır */
    transform: translateX(-50%); /* Kendi genişliğinin yarısı kadar sola çeker, böylece tam merkeze oturur */
    margin-top: 25px;
    background-color: #ffffff;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transition-delay: var(--wmm-delay, 0ms);
    padding: 35px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    pointer-events: none;
    text-align: left;
    box-sizing: border-box;
}

.has-wmm-mega-menu:hover .wmm-mega-wrapper {
    opacity: 1;
    visibility: visible;
    margin-top: 10px;
    pointer-events: auto;
    transition-delay: 0ms;
}

.wmm-mega-wrapper img {
    max-width: 100%;
    height: auto;
}

/* Gelişmiş CSS Grid Sistemi */
.wmm-grid {
    display: grid;
    gap: 15px;
    box-sizing: border-box;
    width: 100%;
}
.wmm-grid-1 { grid-template-columns: repeat(1, 1fr); }
.wmm-grid-2 { grid-template-columns: repeat(2, 1fr); }
.wmm-grid-3 { grid-template-columns: repeat(3, 1fr); }
.wmm-grid-4 { grid-template-columns: repeat(4, 1fr); }
.wmm-grid-5 { grid-template-columns: repeat(5, 1fr); }
.wmm-grid-6 { grid-template-columns: repeat(6, 1fr); }
.wmm-grid-7 { grid-template-columns: repeat(7, 1fr); }
.wmm-grid-8 { grid-template-columns: repeat(8, 1fr); gap: 15px; }
.wmm-grid-9 { grid-template-columns: repeat(9, 1fr); }
.wmm-grid-10 { grid-template-columns: repeat(10, 1fr); }

/* Typografik Elemanlar */
.wmm-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #222;
    text-transform: uppercase;
    letter-spacing: -0.3px;
    position: relative;
    padding-bottom: 10px;
    grid-column: 1 / -1;
}
.wmm-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: #0076c0;
    border-radius: 3px;
}

/* Ürün Kartı Stili (Genişletilmiş, Daha Kaliteli Tasarım) */
.wmm-product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    padding: 20px 15px;
    box-sizing: border-box;
}
.wmm-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: #e4e4e4;
}
.wmm-product-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    margin-bottom: 15px;
}
.wmm-product-info {
    padding: 0;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #fff;
}
.wmm-product-card h3 {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wmm-product-card .price {
    font-size: 16px;
    color: #222;
    font-weight: 700;
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.wmm-product-card .price del {
    color: #999;
    font-weight: 400;
    font-size: 13px;
    margin-right: 0;
}
.wmm-product-card .price ins {
    text-decoration: none;
    color: #111;
}

/* Kategori Kartı */
.wmm-cat-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    text-decoration: none !important;
    aspect-ratio: 16/9;
    background: #f0f0f0;
}
.wmm-cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.wmm-cat-card:hover img {
    transform: scale(1.05);
}
.wmm-cat-card .wmm-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    transition: background 0.3s ease;
}
.wmm-cat-card:hover .wmm-cat-overlay {
    background: linear-gradient(to top, rgba(0,118,192,0.85) 0%, rgba(0,0,0,0) 80%);
}
.wmm-cat-card h3 {
    color: #fff;
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
}
.wmm-cat-card span {
    color: #eee;
    font-size: 12px;
    font-weight: 500;
}

/* Liste Tarzı Kategoriler */
.wmm-cat-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.wmm-cat-list li {
    margin-bottom: 10px;
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 10px;
}
.wmm-cat-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.wmm-cat-list a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.wmm-cat-list a:hover {
    color: #0076c0;
    padding-left: 6px;
}
.wmm-cat-list a .count {
    margin-left: auto;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    color: #888;
}

/* Mixed Layout Wrapper */
.wmm-layout-mixed-wrapper {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
}

.wmm-error {
    color: #d63638;
    font-weight: bold;
    padding: 20px;
    text-align: center;
}

/* Yeni Dinamik Tab Tasarımı */
.wmm-dynamic-tabs-wrapper {
    display: flex;
    gap: 30px;
    min-height: 350px;
}
.wmm-dynamic-tabs-left {
    width: 30%;
    border-right: 1px solid #f0f0f0;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
}
.wmm-dynamic-tabs-right {
    width: 70%;
    position: relative;
    padding-left: 10px;
}
.wmm-tab-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    margin-bottom: 8px;
    background: transparent;
    color: #555;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
}
.wmm-tab-link:hover, .wmm-tab-link.active {
    background: #f4f6f8;
    color: #0076c0;
    font-weight: 600;
}
.wmm-tab-content {
    display: none;
    animation: wmmFadeIn 0.3s ease;
}
.wmm-tab-content.active {
    display: block;
}
.wmm-tab-content .wmm-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 15px !important;
}
@keyframes wmmFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tüm Kategoriler Butonu Özel Stili */
.wmm-all-cats-btn {
    margin-top: auto;
    display: block;
    padding: 15px 20px;
    background: #0076c0;
    color: #fff !important;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.wmm-all-cats-btn:hover {
    background: #005a96;
    box-shadow: 0 4px 10px rgba(0,118,192,0.3);
}

/* =========================================
   MOBİL VE TABLET RESPONSİVE OPTİMİZASYONU 
   ========================================= */

@media (max-width: 1200px) {
    .wmm-grid-10, .wmm-grid-9, .wmm-grid-8, .wmm-grid-7 { grid-template-columns: repeat(4, 1fr); }
    .wmm-grid-6, .wmm-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .wmm-dynamic-tabs-left { width: 35%; }
    .wmm-dynamic-tabs-right { width: 65%; }
}

@media (max-width: 992px) {
    .wmm-grid-10, .wmm-grid-9, .wmm-grid-8, .wmm-grid-7 { grid-template-columns: repeat(4, 1fr); }
    .wmm-grid-6, .wmm-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .wmm-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .wmm-layout-mixed-wrapper { grid-template-columns: 1fr; gap: 20px; }
    
    .wmm-grid-8 > a.wmm-product-card:nth-child(n+9), 
    .wmm-grid-6 > a.wmm-product-card:nth-child(n+7) {
        display: none !important;
    }

    .wmm-dynamic-tabs-wrapper { flex-direction: column; min-height: auto; gap: 15px; }
    .wmm-dynamic-tabs-left { 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid #f0f0f0; 
        padding-right: 0; 
        padding-bottom: 15px; 
        display: grid; 
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
        gap: 10px; 
    }
    .wmm-dynamic-tabs-right { width: 100%; padding-left: 0; }
    .wmm-all-cats-btn { grid-column: 1 / -1; margin-top: 10px; }
}

@media (max-width: 768px) {
    .wmm-hide-mobile {
        display: none !important;
    }
    
    .wmm-mega-wrapper {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 10px !important;
        padding: 15px !important;
        box-shadow: none;
        border: none;
    }
    
    .wmm-grid-10, .wmm-grid-9, .wmm-grid-8, .wmm-grid-7, .wmm-grid-6, .wmm-grid-5, .wmm-grid-4, .wmm-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wmm-grid > a.wmm-product-card:nth-child(n+5) {
        display: none !important;
    }
    
    .wmm-dynamic-tabs-left { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .wmm-grid-10, .wmm-grid-9, .wmm-grid-8, .wmm-grid-7, .wmm-grid-6, .wmm-grid-5, .wmm-grid-4, .wmm-grid-3, .wmm-grid-2 {
        grid-template-columns: 1fr;
    }
    .wmm-dynamic-tabs-left { grid-template-columns: 1fr; }
    
    .wmm-grid > a.wmm-product-card:nth-child(n+4) {
        display: none !important;
    }
}
