@media (max-width: 980px) {
  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .facet-column {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    grid-column: 1;
    grid-row: 1;
    gap: 8px;
    margin: 0 -10px;
    padding: 8px 10px;
    overflow-x: auto;
    background: rgba(247, 251, 255, 0.94);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  .facet-column::-webkit-scrollbar {
    display: none;
  }

  .facet-panel {
    box-sizing: border-box;
    flex: 0 0 172px !important;
    flex-basis: 172px !important;
    width: 172px !important;
    min-width: 172px !important;
    max-width: 172px !important;
    height: 136px;
    max-height: 136px;
    overflow: hidden;
    position: static;
    align-content: start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-solid);
    box-shadow: 0 10px 24px rgba(17, 118, 174, 0.08);
  }

  .facet-panel:focus-within {
    max-height: 136px;
    overflow: hidden;
  }

  .facet-panel.facet-panel-expanded {
    flex: 0 0 172px !important;
    flex-basis: 172px !important;
    width: 172px !important;
    min-width: 172px !important;
    max-width: 172px !important;
    height: 318px;
    max-height: 318px;
    overflow: hidden;
    align-content: start;
  }

  .facet-panel.facet-panel-expanded .facet-options.expanded {
    max-height: 226px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    scrollbar-width: thin;
  }

  .facet-panel.facet-panel-expanded .facet-check {
    font-size: 14px;
  }

  .facet-panel.facet-panel-expanded .facet-check span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .facet-group h3 {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .facet-options {
    gap: 8px;
  }

  .facet-options.expanded {
    max-height: 226px;
    padding-right: 8px;
  }

  .facet-check {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    font-size: 13px;
  }

  .facet-check input {
    width: 17px;
    height: 17px;
  }

  .facet-more {
    font-size: 13px;
    padding-top: 4px;
  }

  .catalog-layout > .product-grid,
  .catalog-layout > .products-column {
    grid-column: 1;
    grid-row: 2;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 132px;
  }

  .media {
    min-height: 132px;
  }

  .product-image {
    height: 116px;
    padding: 10px 10px;
  }

  .chain-logo {
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
  }

  .product-body {
    padding: 9px 10px 32px;
  }

  .product-title {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.24;
  }

  .discount-badge {
    padding: 3px 5px;
    font-size: 10px;
  }

  .actual-price {
    font-size: 18px;
  }

  .old-price {
    font-size: 12px;
  }

  .unit-price {
    font-size: 12px;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .pack-line {
    gap: 8px;
  }

  .quantity-control {
    right: 8px;
    bottom: 7px;
    min-width: 22px;
    min-height: 22px;
  }

  .quantity-button {
    width: 21px;
    height: 21px;
    font-size: 18px;
  }

  .quantity-value {
    min-width: 18px;
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .facet-panel {
    flex: 0 0 172px !important;
    flex-basis: 172px !important;
    width: 172px !important;
    min-width: 172px !important;
    max-width: 172px !important;
  }

  .facet-panel.facet-panel-expanded {
    flex: 0 0 172px !important;
    flex-basis: 172px !important;
    width: 172px !important;
    min-width: 172px !important;
    max-width: 172px !important;
  }

  .product-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .media {
    min-height: 128px;
  }

  .product-image {
    height: 112px;
    padding: 10px 8px;
  }
}

.products-column {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  gap: 10px;
  min-width: 0;
}

.products-column .sort-row {
  margin: 0 0 2px;
}

.bottom-nav {
  grid-template-columns: repeat(4, 1fr);
}

.shopping-check {
  top: 7px;
  right: 8px;
  width: 20px;
  height: 20px;
}

.manual-shopping-check {
  width: 20px;
  height: 20px;
}

.manual-shopping-item {
  grid-template-columns: minmax(0, 1fr) 20px;
  padding-right: 8px;
}

.profile-card {
  display: grid;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  box-shadow: 0 12px 30px rgba(17, 118, 174, 0.08);
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-form input,
.profile-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  font: inherit;
}

.profile-form input:focus,
.profile-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 174, 234, 0.16);
}

.profile-form input[readonly] {
  background: var(--soft-blue);
  color: var(--muted);
}

.profile-form-wide,
.profile-actions,
.profile-save-status {
  grid-column: 1 / -1;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-save,
.profile-location {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 900;
}

.profile-save {
  background: var(--green);
  color: #fff;
}

.profile-location {
  border: 1px solid var(--line);
  background: var(--soft-blue);
  color: var(--green-dark);
}

.profile-save-status {
  min-height: 18px;
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 560px) {
  .profile-form {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    display: grid;
  }

  .nav-button {
    min-height: 46px;
    font-size: 11px;
  }
}
