.shop-mast {
  padding-block: clamp(1.6rem, 3.3vw, 3.1rem);
  border-block: 1px solid var(--stroke);
  background: var(--surface-deep);
}

.shop-mast h1 {
  margin: 1.1rem 0 .9rem;
  font-size: clamp(2.65rem, 5.3vw, 5.25rem);
  font-weight: 700;
  line-height: 1.04;
  text-wrap: balance;
}

.shop-mast p {
  max-width: 59ch;
  color: var(--text-muted);
  font-size: clamp(1.03rem, 1.35vw, 1.22rem);
  line-height: 1.58;
}

.shop-catalog {
  --shop-accent: #9cd2f8;
  padding-block: clamp(2.6rem, 5vw, 4.8rem) clamp(3.5rem, 7vw, 6rem);
}
.shop-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1.2rem; margin-bottom: 1.6rem; }
.shop-catalog-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem 1.05rem; }
.shop-catalog-heading h2 {
  font-size: clamp(2.2rem, 3.5vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -.055em;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}
.shop-count { color: var(--text-muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.shop-search { display: grid; gap: .4rem; color: var(--text-muted); font-size: .8rem; font-weight: 600; }
.shop-search-box {
  position: relative; display: flex; align-items: center;
  width: clamp(16rem, 24vw, 21rem); max-width: 100%;
}
.shop-search-box svg { position: absolute; left: .9rem; pointer-events: none; }
.shop-search input {
  box-sizing: border-box; width: 100%; min-height: 2.85rem; padding: .6rem .8rem .6rem 2.55rem;
  border: 1px solid var(--control-line); border-radius: .5rem; color: var(--text); background: var(--surface-soft); font: inherit; font-size: .93rem; font-weight: 400;
}
.shop-search input::placeholder { color: var(--text-muted); }
.shop-catalog-layout { display: grid; grid-template-columns: clamp(11.8rem, 17.2vw, 15.2rem) minmax(0, 1fr); align-items: start; gap: clamp(1rem, 2.1vw, 2rem); }
.shop-catalog-layout:has(> .shop-sidebar[hidden]) { grid-template-columns: minmax(0, 1fr); }
.shop-results { min-width: 0; }
.shop-sidebar {
  min-width: 0; padding: 0 1rem; border: 1px solid var(--stroke); border-radius: .75rem; background: var(--surface-soft);
}
.shop-sidebar > summary {
  display: flex; align-items: center; min-height: 3.55rem; gap: .6rem;
  font-size: 1.08rem; font-weight: 680; list-style: none;
}
.shop-sidebar > summary::-webkit-details-marker { display: none; }
.shop-sidebar > summary > svg { color: var(--shop-accent); }
.shop-sidebar > summary::after {
  content: ''; display: block; margin: -.2rem .2rem 0 auto; width: .46rem; height: .46rem;
  border: solid var(--text-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.shop-sidebar[open] > summary::after { margin-top: .28rem; transform: rotate(225deg); }
.shop-sidebar-body { border-top: 1px solid var(--stroke); padding-bottom: 1rem; }
.shop-filter-group { padding: 0; margin: 1rem 0; border: 0; min-width: 0; }
.shop-filter-group + .shop-filter-group { border-top: 1px solid var(--stroke); }
.shop-filter-group legend { width: 100%; padding: 0; margin: 0 0 .45rem; color: var(--text); font-size: .9rem; font-weight: 700; }
.shop-filter-group + .shop-filter-group legend { padding-top: .9rem; border-top: 1px solid var(--stroke); }
.shop-categories, .shop-brands { display: grid; gap: .12rem; }
.shop-filter {
  display: flex; align-items: center; justify-content: space-between; gap: .45rem;
  min-height: 2.05rem; padding: .2rem .56rem; border: 1px solid transparent; border-radius: .32rem;
  text-align: left; font: inherit; font-size: .89rem; color: var(--text-muted); background: transparent;
}
.shop-filter:hover { color: var(--text); background: var(--surface-hover); }
.shop-filter[aria-pressed="true"] { color: var(--shop-accent); background: #23323c; }
.shop-filter-count { font-size: .77rem; font-variant-numeric: tabular-nums; }
.shop-brands label { display: flex; align-items: center; gap: .55rem; min-height: 1.75rem; color: var(--text-muted); font-size: .88rem; cursor: pointer; }
.shop-brands input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--shop-accent); }
.shop-price-slider { position: relative; height: 2rem; cursor: pointer; }
.shop-range-track { position: absolute; top: calc(50% - 2px); left: .6rem; right: .6rem; height: 4px; border-radius: 1rem; background: var(--control-line); }
.shop-range-track::after {
  content: ''; position: absolute; inset-block: 0; left: var(--shop-range-start, 0%); right: calc(100% - var(--shop-range-end, 100%));
  border-radius: inherit; background: var(--shop-accent);
}
.shop-price-slider input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  appearance: none; pointer-events: none; background: transparent; outline: none;
}
.shop-price-slider [data-shop-max], .shop-price-slider.shop-range-at-end [data-shop-min], .shop-price-slider input:focus-visible { z-index: 1; }
.shop-price-slider.shop-range-at-end [data-shop-min], .shop-price-slider input:focus-visible { z-index: 2; }
.shop-price-slider input::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.shop-price-slider input::-moz-range-track { height: 4px; background: transparent; }
.shop-price-slider input::-webkit-slider-thumb {
  appearance: none; width: 1.2rem; height: 1.2rem; margin-top: calc(2px - .6rem);
  border: 2px solid var(--shop-accent); border-radius: 50%; background: var(--surface-deep); pointer-events: auto; cursor: grab;
}
.shop-price-slider input::-moz-range-thumb {
  box-sizing: border-box; width: 1.2rem; height: 1.2rem; border: 2px solid var(--shop-accent);
  border-radius: 50%; background: var(--surface-deep); pointer-events: auto; cursor: grab;
}
.shop-price-slider input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text); outline-offset: 2px; }
.shop-price-slider input:focus-visible::-moz-range-thumb { outline: 2px solid var(--text); outline-offset: 2px; }
.shop-range-values { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.shop-clear { padding: .38rem 0; border: 0; background: transparent; color: var(--shop-accent); text-decoration: underline; text-underline-offset: .2rem; font: inherit; font-size: .85rem; }
.shop-clear:disabled { color: var(--text-muted); text-decoration: none; opacity: .65; cursor: default; }
.shop-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 1.3vw, 1.2rem); padding: 0; margin: 0; list-style: none; }
.shop-product { min-width: 0; }
.shop-card {
  position: relative; display: flex; flex-direction: column; isolation: isolate; min-height: 100%; overflow: hidden;
  border: 1px solid var(--stroke); border-radius: .75rem; background: var(--surface-raised);
}
.shop-card:hover, .shop-card:focus-within { border-color: var(--control-line); }
.shop-photo { position: relative; flex: 0 0 auto; width: 100%; aspect-ratio: 1.65; overflow: hidden; background: var(--surface-deep); }
.shop-photo img, .shop-gallery img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.shop-photo img { position: absolute; inset: 0; padding: .75rem; }
.shop-photo--service img { padding: 0; object-fit: cover; }
.shop-photo:empty {
  display: grid; place-items: center; background: linear-gradient(145deg, #171c21, #263038); color: #8496a3;
}
.shop-photo:empty::before {
  content: ''; width: 4.4rem; height: 4.4rem; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='1.4'%3E%3Crect x='13' y='10' width='38' height='44' rx='5'/%3E%3Ccircle cx='32' cy='28' r='10'/%3E%3Ccircle cx='32' cy='28' r='2.6'/%3E%3Cpath d='m28 37 8-8m-16 18h16m5 0h3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.shop-card-info { display: flex; flex: 1; flex-direction: column; align-items: start; padding: clamp(.9rem, 1.35vw, 1.3rem); }
.shop-card-category { margin: 0 0 .42rem; color: var(--text-muted); font-size: .76rem; font-weight: 600; }
.shop-card h3 { margin: 0; font-size: clamp(1.15rem, 1.5vw, 1.45rem); letter-spacing: -.035em; line-height: 1.19; overflow-wrap: anywhere; }
.shop-detail-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.shop-detail-link:focus-visible { outline-offset: 2px; }
.shop-card:has(.shop-detail-link:hover) .shop-detail-link { color: #cfe8fa; }
.shop-specs { display: grid; gap: .17rem; margin: .64rem 0 0; padding: 0; color: var(--text-muted); list-style: none; font-size: .9rem; line-height: 1.45; }
.shop-card .shop-details, .shop-card .shop-service-link { position: relative; z-index: 2; margin-top: .7rem; color: var(--action); font-size: .91rem; font-weight: 600; }
.shop-details { width: 100%; }
.shop-details summary { width: fit-content; }
.shop-service-link { text-decoration: underline; text-underline-offset: .18em; }
.shop-gallery { display: grid; gap: .6rem; margin-top: .65rem; }
.shop-gallery img { max-height: 13rem; background: var(--surface-deep); border-radius: .25rem; }
.shop-card .shop-details, .shop-card .shop-service-link { display: none; }
.shop-order { display: grid; width: 100%; gap: .65rem; margin-top: auto; padding-top: 1rem; }
.shop-price { font-size: clamp(1.08rem, 1.5vw, 1.3rem); font-weight: 720; font-variant-numeric: tabular-nums; }
.shop-add {
  position: relative; z-index: 2; display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: .55rem;
  padding: .58rem .75rem; border: 1px solid var(--action); border-radius: .38rem; color: var(--on-action); background: var(--action); font: inherit; font-size: .92rem; font-weight: 700;
}
.shop-add svg { width: 1.12rem; height: 1.12rem; }
.shop-add:hover { background: var(--action-hover); }
.shop-add:disabled { color: var(--text-muted); background: transparent; border-color: var(--stroke); cursor: default; }
.shop-empty { padding: 3rem 1rem; border: 1px solid var(--stroke); border-radius: .6rem; color: var(--text-muted); text-align: center; }
.shop-empty .shop-clear { margin-top: .65rem; }
@media (min-width: 761px) and (min-height: 850px) {
  .shop-sidebar { position: sticky; top: calc(var(--header-height) + 1rem); }
}
@media (max-width: 1080px) {
  .shop-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shop-catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .shop-sidebar > summary { min-height: 2.9rem; }
  .shop-sidebar-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
  .shop-filter-group { margin: .9rem 0 .45rem; }
  .shop-filter-group + .shop-filter-group, .shop-filter-group + .shop-filter-group legend { border: 0; padding-top: 0; }
  .shop-sidebar .shop-clear { justify-self: start; align-self: end; }
  .shop-categories { gap: .2rem; }
  .shop-brands label { min-height: 2.1rem; }
}
@media (max-width: 580px) {
  .shop-toolbar { display: grid; gap: 1rem; margin-bottom: 1rem; }
  .shop-search-box { width: 100%; }
  .shop-catalog-heading { justify-content: space-between; }
  .shop-track { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .shop-card-info { padding: 1.15rem; }
  .shop-card h3 { font-size: 1.35rem; }
  .shop-photo { aspect-ratio: 1.8; }
}
@media (scripting: none) {
  .shop-add { display: none; }
}

.shop-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .3rem; margin-top: 1.6rem; }
.shop-pagination a { display: grid; place-items: center; min-width: 2.65rem; min-height: 2.75rem; border: 1px solid var(--stroke); border-radius: .38rem; font-weight: 600; color: var(--text); background: var(--surface-soft); }
.shop-pagination a:hover { border-color: var(--shop-accent); }
.shop-pagination a[aria-current] { color: var(--on-action); background: var(--action); }
.shop-pagination span { padding-inline: .1rem; color: var(--text-muted); }
@media (scripting: enabled) {
  .shop-results:has(.shop-pagination) .shop-track:not([data-paged]) > li:nth-child(n+21) { display: none; }
}
