/**
 * Header Component CSS
 */

/*
 * Şeffaf header'daki backdrop-filter / sticky, içteki position:fixed mobil menüyü
 * header'a bağlar; right:-100% / translateX(100%) sayfayı yatay taşırır.
 * clip + max-width ile scrollport kırpılır (Safari dahil).
 */
html,
body {
    overflow-x: clip;
    max-width: 100%;
}

.site-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 100%;
    overflow-x: clip;
}

.header-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--space-4) var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.site-logo {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.site-logo img {
    max-height: 40px;
}

.site-logo:hover {
    opacity: 0.9;
}

.header-brand-cluster {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
}

.header-tursab-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.7rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 999px;
    background: var(--gray-50, #f9fafb);
    color: var(--gray-700, #374151);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    flex-shrink: 0;
    white-space: nowrap;
}

.header-tursab-mark:hover {
    border-color: var(--primary, #ed4b25);
    color: var(--primary, #ed4b25);
}

.header-tursab-mark__icon {
    display: inline-flex;
    flex-shrink: 0;
}

.header-tursab-mark__text {
    white-space: nowrap;
}

.header--dark .header-tursab-mark,
.header--transparent .header-tursab-mark {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: inherit;
}

@media (max-width: 767px) {
    .header-tursab-mark {
        padding: 0.18rem 0.55rem;
        white-space: normal;
        max-width: none;
    }

    .header-tursab-mark__text {
        white-space: normal;
    }
}

.main-nav {
    display: none;
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
        gap: var(--space-6);
    }
}

.main-nav a,
.main-nav .menu-link {
    color: var(--color-text, var(--gray-700));
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    font-family: var(--font-family-nav, inherit);
    transition: color var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.main-nav a:hover,
.main-nav .menu-link:hover {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: inline-flex;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
    padding: var(--space-2);
    position: relative;
    z-index: 1001;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.mobile-menu-toggle.active {
    color: var(--primary);
}

.mobile-menu-toggle svg {
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.active svg {
    transform: rotate(90deg);
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.header-mobile-tools {
    display: none;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-inline-start: auto;
}

.header-mobile-call {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ea4335;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.35);
}

.header-mobile-call:hover,
.header-mobile-call:focus-visible {
    background: #d33426;
    color: #fff;
}

.header-mobile-call svg,
.header-mobile-call i {
    width: 18px;
    height: 18px;
}

.header-mobile-auth {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.header-mobile-auth__login,
.header-mobile-auth__register {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
    white-space: nowrap;
    border: none;
}

.header-mobile-auth__login {
    background: transparent;
    color: var(--gray-700);
}

.header-mobile-auth__login:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.header-mobile-auth__register {
    background: var(--primary);
    color: #fff;
}

.header-mobile-auth__register:hover {
    filter: brightness(0.95);
}

.header--dark .header-mobile-auth__login,
.header--transparent .header-mobile-auth__login {
    color: inherit;
}

.header--dark .header-mobile-auth__login:hover,
.header--transparent .header-mobile-auth__login:hover {
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
}

@media (max-width: 767px) {
    .header-mobile-tools {
        display: inline-flex;
    }

    body.theme-mobile-call-header .sticky-button.phone {
        display: none !important;
    }

    body.theme-mobile-call-header .sticky-buttons-container:not(:has(.sticky-button.whatsapp, .sticky-button.instagram)) {
        display: none;
    }
}

@media (max-width: 1180px) {
    .header--portal .header-mobile-tools {
        display: inline-flex;
        margin-inline-start: 0;
    }

    body.theme-mobile-call-header.theme-header-portal .sticky-button.phone {
        display: none !important;
    }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu
 * right:-100% kullanma: backdrop-filter/sticky altında fixed header'a bağlanır ve
 * dokümanı sağa genişletir (yatay scrollbar + boş alanda "Menü" paneli).
 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 400px);
    max-width: 400px;
    height: 100vh;
    height: 100dvh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    overflow-y: auto;
    overflow-x: hidden;
    /* Kapalıyken doküman genişliğine katkı vermesin (mobilde sağa kayma) */
    contain: layout paint;
}

.mobile-menu:not(.active) {
    width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.mobile-menu.active {
    width: min(85vw, 400px) !important;
    max-width: 400px !important;
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--gray-900);
    margin: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

/* Mobile Menu Content */
.mobile-menu-content {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.mobile-menu a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    padding: 0.875rem 1.5rem;
    border-radius: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--font-size-sm);
    border-left: 3px solid transparent;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: var(--gray-50);
    color: var(--primary);
    border-left-color: var(--primary);
}

.mobile-menu a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Mobile Menu Submenu */
.mobile-menu-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--gray-50);
}

.mobile-menu-submenu.active {
    max-height: 1000px;
}

.mobile-menu-submenu a {
    padding-left: 3rem;
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

.mobile-menu-submenu a:hover {
    background: var(--gray-100);
}

/* Mobile Menu Item with Submenu */
.mobile-menu-item-has-children {
    position: relative;
}

.mobile-menu-item-has-children > a {
    padding-right: 3rem;
}

.mobile-menu-toggle-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle-arrow .arrow-icon-down,
.mobile-menu-toggle-arrow .arrow-icon-up {
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle-arrow .arrow-icon-up {
    display: none !important;
}

.mobile-menu-item-has-children.active .mobile-menu-toggle-arrow {
    color: var(--primary);
}

.mobile-menu-item-has-children.active .mobile-menu-toggle-arrow .arrow-icon-down {
    display: none !important;
}

.mobile-menu-item-has-children.active .mobile-menu-toggle-arrow .arrow-icon-up {
    display: flex !important;
}

.mobile-menu-item-has-children:not(.active) .mobile-menu-toggle-arrow .arrow-icon-down {
    display: flex !important;
}

.mobile-menu-item-has-children:not(.active) .mobile-menu-toggle-arrow .arrow-icon-up {
    display: none !important;
}

/* Mobile Menu Divider */
.mobile-menu hr {
    margin: 0.75rem 0;
    border: none;
    border-top: 1px solid var(--gray-200);
}

/* Mobile Menu Footer Actions */
.mobile-menu-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    position: sticky;
    bottom: 0;
}

/* Body scroll lock when menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Menu Dropdown Styles */
.main-nav .menu-item-dropdown {
    position: relative;
    display: inline-flex;
}

.menu-item-dropdown .menu-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--color-text, var(--gray-700));
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: color var(--transition-base);
}

.menu-item-dropdown .menu-link:hover {
    color: var(--primary);
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 1000;
    padding: 0.125rem 0;
    margin-top: 0;
}

/* Tetikleyici ↔ panel boşluğunda hover kaybını önle */
.menu-item-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 0.45rem;
}

.menu-dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 0.45rem;
}

.menu-item-dropdown:hover > .menu-dropdown,
.menu-item-dropdown:focus-within > .menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-dropdown-item.has-submenu {
    position: relative;
}

.menu-dropdown-link--parent {
    justify-content: space-between;
}

.menu-dropdown--nested {
    top: 0;
    left: calc(100% - 2px);
    margin-top: 0;
    min-width: 150px;
}

.menu-dropdown-item.has-submenu:hover > .menu-dropdown--nested,
.menu-dropdown-item.has-submenu:focus-within > .menu-dropdown--nested {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-megamenu-nested {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 6px 12px;
}

.menu-megamenu-link--nested {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.4rem !important;
    color: var(--gray-600) !important;
}

.mobile-megamenu-link--nested {
    padding-left: 1.75rem !important;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.menu-dropdown-link {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    color: var(--color-text, var(--gray-700));
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.12s ease;
    white-space: nowrap;
}

/* .main-nav a { display:inline-flex } üst satır linkleri için; dropdown’da satırın tamamı boyansın */
.main-nav .menu-dropdown .menu-dropdown-link,
.main-nav .menu-dropdown a.menu-dropdown-link {
    display: flex;
    width: 100%;
    box-sizing: border-box;
}

.menu-dropdown-item {
    display: block;
    width: 100%;
}

.menu-dropdown-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.menu-dropdown-link:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.menu-dropdown-link:hover svg {
    opacity: 1;
}

.menu-dropdown-link:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.menu-dropdown-link:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Mega menu: yatay konum JS (tetikleyici ortası); CSS yalnızca dikey animasyon. */
.main-nav .menu-item-megamenu {
    position: relative;
}

/* Tetikleyici ↔ panel dikey boşluğunda hover köprüsü */
.menu-item-megamenu::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 0.55rem;
    pointer-events: auto;
}

.menu-megamenu-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: auto;
    display: grid;
    grid-template-columns: repeat(var(--mega-cols, 3), minmax(9.5rem, max-content));
    gap: 0.75rem 1.25rem;
    padding: 1rem 1.15rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    width: max-content;
    max-width: min(640px, calc(100vw - 2rem));
    min-width: 220px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 1000;
    text-align: left;
    pointer-events: none;
}

.menu-megamenu-panel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 0.55rem;
}

.main-nav .menu-megamenu-panel {
    text-align: left;
}

.menu-megamenu-panel--promo {
    grid-template-columns: repeat(var(--mega-cols, 3), minmax(9.5rem, max-content)) var(--mega-promo-w, 176px);
    gap: 1rem 1.5rem;
    align-items: start;
    max-width: min(820px, calc(100vw - 2rem));
}

.menu-megamenu-promo {
    width: var(--mega-promo-w, 176px);
    height: var(--mega-promo-h, 220px);
    flex-shrink: 0;
    align-self: start;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--gray-50), var(--gray-100));
    border: 1px solid var(--gray-200);
}

.menu-megamenu-promo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.menu-item-megamenu:hover .menu-megamenu-panel,
.menu-item-megamenu:focus-within .menu-megamenu-panel,
.menu-item-megamenu.is-mega-open .menu-megamenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-megamenu-col {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.menu-megamenu-col-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin: 0 0 0.375rem 0;
    padding: 0 0.375rem;
    line-height: 1.3;
}

.menu-megamenu-col:not(:first-child) {
    border-left: 1px solid var(--gray-100);
    padding-left: 1rem;
    margin-left: 0.125rem;
}

.menu-megamenu-panel--promo .menu-megamenu-col:not(:first-child) {
    border-left-color: var(--gray-100);
}

.menu-megamenu-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    padding: 0.5rem 0.375rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-800);
    transition: background 0.12s ease, color 0.12s ease;
}

.main-nav .menu-megamenu-link {
    display: flex;
    text-align: left;
    align-items: flex-start;
}

.menu-megamenu-link--thumb {
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
}

.main-nav .menu-megamenu-link.menu-megamenu-link--thumb {
    flex-direction: row;
    align-items: center;
}

.menu-megamenu-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.menu-megamenu-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.menu-megamenu-link-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    min-width: 0;
}

.menu-megamenu-link:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.menu-megamenu-link-title {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
}

.menu-megamenu-link-title svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.75;
}

.menu-megamenu-link:hover .menu-megamenu-link-title svg {
    opacity: 1;
}

.menu-megamenu-link-sub {
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--gray-500);
    line-height: 1.35;
}

.menu-megamenu-link:hover .menu-megamenu-link-sub {
    color: var(--gray-600);
}

.menu-megamenu-link:hover .menu-megamenu-link-sub {
    color: var(--gray-600);
}

.menu-megamenu-link--drill:hover,
.menu-megamenu-link--drill:focus-visible {
    background: var(--primary-50);
}

.menu-megamenu-drill-chevron {
    display: inline-flex;
    margin-left: 0.25rem;
    color: var(--gray-400);
    vertical-align: middle;
}

.menu-megamenu-panel.is-drill-open {
    grid-template-columns: minmax(0, 1fr) !important;
    min-width: min(360px, calc(100vw - 2rem));
    max-height: min(72vh, 560px);
    overflow-x: hidden;
    overflow-y: auto;
    align-content: start;
}

.menu-megamenu-drill {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
    grid-column: 1 / -1;
}

.menu-megamenu-drill-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.menu-megamenu-drill-back {
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-700);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
    cursor: pointer;
}

.menu-megamenu-drill-back:hover {
    background: var(--gray-100);
}

.menu-megamenu-drill-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-900);
}

.menu-megamenu-drill-all {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-600);
    text-decoration: none;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
}

.menu-megamenu-drill-all:hover {
    background: var(--primary-50);
}

.menu-megamenu-drill-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
    gap: 0.25rem 1rem;
    max-height: min(52vh, 400px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.15rem;
}

.menu-megamenu-drill-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 8px;
    color: var(--gray-800);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.menu-megamenu-drill-link:hover,
.menu-megamenu-drill-link:focus-visible {
    background: var(--gray-50);
    color: var(--primary-600);
}

.menu-megamenu-drill-link--branch .menu-megamenu-drill-chevron {
    color: var(--gray-400);
}

/* Katalog megamenü: açık panel + sol kategori listesi + Tümünü gör */
.menu-megamenu-panel--catalog {
    grid-template-columns: minmax(13.5rem, 16.5rem) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 0;
    min-width: min(720px, calc(100vw - 2rem));
    max-width: min(920px, calc(100vw - 2rem));
    height: min(70vh, 36rem);
    max-height: min(70vh, 36rem);
    align-items: stretch;
    overflow: hidden;
    border-radius: 12px;
    border: 0;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.menu-megamenu-panel--catalog.menu-megamenu-panel--catalog-promo {
    grid-template-columns: minmax(13.5rem, 16.5rem) minmax(0, 1fr);
}

.menu-megamenu-panel--catalog.menu-megamenu-panel--catalog-promo-only {
    grid-template-columns: minmax(11rem, 14rem);
    min-width: 0;
    height: auto;
    max-height: min(70vh, 36rem);
}

.mmc-rail {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.65rem;
    background: var(--mmc-rail-bg, #ffffff);
    color: var(--mmc-rail-fg, #1e293b);
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mmc-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    height: 100%;
    background: var(--mmc-surface, #eef3f8);
    overflow: hidden;
}

.menu-megamenu-panel--catalog-promo .mmc-main,
.mmc-main:has(.mmc-promo) {
    grid-template-columns: minmax(16rem, 1fr) minmax(11.5rem, 13.5rem);
}

.main-nav .menu-megamenu-panel--catalog a.mmc-rail-item,
.menu-megamenu-panel--catalog .mmc-rail-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--mmc-rail-fg, #1e293b);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.12s ease, color 0.12s ease;
}

.main-nav .menu-megamenu-panel--catalog a.mmc-rail-item:hover,
.main-nav .menu-megamenu-panel--catalog a.mmc-rail-item:focus-visible,
.main-nav .menu-megamenu-panel--catalog a.mmc-rail-item.is-active,
.menu-megamenu-panel--catalog .mmc-rail-item:hover,
.menu-megamenu-panel--catalog .mmc-rail-item:focus-visible,
.menu-megamenu-panel--catalog .mmc-rail-item.is-active {
    background: var(--mmc-rail-active-bg, #fff);
    color: var(--mmc-rail-active-fg, var(--mmc-rail-bg, var(--primary, #6d28d9)));
    box-shadow: none;
}

.menu-megamenu-panel--catalog .mmc-rail-item svg {
    color: inherit;
    stroke: currentColor;
}

.mmc-rail-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mmc-rail-item.is-active .mmc-rail-thumb,
.mmc-rail-item:hover .mmc-rail-thumb {
    background: color-mix(in srgb, var(--mmc-rail-active-fg, var(--mmc-rail-bg, var(--primary, #6d28d9))) 12%, white);
}

.mmc-rail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mmc-rail-thumb-ph {
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.mmc-rail-label {
    min-width: 0;
    flex: 1;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mmc-rail-chevron {
    flex-shrink: 0;
    display: none;
    opacity: 0.85;
}

.mmc-rail-item.is-active .mmc-rail-chevron,
.mmc-rail-item:hover .mmc-rail-chevron,
.mmc-rail-item:focus-visible .mmc-rail-chevron {
    display: flex;
}

.mmc-rail-item .mmc-count {
    font-size: 0.75rem;
    font-weight: 600;
}

.mmc-list {
    padding: 0.75rem 1.05rem 0.75rem 1.15rem;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.mmc-pane {
    display: none;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    height: 100%;
}

.mmc-pane.is-active,
.mmc-pane:not([hidden]) {
    display: flex;
}

.mmc-pane[hidden] {
    display: none !important;
}

.mmc-pane-scroll {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.2rem;
}

.mmc-rail::-webkit-scrollbar,
.mmc-pane-scroll::-webkit-scrollbar,
.mmc-promo::-webkit-scrollbar {
    width: 6px;
}

.mmc-rail::-webkit-scrollbar-thumb,
.mmc-pane-scroll::-webkit-scrollbar-thumb,
.mmc-promo::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}

.main-nav .menu-megamenu-panel--catalog a.mmc-view-all,
.menu-megamenu-panel--catalog .mmc-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0;
    flex-shrink: 0;
    padding: 0.75rem 0.25rem 0.15rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--mmc-accent, var(--mmc-rail-bg, var(--primary, #6d28d9)));
    text-decoration: none;
}

.mmc-view-all:hover {
    color: color-mix(in srgb, var(--mmc-accent, var(--mmc-rail-bg, var(--primary, #6d28d9))) 78%, #000);
}

.main-nav .menu-megamenu-panel--catalog a.mmc-list-item,
.menu-megamenu-panel--catalog .mmc-list-item {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.62rem 0.15rem;
    border-radius: 0;
    border-bottom: 1px solid #eef2f6;
    text-decoration: none;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
}

.main-nav .menu-megamenu-panel--catalog a.mmc-list-item:hover,
.main-nav .menu-megamenu-panel--catalog a.mmc-list-item:focus-visible,
.menu-megamenu-panel--catalog .mmc-list-item:hover,
.menu-megamenu-panel--catalog .mmc-list-item:focus-visible {
    background: transparent;
    color: var(--mmc-accent, var(--mmc-rail-bg, var(--primary, #6d28d9)));
}

.mmc-list-title {
    min-width: 0;
}

.mmc-count {
    flex-shrink: 0;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    background: none;
}

.mmc-list-item:hover .mmc-count {
    color: var(--mmc-accent, var(--mmc-rail-bg, var(--primary, #6d28d9)));
}

.mmc-promo {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.85rem 0.85rem 0.35rem;
    border-left: 0;
    background: transparent;
    min-height: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mmc-promo-card {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    flex: 0 0 136px;
    width: 100%;
    height: 136px;
    min-height: 136px;
    max-height: 136px;
    text-decoration: none;
    color: inherit;
    border: 0;
}

.mmc-promo-card img {
    width: 100%;
    height: 136px;
    min-height: 136px;
    max-height: 136px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.mmc-promo-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.72));
}

.mobile-mmc {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 0 0.5rem;
}

.mobile-mmc-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-mmc-rail-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.35rem;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 700;
    font-size: 0.9375rem;
}

.mobile-mmc-thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}

.mobile-mmc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mobile-mmc-rail-title {
    flex: 1;
    min-width: 0;
}

.mobile-mmc-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.35rem 0.45rem 2.65rem;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
}

.mobile-mmc-child:hover {
    color: var(--primary-600);
}

.mobile-mmc-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding: 0.65rem 0.35rem 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--mmc-accent, #2563eb);
    text-decoration: none;
}

.mobile-mmc-promo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

.mobile-mmc-promo-card {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.mobile-mmc-promo-card img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    display: block;
}

.mobile-megamenu-link--drill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-megamenu-drill-hint {
    display: block;
    font-size: 0.6875rem;
    color: var(--gray-500);
}

.mobile-megamenu-drill-chevron {
    margin-left: auto;
    color: var(--gray-400);
    flex-shrink: 0;
}

.mobile-megamenu-drill-panel {
    margin: 0.25rem 0 0.5rem 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--gray-200);
}

.mobile-megamenu-drill-all,
.mobile-megamenu-drill-item {
    display: block;
    padding: 0.45rem 0.5rem;
    color: var(--gray-800);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 6px;
}

.mobile-megamenu-drill-all {
    font-weight: 600;
    color: var(--primary-600);
}

.mobile-megamenu-drill-item:hover,
.mobile-megamenu-drill-all:hover {
    background: var(--gray-50);
}

.mobile-megamenu-drill-branch-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border: 0;
    background: transparent;
    color: var(--gray-800);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
}

.mobile-megamenu-drill-branch-toggle:hover {
    background: var(--gray-50);
}

.mobile-megamenu-drill-list--nested {
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--gray-200);
}

.mobile-megamenu-drill-list--nested[hidden] {
    display: none !important;
}

.mobile-megamenu-group {
    padding: 0.25rem 0 0.5rem 0.75rem;
    border-left: 2px solid var(--gray-200);
    margin: 0.25rem 0 0.5rem 0;
}

.mobile-megamenu-group-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    margin: 0.375rem 0 0.25rem 0;
}

.mobile-menu-submenu a.mobile-megamenu-link--thumb {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: nowrap;
}

.mobile-megamenu-row-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.mobile-megamenu-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mobile-megamenu-link-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

/* Login button extracted from inline styles */
.login-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
}

.login-button:hover {
    background: var(--primary-dark);
}

/* Koyu header — açık zeminli dropdown/megamenu linkleri */
.header--dark .main-nav .menu-dropdown a.menu-dropdown-link,
.header--dark .main-nav .menu-megamenu-panel a.menu-megamenu-link {
    color: #374151 !important;
}

.header--dark .main-nav .menu-dropdown a.menu-dropdown-link:hover,
.header--dark .main-nav .menu-megamenu-panel a.menu-megamenu-link:hover {
    color: var(--primary, #ed4b25) !important;
}

/* Tema oluşturucu: header içerik genişliği (stil ayrı, genişlik ayrı) */
body.theme-header-width-p80 .header-container,
body.theme-header-width-p80 .agency-menu-container,
body.theme-header-width-p80 .site-topbar__inner,
body.theme-header-width-p80 .header--portal .portal-bar,
body.theme-header-width-p90 .header-container,
body.theme-header-width-p90 .agency-menu-container,
body.theme-header-width-p90 .site-topbar__inner,
body.theme-header-width-p90 .header--portal .portal-bar,
body.theme-header-width-p95 .header-container,
body.theme-header-width-p95 .agency-menu-container,
body.theme-header-width-p95 .site-topbar__inner,
body.theme-header-width-p95 .header--portal .portal-bar,
body.theme-header-width-full .header-container,
body.theme-header-width-full .agency-menu-container,
body.theme-header-width-full .site-topbar__inner,
body.theme-header-width-full .header--portal .portal-bar,
body.theme-header-width-site .header-container,
body.theme-header-width-site .agency-menu-container,
body.theme-header-width-site .site-topbar__inner,
body.theme-header-width-site .header--portal .portal-bar {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

body.theme-header-width-p80 .header-container,
body.theme-header-width-p80 .agency-menu-container,
body.theme-header-width-p80 .site-topbar__inner,
body.theme-header-width-p80 .header--portal .portal-bar {
    max-width: 80%;
}

body.theme-header-width-p90 .header-container,
body.theme-header-width-p90 .agency-menu-container,
body.theme-header-width-p90 .site-topbar__inner,
body.theme-header-width-p90 .header--portal .portal-bar {
    max-width: 90%;
}

body.theme-header-width-p95 .header-container,
body.theme-header-width-p95 .agency-menu-container,
body.theme-header-width-p95 .site-topbar__inner,
body.theme-header-width-p95 .header--portal .portal-bar {
    max-width: 95%;
}

body.theme-header-width-full .header-container,
body.theme-header-width-full .agency-menu-container,
body.theme-header-width-full .site-topbar__inner,
body.theme-header-width-full .header--portal .portal-bar {
    max-width: none;
}

body.theme-header-width-site .header-container,
body.theme-header-width-site .agency-menu-container,
body.theme-header-width-site .site-topbar__inner,
body.theme-header-width-site .header--portal .portal-bar {
    max-width: var(--container-max-width, 1280px);
}


