/*
|--------------------------------------------------------------------------
| I'M YAMBOL – Mobile UI Polish 1.0
|--------------------------------------------------------------------------
| Additive responsive polish loaded after /assets/css/style.css.
|--------------------------------------------------------------------------
*/

@media (max-width: 760px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    img,
    svg {
        max-width: 100%;
    }

    /* Top weather / language bar */
    .header-top-inner {
        min-height: 37px;
        gap: 8px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .header-info,
    .header-weather {
        min-width: 0;
    }

    .header-weather {
        font-size: 11px;
        white-space: nowrap;
    }

    .header-weather-value {
        gap: 4px;
    }

    .header-links {
        display: flex !important;
        align-items: center;
        flex: 0 0 auto;
        gap: 7px;
        margin-left: auto;
        font-size: 11px;
        white-space: nowrap;
    }

    /* Consistent mobile header */
    .header-main {
        min-height: 72px;
        padding-left: 15px;
        padding-right: 10px;
        gap: 3px;
    }

    .header-main .logo {
        min-width: 0;
        margin-right: auto;
        transform-origin: left center;
    }

    .header-main .logo-main,
    .header-main .logo-city {
        white-space: nowrap;
    }

    .main-nav {
        display: none;
    }

    .header-tools {
        display: flex !important;
        align-items: center;
        flex: 0 0 auto;
        gap: 1px;
        margin-left: auto;
    }

    .header-tools-separator {
        display: none !important;
    }

    .header-tool-btn,
    .menu-toggle {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
    }

    .header-tool-btn {
        display: grid !important;
        place-items: center;
    }

    .menu-toggle {
        display: flex !important;
        flex: 0 0 42px;
        margin: 0;
        padding: 0;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .header-tool-btn svg {
        width: 21px;
        height: 21px;
    }

    .menu-toggle span {
        width: 21px;
    }

    /* Hero */
    .page-hero {
        min-height: 420px;
        background-position: center center;
    }

    .page-hero-content {
        padding-top: 52px;
        padding-bottom: 76px;
    }

    .page-hero-eyebrow {
        margin-bottom: 14px;
        font-size: 11px;
        letter-spacing: 1.7px;
    }

    .page-hero h1 {
        max-width: 340px;
        margin-bottom: 18px;
        font-size: clamp(42px, 12vw, 50px);
        line-height: .98;
        letter-spacing: -2.2px;
        text-wrap: balance;
    }

    .page-hero p {
        max-width: 350px;
        margin: 0;
        font-size: 16px;
        line-height: 1.62;
    }

    /* Floating search/filter toolbars */
    .places-toolbar-section,
    .shops-toolbar-section {
        margin-top: -26px;
    }

    .places-toolbar,
    .shops-toolbar {
        display: block;
        padding: 15px 0 12px;
        overflow: hidden;
        border-radius: 20px;
    }

    .places-search,
    .shops-search {
        width: auto;
        min-height: 50px;
        margin: 0 14px 10px;
        padding: 0 15px;
    }

    .places-search input,
    .shops-search input {
        min-width: 0;
        font-size: 16px;
    }

    .places-filter,
    .shops-filter {
        display: flex;
        width: 100%;
        max-width: 100%;
        gap: 8px;
        padding: 2px 14px 7px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap !important;
        scroll-snap-type: x proximity;
        scroll-padding-left: 14px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
    }

    .places-filter::-webkit-scrollbar,
    .shops-filter::-webkit-scrollbar {
        display: none;
    }

    .places-filter::after,
    .shops-filter::after {
        content: "";
        flex: 0 0 6px;
    }

    .filter-btn,
    .shop-filter-btn {
        flex: 0 0 auto;
        min-height: 44px;
        padding-left: 16px;
        padding-right: 16px;
        white-space: nowrap;
        scroll-snap-align: start;
        touch-action: manipulation;
    }

    /* Reduce large gap after toolbar */
    .places-catalog-section,
    .shops-catalog-section {
        padding-top: 48px !important;
    }

    .places-catalog-heading,
    .shops-catalog-heading {
        gap: 16px;
        margin-bottom: 24px;
    }

    .section-eyebrow {
        line-height: 1.45;
    }

    /* Map */
    .city-map-sidebar-head {
        padding-top: 23px;
    }

    .city-map-filters {
        display: flex;
        flex-wrap: nowrap !important;
        gap: 7px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
    }

    .city-map-filters::-webkit-scrollbar {
        display: none;
    }

    .city-map-filters > * {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .city-map-meta {
        min-height: 54px;
        font-size: 11px;
    }

    /* Touch/accessibility */
    button,
    a.header-tool-btn,
    .filter-btn,
    .shop-filter-btn {
        -webkit-tap-highlight-color: transparent;
    }

    input[type="text"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-top-inner {
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-weather {
        font-size: 10px;
    }

    .header-main {
        padding-left: 12px;
        padding-right: 7px;
        gap: 0;
    }

    .header-main .logo {
        transform: scale(.90);
    }

    .header-tool-btn,
    .menu-toggle {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .page-hero h1 {
        font-size: 40px;
        letter-spacing: -2px;
    }

    .page-hero p {
        font-size: 15px;
    }

    .places-search,
    .shops-search {
        margin-left: 12px;
        margin-right: 12px;
    }

    .places-filter,
    .shops-filter {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 330px) {
    .header-weather {
        max-width: 205px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-links span,
    .header-links a:last-child {
        display: none;
    }

    .header-main .logo {
        transform: scale(.82);
        margin-left: -5px;
    }

    .header-tool-btn,
    .menu-toggle {
        width: 37px;
        min-width: 37px;
        height: 40px;
    }

    .page-hero {
        min-height: 400px;
    }

    .page-hero h1 {
        font-size: 37px;
    }
}
