/* Mega Menu Components */

/* Ensure parent item doesn't trap the absolute dropdown if we want full width relative to header */
.site-header__menu-item.has-mega-menu {
    position: static;
}

/* Icon rotation for mega menu trigger */
/* Icon rotation for mega menu trigger */
.has-mega-menu>a .mega-menu-arrow {
    width: 10px;
    height: 10px;
    margin-left: 3px;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Hover Bridge: Keeps menu open when moving mouse across header whitespace */
.has-mega-menu>a::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 60px;
    /* Covers the gap to the bottom of the 100px header */
    background: transparent;
    z-index: 10;
}

.has-mega-menu:hover>a .mega-menu-arrow {
    transform: rotate(180deg);
}

/* Dropdown Container */
.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    /* Center horizontally */
    width: 1200px;
    /* Specific reduced width (~70% of 1450px) */
    max-width: 95vw;
    /* responsiveness */
    background-color: #fff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    /* Premium shadow */
    padding: 30px;
    /* Aligned with container padding */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(15px);
    /* Start slightly down and centered */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smooth easeOutQuad */
    z-index: 10001;
    /* Above header (1000) */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Show on Hover */
.site-header__menu-item.has-mega-menu:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    /* Keep centered, move up */
}

/* Grid Layout - Layout Specifics to match Reference Image */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 columns roughly */
    gap: 25px;
    grid-auto-rows: min-content;
    /* Ensure rows don't stretch */
}

/* Specific Category Placements (Hardcoded to match visual design requirement) */
/* 1. Ahşap Mobilyalar (CMS Order 0) */
.mega-menu-column:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 3;
}

/* 2. Koltuklar (CMS Order 1) */
.mega-menu-column:nth-child(2) {
    grid-column: 2;
    grid-row: 1 / span 3;
}

/* 3. Ofis Bölme Sistemleri (CMS Order 2) */
.mega-menu-column:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

/* 4. Eğitim Mobilyaları (CMS Order 3) */
.mega-menu-column:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

/* 5. Bahçe & Havuz Mobilyaları (CMS Order 4) */
.mega-menu-column:nth-child(5) {
    grid-column: 3;
    grid-row: 3;
}

/* 6. Çelik Mobilyalar (CMS Order 5) */
.mega-menu-column:nth-child(6) {
    grid-column: 4;
    grid-row: 1 / span 3;
}

/* 7. Akustik Ürünler (CMS Order 6) */
.mega-menu-column:nth-child(7) {
    grid-column: 5;
    grid-row: 1 / span 3;
}

/* Column Styling */
/* Column Styling */
.mega-menu-column h3 {
    font-size: 16px;
    /* Increased from 11px */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    /* Slight increase */
    color: #111;
    position: relative;
    padding-bottom: 8px;
}

.mega-menu-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 25px;
    height: 2px;
    background-color: #eee;
    transition: width 0.3s;
}

.mega-menu-column:hover h3::after {
    width: 40px;
    background-color: var(--primary-color, #cfa15e);
}

.mega-menu-column h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.mega-menu-column h3 a:hover {
    color: var(--primary-color, #cfa15e);
}

/* List Styling */
.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li {
    margin-bottom: 4px;
    padding-left: 0;
    position: relative;
    transition: padding-left 0.2s ease;
}

.mega-menu-list li::before {
    /* No bullet point for cleaner premium look */
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 1px;
    background-color: var(--primary-color, #cfa15e);
    opacity: 0;
    transition: all 0.2s ease;
}

.mega-menu-list li:last-child {
    margin-bottom: 0;
}

.mega-menu-list li a {
    font-size: 14px;
    /* Increased from 12px */
    font-weight: 400;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.mega-menu-list li:hover {
    padding-left: 12px;
}

.mega-menu-list li:hover::before {
    opacity: 1;
}

.mega-menu-list li a:hover {
    color: var(--primary-color, #cfa15e);
    /* No transform here, handled by li padding */
    transform: none;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .mega-menu-grid {
        gap: 30px;
    }
}

@media (max-width: 1200px) {

    /* Hide on mobile/tablet as standard menu takes over */
    .mega-menu-dropdown {
        display: none;
    }
}