/* ============================================
   Custom Menu: Top Bar + Menu Bar (dropdown/megamenu)
   Sol: linkler, Sağ: görseller
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* ---------- TOP BAR ---------- */
.top-bar {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.top-bar__search {
    flex: 1;
    min-width: 120px;
    max-width: 350px;
}

.top-bar__logo {
    flex-shrink: 0;
}

.top-bar__auth {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Mobil ikonlar (sadece mobilde görünür) */
.top-bar__mobile-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.top-bar__mobile-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #333;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.top-bar__mobile-btn:hover {
    background: #f0f0f0;
    color: #ce2c2c;
}

.top-bar__mobile-btn[aria-expanded="true"] {
    background: #f0f0f0;
    color: #ce2c2c;
}

.top-bar__hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
}

.top-bar-search {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
}

.top-bar-search:focus-within {
    border-color: #ce2b2b;
    background: #fff;
}

.top-bar-search__icon {
    color: #666;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.top-bar-search__input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.top-bar-logo__img {
    height: 50px;
    width: auto;
    display: block;
}

.top-bar-auth__link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.top-bar-auth__link:hover {
    color: #dd6b00;
}

.top-bar-auth__sep {
    color: #999;
    font-weight: 400;
}

.top-bar-auth__user {
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.top-bar-auth__link.btn-link,
.top-bar-auth__link[type="submit"] {
    background: none !important;
    border: none !important;
    cursor: pointer;
    font-size: inherit;
    font-weight: inherit;
}

/* Kullanıcı dropdown (üzerine gelindiğinde) */
.top-bar-auth__user-dropdown {
    position: relative;
    display: inline-block;
}
.top-bar-auth__user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.25rem 0;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}
.top-bar-auth__user-trigger:hover {
    color: #dd6b00;
}
.top-bar-auth__user-icon {
    font-size: 0.95rem;
    opacity: 0.9;
}
.top-bar-auth__chevron {
    font-size: 0.65rem;
    margin-left: 0.15rem;
    opacity: 0.7;
    transition: transform 0.2s;
}
.top-bar-auth__user-dropdown:hover .top-bar-auth__chevron {
    transform: rotate(180deg);
}
.top-bar-auth__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.35rem;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,.1);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1000;
}
.top-bar-auth__user-dropdown:hover .top-bar-auth__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.top-bar-auth__dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.top-bar-auth__dropdown-item:hover {
    background: #f5f5f5;
    color: #dd6b00;
}
.top-bar-auth__dropdown-item--btn {
    cursor: pointer;
    width: 100%;
}
.top-bar-auth__dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.4rem 0;
}

/* ---------- MENÜ BAR ---------- */
.menu-bar {
    background: #fff;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.main-nav__toggler {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    background: #fff;
    cursor: pointer;
}

.main-nav__toggler-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    box-shadow: 0 6px 0 #333, 0 -6px 0 #333;
}

.main-nav__collapse {
    flex: 1;
    justify-content: center;
}

.main-nav__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.main-nav__item {
    position: relative;
}

.main-nav__link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    color: #444444;
    text-decoration: none;
    font-weight: 600;
}

.main-nav__icon {
    margin-right: 0.5rem;
    font-size: 0.95em;
    opacity: 0.9;
    font-size: 0.95rem;
    transition: color 0.2s, background 0.2s;
}

.main-nav__link:hover {
    color: #dd6b00;
}

.main-nav__link--highlight {
    background: #dd6b00;
    color: #fff;
    border-radius: 8px;
    margin: 0 0.25rem;
    padding: 8px 15px;
}

.main-nav__link--highlight:hover {
    background: #c55f00;
    color: #fff;
}

.main-nav__link--cta {
    background: #D91A1A;
    color: #fff !important;
    border-radius: 8px;
    margin-left: 0.5rem;
    padding: 8px 15px;
}

.main-nav__link--cta:hover {
    background: #b91515;
    color: #fff !important;
}

.main-nav__link--toggle::after {
    content: "";
    display: inline-block;
    margin-left: 0.35rem;
    vertical-align: 0em;
    border: 4px solid transparent;
    border-top-color: currentColor;
}

/* ---------- DROPDOWN (sol: linkler, sağ: görsel) ---------- */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 420px;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.main-nav__item--dropdown:hover .nav-dropdown,
.main-nav__item--dropdown.is-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown__inner {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 1.25rem;
    border: 1px solid #eee;
}

.nav-dropdown__links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-dropdown__link {
    color: #333;
    text-decoration: none;
    padding: 0.4rem 0;
    font-weight: 500;
    transition: color 0.2s, padding-left 0.2s;
}

.nav-dropdown__link:hover {
    color: #dd6b00;
    padding-left: 6px;
}

.nav-dropdown__image {
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.nav-dropdown__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- MEGAMENU (sol: link grupları, sağ: görseller) ---------- */
.nav-megamenu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    top: 100%;
    min-width: 640px;
    max-width: 90vw;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.main-nav__item--megamenu:hover .nav-megamenu,
.main-nav__item--megamenu.is-open .nav-megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-megamenu__inner {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 1.5rem;
    border: 1px solid #eee;
}

.nav-megamenu__links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-megamenu__col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-megamenu__title {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.nav-megamenu__link {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s, padding-left 0.2s;
}

.nav-megamenu__link:hover {
    color: #dd6b00;
    padding-left: 4px;
}

.nav-megamenu__images {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-megamenu__img-wrap {
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: block;
    aspect-ratio: 16/10;
}

.nav-megamenu__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#mobileSearchDropdown{
    display: none;
}
/* ---------- MOBİL (< 992px) ---------- */
@media (max-width: 991px) {
    #mobileSearchDropdown{
        display: block;
    }
    .top-bar {
        position: relative;
    }
    .top-bar-logo__img{
        height: 30px;
    }
    /* Top bar: Logo sol, sağda arama ikonu | üyelik ikonu | hamburger */
    .top-bar__search--desktop,
    .top-bar__auth--desktop {
        display: none !important;
    }

    .top-bar__mobile-actions {
        display: flex;
    }

    .top-bar__inner {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    .top-bar__logo {
        flex-shrink: 0;
    }

    /* Mobil arama dropdown (ikon tıklanınca) */
    .top-bar__search-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        padding: 0.75rem 0;
        z-index: 1020;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0.2s ease, padding 0.2s ease;
    }

    .top-bar__search-dropdown.is-open {
        max-height: 120px;
        opacity: 1;
        visibility: visible;
    }

    .top-bar-search--dropdown {
        margin: 0;
    }
}

/* Placeholder görsel yoksa arka plan */
.nav-dropdown__image img[src*="placeholder"],
.nav-megamenu__img-wrap img[src*="placeholder"] {
    min-height: 120px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* ---------- BOTTOMSHEET ---------- */
.bottomsheet {
    position: fixed;
    inset: 0;
    z-index: 1050;
    pointer-events: none;
    visibility: hidden;
}

.bottomsheet.is-open {
    pointer-events: auto;
    visibility: visible;
}

.bottomsheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottomsheet.is-open .bottomsheet__backdrop {
    opacity: 1;
}

.bottomsheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bottomsheet.is-open .bottomsheet__panel {
    transform: translateY(0);
}

.bottomsheet__handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
}

.bottomsheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.bottomsheet__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #333;
}

.bottomsheet__close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.bottomsheet__close:hover {
    background: #f0f0f0;
    color: #333;
}

.bottomsheet__body {
    padding: 1rem 1.25rem 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.bottomsheet-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.bottomsheet-btn:last-child {
    margin-bottom: 0;
}

.bottomsheet-btn--primary {
    background: linear-gradient(135deg, #D32F2F, #b71c1c);
    color: #fff;
    border: none;
}

.bottomsheet-btn--primary:hover {
    background: #c55f00;
    color: #fff;
}

.bottomsheet-btn--outline {
    background: transparent;
    color: #d32f2f;
    border: 2px solid #d32f2f;
}

.bottomsheet-btn--outline:hover {
    background: #fff5ef;
    color: #dd6b00;
}

/* ---------- AKORDEON MENÜ (bottomsheet içinde) ---------- */
.accordion-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.accordion-menu__item {
    border-bottom: 1px solid #eee;
}

.accordion-menu__item:last-child {
    border-bottom: none;
}

.accordion-menu__link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 1rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s;
}

.accordion-menu__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}

.accordion-menu__link:hover,
.accordion-menu__toggle:hover {
    color: #dd6b00;
}

.accordion-menu__link--cta {
    background: #D91A1A;
    color: #fff !important;
    border-radius: 10px;
    padding: 1rem 1rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.accordion-menu__link--cta:hover {
    background: #b91515;
    color: #fff !important;
}

.accordion-menu__toggle {
    font-family: inherit;
}

.accordion-menu__item-icon {
    margin-right: 0.6rem;
    font-size: 1rem;
    opacity: 0.9;
}

.accordion-menu__icon {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    color: #999;
}

.accordion-menu__item--open .accordion-menu__icon {
    transform: rotate(180deg);
    color: #dd6b00;
}

.accordion-menu__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-menu__item--open .accordion-menu__content {
    max-height: 400px;
}

.accordion-menu__sublink {
    display: block;
    padding: 0.65rem 0 0.65rem 1rem;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.accordion-menu__sublink:hover {
    color: #dd6b00;
    border-left-color: #dd6b00;
}

body.bottomsheet-open {
    overflow: hidden;
}

/* Top search overlay (desktop top bar arama tıklanınca) */
.top-search--overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background: #fff;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.top-search--overlay.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
