/* ==========================================================================
   Simon Gruber – Teile-Sonderverkauf
   Design angelehnt an simon-gruber.de: Schwarz / Beige / Weiß, klare
   serifenlose Typografie, viel Weißraum, geometrische Akzente.
   ========================================================================== */

:root {
  --c-black: #141310;
  --c-black-soft: #1f1d19;
  --c-beige: #cdb993;
  --c-beige-light: #e9dfc9;
  --c-beige-pale: #f6f2e9;
  --c-white: #ffffff;
  --c-text: #1c1a16;
  --c-muted: #6f6a5d;
  --c-line: #e4ddcd;
  --c-danger: #a3402f;
  --c-success: #4a6a4d;

  --radius: 2px;
  --radius-lg: 4px;
  --shadow-sm: 0 1px 2px rgba(20, 19, 16, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 19, 16, 0.12);
  --shadow-lg: 0 16px 48px rgba(20, 19, 16, 0.22);

  --maxw: 1240px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--c-beige);
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--c-black);
  color: var(--c-beige-light);
  font-size: 12.5px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
}
.topbar a:hover { color: var(--c-white); }
.topbar .topbar-links { display: flex; gap: 20px; }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.logo .mark {
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.logo .mark span { color: var(--c-beige); }
.logo .sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-top: 3px;
}

nav.main-nav {
  display: flex;
  gap: 32px;
}
nav.main-nav a {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
nav.main-nav a:hover { border-color: var(--c-beige); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--c-black); color: var(--c-white); }
.btn-primary:hover { background: var(--c-black-soft); }
.btn-outline { background: transparent; border-color: var(--c-black); color: var(--c-black); }
.btn-outline:hover { background: var(--c-black); color: var(--c-white); }
.btn-beige { background: var(--c-beige); color: var(--c-black); }
.btn-beige:hover { background: var(--c-beige-light); }
.btn-sm { padding: 7px 14px; font-size: 11.5px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.cart-btn {
  position: relative;
  background: var(--c-black);
  color: var(--c-white);
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-btn:hover { background: var(--c-black-soft); }
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--c-beige);
  color: var(--c-black);
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--c-white);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--c-black);
  color: var(--c-white);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 460px;
  height: 460px;
  background: var(--c-beige);
  opacity: 0.14;
  transform: rotate(18deg);
}
.hero .container {
  position: relative;
  padding: 76px 24px 60px;
}
.hero h1 {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.08;
  font-weight: 800;
  margin: 14px 0 18px;
  max-width: 720px;
}
.hero h1 em {
  font-style: normal;
  color: var(--c-beige);
}
.hero p.lead {
  max-width: 560px;
  color: var(--c-beige-light);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0 0 30px;
}
.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 26px;
  flex-wrap: wrap;
}
.hero-stats .stat {
  padding-right: 44px;
  margin-right: 44px;
  border-right: 1px solid rgba(255,255,255,0.14);
}
.hero-stats .stat:last-child { border-right: none; }
.hero-stats .stat .num {
  font-size: 28px;
  font-weight: 800;
  color: var(--c-beige);
}
.hero-stats .stat .lbl {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-beige-light);
  margin-top: 2px;
}

/* ---------- Toolbar / Filters ---------- */
.catalog-toolbar {
  position: sticky;
  top: 76px;
  z-index: 30;
  background: var(--c-beige-pale);
  border-bottom: 1px solid var(--c-line);
  padding: 18px 0;
}
.toolbar-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  flex: 1 1 280px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--c-white);
}
.search-box input:focus { outline: 2px solid var(--c-black); outline-offset: -1px; }
.search-box svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--c-muted);
}
select, .select {
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-white);
  font-size: 13.5px;
  color: var(--c-text);
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--c-line);
  background: var(--c-white);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-text);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--c-black); }
.chip.active { background: var(--c-black); border-color: var(--c-black); color: var(--c-white); }
.chip .n { opacity: 0.6; margin-left: 4px; }

.result-count {
  font-size: 13px;
  color: var(--c-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ---------- Product grid ---------- */
.catalog-section { padding: 40px 0 90px; background: var(--c-white); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--c-white);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--c-beige); transform: translateY(-2px); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--c-beige-pale);
  color: var(--c-muted);
  white-space: nowrap;
}
.badge.discount { background: var(--c-black); color: var(--c-beige-light); }

.card h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}
.card .part-no {
  font-size: 12px;
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.card .meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 2px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
}
.price-old {
  font-size: 13px;
  color: var(--c-muted);
  text-decoration: line-through;
}
.price-new {
  font-size: 21px;
  font-weight: 800;
  color: var(--c-black);
}

.card-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.qty-input {
  width: 56px;
  padding: 9px 6px;
  text-align: center;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  font-size: 13px;
}
.card .btn { flex: 1; }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--c-muted);
}
.empty-state h3 { color: var(--c-text); margin-bottom: 8px; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
}
.pagination button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--c-line);
  background: var(--c-white);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}
.pagination button.active { background: var(--c-black); color: var(--c-white); border-color: var(--c-black); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- Info strip ---------- */
.info-strip {
  background: var(--c-beige-pale);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  padding: 40px 0;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.info-grid .item h4 {
  font-size: 14.5px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-grid .item p { margin: 0; font-size: 13.5px; color: var(--c-muted); line-height: 1.6; }
.info-grid .icon-dot {
  width: 30px; height: 30px;
  background: var(--c-black);
  color: var(--c-beige);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--c-black);
  color: var(--c-beige-light);
  padding: 56px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-beige);
  margin: 0 0 16px;
}
.footer-grid p, .footer-grid a { font-size: 13.5px; color: rgba(233,223,201,0.82); line-height: 1.9; display: block; }
.footer-grid a:hover { color: var(--c-white); }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(233,223,201,0.6);
}
.footer-bottom .legal-links { display: flex; gap: 18px; }

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(20,19,16,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  z-index: 50;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--c-white);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--c-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-header h3 { margin: 0; font-size: 17px; }
.drawer-close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--c-muted); }

.drawer-body { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-line);
}
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item h4 { font-size: 13.5px; margin: 0 0 3px; }
.cart-item .ci-part { font-size: 11.5px; color: var(--c-muted); }
.cart-item .ci-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.ci-qty { display: flex; align-items: center; border: 1px solid var(--c-line); border-radius: var(--radius); }
.ci-qty button { border: none; background: none; width: 26px; height: 26px; font-size: 14px; }
.ci-qty span { width: 26px; text-align: center; font-size: 12.5px; }
.ci-remove { font-size: 11.5px; color: var(--c-danger); text-decoration: underline; background: none; border: none; }
.ci-price { font-weight: 700; font-size: 13.5px; white-space: nowrap; }

.drawer-footer { padding: 20px 24px 26px; border-top: 1px solid var(--c-line); }
.total-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.total-row .sub { font-size: 12px; font-weight: 500; color: var(--c-muted); margin-top: 2px; }

.cart-empty { text-align: center; padding: 60px 20px; color: var(--c-muted); }

/* ---------- Modal (request form) ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 70;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--c-white);
  width: min(520px, 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 { margin: 0 0 6px; font-size: 20px; }
.modal-card p.hint { color: var(--c-muted); font-size: 13.5px; margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 70px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--c-black);
  color: var(--c-white);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 13.5px;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* ---------- Simple info pages (Impressum/Datenschutz) ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 64px 24px 100px; }
.legal-page h1 { font-size: 30px; margin-bottom: 24px; }
.legal-page h2 { font-size: 18px; margin: 32px 0 10px; }
.legal-page p, .legal-page li { color: var(--c-muted); line-height: 1.75; font-size: 14.5px; }
.legal-page .placeholder { background: var(--c-beige-pale); border: 1px dashed var(--c-beige); padding: 14px 16px; border-radius: var(--radius); color: var(--c-text); font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  nav.main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero .container { padding: 52px 20px 40px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .topbar { display: none; }
  .hero-stats { flex-direction: column; gap: 14px; }
  .hero-stats .stat {
    padding-right: 0;
    margin-right: 0;
    border-right: none;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    width: 100%;
  }
  .hero-stats .stat:last-child { border-bottom: none; padding-bottom: 0; }
}
