/**
 * Телефон в landscape / низкий viewport: держим мобильный UI компактным.
 * Основной mobile breakpoint — max-width 991px (см. mobile-app.css).
 */

@media screen and (max-width: 991px) and (orientation: landscape) {
  /* Шапка: меньше вертикали */
  header#navbar_new .head_line2 {
    min-height: 44px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  header#navbar_new .head_line2 .head_search .navbar__top,
  header#navbar_new .head_line2 .head_search .navbar__top .search,
  header#navbar_new .head_line2 .head_search .navbar__top .search #search-input {
    height: 36px !important;
    min-height: 36px !important;
  }

  /* В landscape достаточно места — полный логотип, не узкий mob-mark */
  header#navbar_new .head_line2 .head_logo #logo {
    display: flex !important;
  }

  header#navbar_new .head_line2 .head_logo #logo-2 {
    display: none !important;
  }

  header#navbar_new .head_line2 .head_logo #logo,
  header#navbar_new .head_line2 .head_logo #logo img {
    max-height: 32px !important;
    width: auto !important;
  }

  /* Баннер на главной (реальный блок — mod-slider, не .mod-banner) */
  #top_content .mod-slider .owl-carousel,
  #top_content .mod-slider .owl-carousel .owl-stage-outer,
  #top_content .mod-slider .owl-carousel .owl-stage,
  #top_content .mod-slider .owl-carousel .owl-item,
  #top_content .mod-slider .item {
    height: min(36vh, 180px) !important;
    min-height: 110px !important;
    max-height: 180px !important;
  }

  #top_content .mod-slider .owl-carousel .owl-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  /* Нижнее меню компактнее */
  nav.mob_menu[data-rs-mob-nav="1"] {
    min-height: 0 !important;
  }

  nav.mob_menu[data-rs-mob-nav="1"] .mob_menu__track {
    padding-top: 6px !important;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0)) !important;
  }

  nav.mob_menu[data-rs-mob-nav="1"] a {
    font-size: 11px !important;
    gap: 2px !important;
  }

  nav.mob_menu[data-rs-mob-nav="1"] a img,
  nav.mob_menu[data-rs-mob-nav="1"] a .mob-menu-icon {
    height: 18px !important;
    width: 18px !important;
  }

  /* PDP: боковая карточка цены — обычный поток, без десктопного sticky */
  body.rs-is-pdp .bx-catalog-element .sticky-side-price.pdp-side-card {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.rs-is-pdp .pdp-desktop-sticky-bar {
    display: none !important;
  }
}

@media screen and (max-width: 991px) and (orientation: landscape) and (max-height: 430px) {
  #top_content .mod-slider .owl-carousel,
  #top_content .mod-slider .owl-carousel .owl-stage-outer,
  #top_content .mod-slider .owl-carousel .owl-stage,
  #top_content .mod-slider .owl-carousel .owl-item,
  #top_content .mod-slider .item {
    height: min(32vh, 150px) !important;
    max-height: 150px !important;
  }

  header#navbar_new .head_line2 {
    min-height: 40px !important;
  }
}
