/* STARTER+ v9: tablet layouts and exact toolbar alignment. */
@media (min-width:768px) and (max-width:1199px) {
  html.sp-view-table .sp-catalog .sp-catalog-products {overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
  html.sp-view-table .sp-catalog .sp-catalog-products .table-responsive {overflow:visible!important;max-width:100%!important}
  html.sp-view-table .sp-catalog .sp-product-table,html.sp-view-table .sp-catalog .sp-product-table tbody {display:block!important;width:100%!important;min-width:0!important}
  html.sp-view-table .sp-catalog .sp-product-table thead {display:none!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody tr {display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:5px 10px!important;padding:13px!important;margin-bottom:10px!important;border:1px solid #e1e8f2!important;border-radius:12px!important;background:#fff!important;min-width:0!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td {display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:5px 0!important;border:0!important;white-space:normal!important;text-align:left!important;overflow-wrap:anywhere!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td:before {display:none!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-product-cell {grid-column:1/7!important;grid-row:1!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-number-cell {grid-column:7/10!important;grid-row:1!important;align-self:center!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-description-cell {grid-column:10/13!important;grid-row:1!important;align-self:center!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-brand-cell {grid-column:1/5!important;grid-row:2!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-stock-cell {grid-column:5/9!important;grid-row:2!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-price-cell {grid-column:9/13!important;grid-row:2!important;text-align:right!important;font-weight:800!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell {grid-column:1/13!important;grid-row:3!important;padding-top:10px!important;border-top:1px solid #e8edf4!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-retail-cell {grid-column:1/13!important;grid-row:4!important;text-align:right!important}
  html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-retail-cell:before {content:'Розничная: '!important;display:inline!important}
  html.sp-view-table .sp-catalog .sp-product-table .sp-livecart {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,2fr)!important;gap:8px!important;width:100%!important}
  html.sp-view-table .sp-catalog .sp-product-table .sp-qty-control {width:100%!important;min-width:0!important;justify-content:space-between!important}
  html.sp-view-table .sp-catalog .sp-product-table .sp-live-count {flex:1 1 auto!important;min-width:0!important}
  html.sp-view-table .sp-catalog .sp-product-table .sp-cart-status {width:100%!important;min-width:0!important;max-width:none!important;flex:1 1 auto!important;white-space:normal!important}
  html.sp-view-table .sp-catalog .sp-product-table .sp-product-cell {min-width:0!important}
  html.sp-view-table .sp-catalog .sp-product-table .sp-product-head {min-width:0!important}
  html.sp-view-table .sp-catalog .sp-product-table .product__image {flex-shrink:0!important}
  html.sp-view-grid .sp-catalog .sp-product-table tbody {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
/* Keep category filter and product column inside the available viewport. */
@media (min-width:768px) and (max-width:1199px) {
 .sp-catalog .section__catalog-row {min-width:0!important}
 .sp-catalog .section__catalog-items {min-width:0!important;max-width:100%!important}
}

/* v10: compact desktop-style table on tablets; no card conversion. */
@media (min-width:768px) and (max-width:1199px) {
 html.sp-view-table .sp-catalog .sp-catalog-products {border:1px solid #e4e9f2!important;background:#fff!important;overflow:hidden!important}
 html.sp-view-table .sp-catalog .sp-catalog-products .table-responsive {overflow-x:hidden!important;width:100%!important;max-width:100%!important}
 html.sp-view-table .sp-catalog .sp-product-table {display:table!important;width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:10px!important}
 html.sp-view-table .sp-catalog .sp-product-table thead {display:table-header-group!important}
 html.sp-view-table .sp-catalog .sp-product-table thead tr {display:table-row!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th {display:table-cell!important;font-size:9px!important;padding:9px 3px!important;white-space:normal!important;overflow-wrap:anywhere!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody {display:table-row-group!important;width:auto!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody tr {display:table-row!important;border:0!important;border-radius:0!important;background:transparent!important;margin:0!important;padding:0!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td {display:table-cell!important;width:auto!important;min-width:0!important;max-width:none!important;padding:8px 3px!important;vertical-align:middle!important;border-bottom:1px solid #edf0f5!important;font-size:10px!important;line-height:1.25!important;overflow-wrap:anywhere!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td:before {display:none!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(1),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(1){width:22%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(2),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(2){width:13%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(3),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(3){width:13%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(4),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(4){width:8%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(5),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(5){width:8%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(6),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(6){width:12%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(7),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(7){width:24%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(8),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(8){display:none!important}
 html.sp-view-table .sp-catalog .sp-product-table .sp-product-cell{min-width:0!important}
 html.sp-view-table .sp-catalog .sp-product-table .product__image{width:32px!important;min-width:32px!important;height:32px!important;margin-right:4px!important}
 html.sp-view-table .sp-catalog .sp-product-table .sp-product-head{min-width:0!important;gap:3px!important}
 html.sp-view-table .sp-catalog .sp-product-table .sp-cart-cell .sp-livecart{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:3px!important;width:100%!important}
 html.sp-view-table .sp-catalog .sp-product-table .sp-cart-cell .sp-qty-control{width:83px!important;min-width:0!important;max-width:100%!important;flex:0 1 83px!important}
 html.sp-view-table .sp-catalog .sp-product-table .sp-cart-cell .sp-qty-btn{width:23px!important;flex-basis:23px!important;height:30px!important}
 html.sp-view-table .sp-catalog .sp-product-table .sp-cart-cell .sp-live-count{width:30px!important;min-width:0!important;flex:1 1 auto!important;height:30px!important}
 html.sp-view-table .sp-catalog .sp-product-table .sp-cart-cell .sp-cart-status{width:100%!important;max-width:100%!important;min-width:0!important;flex:1 1 100%!important;min-height:28px!important;font-size:9px!important;padding:3px!important}
}
/* v10: both mobile toolbar controls in the same row, with no page overflow. */
@media (max-width:767px) {
 html,body {max-width:100%!important;overflow-x:clip!important}
 .sp-category-heading.sp-category-toolbar {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)!important;align-items:stretch!important;column-gap:8px!important;row-gap:0!important;width:100%!important;max-width:100%!important;padding:0!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important}
 .sp-category-toolbar>.sp-filter-toolbar-toggle {grid-column:1!important;grid-row:1!important;align-self:stretch!important;min-width:0!important;width:100%!important;max-width:100%!important;margin:0!important;min-height:43px!important;white-space:normal!important}
 .sp-category-toolbar>.sp-catalog-switch {grid-column:2!important;grid-row:1!important;align-self:stretch!important;justify-self:stretch!important;display:flex!important;justify-content:space-between!important;min-width:0!important;width:100%!important;max-width:100%!important;margin:0!important;box-sizing:border-box!important}
 .sp-category-toolbar>.sp-catalog-switch>.sp-catalog-switch__btn {flex:1 1 0!important;min-width:0!important;padding:8px 3px!important;font-size:11px!important;white-space:nowrap!important}
 .sp-category-toolbar .sp-category-crumbs {grid-column:1/-1!important;grid-row:auto!important}
 .sp-catalog .section__catalog-row,.sp-catalog .section__catalog-items {min-width:0!important;max-width:100%!important}
}

/* v11: mobile controls stacked in requested order, aligned to catalog cards. */
@media (max-width:767px) {
 .sp-category-heading.sp-category-toolbar {
   display:flex!important;flex-direction:column!important;align-items:stretch!important;
   gap:10px!important;width:100%!important;max-width:100%!important;
   padding:0!important;margin:0 0 16px!important;box-sizing:border-box!important;
 }
 .sp-category-toolbar > .sp-catalog-switch {
   order:0!important;display:flex!important;align-self:stretch!important;
   width:100%!important;max-width:100%!important;min-width:0!important;
   margin:0!important;padding:4px!important;box-sizing:border-box!important;
 }
 .sp-category-toolbar > .sp-catalog-switch > .sp-catalog-switch__btn {
   flex:1 1 50%!important;min-width:0!important;
 }
 .sp-category-toolbar > .sp-filter-toolbar-toggle {
   order:1!important;align-self:stretch!important;
   width:100%!important;max-width:100%!important;min-width:0!important;
   margin:0!important;box-sizing:border-box!important;
 }
 .sp-catalog .section__catalog-row {
   margin-left:0!important;margin-right:0!important;width:100%!important;
   max-width:100%!important;box-sizing:border-box!important;
 }
 .sp-catalog .section__catalog-row > .section__catalog-items {
   flex:0 0 100%!important;width:100%!important;max-width:100%!important;
   padding-left:0!important;padding-right:0!important;margin:0!important;
   box-sizing:border-box!important;
 }
 .sp-catalog .section__catalog-row > .col-12.col-md-auto {
   flex:0 0 100%!important;width:100%!important;max-width:100%!important;
   padding-left:0!important;padding-right:0!important;box-sizing:border-box!important;
 }
 .sp-catalog .sp-catalog-products,.sp-catalog .sp-catalog-products .table-responsive {
   width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;
   box-sizing:border-box!important;
 }
}
/* v11: identical cart action geometry regardless of cart state on tablets. */
@media (min-width:768px) and (max-width:1199px) {
 html.sp-view-table .sp-catalog .sp-product-table .sp-cart-cell .sp-livecart > .sp-cart-status,
 html.sp-view-table .sp-catalog .sp-product-table .sp-cart-cell .sp-livecart.is-in-cart > .sp-cart-status {
   display:flex!important;align-items:center!important;justify-content:center!important;
   flex:0 0 100%!important;width:100%!important;min-width:0!important;max-width:100%!important;
   height:32px!important;min-height:32px!important;max-height:32px!important;
   padding:3px 5px!important;line-height:1.15!important;font-size:9px!important;
   border-radius:7px!important;box-sizing:border-box!important;
   white-space:nowrap!important;overflow:hidden!important;
 }
}

/* v13: tablet purchase controls must stay side-by-side in a single table row. */
@media (min-width:768px) and (max-width:1199px) {
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell {padding:5px 3px!important;vertical-align:middle!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart {
   display:flex!important;flex-flow:row nowrap!important;align-items:center!important;
   justify-content:space-between!important;gap:4px!important;width:100%!important;
   max-width:100%!important;white-space:nowrap!important;
 }
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart > .sp-qty-control {
   display:flex!important;flex:0 0 42%!important;width:42%!important;min-width:0!important;
   max-width:42%!important;height:30px!important;
 }
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart .sp-qty-btn {
   flex:0 0 22px!important;width:22px!important;min-width:0!important;height:30px!important;
   font-size:17px!important;padding:0!important;
 }
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart input.sp-live-count {
   flex:1 1 auto!important;width:12px!important;min-width:0!important;height:30px!important;
   padding:0!important;font-size:11px!important;
 }
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart > .sp-cart-status,
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart.is-in-cart > .sp-cart-status {
   display:flex!important;flex:1 1 0!important;width:0!important;min-width:0!important;
   max-width:none!important;height:30px!important;min-height:30px!important;max-height:30px!important;
   margin:0!important;padding:2px 3px!important;font-size:9px!important;line-height:1.05!important;
   align-items:center!important;justify-content:center!important;white-space:normal!important;
 }
}
/* v13: prevent legacy category toolbar padding from shrinking its contents on phones. */
@media (max-width:767px) {
 .sp-category-heading.sp-category-toolbar {
   box-sizing:border-box!important;min-width:0!important;max-width:none!important;
   padding:0!important;margin-right:0!important;
 }
 .sp-category-heading.sp-category-toolbar > .sp-catalog-switch,
 .sp-category-heading.sp-category-toolbar > .sp-filter-toolbar-toggle {
   width:100%!important;max-width:100%!important;box-sizing:border-box!important;
   margin-left:0!important;margin-right:0!important;
 }
}

/* STARTER+ v15.1 — final cascade fixes. This file is loaded AFTER starter-catalog.css. */
@media (min-width:768px) and (max-width:1199px) {
 html.sp-view-table .sp-catalog .sp-product-table {table-layout:fixed!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(1),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(1){width:20%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(2),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(2){width:12%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(3),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(3){width:12%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(4),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(4){width:7%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(5),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(5){width:7%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(6),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(6){width:11%!important}
 html.sp-view-table .sp-catalog .sp-product-table thead th:nth-child(7),html.sp-view-table .sp-catalog .sp-product-table tbody td:nth-child(7){width:31%!important;min-width:0!important;max-width:none!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart {display:flex!important;flex-flow:row nowrap!important;gap:5px!important;align-items:center!important;justify-content:space-between!important;min-width:0!important;width:100%!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart > .sp-qty-control {display:flex!important;flex:0 0 91px!important;width:91px!important;min-width:91px!important;max-width:91px!important;height:32px!important;overflow:hidden!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart .sp-qty-btn {display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 27px!important;width:27px!important;min-width:27px!important;height:32px!important;visibility:visible!important;opacity:1!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart input.sp-live-count {display:block!important;flex:1 1 37px!important;width:37px!important;min-width:30px!important;max-width:none!important;height:32px!important;visibility:visible!important;opacity:1!important;text-align:center!important}
 html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart > .sp-cart-status,html.sp-view-table .sp-catalog .sp-product-table tbody td.sp-cart-cell .sp-livecart.is-in-cart > .sp-cart-status {display:flex!important;flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:none!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:2px 3px!important;white-space:normal!important;font-size:9px!important;line-height:1.1!important}
}
@media (max-width:767px) {
 .sp-category-heading.sp-category-toolbar {display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;box-sizing:border-box!important;width:calc(100% + 40px)!important;max-width:none!important;min-width:0!important;margin-left:-10px!important;margin-right:0!important;padding:0!important}
 .sp-category-heading.sp-category-toolbar > .sp-catalog-switch {order:0!important;display:flex!important;align-self:stretch!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;min-width:0!important}
 .sp-category-heading.sp-category-toolbar > .sp-filter-toolbar-toggle {order:1!important;display:flex!important;align-self:stretch!important;justify-content:center!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;min-width:0!important}
}
