@media (max-width: 1024px) {
  .categories-large {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .categories-small {
    grid-template-columns: repeat(3, 1fr);
  }

  .all-categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .catalog-card-offers__grid--listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-listing-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "status category"
      "search apply"
      "languages languages";
  }

  .admin-user-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-filters .admin-filter-field--apply {
    justify-self: stretch;
  }

  .admin-filter-field--apply {
    justify-self: stretch;
  }

  .admin-filter-field--apply .btn {
    width: 100%;
  }

  .admin-banner-settings {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .admin-banner-settings__controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  .admin-banner-settings .btn {
    min-width: 190px;
  }

  .admin-banner-form {
    grid-template-columns: 1fr;
    padding: var(--space-md);
  }

  .admin-banner-live-preview {
    min-height: 150px;
  }
}

@media (max-width: 768px) {
  .admin-banner-live-preview--desktop {
    height: 75px;
    min-height: 75px;
    aspect-ratio: auto;
  }

  .admin-banner-live-preview--desktop img {
    object-fit: contain;
  }

  .header__logo-img {
    height: 32px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .hero__title {
    font-size: 26px;
  }

  .container {
    padding: 0;
  }

  .main {
    padding: var(--space-lg) 0;
  }

  .main.main--catalog {
    padding-top: var(--space-sm);
  }

  .main--catalog > .container > .back-btn,
  .main--catalog .listings-toolbar {
    margin-bottom: var(--space-md);
  }

  .main.main--home {
    --home-section-gap: var(--space-lg);
    padding-top: 0;
  }

  .main--home .hero--compact {
    padding: 0;
  }

  .home-city__trigger {
    min-height: 32px;
    margin: -10px 0 5px 0;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
  }

  .home-city__trigger:hover,
  .home-city--open .home-city__trigger {
    border-color: transparent;
    box-shadow: none;
  }

  .home-city__trigger:focus {
    outline: none;
  }

  .home-city__trigger:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .home-city__menu {
    top: calc(100% + 4px);
    max-height: min(55dvh, 380px);
  }

  .admin-statistics__grid {
    grid-template-columns: 1fr;
  }

  .account-header {
    flex-direction: column;
  }

  #account-page .account-header {
    flex-direction: row;
  }

  .account-header__actions,
  .account-header__actions .btn,
  .account-toolbar .btn {
    width: 100%;
  }

  .account-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: var(--space-xl);
  }

  .account-tabs .tab-btn {
    width: 100%;
    flex: initial;
    justify-content: center;
    min-height: 48px;
    min-width: 0;
    padding: 11px 6px;
    font-size: 11px;
    white-space: normal;
    text-align: center;
    overflow: hidden;
    word-break: break-word;
  }

  .account-tabs .tab-btn[data-tab="tab-account-favorites"] {
    display: none;
  }

  .account-promotion-info {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }

  .account-promotion-info__icon {
    width: 44px;
    height: 44px;
  }

  #account-promotion-manager-link {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .account-profile-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-bottom: var(--space-lg);
  }

  .account-profile-tabs .tab-btn {
    width: 100%;
    padding: 10px 8px;
    font-size: 13px;
  }

  .header-account-link {
    display: none;
  }

  .home-categories__controls {
    display: none;
  }

  .catalog-card-photos {
    position: relative;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .catalog-card-photos::-webkit-scrollbar {
    display: none;
  }

  .catalog-card-photos__item {
    flex: 0 0 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    scroll-snap-align: start;
  }

  .catalog-card-photos__dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    z-index: 2;
    display: flex;
    gap: 6px;
    transform: translateX(-50%);
  }

  .gallery__nav {
    display: none;
  }

  .section-header.listings-section-header {
    flex-direction: row;
    align-items: center;
  }

  .listings-section-header h1 {
    min-width: 0;
  }

  .filters__mobile-button {
    position: relative;
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
  }

  .filters__mobile-button svg {
    width: 25px;
    height: 25px;
  }

  .filters__mobile-count {
    position: absolute;
    top: 0;
    right: -2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }

  #filters-container {
    margin-bottom: var(--space-md);
  }

  #filters-container .filters__trigger-row {
    display: none;
  }

  .account-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 72px;
    padding: 7px 10px max(7px, env(safe-area-inset-bottom));
    background: var(--surface);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    overflow: visible;
  }

  #account-page {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  body.has-mobile-bottom-nav {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .account-bottom-nav__item {
    gap: 3px;
    font-size: 10px;
  }

  .account-bottom-nav__item--create {
    transform: translateY(-10px);
  }

  .info-hub__intro {
    min-height: 210px;
    padding: var(--space-xl);
    border-radius: var(--radius-card);
  }

  .info-hub__intro::after {
    right: -130px;
    bottom: -170px;
  }

  .info-hub__eyebrow {
    margin-bottom: var(--space-lg);
  }

  .info-hub__intro-content h1,
  .info-hub__intro-content h2,
  .info-hub__intro-content h3 {
    font-size: 24px;
  }

  .info-hub__intro-content p,
  .info-hub__intro-content li {
    font-size: 14px;
  }

  .info-hub__content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-top: var(--space-xl);
  }

  .info-hub__section-heading {
    margin-bottom: var(--space-md);
  }

  .admin-header__subtitle {
    display: none;
  }

  .admin-header {
    min-height: 52px;
  }

  .admin-header__inner {
    width: 100%;
    min-height: 52px;
    margin-inline: 0;
    padding-inline: 8px;
  }

  .admin-header__brand {
    gap: 8px;
  }

  .admin-header__logo-wrap {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 8px;
  }

  .admin-header__logo {
    width: 15px;
    height: 15px;
  }

  .admin-header__title {
    font-size: 12px;
  }

  .admin-header__action {
    min-height: 30px;
    padding: 0 10px;
    font-size: 10px;
  }

  .admin-header__actions {
    gap: 5px;
  }
  .admin-header__action--logout { width:44px; height:44px; min-height:44px; padding:0; }

  #admin-dashboard > .container {
    width: 100%;
    margin-inline: 0;
    padding-inline: 8px;
  }

  #admin-dashboard .admin-primary-nav {
    min-height: 48px;
    margin-inline: -8px;
    padding-inline: 4px;
  }

  #admin-dashboard .admin-primary-nav__item {
    min-height: 48px;
  }

  #admin-dashboard .admin-primary-nav__item svg {
    width: 18px;
    height: 18px;
  }

  #admin-dashboard .admin-view-heading {
    margin: 16px 2px 10px;
  }

  #admin-dashboard .admin-view-heading__title {
    font-size: 20px;
  }

  #admin-dashboard .admin-view-heading__action {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 14px;
  }

  #admin-dashboard .admin-search-field .form-input {
    min-height: 42px;
  }

  #admin-dashboard .admin-filter-toggle {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  #admin-dashboard .admin-subtabs {
    gap: 6px;
    margin-inline: -8px;
    margin-bottom: 14px;
    padding: 0 8px 3px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #admin-dashboard .admin-subtabs::-webkit-scrollbar {
    display: none;
  }

  #admin-dashboard .admin-subtabs .tab-btn {
    min-width: max-content;
    min-height: 36px;
    flex: 0 0 auto;
    padding-inline: 12px;
    font-size: 11px;
    scroll-snap-align: start;
  }

  #admin-dashboard [data-admin-subtabs="moderation"] {
    gap: 6px;
  }

  #admin-dashboard [data-admin-subtabs="moderation"] .tab-btn span {
    margin-left: 5px;
    font-size: 10px;
  }

  #admin-dashboard .admin-filter-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 12px;
    padding: 12px;
  }

  #admin-dashboard .admin-filter-panel > *,
  #admin-dashboard .admin-filter-panel .admin-filter-field {
    grid-column: 1;
    grid-area: auto;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  #admin-dashboard .admin-filter-panel__header {
    min-height: 32px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
  }

  #admin-dashboard .admin-filter-panel__header strong {
    font-size: 14px;
  }

  #admin-dashboard .admin-filter-panel .form-label {
    margin-bottom: 8px;
  }

  #admin-dashboard .admin-card {
    padding: 10px;
    border-radius: 12px;
  }

  #admin-dashboard .admin-table:not(.admin-table--mobile-cards) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  #admin-dashboard .admin-table-wrap--mobile-cards {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #admin-dashboard .admin-table--mobile-cards,
  #admin-dashboard .admin-table--mobile-cards tbody {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
  }

  #admin-dashboard .admin-table--mobile-cards colgroup,
  #admin-dashboard .admin-table--mobile-cards thead {
    display: none;
  }

  #admin-dashboard .admin-table--mobile-cards tbody {
    display: grid;
    gap: 8px;
  }

  #admin-dashboard .admin-table--mobile-cards tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }

  #admin-dashboard .admin-table--mobile-cards td {
    display: flex;
    grid-column: 1 / -1;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    text-align: right;
  }

  #admin-dashboard .admin-table--mobile-cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    text-align: left;
  }

  #admin-dashboard .admin-table--mobile-cards td:first-child {
    display: block;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    text-align: left;
  }

  #admin-dashboard .admin-table--mobile-cards td:first-child::before {
    display: none;
  }

  #admin-dashboard .admin-table--mobile-cards td:last-child {
    align-items: center;
    padding-top: 6px;
  }

  #admin-dashboard .admin-table--mobile-cards tr:hover td {
    background: transparent;
  }

  #admin-dashboard .admin-table__actions {
    justify-content: flex-end;
  }

  #admin-dashboard .admin-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  #admin-dashboard .admin-card__actions > .btn,
  #admin-dashboard .admin-card__actions > .admin-file-action {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    justify-content: center;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
  }

  #admin-dashboard .admin-card__actions > .form-hint,
  #admin-dashboard .admin-card__actions > .admin-card-action--wide {
    grid-column: 1 / -1;
  }

  #admin-dashboard .admin-card__actions--compact {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--bg);
    flex-wrap: wrap;
  }

  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn {
    width: auto;
    height: 34px;
    min-width: 0;
    min-height: 34px;
    flex: 0 1 auto;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
  }

  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn--primary {
    color: var(--text-primary);
  }

  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn--success {
    color: var(--success);
  }

  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn--danger {
    color: var(--danger);
  }

  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn:hover,
  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn:focus-visible {
    border-color: currentColor;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }

  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn:active {
    transform: scale(0.96);
  }

  #admin-dashboard .admin-card__actions--compact > .admin-card-action-btn > svg {
    display: block;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
  }

  #admin-dashboard .admin-card__actions--compact .admin-card-action-btn__label {
    display: block;
    overflow: hidden;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #admin-dashboard .admin-photo-gallery__header,
  #edit-modal .admin-photo-gallery__header {
    align-items: center;
  }

  #admin-dashboard .admin-card-photos,
  #edit-modal .admin-card-photos {
    gap: 8px;
    margin-inline: -8px;
    padding: 0 8px 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    flex-wrap: nowrap;
    scroll-padding-inline: 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #admin-dashboard .admin-card-photos::-webkit-scrollbar,
  #edit-modal .admin-card-photos::-webkit-scrollbar {
    display: none;
  }

  #admin-dashboard .admin-card-photo,
  #edit-modal .admin-card-photo {
    width: min(66vw, 220px);
    flex: 0 0 min(66vw, 220px);
    scroll-snap-align: start;
  }

  #admin-dashboard .admin-card-photo__actions .btn,
  #admin-dashboard .admin-card-photo__actions .admin-file-action,
  #edit-modal .admin-card-photo__actions .btn {
    min-height: 36px;
    padding: 6px;
    font-size: 12px;
  }

  #admin-dashboard .admin-card-photo--add,
  #edit-modal .admin-card-photo--add {
    min-height: 190px;
  }

  .admin-photo-viewer {
    display: block;
    padding: max(72px, calc(env(safe-area-inset-top) + 58px)) 12px 92px;
  }

  .admin-photo-viewer__figure {
    height: 100%;
    align-content: center;
  }

  .admin-photo-viewer__image {
    max-height: calc(100dvh - 190px);
  }

  .admin-photo-viewer__nav {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom));
  }

  .admin-photo-viewer__nav--previous {
    left: calc(50% - 58px);
  }

  .admin-photo-viewer__nav--next {
    right: calc(50% - 58px);
  }

  .admin-form-options {
    gap: 8px;
  }

  .admin-checkbox-card {
    min-height: 62px;
    padding: 10px;
  }

  .categories-large {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-small {
    grid-template-columns: repeat(2, 1fr);
  }

  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .filters__row {
    flex-direction: column;
  }

  .filters__group {
    min-width: 100%;
  }

  .filters__price-range .form-input {
    width: 100%;
    flex: 1;
  }

  .form-row {
    flex-direction: column;
  }

  .admin-filters {
    flex-direction: column;
  }

  .admin-filters .form-group {
    min-width: 100%;
  }

  .admin-listing-filters {
    grid-template-columns: 1fr;
    grid-template-areas:
      "status"
      "category"
      "search"
      "languages"
      "apply";
    padding: var(--space-md);
    row-gap: var(--space-md);
  }

  .admin-listing-filters .form-group {
    min-width: 0;
  }

  .admin-user-filters {
    grid-template-columns: 1fr;
    padding: var(--space-md);
    row-gap: var(--space-md);
  }

  .admin-user-filters .form-group {
    min-width: 0;
  }

  .admin-filter-field--apply,
  .admin-filter-field--apply .btn {
    width: 100%;
  }

  #admin-dashboard .admin-filter-field--apply .btn {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .admin-edit-grid--two {
    grid-template-columns: 1fr;
  }

  .admin-switch-card {
    min-height: 68px;
  }

  .admin-switch-card--compact {
    min-height: 46px;
  }

  .admin-edit-language .lang-chip {
    padding-inline: 5px;
    font-size: 11px;
  }

  .admin-card__header {
    flex-direction: column;
  }

  .admin-banner-settings__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .admin-banner-settings__field {
    min-width: 0;
  }

  .admin-banner-settings .btn {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }

  .admin-banner-form__grid {
    grid-template-columns: 1fr;
  }

  .admin-banner-language-panel {
    grid-template-columns: 1fr;
    padding: var(--space-sm);
  }

  .admin-banner-language-panel__title {
    grid-column: auto;
  }

  .admin-seo-editor__language {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .admin-seo-editor__wide {
    grid-column: auto;
  }

  .admin-banner-form__actions {
    justify-content: stretch;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-banner-form__actions .btn {
    width: 100%;
  }

  .admin-banner-card {
    padding: 12px;
  }

  .admin-banner-card__topline {
    gap: 8px;
  }

  .admin-banner-form--editor {
    margin-top: 12px;
    padding: 12px;
  }

  .admin-banner-card__editor-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-banner-card__editor-buttons .btn {
    width: 100%;
  }

  .admin-banner-card__editor-buttons .btn-danger {
    grid-column: 1 / -1;
  }

  .admin-table {
    font-size: 13px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
  }

  .modal {
    width: 95%;
    max-height: 85vh;
  }

  #edit-modal {
    width: calc(100% - 8px);
    max-height: calc(100dvh - 8px);
  }

  #edit-modal .modal__header,
  #edit-modal .modal__footer {
    padding: 10px;
  }

  #edit-modal .modal__header {
    min-height: 48px;
  }

  #edit-modal .modal__title {
    font-size: 16px;
  }

  #edit-modal .modal__close {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  #edit-modal .modal__footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  #edit-modal .modal__footer .btn {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    justify-content: center;
    padding: 6px 10px;
    font-size: 12px;
  }

  #edit-modal .modal__body {
    padding: 8px;
    overflow-x: hidden;
  }

  #edit-modal .admin-edit-form {
    gap: 8px;
  }

  #edit-modal .admin-edit-section {
    padding: 10px;
    border-radius: 12px;
  }

  #edit-modal .admin-edit-section__header {
    margin-bottom: 10px;
  }

  #edit-modal .admin-edit-grid {
    gap: 10px;
  }

  #edit-modal .admin-edit-form .form-group {
    margin-bottom: 10px;
  }

  #edit-modal .admin-edit-form .form-input,
  #edit-modal .admin-edit-form .admin-custom-select__button,
  #edit-modal .admin-edit-form .form-select {
    min-height: 42px;
    padding: 9px 11px;
    font-size: 14px;
  }

  #edit-modal .admin-edit-form .form-textarea {
    min-height: 96px;
    padding: 10px 11px;
  }

  #edit-modal .admin-switch-card {
    min-height: 58px;
    padding: 9px 10px;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: 12px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  .listing-detail__title {
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
  }

  .listing-detail__price {
    font-size: 17px;
  }

  .listing-detail {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .listing-detail__header {
    margin: 14px 0 10px;
  }

  .listing-detail__description,
  .catalog-card-hero__description {
    margin: 17px 0 18px;
  }



  .contact-btn {
    justify-content: center;
  }

  .banner-carousel__controls {
    min-height: 22px;
    padding: 1px 4px;
    gap: 0;
  }

  .banner-carousel__slide::after {
    height: 38%;
  }

  .banner-carousel__dot {
    width: 16px;
    height: 20px;
    cursor: default;
  }
}

@media (max-width: 640px) {
  .admin-catalog-card-search__row {
    grid-template-columns: 1fr;
  }

  .admin-catalog-card-search__row .btn,
  .admin-catalog-card-search__footer .btn {
    width: 100%;
  }

  .favorites-login {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .favorites-login__icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .favorites-login__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .favorites-login__actions .btn {
    width: 100%;
    padding-inline: 10px;
  }

  .home-search {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 2px;
  }

  .header--search .header__inner {
    gap: 8px;
  }

  .header--search .header__logo {
    display: none;
  }

  .header--search .header__cta {
    flex: 0 0 auto;
  }

  .home-search--header {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }

  .home-search--header .home-search__input {
    min-width: 0;
    min-height: 32px;
    padding-inline: 2px;
    font-size: 14px;
  }

  .home-search--header .home-search__submit {
    min-width: 64px;
    min-height: 32px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .home-search__submit {
    width: auto;
  }

  .about__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__inner {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .hero {
    padding: var(--space-lg) 0;
  }

  .hero__title {
    font-size: 22px;
    margin-bottom: var(--space-lg);
  }

  .admin-banner-settings__controls {
    grid-template-columns: 1fr;
  }

  .admin-banner-settings .btn {
    grid-column: auto;
  }

  .categories-large {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .category-card-lg {
    padding: var(--space-lg);
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .category-card-lg::after {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    opacity: 0.5;
  }

  .category-card-lg .category-card__icon {
    width: 32px;
    height: 32px;
  }

  .category-card-lg .category-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
  }

  .categories-small {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .home-categories__track {
    grid-template-rows: repeat(2, minmax(58px, auto));
    grid-auto-columns: 30%;
    gap: var(--space-sm);
  }

  .home-categories--spheres .home-categories__track {
    grid-template-rows: minmax(58px, auto);
  }

  .home-categories__viewport {
    width: calc(100% + var(--space-md));
    max-width: none;
    padding-right: 0;
  }

  .home-categories {
    margin-bottom: 0;
  }

  .home-categories__track .category-card {
    min-height: 58px;
  }

  .home-categories__header {
    align-items: center;
  }

  .home-categories__header h2 {
    font-size: 18px;
  }

  .all-categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
  }

  .categories-page .account-header {
    margin-bottom: var(--space-lg);
  }

  .all-categories-grid .category-card {
    min-height: 104px;
  }

  .category-card {
    padding: 10px 8px;
    gap: 0;
  }

  .category-card__icon {
    display: none;
  }

  .category-card__name {
    font-size: 12px;
  }

  .banner-carousel__track {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
  }

  .favorites-page__grid,
  #account-favorites-list,
  #account-favorite-companies-list,
  #account-favorite-specialists-list,
  .catalog-card-offers__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
  }

  .favorites-tabs.search-results-tabs { width:100%; gap:6px; margin-bottom:16px; }
  .favorites-tabs .search-results-tab { width:100%; min-width:0; padding:9px 6px; font-size:13px; line-height:1.3; }
  .public-detail-actions > [data-detail-action="contacts"], .public-detail-actions > [data-detail-action="booking"] { flex:1 1 112px; }
  .listing-card-favorite,
  .listing-card-favorite .listing-card {
    min-width: 0;
    height: 100%;
  }

  .listing-card__body,
  .profile-card__body {
    gap: 6px;
    padding: 10px;
  }

  .catalog-tile .listing-card__body,
  .profile-card--catalog .profile-card__body {
    gap: 5px;
    padding: 8px 0 0;
  }

  .listing-card__badges {
    gap: 4px;
    min-height: 20px;
  }

  .listing-card__badges .badge {
    height: 20px;
    padding: 0 6px;
    font-size: 9px;
  }

  .listing-card__title,
  .profile-card__title {
    font-size: 13px;
  }

  .listing-card__meta,
  .profile-card__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
  }

  .listing-card__city,
  .profile-card__city,
  .listing-card__date {
    font-size: 11px;
  }

  .listing-card__price {
    font-size: 13px;
  }

  .listing-card__price--model-payment {
    align-items: center;
  }

  .profile-card--published {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 11px;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 17px 0;
  }

  .profile-card--published .profile-card__photo {
    width: 52px;
    height: 52px;
    min-height: 52px;
    border-radius: 10px;
  }

  .profile-card--published .profile-card__body {
    gap: 0;
    padding: 0 33px 0 0;
  }

  .profile-card--published .profile-card__title {
    padding: 0;
    font-size: 14px;
    font-weight: 500;
  }

  .profile-card__eyebrow {
    font-size: 11px;
  }

  .profile-card__published-meta {
    font-size: 12px;
  }

  .listing-card__top-badge {
    top: 8px;
    left: 8px;
    min-height: 26px;
    padding: 0 10px;
    font-size: 10px;
  }

  .listing-card-favorite__btn {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
  }

  .profile-card__rating {
    font-size: 11px;
  }

  .header__cta .btn-text {
    display: none;
  }

  .header__cta .btn-text-short {
    display: inline;
  }

  .header__cta .btn {
    display: none;
  }

  .lang-button {
    padding: 7px 10px;
    font-size: 12px;
  }

  .lang-button__flag {
    width: 18px;
    height: 13px;
  }

  .pagination__btn {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .pagination {
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    padding: 0 2px 4px;
    scrollbar-width: none;
  }

  .pagination::-webkit-scrollbar {
    display: none;
  }

  .gallery__main {
    aspect-ratio: 1 / 1;
    border-radius: 16px;
  }

  .gallery__main--track {
    display: flex;
    gap: 8px;
    aspect-ratio: auto;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gallery__main--track::-webkit-scrollbar {
    display: none;
  }

  .gallery__main--track img,
  .gallery--single .gallery__main--track img {
    width: 100%;
    max-width: none;
    flex: 0 0 100%;
    border-radius: 16px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .gallery__dots {
    bottom: 10px;
    display: flex;
  }

  .listing-detail__title {
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
  }

  .filters-popup__sheet,
  .contacts-modal__sheet {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(86dvh, 720px);
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    transform: translateY(100%);
  }

  .filters-popup.active .filters-popup__sheet,
  .contacts-modal.active .contacts-modal__sheet {
    transform: translateY(0);
  }

  .filters-popup__header,
  .contacts-modal__header,
  .filters-popup__body,
  .contacts-modal__body,
  .filters-popup__footer {
    padding: var(--space-md);
  }

  .filters-popup__footer {
    flex-direction: column-reverse;
  }

  .filters-popup__footer .btn {
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
  }

  .section-header.home-categories__header {
    flex-direction: row;
    align-items: center;
    margin-bottom: 2px;
  }

  .toast {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
    max-width: none;
  }

  .login-card {
    padding: var(--space-lg);
  }

  .account-header {
    flex-direction: column;
  }

  #account-page .account-header {
    flex-direction: row;
  }

  .account-header__actions,
  .account-header__actions .btn,
  .account-toolbar .btn {
    width: 100%;
  }

  .account-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .account-tabs .tab-btn {
    width: 100%;
    flex: initial;
    justify-content: center;
    min-width: 0;
    padding: 11px 6px;
    font-size: 11px;
    white-space: normal;
    overflow: hidden;
    word-break: break-word;
  }

  .account-tabs .tab-btn[data-tab="tab-account-favorites"] {
    display: none;
  }

  .account-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 72px;
    padding: 7px 10px max(7px, env(safe-area-inset-bottom));
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }

  #account-page {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .account-grid {
    grid-template-columns: 1fr;
  }

  .account-search-row {
    grid-template-columns: 1fr;
  }

  .admin-card-change {
    grid-template-columns: 1fr;
  }

  .admin-card-change__values {
    grid-template-columns: 1fr;
  }

  .catalog-card-hero__header {
    display: block;
    margin: 14px 0 10px;
  }

  .catalog-card-hero {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .catalog-card-hero__title {
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
  }

  .catalog-card-hero__subtitle {
    font-size: 14px;
    font-weight: 400;
  }

  .catalog-card-hero__rating {
    font-size: 13px;
  }

  .catalog-card-info .btn,
  .catalog-card-claim .btn {
    width: 100%;
  }

  .catalog-card-actions {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
  }

  .catalog-card-actions .btn {
    width: auto;
    min-width: 0;
  }

  #catalog-card-claim-open,
  .catalog-card-actions a.catalog-card-action-btn {
    grid-column: 1 / -1;
  }

  .catalog-card-hero__rating {
    align-items: center;
  }

  .lightbox__nav {
    display: none;
  }

  .lightbox__stage {
    padding: 70px 16px max(70px, calc(40px + env(safe-area-inset-bottom))) 16px;
  }

  .lightbox__close {
    width: 44px;
    height: 44px;
  }

  .lightbox__close svg {
    width: 24px;
    height: 24px;
  }

  .lightbox__topbar {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .lightbox__counter {
    font-size: 13px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .listings-grid,
  .favorites-page__grid,
  #account-favorites-list,
  #account-favorite-companies-list,
  #account-favorite-specialists-list,
  .catalog-card-offers__grid--listings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .catalog-card-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .catalog-card-photos .catalog-card-photos__item {
    min-width: 0;
    flex: initial;
    border-radius: 18px;
    scroll-snap-align: none;
  }

  .catalog-card-photos__dots {
    display: none;
  }
}

@media (min-width: 1024px) {
  .listings-grid,
  .favorites-page__grid,
  #account-favorites-list,
  #account-favorite-companies-list,
  #account-favorite-specialists-list,
  .catalog-card-offers__grid--listings {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 340px) {
  #admin-dashboard .admin-card__actions {
    grid-template-columns: minmax(0, 1fr);
  }

  #admin-dashboard .admin-card__actions > .form-hint,
  #admin-dashboard .admin-card__actions > .admin-card-action--wide {
    grid-column: 1;
  }
}

@media (max-width: 420px) {
  .localized-content-editor {
    padding: 12px;
  }

  .localized-content-editor__tabs .lang-chip {
    padding-inline: 4px;
    gap: 4px;
    font-size: 12px;
  }

  .publication-type-switch {
    gap: 4px;
    padding: 4px;
  }

  .publication-type-option span {
    min-height: 38px;
    padding: 7px 5px;
    font-size: 12px;
  }

  .guest-publication-access {
    padding: 14px;
  }
}


/* Mobile top header is route-controlled in utils.js. Desktop/tablet stay unchanged. */
@media (max-width: 768px) {
  body > .header.header--search.header--mobile-internal-hidden {
    display: none;
  }
}

/* User navigation: keep the existing <=768px navigation breakpoint. */
@media (max-width: 768px) {
  body.has-mobile-bottom-nav {
    --mobile-nav-bottom: max(19px, env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(54px + var(--mobile-nav-bottom) + 16px);
  }
  body.has-mobile-bottom-nav #account-page { padding-bottom: 0; }
  .account-bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: var(--mobile-nav-bottom, max(19px, env(safe-area-inset-bottom, 0px)));
    width: 84%;
    height: 54px;
    min-height: 0;
    padding: 5px 0;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    border: 0;
    border-radius: 27px;
    background: rgb(255 255 255 / 82%);
    box-shadow: 0 2px 10px rgb(17 17 17 / 6%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(-50%);
    will-change: auto;
    overflow: hidden;
  }
  .account-bottom-nav .account-bottom-nav__item {
    position: relative;
    display: block;
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 22px;
    isolation: isolate;
    background: transparent;
    color: #111111;
    font-size: clamp(8.5px, 2.65vw, 10px);
    line-height: 12px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transform: none;
    -webkit-tap-highlight-color: transparent;
  }
  .account-bottom-nav .account-bottom-nav__item::after {
    content: "";
    position: absolute;
    inset: 0 3px;
    z-index: -1;
    border-radius: 999px;
    pointer-events: none;
    transition: background-color 120ms ease, box-shadow 120ms ease;
  }
  .account-bottom-nav .account-bottom-nav__item:first-child::after { left: 5px; }
  .account-bottom-nav .account-bottom-nav__item:last-child::after { right: 5px; }
  .account-bottom-nav .account-bottom-nav__item svg {
    position: absolute;
    top: 1px;
    left: calc(50% - 12px);
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    stroke-width: 1.8;
  }
  .account-bottom-nav .account-bottom-nav__item span {
    position: absolute;
    top: 27px;
    left: 0;
    width: 100%;
    white-space: nowrap;
    opacity: 1;
  }
  .account-bottom-nav .account-bottom-nav__item--create::before { content: none; }
  .account-bottom-nav .account-bottom-nav__item.active {
    color: #171717;
    font-weight: 600;
  }
  .account-bottom-nav .account-bottom-nav__item.active::after {
    background: rgb(255 255 255 / 48%);
    box-shadow: inset 0 0 0 1px rgb(17 17 17 / 5%), 0 1px 6px rgb(17 17 17 / 9%);
  }
  .account-bottom-nav .account-bottom-nav__item.active svg { color: #e8590c; }
  .account-bottom-nav .account-bottom-nav__item:active::after {
    background: rgb(255 255 255 / 72%);
    box-shadow: inset 0 0 0 1px rgb(17 17 17 / 6%), 0 1px 7px rgb(17 17 17 / 12%);
  }
  .account-bottom-nav .account-bottom-nav__item:focus-visible {
    outline: 2px solid #e8590c;
    outline-offset: -3px;
  }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .account-bottom-nav .account-bottom-nav__item::after { transition: none; }
}


/* Mobile public taxonomy and forms. Desktop keeps its original presentation. */
.catalog-tile__taxonomy--mobile,
.profile-card__published-meta--mobile, .catalog-card-directions-position--ssr { display: none; }
@media (max-width: 768px) {
  body[data-mobile-footer="hidden"] > .footer { display: none; }
  [data-legacy-profile-name],
  .catalog-card-hero__subtitle--legacy,
  .catalog-tile__taxonomy--legacy,
  .profile-card__published-meta--legacy,
  .account-card-category--legacy { display: none !important; }
  .catalog-tile__taxonomy--mobile { display: flex; }
  .profile-card__published-meta--mobile { display: block; }
  .profile-directions-summary {
    min-width: 0;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.45;
    gap: 0;
    align-items: baseline;
  }
  .profile-directions-summary__names {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary, #171717);
  }
  .profile-directions-summary__more {
    margin-inline-start: 6px;
    flex: 0 0 auto;
    white-space: pre;
    color: #737985;
    text-decoration: none;
  }
  .profile-directions-summary__more[hidden] { display: none; }
  .account-card__meta .profile-directions-summary { flex-basis: 100%; }
  .catalog-card-hero { display: flex; flex-direction: column; }
  .catalog-card-hero > * { order: 4; min-width: 0; }
  .catalog-card-hero > .catalog-card-media { order: 0; }
  .catalog-card-hero > .catalog-card-hero__header { order: 1; }
  .catalog-card-hero > .catalog-card-directions-position { order: 2; }
  .catalog-card-hero > .catalog-card-info { order: 3; }
  #catalog-card-directions, .catalog-card-directions--ssr {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    margin: 4px 0 10px;
    padding: 2px 0 4px;
    scrollbar-width: none;
  }
  #catalog-card-directions .lang-chip, .catalog-card-directions--ssr .lang-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    max-width: none;
    border: 1px solid #e4e6ea;
    border-radius: 999px;
    background: #f2f3f5;
    color: #171717;
    padding: 7px 12px;
    font-size: 13px;
    line-height: 18px;
  }
  #catalog-card-directions:focus-visible { outline: 2px solid #e8590c; outline-offset: 2px; }
  .legacy-name-notice { margin: 0 0 12px; }
}
@media (min-width: 769px) { .legacy-name-notice { display: none; } }

@media (max-width: 768px) { .catalog-card-directions-position--ssr { display: block; } }

/* Mobile feed overlays only: detail actions and bottom navigation keep their styles. */
@media (max-width: 768px) {
  .listing-card__photo .listing-card__top-badge,
  .profile-card__photo .listing-card__top-badge {
    top: 8px;
    left: 8px;
    height: 24px;
    min-height: 24px;
    min-width: 44px;
    padding: 0 8px;
    border: 0;
    border-left: 3px solid #fff;
    border-radius: 7px;
    background: #F56600;
    color: #fff;
    box-shadow: none;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    justify-content: center;
  }
  .catalog-tile-favorite__btn,
  .catalog-tile-favorite__btn:hover:not(:disabled),
  .catalog-tile-favorite__btn.active {
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #fff;
    box-shadow: none;
    transform: none;
    transition: none;
  }
  .catalog-tile-favorite__btn svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    stroke-width: 2;
    fill: none;
    transform: translate(2px, -2px);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6));
  }
  .catalog-tile-favorite__btn.active svg { fill: currentColor; }
  .catalog-tile-favorite__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
  }
}
@media (max-width: 768px) {
  .favorites-login__actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .favorites-login__actions .btn {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    min-height: 44px;
  }
}
/* Shared mobile navigation keeps its size when moving between public and cabinet pages. */
@media(max-width:768px){
 body .account-bottom-nav{box-sizing:border-box;left:12px;right:12px;transform:none;width:calc(100% - 24px);max-width:440px;height:54px;min-height:54px;max-height:54px;padding:5px 0;margin-inline:auto;grid-template-columns:repeat(5,minmax(0,1fr))}
 body .account-bottom-nav .account-bottom-nav__item{box-sizing:border-box;height:44px;min-height:44px;max-height:44px;min-width:0;margin:0;padding:0;font-size:10px;line-height:1.3}
}
