.price-page {
  background: #f6f6f1;
}

.price-header {
  grid-template-columns: auto 1fr auto;
}

.cart-open,
.cart-close,
.category-list button,
.qty-control button,
.load-more,
.quick-searches button,
.search-input-wrap button {
  font: inherit;
}

.cart-open {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.cart-open span {
  min-width: 24px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--yellow);
  color: #111111;
  font-size: 12px;
}

.catalog-shell {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 90px;
}

.catalog-hero {
  padding: 22px 0 28px;
}

.catalog-hero h1 {
  max-width: 900px;
  margin-bottom: 16px;
  font-size: 50px;
}

.catalog-hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.category-panel,
.catalog-main,
.cart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.category-panel,
.cart-panel {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.category-panel {
  padding: 16px;
}

.category-panel-head,
.cart-head,
.cart-total,
.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.category-panel h2,
.cart-panel h2 {
  margin: 0;
  font-size: 22px;
}

.category-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.category-search {
  margin: 14px 0;
}

.category-search input,
.search-box input,
.order-form input,
.order-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.category-search input,
.search-box input,
.order-form input {
  padding: 0 12px;
}

.order-form textarea {
  padding: 10px 12px;
  resize: vertical;
}

.category-list {
  display: grid;
  gap: 7px;
}

.category-list button {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #303841;
  text-align: left;
  cursor: pointer;
}

.category-list button:hover,
.category-list button.active {
  border-color: #cad0d6;
  background: #ffffff;
}

.category-list b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-list span {
  color: var(--muted);
  font-size: 12px;
}

.catalog-main {
  min-width: 0;
  padding: 16px;
}

.catalog-toolbar {
  align-items: end;
  margin-bottom: 14px;
}

.search-area {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 9px;
  flex: 1;
}

.search-box {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap input {
  padding-right: 44px;
}

.search-input-wrap button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: #edf0f3;
  color: #4b545d;
  cursor: pointer;
  font-weight: 900;
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-searches button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #3d454c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.quick-searches button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.catalog-meta {
  min-width: 210px;
  display: grid;
  gap: 5px;
  text-align: right;
}

.catalog-meta strong {
  font-size: 18px;
}

.catalog-meta span,
.catalog-status {
  color: var(--muted);
  font-size: 13px;
}

.catalog-status {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.catalog-status:empty {
  display: none;
}

.catalog-list {
  display: grid;
  gap: 9px;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 132px;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.item-main {
  min-width: 0;
}

.item-main h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.item-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.item-tags span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf0f3;
  color: #3d454c;
  font-size: 12px;
  font-weight: 800;
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(255, 191, 24, 0.55);
  color: inherit;
}

.item-price {
  display: grid;
  gap: 4px;
  text-align: right;
}

.item-price strong {
  color: var(--blue);
  font-size: 17px;
}

.item-price span {
  color: var(--muted);
  font-size: 12px;
}

.item-actions {
  display: grid;
  gap: 8px;
}

.qty-control {
  display: grid;
  grid-template-columns: 34px minmax(42px, 1fr) 34px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.qty-control button {
  border: 0;
  background: #edf0f3;
  cursor: pointer;
  font-weight: 900;
}

.qty-control input {
  min-width: 0;
  border: 0;
  text-align: center;
  font: inherit;
  font-weight: 900;
}

.add-button,
.load-more {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.load-more {
  width: 100%;
  margin-top: 14px;
}

.cart-panel {
  padding: 16px;
}

.cart-head {
  align-items: start;
  margin-bottom: 14px;
}

.cart-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.cart-close {
  display: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.cart-items {
  display: grid;
  gap: 8px;
  min-height: 52px;
}

.cart-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.cart-line {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.cart-line h3 {
  margin-bottom: 0;
  font-size: 14px;
}

.cart-line p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.cart-line-foot {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 8px;
  align-items: center;
}

.remove-line {
  border: 0;
  background: transparent;
  color: #a33434;
  cursor: pointer;
  font-weight: 900;
}

.cart-total {
  margin: 14px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cart-total span {
  color: var(--muted);
  font-size: 13px;
}

.cart-total strong {
  color: var(--blue);
  font-size: 18px;
}

.order-form {
  display: grid;
  gap: 11px;
}

.order-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.order-form .button {
  width: 100%;
  margin-top: 4px;
  border: 0;
  cursor: pointer;
}

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.form-status.ok {
  color: #22663a;
}

.form-status.err {
  color: #a33434;
}

.mobile-cart-bar {
  display: none;
}

@media (max-width: 1180px) {
  .catalog-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .cart-panel {
    position: fixed;
    z-index: 40;
    inset: 0 0 0 auto;
    width: min(420px, 100%);
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 180ms ease;
  }

  .cart-panel.open {
    transform: translateX(0);
  }

  .cart-close {
    display: inline-grid;
    place-items: center;
  }

  .mobile-cart-bar {
    position: fixed;
    z-index: 30;
    right: 16px;
    bottom: 16px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(9, 47, 135, 0.25);
    font: inherit;
    font-weight: 900;
  }
}

@media (max-width: 820px) {
  .price-header {
    grid-template-columns: 1fr auto;
  }

  .catalog-shell {
    width: min(100% - 24px, 1440px);
    padding-top: 22px;
  }

  .catalog-hero h1 {
    font-size: 36px;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .category-panel,
  .cart-panel {
    position: static;
    max-height: none;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 260px;
    overflow: auto;
  }

  .catalog-toolbar {
    display: grid;
  }

  .catalog-meta {
    min-width: 0;
    text-align: left;
  }

  .catalog-row {
    grid-template-columns: 1fr;
  }

  .item-price {
    text-align: left;
  }

  .cart-panel {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-height: 86vh;
    border-radius: 8px 8px 0 0;
    transform: translateY(100%);
  }

  .cart-panel.open {
    transform: translateY(0);
  }
}

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

  .cart-line-foot {
    grid-template-columns: 1fr;
  }

  .mobile-cart-bar {
    left: 12px;
    right: 12px;
    justify-content: space-between;
  }
}
