/*
 * Адаптивная вёрстка витрины.
 *   от 1024px      — десктоп как раньше (этот файл ничего не меняет);
 *   640–1023px     — планшет: шапка в одну строку, каталог в шторке, товары по 2 в ряд;
 *   до 639px       — телефон: одна колонка, товары строками, липкая кнопка «В корзину».
 * Разметка шапки и шторки — в layouts.layout.liquid (.m-bar, .m-drawer-*), поведение — в mobile.js.
 */

/* кружок Telegram в шапке (десктоп — справа от телефона, телефон — между логотипом и поиском) */
.tg-head {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 34px; height: 34px; margin-left: 12px; border-radius: 50%;
  background: #2aabee; color: #fff; transition: background .15s;
}
.tg-head svg { width: 18px; height: 18px; fill: #fff; margin-left: -2px; }
a.tg-head:hover, .m-bar-tg:hover .tg-head { background: #1e96d4; }
.tg-head:focus-visible, .m-bar-tg:focus-visible { outline: 2px solid #2aabee; outline-offset: 2px; }

.m-contacts,
.m-bar,
.m-drawer-top,
.m-drawer-extra,
.m-overlay,
.m-buybar,
.m-acc-head {
  display: none;
}

@media (max-width: 1023px) {

  /* ---------- каркас ---------- */
  html, body { min-width: 0 !important; }
  body { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
  .wrap { width: auto; max-width: 100%; }
  #layout img { max-width: 100%; height: auto; }
  footer img { max-width: 100%; }
  #main { margin-top: 0; padding: 16px 16px 0; }
  #layout { float: none; width: auto; }
  #layout > div { margin-bottom: 40px; }
  #layout iframe { max-width: 100%; }
  #layout iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  /* таблицы из редактора не должны распирать страницу */
  #layout table { max-width: 100%; }
  .m-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #layout td[style*="font-size: 32px"], #layout td[style*="font-size:32px"] { font-size: 24px !important; padding: 8px !important; }
  #layout [style*="width:930px"], #layout [style*="width: 930px"],
  #layout [style*="width:1200px"], #layout [style*="width: 1200px"],
  #layout [style*="width:927px"], #layout [style*="width: 927px"] {
    width: auto !important; max-width: 100% !important;
  }
  #layout [style*="margin-left:-270px"], #layout [style*="margin-left: -270px"] { margin-left: 0 !important; }
  .category-narrow, .category-wide { width: auto !important; margin-left: 0 !important; }
  .category-desc { margin-left: 0 !important; margin-right: 0 !important; }
  #breadcrumbs { margin-bottom: 20px; padding: 10px 0; font-size: 14px; }
  h1.title, #layout h1 { font-size: 26px; line-height: 1.15; }

  /* ---------- шапка: одна строка ---------- */
  header { height: auto; position: sticky; top: 0; z-index: 900; }
  header > .row { display: none; }
  .m-bar {
    display: flex; align-items: center; gap: 2px;
    background: #fff; border-bottom: 3px solid #ff6602;
    padding: 6px 6px;
  }
  .m-bar-logo { flex: 1 1 auto; min-width: 0; display: flex; justify-content: center; }
  .m-bar-logo img { height: auto; width: auto; max-height: 30px; max-width: 100%; }
  .m-bar-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 44px; padding: 0 4px; flex: 0 0 auto;
    border: 0; background: none; color: #1b1b1b; cursor: pointer; border-radius: 8px;
  }
  .m-bar-btn:focus-visible { outline: 2px solid #ff6602; outline-offset: 1px; }
  .m-bar-btn svg, .m-search svg, .m-drawer-close svg {
    width: 24px; height: 24px; fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  }
  .m-bar-btn svg { flex: 0 0 auto; }
  .m-bar-cart:hover { color: #1b1b1b; }
  .m-bar-sum:empty { display: none; }
  .m-bar-sum {
    margin-left: 4px; background: #ff6602; color: #fff; border-radius: 10px;
    font-size: 13px; font-weight: 700; line-height: 20px; padding: 0 7px; white-space: nowrap;
  }

  /* ---------- шторка каталога (это бывший #sidebar) ---------- */
  #sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1001;
    float: none; width: min(340px, 88vw); margin: 0; padding: 0 0 24px;
    border-right: 0; background: #fff; overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-105%); transition: transform .25s ease, visibility 0s .25s;
    visibility: hidden;
  }
  body.m-nav-open #sidebar {
    transform: none; visibility: visible; transition: transform .25s ease;
    box-shadow: 0 0 30px rgba(0, 0, 0, .25);
  }
  body.m-nav-open { overflow: hidden; }
  .m-overlay {
    display: block; position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  body.m-nav-open .m-overlay { opacity: 1; pointer-events: auto; }

  .m-drawer-top {
    display: flex; align-items: center; gap: 6px;
    position: sticky; top: 0; z-index: 2; background: #fff;
    padding: 10px 8px 10px 14px; border-bottom: 1px solid #ececec; margin-bottom: 14px;
  }
  .m-search {
    flex: 1; display: flex; align-items: center;
    border: 1.5px solid #ff6602; border-radius: 8px; padding: 0 4px 0 10px;
  }
  .m-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: none;
    font: inherit; font-size: 16px; height: 40px; margin: 0; padding: 0;
  }
  .m-search button, .m-drawer-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 0; background: none; color: #ff6602; cursor: pointer; padding: 0;
  }
  .m-drawer-close { color: #1b1b1b; width: 44px; height: 44px; }

  #sidebar > ul, #sidebar > div { margin-bottom: 18px; }
  #sidebar .catalog-nav { padding: 0 14px; }
  #sidebar .catalog-nav li { margin-bottom: 4px !important; margin-top: 0 !important; }
  #sidebar .catalog-nav-li { display: flex; align-items: center; min-height: 44px; }
  #sidebar .catalog-nav-li img { width: 42px; height: auto; margin-right: 10px; }
  #sidebar .catalog-nav li a[style] { margin-left: 52px !important; display: block; padding: 7px 0; }
  #sidebar .catalog-nav a.title { flex: 1; padding: 8px 0; margin: 0; }
  body.m-nav-open #e4-msg { display: none; }
  #sidebar .seporator { margin: 6px 14px 10px; }
  #sidebar .information li { margin-left: 52px; }
  #sidebar > .title { padding: 0 14px; }
  #sidebar #characteristics { display: none; } /* фильтр каталога в шторке не нужен */

  .m-drawer-extra { display: block; padding: 6px 14px 0; border-top: 1px solid #ececec; }
  .m-drawer-links { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .m-drawer-links a { display: block; padding: 8px 0; color: #1b1b1b; }
  .m-drawer-contacts { margin-top: 8px; padding: 12px 14px; background: #fafafa; border-radius: 8px; font-size: 14px; color: #555; }
  .m-drawer-phone { display: block; font-size: 20px; font-weight: 700; color: #1b1b1b; margin-bottom: 2px; }

  /* ---------- подвал ---------- */
  footer .line { padding: 32px 16px 24px; }
  footer .container, footer .container:last-child {
    float: none; display: inline-block; vertical-align: top;
    width: calc(50% - 12px); margin: 0 0 28px; position: static;
  }
  footer .container:nth-child(odd) { margin-right: 20px; }
  footer .container .title { margin-bottom: 12px; }
  footer .container .content { font-size: 15px; }
  footer .container .content li { margin-bottom: 6px; }
  footer .socials.fr { width: auto !important; }

  /* ---------- главная ---------- */
  .index #articles, .index #news { float: none; width: auto; padding: 20px; margin-bottom: 20px; }
  .index .article[style*="height"] { height: auto !important; margin-bottom: 16px; }
  .index #follow_us { padding: 20px; display: block; }
  .slide { padding-left: 0; }
  .slide .owl-carousel, .control, .slide.not { width: 100% !important; }
  .slide.not .owl-item:first-child { margin-left: 0; }

  /* ---------- категория: 2–3 в ряд ---------- */
  .collection .row:has(> [itemprop="itemListElement"]),
  .search .row:has(> [itemprop="itemListElement"]) {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px;
  }
  .collection .row:has(> [itemprop="itemListElement"])::after,
  .search .row:has(> [itemprop="itemListElement"])::after { display: none; }
  .collection .box_item, .search .box_item {
    float: none; width: auto; height: 100%; margin: 0 !important; box-sizing: border-box;
  }
  .box_item .preview { width: auto; }
  .box_item .description { padding: 14px; }
  .box_item .description > div[style*="height"] { height: auto !important; min-height: 44px; }
  .box_item .prices:after { content: ""; display: block; clear: both; }
  .category .panel { margin-bottom: 20px; }
  .category .panel #sort_by, .category .panel .pagination { float: none; }

  .m-bar-tg .tg-head { margin: 0; width: 32px; height: 32px; }
  .m-bar-tg .tg-head svg { width: 17px; height: 17px; }
  .m-bar-btn.m-bar-tg, .m-bar-btn.m-bar-call { min-width: 36px; padding: 0 2px; }

  /* кружок телефона и меню контактов под шапкой */
  .call-head {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; background: #ff6602; transition: background .15s;
  }
  .m-bar-btn .call-head svg { width: 17px; height: 17px; fill: #fff; stroke: none; }
  .m-bar-call[aria-expanded="true"] .call-head { background: #1b1b1b; }
  .m-contacts:not([hidden]) {
    display: block; position: absolute; top: 100%; left: 8px; right: 8px; z-index: 5;
    margin-top: 6px; padding: 6px 0; background: #fff; border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22); animation: m-drop .18s ease-out;
  }
  @keyframes m-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .m-contacts-phone, .m-contacts-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; color: #1b1b1b; }
  .m-contacts-phone { border-bottom: 1px solid #ececec; text-decoration: none !important; }
  .m-contacts-phone:hover { color: #1b1b1b; }
  .m-contacts-phone b { display: block; font-size: 22px; line-height: 1.2; color: #ff6602; }
  .m-contacts-hint { display: block; font-size: 13px; color: #888; margin-top: 2px; }
  .m-contacts-phone.is-copied .m-contacts-hint { color: #2f8a3a; font-weight: 600; }
  .m-contacts-row + .m-contacts-row { border-top: 1px solid #f3f3f3; }
  .m-contacts-ico { flex: 0 0 auto; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
  .m-contacts-ico svg { width: 22px; height: 22px; fill: none; stroke: #ff6602; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .m-contacts-phone .m-contacts-ico svg { fill: #ff6602; stroke: none; }
  .m-contacts-row > div { font-size: 15px; line-height: 1.45; min-width: 0; }
  .m-contacts-addr p { margin: 0; }
  .m-contacts-addr a { color: #1b1b1b; text-decoration: underline; }

  /* ---------- корзина: планшет — та же таблица, только уже ---------- */
  .cart-item-comment { width: 100%; margin-left: 0; box-sizing: border-box; }
  .cart-item-comment-title { margin-left: 0; }
  #cartform .cart-table { margin-bottom: 40px; }
  #cartform .cart-img { width: 110px; }
  #cartform .cart-title { padding-left: 16px; }
  #cartform .cart-del, #cartform .send-but-wrapper { width: auto; }
  .cart-empty { margin-bottom: 40px !important; }

  /* ---------- товар ---------- */
  .product-content .gallery { float: none; width: auto; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
  .gallery .product-big-foto { width: auto; flex: 0 0 100%; margin: 0; box-sizing: border-box; }
  .gallery .product-big-foto img { width: 100%; height: auto; }
  .gallery .preview-list { display: contents !important; }
  .gallery .preview-list li { flex: 0 0 calc((100% - 30px) / 6); margin: 0 !important; box-sizing: border-box; }
  .gallery .preview-list li img { width: 100%; height: auto; }
  .product-info { float: none; width: auto; margin: 0; }
  .product-info .available, .product-info .sku-wrapper, .product-info .variants { margin-bottom: 16px; }
  .product-info #order { margin-bottom: 24px; }
  .product-info .variants { float: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; width: 100%; }
  .product-info .variants .selector-wrapper { margin: 0; min-width: 0; }
  .product-info .select_wrap { width: 100% !important; box-sizing: border-box; }
  .product-info .soc_like { display: none; }
  .product-info .price { font-size: 26px; margin: 8px 0 14px; }
  .product-info .buy { padding: 10px 26px; font-size: 18px; }
  .properties table { width: 100%; }
  .properties td[style] { padding-left: 12px !important; }
  .tubs .controls .tub { font-size: 18px; padding: 1px 8px 6px; }

  /* совместимые товары: лента вместо сетки по 6 */
  .m-hscroll-wrap { margin-bottom: 32px !important; }
  .m-hscroll {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .m-hscroll .box_item { float: none; flex: 0 0 146px; margin: 0 !important; scroll-snap-align: start; }
  .m-hscroll .box_item img { width: 100%; height: auto; }
}

/* ======================= телефон ======================= */
@media (max-width: 639px) {
  #main { padding: 12px 12px 0; }
  h1.title, #layout h1 { font-size: 22px; }
  h2.title, #layout h2 { font-size: 19px; line-height: 1.2; }

  footer .container, footer .container:last-child { display: block; width: auto; margin-right: 0 !important; }

  /* категория: товар строкой — фото слева, характеристики справа */
  .collection .row:has(> [itemprop="itemListElement"]),
  .search .row:has(> [itemprop="itemListElement"]) { grid-template-columns: 1fr; gap: 0; }
  .collection .box_item, .search .box_item {
    display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px;
    border: 0; border-bottom: 1px solid #ececec; border-radius: 0; padding: 12px 0;
  }
  .collection .box_item:hover, .search .box_item:hover { border-color: #ececec; }
  .collection .box_item .preview img, .search .box_item .preview img { border-radius: 6px; }
  .collection .box_item .description, .search .box_item .description { padding: 0; }
  .box_item .description > div[style*="height"] { min-height: 0; margin-bottom: 4px; }
  .box_item .description .name { margin-bottom: 4px; font-weight: 600; font-size: 15px; line-height: 1.25; }
  .box_item .description table { margin-bottom: 6px !important; font-size: 13px; }
  .box_item .description table td { padding: 1px 0; line-height: 1.25; }
  .box_item .paramName { font-size: 12px; }
  .box_item .prices { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .box_item .prices .price { font-size: 18px; }
  .box_item .prices .button { padding: 4px 12px; font-size: 14px; }

  /* товар */
  #disqus_recommendations { display: none; }
  .tubs.m-acc .description > br { display: none; }
  .gallery .preview-list li { flex-basis: calc((100% - 18px) / 4); }
  .product-info .variants { grid-template-columns: 1fr; }

  /* описание товара складными блоками (собирает mobile.js) */
  .tubs.m-acc .controls { display: none; }
  .tubs.m-acc .content > div { display: block; }
  .m-acc-head {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 4px; margin: 0; border: 0; border-bottom: 1px solid #ececec; background: none;
    font: inherit; font-size: 17px; font-weight: 700; color: #1b1b1b; text-align: left; cursor: pointer;
  }
  .m-acc-head::after {
    content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-right: 4px;
    border-right: 2px solid #ff6602; border-bottom: 2px solid #ff6602;
    transform: rotate(45deg) translateY(-3px); transition: transform .2s;
  }
  .m-acc-head[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -1px); }
  .m-acc-head.m-acc-top { font-size: 19px; text-transform: uppercase; border-bottom: 2px solid #1b1b1b; }
  .m-acc-body { padding: 10px 4px 6px; }
  .m-acc-body[hidden] { display: none !important; }

  /* липкая панель покупки */
  .m-buybar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid #ececec; box-shadow: 0 -6px 16px rgba(0, 0, 0, .08);
    transform: translateY(110%); transition: transform .2s ease;
  }
  .m-buybar.is-shown { transform: none; }
  .m-buybar-price { flex: 1; font-size: 20px; font-weight: 700; white-space: nowrap; }
  .m-buybar .button { padding: 10px 22px; font-size: 17px; }
  body.m-has-buybar footer { padding-bottom: 90px; }
  body.m-buybar-on #e4-msg { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transition: bottom .2s; }
}

/* ======================= корзина на телефоне: карточки вместо таблицы ======================= */
@media (max-width: 767px) {
  #cartform .cart-table, #cartform .cart-table > tbody, #cartform .cart-table > tfoot { display: block; width: 100%; }
  #cartform .cart-table tr, #cartform .cart-table td { display: block; padding: 0; border: 0; width: auto; text-align: left; }
  #cartform .cart-table td[colspan] { width: auto; }

  /* строка товара: фото | название, количество, сумма | крестик */
  #cartform tr.table-separated {
    display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas:
      "img title del" "img qty sum";
    gap: 6px 12px; align-items: center;
    padding: 16px 0 8px; border-top: 1px solid #ececec;
  }
  #cartform tr.table-separated:first-child { border-top: 0; padding-top: 4px; }
  #cartform tr.table-separated .cart-img { grid-area: img; align-self: start; width: auto; }
  #cartform .cart-img .image { border-width: 1px; border-radius: 6px; overflow: hidden; }
  #cartform .cart-img img { display: block; width: 100%; height: auto; }
  #cartform tr.table-separated .cart-title { grid-area: title; padding: 0; font-weight: 600; line-height: 1.3; }
  #cartform .cart-title a { color: #1b1b1b; }
  #cartform .cart-title span { font-weight: 400; font-size: 13px; color: #888; margin-top: 2px; }
  #cartform tr.table-separated .cart-quantity { grid-area: qty; width: auto; padding: 0; }
  #cartform tr.table-separated .cart-total-price { grid-area: sum; width: auto; padding: 0; text-align: right; font-size: 18px; white-space: nowrap; }
  #cartform tr.table-separated .cart-del { grid-area: del; align-self: start; width: auto; padding: 0; }
  #cartform .cart-del a {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: -8px -8px 0 0; font-size: 18px; color: #999;
  }
  #cartform .cart-del a:hover { color: #ff6602; }
  #cartform .cart-del a.m-del-ask {
    width: auto; height: 32px; margin: -4px 0 0; padding: 0 12px; gap: 6px;
    background: #d72e31; color: #fff; border-radius: 16px; font-size: 14px; font-weight: 700; white-space: nowrap;
  }
  #cartform .cart-del a.m-del-ask::after { content: "\0423\0434\0430\043b\0438\0442\044c?"; /* «Удалить?» */ }
  #cartform .cart-del a.m-del-busy { opacity: .5; }
  /* удалённый товар уезжает влево и гаснет, место под ним плавно схлопывается (mobile.js) */
  #cartform tr.m-row-leaving { transition: transform .3s ease-in, opacity .3s ease-in; }
  #cartform .m-row-out { display: block; overflow: hidden; transition: height .28s ease; }
  #cartform .cart-quantity .select_wrap { width: 72px !important; height: 38px; box-sizing: border-box; margin: 0; }
  #cartform .cart-quantity .select_wrap { padding-top: 0; padding-bottom: 0; }
  #cartform .cart-quantity .select_wrap .select { top: 0; bottom: 0; line-height: 34px; }
  #cartform .cart-quantity select.count { font-size: 16px; height: 38px; }

  /* комментарий к позиции — компактно под товаром */
  #cartform tr.table-separated + tr { padding: 0 0 14px 96px; }
  #cartform .cart-item-comment-title { font-size: 13px; color: #888; margin: 0 0 2px; }
  #cartform .cart-item-comment { font-size: 16px; height: 38px; padding: 6px 10px; border: 1px solid #ddd; border-radius: 6px; }

  /* скидки */
  #cartform .product-meta, #cartform .discount-price { display: inline-block !important; }
  #cartform .discount-price { float: right; }

  /* низ: купон, итого, кнопка */
  #cartform .cart-table tfoot tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas:
      "kupon kupon" "label total" "send send";
    gap: 10px 12px; align-items: center; padding-top: 16px; border-top: 2px solid #1b1b1b;
  }
  #cartform .cart-table tfoot td.basket-kupon { grid-area: kupon; border: 0; display: flex; flex-wrap: wrap; gap: 6px; }
  #cartform .basket-kupon label { flex: 0 0 100%; margin: 0; font-size: 14px; color: #888; }
  #cartform .basket-kupon input[type="text"] { flex: 1; min-width: 0; height: 42px; font-size: 16px; box-sizing: border-box; margin: 0; padding: 0 10px; border: 1px solid #ddd; border-radius: 6px; }
  #cartform .basket-kupon .button { flex: 0 0 auto; height: 42px; margin: 0; padding: 0 16px; }
  #cartform .basket-kupon .invalid { flex: 0 0 100%; margin: 0; }
  #cartform tfoot .itogo-title { grid-area: label; width: auto; padding: 0; text-align: left; font-size: 18px; }
  #cartform tfoot td:has(> #total_price) { grid-area: total; }
  #cartform .total_amount { width: auto; padding: 0; font-size: 24px; white-space: nowrap; }
  #cartform tfoot .send-but-wrapper { grid-area: send; width: auto; text-align: left; }
  #cartform .send-but { display: block; width: 100%; padding: 12px; font-size: 18px; }

  /* «популярное» под корзиной: вместо карусели на 3 карточки — лента (mobile.js снимает карусель) */
  #layout .popular .slide .control { display: none; }
  #layout .popular .m-hscroll > div { flex: 0 0 180px; scroll-snap-align: start; }
  #layout .popular .m-hscroll .box_item { float: none; width: auto; height: 100%; margin: 0 !important; box-sizing: border-box; }
  #layout .popular .m-hscroll .box_item .preview { width: auto; }
  #layout .popular .m-hscroll .box_item .description { padding: 10px; }
  #layout .popular .m-hscroll .box_item table { display: none; }
}
@media (max-width: 639px) {
  #cartform tr.table-separated { grid-template-columns: 72px minmax(0, 1fr) auto; }
  #cartform tr.table-separated + tr { padding-left: 84px; }
}

/* ======================= добавление в корзину на телефоне ======================= */
@media (max-width: 767px) {
  /* окно «Товар добавлен в корзину» заменено анимацией и плашкой (mobile.js) */
  #shadow_window, #form_popup { display: none !important; }

  .m-fly {
    position: fixed; z-index: 10002; pointer-events: none;
    border-radius: 50%; background: #fff center / cover no-repeat;
    border: 3px solid #ff6602; box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  }
  .m-cart-bump svg, .m-cart-bump .m-bar-sum { animation: m-bump .5s cubic-bezier(.3, 1.6, .5, 1); }
  @keyframes m-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

  .m-toast {
    position: fixed; left: 12px; right: 12px; z-index: 950;
    top: calc(66px + env(safe-area-inset-top, 0px));
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 10px;
    background: #1b1b1b; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    transform: translateY(-20px); opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  .m-toast.is-shown { transform: none; opacity: 1; pointer-events: auto; }
  .m-toast-ok {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: #2f8a3a; position: relative;
  }
  .m-toast-ok::after {
    content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
  }
  .m-toast-text { flex: 1; font-weight: 700; line-height: 1.25; }
  .m-toast-text small { display: block; font-weight: 400; font-size: 13px; color: #c9c9c9; }
  .m-toast-link {
    flex: 0 0 auto; color: #1b1b1b !important; background: #febd22; border-radius: 6px;
    padding: 8px 12px; font-weight: 700; text-decoration: none !important;
  }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .m-cart-bump svg, .m-cart-bump .m-bar-sum { animation: none; }
  .m-toast { transition: none; }
}

/* шире телефона подзаголовки описания — обычные заголовки, ничего не сворачивается */
@media (min-width: 640px) {
  .tubs.m-acc .m-acc-head:not(.m-acc-top) {
    display: block; width: 100%; margin: 1em 0 .5em; padding: 0; border: 0; background: none;
    font: inherit; font-weight: 700; color: inherit; text-align: left; cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sidebar, .m-overlay, .m-buybar, .m-acc-head::after { transition: none !important; }
}
