/* Mobile navigation uses the existing category menu and brand palette. */
.mobile-bottom-nav,
.mobile-category-toggle-icon,
.mobile-home-logo {
    display: none;
}

.hero-search-submit-icon,
.home-results-title-short {
    display: none;
}

@media (max-width: 900px) {
    body {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    .site-header .top {
        height: 68px;
        padding-inline: 16px;
    }

    .header-nav-left {
        display: flex;
    }

    .header-nav-left > .header-nav-link,
    .top-actions,
    .mobile-nav-panel {
        display: none !important;
    }

    .header-center-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .brand-logo {
        height: 46px;
        max-width: 170px;
    }

    .nav-dropdown {
        position: static;
    }

    .nav-dropdown-btn {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 12px;
    }

    .nav-dropdown-btn > span,
    .nav-dropdown-arrow {
        display: none;
    }

    .mobile-category-toggle-icon {
        display: block;
    }

    .nav-dropdown-menu {
        top: calc(100% + 4px);
        left: 12px;
        width: calc(100% - 24px);
        max-width: none;
        max-height: calc(100dvh - 170px - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 16px;
        border-color: #eee;
        border-radius: 18px;
    }

    .nav-categories-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .nav-category-card {
        min-height: 64px;
    }

    .mobile-bottom-nav {
        position: fixed;
        inset: auto 0 0;
        z-index: 1001;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #f0f0f0;
        box-shadow: 0 -5px 24px rgb(24 34 38 / 5%);
    }

    .mobile-bottom-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        min-height: 54px;
        color: #62676b;
        font-size: 10px;
        line-height: 1.4;
        font-weight: 400;
    }

    .mobile-bottom-icon {
        display: grid;
        place-items: center;
        width: 52px;
        height: 32px;
        border-radius: 20px;
    }

    .mobile-bottom-icon svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-item.is-active {
        color: var(--brand-yellow-text);
    }

    .mobile-bottom-item.is-active .mobile-bottom-icon {
        background: var(--brand-yellow-light);
    }

    .mobile-bottom-create {
        color: var(--brand-dark);
    }

    .mobile-bottom-create .mobile-bottom-icon {
        background: var(--brand-yellow);
    }

    .mobile-bottom-create svg {
        width: 28px;
        height: 28px;
    }

    body .tb-cookie-banner-wrap {
        bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 640px) {
    .mobile-home .site-header {
        position: absolute;
        inset: 0 0 auto;
        background: transparent;
        border: 0;
    }

    .mobile-home .brand-logo {
        display: none;
    }

    .mobile-home-logo {
        height: 46px;
        width: auto;
        max-width: 170px;
        object-fit: contain;
    }

    .mobile-home .mobile-home-logo {
        display: block;
    }

    .mobile-home .nav-dropdown-btn {
        color: #fff;
    }

    .mobile-home .nav-dropdown-btn:hover,
    .mobile-home .nav-dropdown.open .nav-dropdown-btn {
        background: rgb(255 255 255 / 14%);
        box-shadow: none;
    }

    .mobile-home .hero-section {
        padding: 0 0 24px;
    }

    .mobile-home .hero-wrap {
        padding: 0;
    }

    .mobile-home .hero-card {
        min-height: 0;
        height: auto;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }

    .mobile-home .hero-photo,
    .mobile-home .hero-overlay {
        height: calc(100% - 28px);
    }

    .mobile-home .hero-overlay {
        background: linear-gradient(180deg, rgb(17 24 28 / 50%), rgb(17 24 28 / 78%));
    }

    .mobile-home .hero-content {
        width: 100%;
        max-width: none;
        padding: 88px 16px 0;
    }

    .mobile-home .hero-eyebrow,
    .mobile-home .hero-subtitle {
        display: none;
    }

    .mobile-home .hero-title {
        margin-bottom: 24px;
        font-size: clamp(22px, 6vw, 30px);
        line-height: 1.25;
        text-align: center;
    }

    .mobile-home .hero-title br {
        display: none;
    }

    .mobile-home .hero-tabs {
        flex-wrap: nowrap;
        gap: 4px;
        margin: 0;
        justify-content: center;
    }

    .mobile-home .hero-tab {
        min-width: 0;
        height: 38px;
        padding: 0 10px;
        border-radius: 16px 16px 0 0;
        font-size: clamp(9px, 2.7vw, 12px);
        white-space: nowrap;
        font-weight: 500;
    }

    .mobile-home .hero-tab.active {
        background: #fff;
        border-color: #fff;
    }

    .mobile-home .hero-search-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 7px;
        border-radius: 16px;
        box-shadow: 0 6px 24px rgb(24 34 38 / 12%);
    }

    .mobile-home .hero-query-field {
        min-width: 0;
        padding-left: 6px;
        gap: 6px;
    }

    .mobile-home .hero-query-field input {
        min-width: 0;
        font-size: 16px;
    }

    .mobile-home .hero-city-field {
        grid-column: 1 / -1;
        grid-row: 2;
        padding: 8px 6px 2px;
        border-top: 1px solid var(--border-light);
    }

    .mobile-home .hero-city-field select {
        font-size: 16px;
    }

    .mobile-home .hero-search-btn {
        display: grid;
        place-items: center;
        width: 48px;
        height: 44px;
        padding: 0;
        border-radius: 12px;
    }

    .mobile-home .hero-search-label,
    .mobile-home .home-results-title-full,
    .mobile-home #ilanlar #result-count {
        display: none;
    }

    .mobile-home .hero-search-submit-icon,
    .mobile-home .home-results-title-short {
        display: inline;
    }

    .mobile-home #ilanlar .section-head {
        align-items: center;
        gap: 12px;
    }

    .mobile-home #ilanlar .section-head h2 {
        font-size: 18px;
    }

    .mobile-home #ilanlar .all-listings-link {
        flex-shrink: 0;
        font-size: 11px;
    }

    .mobile-home .site-main {
        padding-inline: 16px;
    }

    .mobile-home .category-section {
        margin: 0 0 28px;
    }

    .mobile-home .category-section-title {
        margin-bottom: 14px;
        font-size: 18px;
    }

    .mobile-home .category-cards-track {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
        padding: 0;
    }

    .mobile-home .category-item-card {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        min-width: 0;
        min-height: 100px;
        padding: 12px 5px;
        border-radius: 16px;
        box-shadow: none;
        text-align: center;
    }

    .mobile-home .category-icon-box {
        width: 32px;
        height: 32px;
        background: transparent;
    }

    .mobile-home .category-icon-box svg {
        width: 29px;
        height: 29px;
    }

    .mobile-home .category-text-box {
        flex: initial;
    }

    .mobile-home .category-text-box strong {
        font-size: 11px;
        font-weight: 400;
        white-space: normal;
    }

    .mobile-home .category-text-box small,
    .mobile-home .category-arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-dropdown-menu {
        animation: none;
    }
}

@media (max-width: 900px) {
    html.mobile-account-open {
        overflow: hidden;
    }

    .mobile-account-sheet {
        position: fixed;
        inset: auto 0 0;
        width: 100%;
        max-width: 560px;
        max-height: calc(100dvh - 72px);
        margin: 0 auto;
        padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 0;
        border-radius: 24px 24px 0 0;
        background: #fff;
        color: var(--text-primary);
        box-shadow: 0 -12px 48px rgb(0 0 0 / 12%);
    }

    .mobile-account-sheet[open] {
        animation: mobileAccountSlide 180ms ease-out;
    }

    .mobile-account-sheet::backdrop {
        background: rgb(17 24 28 / 58%);
        backdrop-filter: none;
    }

    .mobile-account-handle {
        width: 36px;
        height: 4px;
        margin: 0 auto 4px;
        border-radius: 4px;
        background: #dedfe0;
    }

    .mobile-account-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px 12px 24px;
        border-bottom: 1px solid var(--border-light);
    }

    .mobile-account-heading h2 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

    .mobile-account-close {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        color: #777d81;
    }

    .mobile-account-auth {
        display: grid;
        gap: 4px;
        padding: 16px 20px 12px;
        border-bottom: 1px solid var(--border-light);
        text-align: center;
    }

    .mobile-account-login {
        padding: 13px;
        border-radius: 12px;
        background: var(--brand-yellow);
        color: var(--brand-dark);
        font-size: 14px;
        font-weight: 600;
    }

    .mobile-account-register {
        display: grid;
        place-items: center;
        min-height: 44px;
        font-size: 12px;
        color: var(--text-secondary);
    }

    .mobile-account-identity {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-light);
        font-size: 14px;
    }

    .mobile-account-identity strong {
        overflow-wrap: anywhere;
    }

    .mobile-account-avatar {
        display: grid;
        place-items: center;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--brand-yellow-light);
        color: var(--brand-yellow-text);
    }

    .mobile-account-links {
        display: grid;
        padding: 8px 12px;
    }

    .mobile-account-links a,
    .mobile-account-logout button {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 52px;
        padding: 12px;
        border-radius: 12px;
        font-size: 14px;
        text-align: left;
    }

    .mobile-account-links i,
    .mobile-account-logout i {
        width: 24px;
        color: #73797d;
        font-size: 20px;
        text-align: center;
    }

    .mobile-account-chevron {
        margin-left: auto;
        color: #a1a5a8;
        font-size: 22px;
    }

    .mobile-account-links a:hover,
    .mobile-account-close:hover {
        background: #f8f9fa;
    }

    .mobile-account-logout {
        margin: 0 12px;
        padding-top: 8px;
        border-top: 1px solid var(--border-light);
    }

    .mobile-account-logout button {
        width: 100%;
        color: #c34444;
    }

    .mobile-account-logout i {
        color: inherit;
    }
}

@keyframes mobileAccountSlide {
    from { transform: translateY(28px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-account-sheet[open] {
        animation: none;
    }
}
