/* ==========================================================================
   PR CUP1 — Teilekatalog
   ========================================================================== */

.shop-band { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.shop-band__inner { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 24px 48px; align-items: center; padding-block: 32px; }

.catalog { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(24px, 3vw, 48px); align-items: start; }

/* Toolbar */
.toolbar { position: sticky; top: var(--header-h); z-index: 5; background: rgba(10,10,11,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 8px; display: flex; flex-direction: column; gap: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); color: var(--text-2);
  font-family: var(--f-display); font-weight: 600; font-stretch: 106%; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.chip .mono { font-size: 10.5px; color: var(--text-3); letter-spacing: 0; }
.chip:hover { color: var(--white); border-color: var(--text-2); }
.chip[aria-selected='true'] { background: var(--white); color: var(--ink); border-color: var(--white); }
.chip[aria-selected='true'] .mono { color: #555; }
.toolbar__row { display: flex; gap: 12px; align-items: center; }
.search { flex: 1; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; border: 1px solid var(--line-2); transition: border-color .2s; }
.search:focus-within { border-color: var(--white); }
.search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search input { flex: 1; background: transparent; border: 0; outline: none; height: 100%; font-size: .95rem; min-width: 0; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(1); }

/* Kategorien + Zeilen */
.parts { display: flex; flex-direction: column; }
.cat { padding-top: 40px; }
.cat__head { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); }
.cat__img { width: 96px; height: 64px; object-fit: cover; background: var(--surface); }
.cat__title { font-family: var(--f-display); font-weight: 800; font-stretch: 112%; text-transform: uppercase; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.05; }
.cat__meta { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }

.part { display: grid; grid-template-columns: 40px minmax(0, 1fr) 170px 120px 128px; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); transition: background .2s; }
.part:hover { background: rgba(255,255,255,.015); }
.part.is-added { background: rgba(255,255,255,.03); }
.part__pos { font-family: var(--f-mono); font-size: 11px; color: var(--text-3); padding-left: 4px; }
.part__name { font-weight: 500; line-height: 1.4; }
.part__sup { margin-top: 4px; font-size: .86rem; color: var(--text-3); }
.part__note { margin-top: 8px; font-size: .82rem; color: var(--text-2); line-height: 1.5; padding-left: 12px; border-left: 1px solid var(--line-2); }
.part__price { margin-top: 8px; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .02em; color: var(--white); }
.part__ship { margin-top: 4px; font-size: .8rem; color: var(--text-3); }
.part__ship a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.part__ship a:hover { color: var(--text); }
.cart__fine a { text-decoration: underline; text-underline-offset: 2px; }
.part__link { display: inline-block; margin-top: 6px; font-size: .84rem; color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.part__link:hover { text-decoration-color: currentColor; }
.part__pn { font-family: var(--f-mono); font-size: 12.5px; color: var(--text); word-break: break-all; }
.part__pn small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; word-break: normal; }
.free, .part__main .tag { display: inline-block; margin-top: 6px; }
.part__main { min-width: 0; }
.part__opt { display: flex; align-items: center; gap: 10px; margin-top: 10px; max-width: 100%; min-width: 0; }
.part__opt .mono { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.part__opt select { min-width: 0; max-width: 100%; text-overflow: ellipsis; height: 34px; padding: 0 34px 0 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--line-2); color: var(--text); font-size: .9rem; -webkit-appearance: none; appearance: none; cursor: pointer; }
.part__opt select:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.stepper { display: inline-grid; grid-template-columns: 32px 40px 32px; height: 36px; border: 1px solid var(--line-2); }
.stepper button { display: grid; place-items: center; color: var(--text-2); transition: background .15s, color .15s; }
.stepper button:hover { background: var(--surface-2); color: var(--white); }
.stepper input { width: 100%; text-align: center; background: transparent; border: 0; border-inline: 1px solid var(--line); font-family: var(--f-mono); font-size: 13px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--surface); }

.add {
  height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 1px solid var(--white); background: var(--white); color: var(--ink);
  font-family: var(--f-display); font-weight: 700; font-stretch: 108%; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.add:hover { background: #d8d8d6; }
.add.is-added { background: transparent; color: var(--white); border-color: var(--line-2); }
.add.is-added:hover { border-color: var(--white); }
.add svg { width: 12px; height: 12px; }

.parts__empty { padding: 48px 0; color: var(--text-2); }

/* Anfrageliste */
.cart { position: sticky; top: calc(var(--header-h) + 16px); }
.cart__inner { border: 1px solid var(--line-2); background: var(--surface); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 32px); }
.cart__head { display: flex; align-items: baseline; gap: 12px; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.cart__count { margin-left: auto; font-size: 11px; letter-spacing: .1em; color: var(--text-3); text-transform: uppercase; }
.cart__close { display: none; margin-left: 8px; width: 36px; height: 36px; place-items: center; color: var(--text-2); }
.cart__body { overflow-y: auto; padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.cart__empty { color: var(--text-3); font-size: .92rem; }
.cart__list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.4; }
.cart__list li:first-child { padding-top: 0; }
.cart__list .mono { font-size: 11px; color: var(--text-3); display: block; margin-top: 3px; }
.cart__list .qty { font-family: var(--f-mono); font-size: 12px; white-space: nowrap; color: var(--text); padding-top: 1px; }
.cart__list .rm { width: 22px; height: 22px; display: grid; place-items: center; color: var(--text-3); }
.cart__list .rm:hover { color: var(--white); }
.cart__sum { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.cart__totals { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.cart__totals b { font-weight: 500; color: var(--text); }
.cart__gross { font-size: 13px; color: var(--white); padding-top: 6px; border-top: 1px solid var(--line-2); }
.cart__gross b { color: var(--white); }
.cart__fine { margin-top: 10px; font-size: 10px; letter-spacing: .08em; text-transform: none; color: var(--text-3); }
.cart__form { display: flex; flex-direction: column; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.cart__form .field input, .cart__form .field textarea, .cart__form .field select { font-size: .95rem; padding: 6px 0 10px; }
.cart__form .check { font-size: .86rem; }
.cart__tools { display: flex; gap: 18px; flex-wrap: wrap; }
.cart__tools button { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line-2); padding-bottom: 3px; }
.cart__tools button:hover { color: var(--white); border-color: var(--white); }

.cart-fab, .cart-scrim { display: none; }

@media (max-width: 1180px) {
  .catalog { grid-template-columns: minmax(0, 1fr); }
  .cart { position: fixed; z-index: 150; inset: auto 0 0 0; top: auto; transform: translateY(105%); transition: transform .45s var(--ease); }
  .cart.is-open { transform: none; }
  .cart__inner { max-height: 88vh; max-height: 88dvh; border-inline: 0; border-bottom: 0; }
  .cart__close { display: grid; }
  .cart-fab {
    display: flex; position: fixed; z-index: 140; left: var(--gutter); right: var(--gutter); bottom: max(16px, env(safe-area-inset-bottom));
    height: 56px; align-items: center; justify-content: space-between; padding: 0 20px;
    background: var(--white); color: var(--ink);
    font-family: var(--f-display); font-weight: 700; font-stretch: 108%; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
    box-shadow: 0 10px 40px rgba(0,0,0,.5); transition: transform .35s var(--ease);
  }
  .cart-fab__n { min-width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: var(--white); font-size: 12px; padding: 0 8px; }
  .cart-scrim { display: block; position: fixed; inset: 0; z-index: 145; background: rgba(0,0,0,.6); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  .cart-open .cart-scrim { opacity: 1; visibility: visible; }
  .cta-band { padding-bottom: 80px; }
}
@media (max-width: 820px) {
  .shop-band__inner { grid-template-columns: 1fr; }
  .part { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: 'pos name name' 'pos pn pn' 'pos qty add'; gap: 10px 12px; }
  .part__pos { grid-area: pos; align-self: start; padding-top: 3px; }
  .part__main { grid-area: name; }
  .part__pn { grid-area: pn; }
  .part__qty { grid-area: qty; }
  .part__add { grid-area: add; }
  .add { width: auto; padding: 0 16px; }
  .cat__head { grid-template-columns: 64px 1fr; }
  .cat__img { width: 64px; height: 48px; }
  .cat__meta { grid-column: 2; }
  .toolbar__row { flex-direction: column; align-items: stretch; }
}

@media print {
  .site-header, .mobile-menu, .site-footer, .page-hero, .shop-band, .catalog__main, .cta-band, .cart-fab, .cart-scrim, .cart__form, .cart__close, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 0; }
  .sec-head { display: none; }
  .catalog { display: block; }
  .cart { position: static; transform: none; }
  .cart__inner { border: 0; background: #fff; max-height: none; }
  .cart__head, .cart__list li { border-color: #ccc; }
  .cart__list .mono, .cart__count, .cart__sum { color: #444; }
  .cart__list .rm { display: none; }
  .cart__list .qty { color: #000; }
}

/* Hinweis Handling-Pauschale */
.parts-toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; width: min(560px, calc(100% - 32px)); transform: translate(-50%, 16px); opacity: 0; visibility: hidden;
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--white); color: var(--ink); box-shadow: 0 12px 40px rgba(0,0,0,.45);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; font-size: .9rem; line-height: 1.5; }
.parts-toast.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.parts-toast p { flex: 1; }
.parts-toast button { font-size: 20px; line-height: 1; color: var(--ink); padding: 0 2px; }
@media (max-width: 1180px) { .parts-toast { bottom: 84px; } }
@media print { .parts-toast { display: none; } }

.cart__totals .cart__shipnote { color: var(--text-2); font-style: italic; }
