/* ============================================================
   shop.css — Shop-spezifische Komponenten (Header, Hero,
   Kategorien, Produkt-Karten, Filter, Footer).
   CI-Tokens kommen aus shared.css (:root).
   ============================================================ */

/* ---------- Reset / Grundlayout ---------- */
html, body { min-height: 100%; }
body.shop-layout {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.shop-layout main { flex: 1; }
a { color: inherit; }

/* ---------- Shop-Container ---------- */
.shop-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.shop-section { padding: 40px 0; }
.shop-section-tight { padding: 24px 0; }
.shop-section h2 { font-size: 22px; font-weight: 700; margin: 0 0 20px; color: var(--text); }
.shop-section h2 .hint { font-weight: 400; color: var(--text-muted); font-size: 14px; margin-left: 8px; }

/* ============================================================
   HEADER
   ============================================================ */
.shop-header-wrap { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.shop-header {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
}
.shop-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.shop-logo-mark {
  width: 38px; height: 38px; border-radius: 8px; background: var(--accent);
  color: #fff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; letter-spacing: -.5px;
}
.shop-logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.shop-logo-text strong { font-size: 16px; color: var(--primary); font-weight: 800; letter-spacing: -.3px; }
.shop-logo-text span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.2px; }

/* Suchleiste */
.shop-search { position: relative; display: flex; }
.shop-search input {
  width: 100%; padding: 12px 110px 12px 44px;
  border: 2px solid var(--border); border-radius: 8px; background: #fff;
  font-size: 14px; font-family: inherit;
}
.shop-search input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(201,48,44,.12); }
.shop-search::before {
  content: ""; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6678' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.35-4.35'/></svg>") no-repeat center / contain;
}
.shop-search button {
  position: absolute; right: 5px; top: 5px; bottom: 5px;
  width: auto; margin: 0; padding: 0 18px; border-radius: 6px; font-size: 13px;
}

/* Header-Rechts */
.shop-header-actions { display: flex; align-items: stretch; gap: 2px; flex-wrap: nowrap; flex-shrink: 0; }
.shop-header-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 10px; text-decoration: none; color: var(--text); background: none; border: none;
  font-size: 11px; font-weight: 500; cursor: pointer; border-radius: 6px; font-family: inherit;
  position: relative; line-height: 1.1; flex-shrink: 0; white-space: nowrap; min-height: 52px;
}
.shop-header-btn:hover { background: var(--bg); color: var(--accent); }
.shop-header-btn svg { width: 20px; height: 20px; stroke-width: 1.8; flex-shrink: 0; }
.shop-header-btn .label { font-size: 10px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.shop-header-btn .badge {
  position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px;
  background: var(--accent); color: #fff; border-radius: 9px;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* "Mein Konto" in catnav */
.shop-catnav .catnav-konto { margin-left: auto; color: #CBD5E1; }
.shop-catnav .catnav-konto:hover, .shop-catnav .catnav-konto.active { color: #fff; border-bottom-color: var(--accent); }

/* Kategorien-Nav unter dem Header */
.shop-catnav { background: var(--primary); }
.shop-catnav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 4px; overflow-x: auto;
}
.shop-catnav a {
  color: #CBD5E1; text-decoration: none; padding: 10px 14px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.shop-catnav a:hover, .shop-catnav a.active { color: #fff; border-bottom-color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.shop-hero { background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%); color: #fff; padding: 48px 0 56px; }
.shop-hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: stretch;
}
.shop-hero h1 { font-size: 30px; margin: 0 0 8px; font-weight: 800; letter-spacing: -.5px; }
.shop-hero h1 .ac { color: var(--accent); }
.shop-hero .lead { color: #94A3B8; margin: 0 0 24px; font-size: 15px; }

.hero-card { background: #fff; color: var(--text); border-radius: 12px; padding: 24px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.4); }
.hero-card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }

.hero-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin: 0 0 18px; }
.hero-tab {
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; width: auto;
  font-family: inherit; margin-top: 0;
}
.hero-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.hero-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.hero-row .fld { display: flex; flex-direction: column; gap: 4px; }
.hero-row .fld label { font-size: 11px; color: var(--text-muted); margin: 0; text-transform: uppercase; letter-spacing: .5px; }
.hero-row .fld input { padding: 10px 12px; font-size: 14px; }
.hero-row .fld.fld-grow { flex: 1; min-width: 120px; }
.hero-row .fld.fld-hsn input { width: 90px; }
.hero-row .fld.fld-tsn input { width: 110px; }
.hero-row .hero-submit { width: auto; padding: 10px 20px; margin: 0; white-space: nowrap; }

.hero-garage { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 24px; color: #fff; }
.hero-garage h3 { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: #fff; }
.hero-garage .empty { color: #94A3B8; font-size: 13px; }
.hero-garage-list { display: flex; flex-direction: column; gap: 8px; }
.hero-garage-item {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 10px 12px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  transition: background .15s, border-color .15s;
}
.hero-garage-item:hover { background: rgba(201,48,44,.18); border-color: var(--accent); }
.hero-garage-item .bez { font-size: 13px; font-weight: 600; }
.hero-garage-item .hsn { font-size: 11px; color: #CBD5E1; font-family: ui-monospace, monospace; }

/* ============================================================
   KATEGORIEN-GRID
   ============================================================ */
.kat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.kat-tile {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 22px 16px; text-align: center; text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.kat-tile:hover { border-color: var(--accent); box-shadow: 0 8px 20px -10px rgba(201,48,44,.25); transform: translateY(-2px); }
.kat-tile .ico {
  width: 64px; height: 64px; border-radius: 50%;
  background: #F1F5F9; display: flex; align-items: center; justify-content: center;
}
.kat-tile:hover .ico { background: rgba(201,48,44,.1); }
.kat-tile .ico img { width: 36px; height: 36px; }
.kat-tile .name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.kat-tile .count { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   MARKEN-STRIP
   ============================================================ */
.marken-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.marken-badge {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  height: 64px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary); font-size: 14px; letter-spacing: -.2px;
  transition: border-color .15s;
}
.marken-badge:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   USP-SEKTION
   ============================================================ */
.usps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.usp {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start;
}
.usp .usp-ico {
  flex: 0 0 40px; height: 40px; border-radius: 8px;
  background: rgba(201,48,44,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.usp .usp-ico svg { width: 22px; height: 22px; }
.usp strong { font-size: 14px; display: block; margin-bottom: 2px; }
.usp span { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

/* ============================================================
   PRODUKT-KARTEN (für kategorie.html / suche.html später)
   ============================================================ */
.prod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.prod-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.prod-card:hover { border-color: var(--accent); box-shadow: 0 8px 20px -12px rgba(0,0,0,.15); }
.prod-card .thumb {
  aspect-ratio: 1; background: #F1F5F9; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 6px;
}
.prod-card .thumb img { width: 60%; height: 60%; opacity: .7; }
.prod-card .cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.prod-card .herst { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.prod-card .name { font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 36px; }
.prod-card .nr { font-size: 11px; color: var(--text-muted); font-family: ui-monospace, monospace; }
.prod-card .bot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.prod-card .price { font-size: 18px; font-weight: 800; color: var(--primary); }
.prod-card .stock-ok { font-size: 11px; color: var(--success); font-weight: 600; }
.prod-card .stock-bad { font-size: 11px; color: var(--error); font-weight: 600; }
.prod-card .actions { display: flex; gap: 8px; margin-top: 8px; }
.prod-card .actions input[type=number] { width: 56px; padding: 7px; text-align: center; }
.prod-card .actions button { flex: 1; margin: 0; padding: 8px 10px; font-size: 13px; }
.prod-card .ok-msg { font-size: 12px; color: var(--success); font-weight: 600; margin-top: 2px; }

/* ============================================================
   FOOTER
   ============================================================ */
.shop-footer { background: var(--primary); color: #CBD5E1; margin-top: 48px; }
.shop-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 40px 24px 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.shop-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin: 0 0 14px; font-weight: 700; }
.shop-footer ul { list-style: none; padding: 0; margin: 0; }
.shop-footer li { margin-bottom: 6px; }
.shop-footer a { color: #CBD5E1; text-decoration: none; font-size: 13px; }
.shop-footer a:hover { color: #fff; text-decoration: underline; }
.shop-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  max-width: 1280px; margin: 0 auto; padding: 16px 24px;
  display: flex; justify-content: space-between; color: #64748B; font-size: 12px; flex-wrap: wrap; gap: 10px;
}

/* ============================================================
   PRODUKT-DETAIL
   ============================================================ */
.prod-detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .shop-header { grid-template-columns: auto auto; gap: 12px; }
  .shop-search { grid-column: 1 / -1; order: 3; }
  .shop-hero-grid { grid-template-columns: 1fr; }
  .shop-hero h1 { font-size: 24px; }
}
@media (max-width: 700px) {
  .prod-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shop-wrap, .shop-header, .shop-catnav-inner, .shop-footer-inner, .shop-footer-bottom { padding-left: 16px; padding-right: 16px; }
  .shop-header-btn .label { display: none; }
  .kat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   KONTAKT-WIDGET (floating bottom-right)
   ============================================================ */
.contact-widget {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.contact-widget-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(201,48,44,.45); font-family: inherit;
  transition: transform .2s, box-shadow .2s;
}
.contact-widget-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(201,48,44,.55); }
.contact-widget-btn svg { width: 26px; height: 26px; }
.contact-widget-btn .cw-close { display: none; }
.contact-widget.open .cw-open { display: none; }
.contact-widget.open .cw-close { display: block; }

.contact-widget-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 40px -8px rgba(0,0,0,.18);
  padding: 18px; min-width: 240px;
  display: none; flex-direction: column; gap: 10px;
}
.contact-widget.open .contact-widget-panel { display: flex; }

.cw-panel-title { font-size: 13px; font-weight: 700; color: var(--primary); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.cw-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); padding: 8px 10px; border-radius: 8px;
  font-size: 13px; transition: background .15s;
}
.cw-link:hover { background: var(--bg); color: var(--accent); }
.cw-link .cw-icon {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  background: rgba(201,48,44,.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.cw-link .cw-icon svg { width: 17px; height: 17px; }
.cw-link .cw-label strong { display: block; font-size: 12px; font-weight: 700; margin-bottom: 1px; }
.cw-link .cw-label span { font-size: 11px; color: var(--text-muted); }

@media (max-width: 480px) {
  .contact-widget { bottom: 16px; right: 16px; }
  .contact-widget-btn { width: 50px; height: 50px; }
  .contact-widget-panel { min-width: 210px; }
}
