/* Locked shelf shell: crumb + left-aligned H1, left Kategorien rail, 3-col grid.
   Do not go back to the full-width 4-col single grid. */

.shop-head {
  position: relative;
  background: var(--c-gray-50);
  border-bottom: 1px solid var(--c-gray-200);
  padding: 24px 0 30px;
  text-align: left;
  overflow: hidden;
}

.shop-head.has-banner {
  min-height: 260px;
  display: flex;
  align-items: center;
  padding: 0;
  background: var(--c-chrome);
  border-bottom: 0;
}

.shop-head-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
}

.shop-head-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 10, 16, .88) 0%, rgba(8, 10, 16, .55) 46%, rgba(8, 10, 16, .2) 100%);
}

.shop-head-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 36px;
  padding-bottom: 36px;
}

.shop-head h1 {
  margin: 0 0 10px;
  font-size: var(--h1-size);
  font-weight: var(--h1-weight);
  line-height: var(--h1-lh);
  letter-spacing: var(--h1-track);
  color: var(--c-charcoal);
  text-align: left;
}

.shop-head.has-banner h1 {
  color: #fff;
}

.shop-head .section-sub {
  margin: 0;
  max-width: 36em;
  color: var(--c-text-light);
  font-size: var(--text);
  line-height: 1.55;
  text-align: left;
}

.shop-head.has-banner .section-sub {
  color: rgba(255, 255, 255, .78);
}

.shop-head.has-banner .crumb {
  color: rgba(255, 255, 255, .62);
}

.shop-head.has-banner .crumb a {
  color: rgba(255, 255, 255, .72);
}

.shop-head.has-banner .crumb a:hover {
  color: #fff;
}

.shop-head.has-banner .crumb-sep {
  color: rgba(255, 255, 255, .38);
}

.shop-head.has-banner .crumb [aria-current="page"] {
  color: #fff;
}

/* Rail + grid. One page width only: .container still owns --maxw and the 20px gutter. */
.shop-main {
  padding: 30px 0 64px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* grid items must be allowed to shrink, otherwise the sort select widens the track */
.shelf-rail,
.shop-body {
  min-width: 0;
}

.shelf-rail {
  position: sticky;
  top: calc(var(--site-header-h, 148px) + 12px);
  z-index: 1;
  max-height: calc(100vh - var(--site-header-h, 148px) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 8px 10px;
  background: #fff;
  border: 1px solid var(--c-gray-200);
  border-top: 3px solid var(--c-chrome);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(17, 17, 17, .08), 0 10px 24px rgba(17, 17, 17, .08);
}

.shelf-group {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shelf-group + .shelf-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--c-gray-100);
}

.shelf-acc {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 6px 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  text-align: left;
  cursor: pointer;
  list-style: none;
  transition: color var(--btn-move), background-color var(--btn-move);
}

.shelf-acc::-webkit-details-marker {
  display: none;
}

.shelf-acc::marker {
  content: none;
}

.shelf-group[open] {
  background: transparent;
}

.shelf-group[open] .shelf-acc {
  color: var(--c-charcoal);
}

.shelf-acc:hover {
  background: var(--c-gray-50);
}

.shelf-acc:focus {
  outline: none;
}

.shelf-acc:focus-visible {
  box-shadow: inset 0 0 0 1px var(--c-charcoal);
}

.shelf-acc-label {
  flex: 1 1 auto;
  min-width: 0;
}

.shelf-acc-n,
.shelf-n {
  flex: 0 0 auto;
  min-width: 1.45em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--c-gray-100);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
  color: var(--c-text-light);
  text-align: center;
}

.shelf-acc-chev {
  flex: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: transparent;
  color: var(--c-text-light);
  box-shadow: none;
  transition: transform var(--btn-move), color var(--btn-move);
}

.shelf-acc-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.shelf-group[open] .shelf-acc-chev {
  background: transparent;
  color: var(--c-charcoal);
  box-shadow: none;
  transform: rotate(180deg);
}

.shelf-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0 0 2px;
  background: transparent;
  border-radius: 0;
}

.shelf-list--scroll {
  max-height: 192px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--c-gray-300) transparent;
}

.shelf-list--scroll::-webkit-scrollbar {
  width: 4px;
}

.shelf-list--scroll::-webkit-scrollbar-thumb {
  background: var(--c-gray-300);
  border-radius: 999px;
}

.shelf-list li + li {
  margin-top: 1px;
}

.shelf-list a,
.shelf-list .shelf-facet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 5px 8px 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-decoration: none;
  text-align: left;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  color: var(--c-text);
  cursor: pointer;
  transition: background-color var(--btn-move), color var(--btn-move);
}

.shelf-list a:hover,
.shelf-list .shelf-facet:hover {
  background: var(--c-gray-50);
}

.shelf-list a.is-on,
.shelf-list .shelf-facet.is-on {
  font-weight: 600;
  background: var(--c-pop-blue);
  color: var(--c-charcoal);
}

.shelf-list a.is-on .shelf-n,
.shelf-list .shelf-facet.is-on .shelf-n {
  background: rgba(36, 95, 229, .14);
  color: var(--c-accent);
}

@media (prefers-reduced-motion: reduce) {
  .shelf-acc-chev,
  .shelf-acc,
  .shelf-list a,
  .shelf-list .shelf-facet {
    transition: none;
  }
}

.product-grid .product-card.is-off {
  display: none;
}

.shop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-gray-200);
}

.shop-count {
  margin: 0;
  font-size: .9rem;
  color: var(--c-text-light);
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.shop-sort label {
  font-size: .85rem;
  color: var(--c-text-light);
}

.shop-sort select {
  appearance: none;
  -webkit-appearance: none;
  font-size: .88rem;
  color: var(--c-text);
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b616b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  border: 1px solid var(--c-gray-200);
  border-radius: var(--radius);
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  transition: border-color var(--btn-move);
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
}

.shop-sort select:hover {
  border-color: var(--c-gray-300);
}

.js-sort-auto .shop-sort-go {
  display: none;
}

.shelf-filter-toggle {
  display: none;
}

.shop-empty {
  margin: 0;
  color: var(--c-text-light);
}

.shop-body .product-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* Blocks below the grid. Order is locked: numbers, model table, buying notes,
   long copy. The grid loses some bottom padding so the first band sits close. */
.woocommerce-shop .shop-main {
  padding-bottom: 30px;
}

.shop-blocks .section {
  padding: 42px 0;
}

.shop-blocks .copy-band {
  padding: 48px 0 60px;
}

/* The model table lives in style.css — the homepage uses the same component. */

@media (max-width: 1024px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .shelf-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .shop-body .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 780px) {
  .shop-body .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shelf-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--c-gray-200);
    border-radius: var(--radius);
    background: #fff;
    color: var(--c-charcoal);
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--btn-move), color var(--btn-move), border-color var(--btn-move);
  }

  .shelf-filter-toggle[aria-expanded="true"] {
    border-color: var(--c-charcoal);
    background: var(--c-gray-50);
  }

  .shop-layout:not(.is-filters-open) .shelf-rail {
    display: none;
  }
}

@media (max-width: 768px) {
  .shop-head.has-banner {
    min-height: 0;
  }

  .shop-head-inner {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .shop-head .section-sub {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .shop-head:not(.has-banner) {
    padding: 18px 0 24px;
  }

  .shop-blocks .section {
    padding: 34px 0;
  }

  .shop-head h1 {
    font-size: var(--h1-size-sm);
  }

  .shop-bar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
  }

  .shop-count {
    justify-self: end;
  }

  .shop-sort {
    grid-column: 1 / -1;
    width: 100%;
  }

  .shop-sort select {
    flex: 1 1 auto;
    min-width: 0;
  }
}
