@media (max-width: 1279px) {
  .ot-header__main-inner {
    grid-template-columns: 170px auto minmax(240px, 1fr) auto;
  }

  .ot-header-action span:not(.ot-badge) {
    display: none;
  }

  .ot-header-action {
    min-width: 42px;
  }

  .ot-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .ot-footer__contacts {
    grid-column: 1 / -1;
  }

  .ot-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .ot-header__service,
  .ot-header__main {
    display: none;
  }

  .ot-header__mobile {
    display: block;
  }

  .ot-header__mobile-top {
    display: grid;
    min-height: 56px;
    grid-template-columns: 44px 40px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 7px;
  }

  .ot-header__mobile .ot-icon-button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    color: #4f5b6c;
    background: transparent;
    border: 0;
    border-radius: 8px;
  }

  .ot-header__mobile .ot-icon-button:hover,
  .ot-header__mobile .ot-icon-button:focus-visible {
    color: var(--ot-primary);
    background: var(--ot-surface);
  }

  .ot-header__mobile .ot-icon-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.7;
  }

  .ot-logo--mobile img {
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  .ot-search--mobile {
    grid-template-columns: minmax(0, 1fr) 40px;
    border-width: 1px;
  }

  .ot-search--mobile input {
    min-height: 40px;
  }

  .ot-search--mobile button {
    min-height: 40px;
  }

  .ot-layout--left,
  .ot-layout--right,
  .ot-layout--both,
  .ot-product-view,
  .ot-cart-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ot-cart-summary {
    position: static;
  }

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

  .ot-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ot-container {
    width: min(100% - 24px, var(--ot-container));
  }

  .container {
    width: min(100% - 24px, var(--ot-container));
  }

  .rs-fields-grid > [class*="col-sm-"] {
    grid-column: 1 / -1;
  }

  .ot-page-main {
    padding-block: 18px 36px;
  }

  .ot-page-title {
    margin-bottom: 15px;
    font-size: 25px;
    line-height: 1.16;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }

  .ot-has-mobile-nav .ot-page-main,
  .ot-has-mobile-nav .ot-footer {
    padding-bottom: calc(var(--ot-mobile-nav-height) + env(safe-area-inset-bottom) + 20px);
  }

  .ot-mobile-nav {
    position: fixed;
    z-index: 700;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(var(--ot-mobile-nav-height) + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
    padding: 4px 4px env(safe-area-inset-bottom);
    background: var(--ot-white);
    border-top: 1px solid var(--ot-border);
    box-shadow: 0 -8px 28px rgba(17, 17, 17, 0.08);
  }

  .ot-mobile-nav a,
  .ot-mobile-nav button {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 2px;
    color: var(--ot-text-soft);
    background: transparent;
    border: 0;
    font-size: 10px;
    line-height: 1.15;
  }

  .ot-mobile-nav a.is-active,
  .ot-mobile-nav button[aria-expanded="true"] {
    color: var(--ot-primary);
  }

  .ot-mobile-nav a.is-active::before,
  .ot-mobile-nav button[aria-expanded="true"]::before {
    position: absolute;
    top: -6px;
    width: 26px;
    height: 3px;
    background: var(--ot-accent);
    border-radius: 999px;
    content: "";
  }

  .ot-mobile-nav svg {
    width: 22px;
    height: 22px;
  }

  .ot-mobile-nav .ot-badge {
    top: 2px;
    left: calc(50% + 7px);
  }

  .ot-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ot-product-card {
    padding: 9px;
  }

  .ot-product-card__name {
    min-height: 40px;
    font-size: 13px;
  }

  .ot-product-card__price {
    font-size: 16px;
  }

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

  .ot-category-head {
    grid-template-columns: 1fr;
  }

  .ot-category-toolbar {
    align-items: stretch;
  }

  .ot-category-toolbar select {
    width: 100%;
  }

  .ot-product-gallery__main {
    min-height: 260px;
  }

  .ot-product-buy {
    grid-template-columns: 1fr;
  }

  .ot-cart-item {
    grid-template-columns: 82px minmax(0, 1fr) 36px;
    align-items: start;
    gap: 12px;
  }

  .ot-cart-item__quantity,
  .ot-cart-item__total {
    grid-column: 1 / -1;
  }

  .ot-cart-item > .ot-icon-button {
    grid-column: 3;
    grid-row: 1;
  }

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

  .ot-footer__main {
    padding-block: 30px;
  }

  .ot-footer__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ot-footer__contacts {
    grid-column: auto;
    margin-bottom: 22px;
  }

  .ot-footer__group {
    padding-block: 4px;
    border-top: 1px solid #303030;
  }

  .ot-footer__group summary {
    position: relative;
    min-height: 44px;
    padding: 11px 34px 11px 0;
    cursor: pointer;
  }

  .ot-footer__group summary::after {
    position: absolute;
    top: 8px;
    right: 0;
    content: "+";
    font-size: 22px;
    font-weight: 400;
  }

  .ot-footer__group[open] summary::after {
    content: "−";
  }

  .ot-footer__group nav {
    margin: 0 0 16px;
  }

  .ot-footer__bottom .ot-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .ot-notices {
    top: 10px;
    right: 12px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 374px) {
  .ot-header__mobile-top {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .ot-logo--mobile {
    display: none;
  }

  .ot-product-card__actions {
    grid-template-columns: 1fr;
  }

  .ot-product-card__actions .ot-icon-button {
    display: none;
  }
}
