
@media screen and (max-width: 960px) {

  /* КП и Корзина — отступ заголовка от таблицы */
  .page-commercial-offer h1.page-title,
  .page-cart h1.page-title {
    margin-bottom: 15px !important;
  }

  body aside,
  body #content,
  #top-area .column,
  #footer-area .column{
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    clear: both;
  }

  #footer,
  #page-wrap,
  #footer_wrapper{
    padding: 0 15px;
  }

  .top_left, .top_right{
    float: none;
    width: 100%;
    display: block;
    overflow: hidden;
    text-align: center;
  }

  #logo,
  #site-title{
    display: inline-block;
    text-align: center;
    float: none;
    vertical-align: top;
  }

  .top_right .region-search{ float: none; }

  .social-icons{
    width: 100%;
    margin: 10px 0;
    text-align: center;
  }
  
    #block-site-categories {
    display: block;
  }
  #block-site-categories .categories-block .list > .item-list > ul {
    grid-template-columns: repeat(3, 1fr);
  }

  #block-tb-megamenu-menu-catalog {
    display: none;
	}

  #products_list_mobile td{
    display:block;
    width:100%;
	border: none;
    border-bottom: 1px solid #ddd;
  }
  
  #block-system-main .term_page {
    display: block;
}

  #block-system-main {
    font-size: 16px;
}
	#block-system-main .catalog_filters {
	width: 100%;
    display: block;
	}
	
#block-system-main .sku-m {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 6px;
    margin-top: -15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-bottom: none;
    background-color: #f1f1f1;
}

ul.views-fluid-grid-items-width-250 li.views-fluid-grid-item {
    width: 100%;
}

#product-display .h_mob {border: 1px solid #ddd; background-color: #f1f1f1; padding: 6px 10px; text-align: center; border-bottom:none; display: block;}
#product-display .h_mob_m {border: 1px solid #ddd; background-color: #f1f1f1; padding: 6px 10px; text-align: center; border-bottom:none; display: block;}
#product-display .h_mob_td {display: block; padding: 6px 10px;}
#product-display .h_mob_td_dm {border-bottom: 1px solid #ddd; padding: 6px 10px; min-height:40px; display: block;}
#product-display .h_mob_td_d {display:none;}
#product-display .attributes_mob {border: 1px solid #ddd; margin-bottom: 15px; border-bottom: none;}
#product-display .s_mob	{display: flex; float: left; padding-right: 5px;}
#product-display .product-attributes {display:none;}
#product-display .block_st_mob {display:flex; flex-wrap:wrap; border: 1px solid #ddd; border-bottom: none; margin-bottom: 15px;}
#product-display .st_mob {width:50%;}
#product-display .st_mob_td {border-bottom: 1px solid #ddd; padding: 6px 10px; text-align:center;}
#product-display .field-name-field-product-stock-size,.field-name-field-stock-p,.field-name-field-stock-de {display: contents;}

#product-display .artс {display:none;}
#product-display .product-stock {display:none;}
#product_tarifs_by_count table {border-bottom: none;}
#product_tarifs_by_count .t_title_m {background-color: #f1f1f1;}
#product_tarifs_by_count .t_title_ {background-color: #f1f1f1;}
	
#product-display .b1 {width: 100%;padding:0;}
#product-display .main-product-image {
    border-radius: 0 0 3px 3px;
}

#product-display .fb {width: 100%; font-size: 16px; margin: 0;}
#product_tarifs_by_count tr {display: block;width: 50%;float: left;padding: 0;margin: 0; border-bottom:none;}
#product_tarifs_by_count td {display: block;width: 100%;background-color: #fff;border-bottom: 1px solid #ddd;
    border-left: none;
    border-right: none;
    border-top: none;}
  /* На мобильном скрываем десктопные элементы шапки */
  .header-actions { display: none !important; }
  .header-search-wrap { display: none !important; }
  .site_header .header { display: none !important; }

  /* Высота center-inner = высота мобильной шапки */
  .site_header .center .center-inner {
    height: 60px !important;
    padding: 0 !important;
  }

  /* Sticky шапка */
  #header {
    position: sticky;
    top: 0;
    z-index: 996;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  /* Шапка: одна компактная строка */
  #block-aaa-site-header .container {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 120px 0 10px !important;
    min-height: 60px;
  }

  /* Скрыть правый блок (телефон/корзина/избранное) — заменяем иконками */
  #block-aaa-site-header .center .right {
    display: none !important;
  }

  #block-aaa-site-header .logo {
    padding: 5px 0 0 10px !important;
    flex-shrink: 0;
    max-width: 85%;
  }


  /* Иконка поиска — фиксированная, левее бургера */
  .search-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    right: 60px;
    width: 48px;
    height: 60px;
    cursor: pointer;
    z-index: 1001;
    background: transparent;
    text-decoration: none;
    color: #555;
  }
  .search-icon-btn svg { display: block; }

  .mobile-profile-btn,
  .mobile-phone-btn {
    display: none;
  }

  /* Выпадающая панель поиска — под sticky шапкой */
  #mobile-search-bar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 994;
    background: #f7f7f7;
    padding: 8px 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  }
  #mobile-search-bar .header-search-form-wrap {
    width: 100%;
    position: relative;
  }
  #mobile-search-bar .header-search-icon {
    display: none;
  }
  #mobile-search-bar .views-exposed-form {
    display: flex;
  }
  #mobile-search-bar .views-exposed-widget {
    padding: 0 !important;
    float: left;
  }
  #mobile-search-bar #edit-search-wrapper {
    flex: 1;
	width: 85%;
  }
  #mobile-search-bar .form-text {
    width: 100%;
    height: 40px;
    font-size: 15px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
    border-right: none;
    margin: 0;
  }
  #mobile-search-bar .views-submit-button {
    flex-shrink: 0;
	width: 15%;
  }
  #mobile-search-bar .form-submit {
    height: 40px;
    padding: 0 15px;
    background: #289DCC;
    color: #fff;
    border: none;
    border-radius: 0 3px 3px 0;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
  }

  /* Убрать визуальную полосу меню-бара */
  #header_wrapper .menu-wrap {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #header_wrapper .full-wrap {
    height: 0;
    overflow: visible;
  }

  #main-menu {
    height: 0 !important;
    overflow: visible !important;
  }
#products_list_mobile .roduct_colors_links {display: flex;flex-wrap: wrap;justify-content: center;}
#container {padding:0;}
#breadcrumbs .breadcrumb {margin-top: 10px; padding-bottom:5px; border-bottom: #ddd 1px solid; font-size: 15px;}
#page-wrap {font-family: 'Roboto Condensed', sans-serif;}
#post-content .page-title {line-height: 28px; font-size: 24px; text-align: center; padding-top:10px;}
#post-content h1.page-title {margin:0;}
#block-system-main .catalog-page .items > .item-list > ul > li {width: 50%;}

  /* === Мобильный bottom bar === */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 997;
    height: 56px;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.07);
    align-items: stretch;
  }
  body {
    padding-bottom: 56px;
  }
  .mobile-bottom-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #555;
    font-size: 11px;
    background: none;
    border: none;
    padding: 6px 4px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    border-right: 1px solid #e8e8e8;
  }
  .mobile-bottom-btn:last-child {
    border-right: none;
  }
  .mobile-bottom-btn svg {
    display: block;
    color: #555;
  }
  .mobile-bottom-btn:hover,
  .mobile-bottom-btn:active {
    color: #289dcc;
    background: #f5fbff;
  }
  .mobile-bottom-btn:hover svg,
  .mobile-bottom-btn:active svg {
    color: #289dcc;
  }
  .mobile-bottom-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    background: #289dcc;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
  }
  /* Переключатель языка в бургер-меню */
  .mobile-menu-lang {
    padding: 16px 16px;
    border-top: 1px solid #e8e8e8;
  }
  .mobile-menu-lang .language-switcher-locale-url {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
  }
  .mobile-menu-lang .language-switcher-locale-url li {
    margin: 0;
    padding: 0;
  }
  .mobile-menu-lang .language-switcher-locale-url li a,
  .mobile-menu-lang .language-switcher-locale-url li.active span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #aaa;
  }
  .mobile-menu-lang .language-switcher-locale-url li.active span {
    background: #289dcc;
    border-color: #289dcc;
    color: #fff;
  }

}

@media screen and (max-width: 768px) {

  /* КП — горизонтальный скролл только таблицы */
  .kp-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
  }

  /* Корзина — горизонтальный скролл только таблицы */
  .cart > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
  }

}

@media screen and (max-width: 640px) {

  .footer_credit p {
    width: 100%;
    text-align: center;
  }

  .social-icons {
    margin: 10px 0 0 0;
  }

  #block-site-categories {
    display: block;
  }
  #block-site-categories .categories-block .list > .item-list > ul {
    grid-template-columns: repeat(2, 1fr);
  }

  #block-tb-megamenu-menu-catalog {
    display: none;
  }

  #products_list_mobile td {
    display: block;
    width: 100%;
  }

.views-exposed-widgets {
    margin-bottom: .5em;
    width: 100%;
}

  /* Блок новостей — 2 колонки на мобильных */
  #block-views-view-block-news-block .views-fluid-grid-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #block-views-view-block-news-block .views-fluid-grid-item {
    height: 180px;
  }

}
@media screen and (max-width: 768px) {

  /* Личный кабинет — вертикальный layout на мобиле */
  body.page-user #post-content {
    flex-direction: column;
    gap: 16px;
  }

  body.page-user .tabs-wrapper {
    width: 100%;
  }

  body.page-user .region-content {
    width: 100%;
  }

}
