/* Manrope für Header — identisch zum Portal */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

@font-face {
  font-family: 'Carlito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Carlito'), url('/fonts/carlito-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Carlito';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Carlito'), url('/fonts/carlito-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Carlito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Carlito Bold'), url('/fonts/carlito-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Carlito';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Carlito Bold'), url('/fonts/carlito-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --orange: #F49F25;
  --orange-dark: #D88715;
  --orange-light: #fdf4e3;
  --ink: #1D1D1B;
  --ink-soft: #555;
  --muted: #8a8a88;
  --line: #e6e4e1;
  --bg: #F4F3F2;
  --white: #ffffff;
  --danger: #d32f2f;
  --success: #2e7d32;
  --radius: 24px;
  --radius-sm: 12px;
  --shadow: 0 2px 8px rgba(29,29,27,.05);
  --shadow-lg: 0 12px 40px rgba(29,29,27,.08);
  --font: 'Carlito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); }

img { max-width: 100%; height: auto; display: block; }

button, .btn {
  font-family: inherit;
  font-size: 15px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  cursor: pointer;
  font-weight: 700;
  transition: all .15s ease;
  background: var(--ink);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
button:hover, .btn:hover { background: var(--orange); color: var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }

input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244,159,37,.15);
}
label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 500; }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header.topbar {
  background: hsla(0, 0%, 100%, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  max-width: 1320px;
  margin: 0 auto;
  gap: 24px;
}
.brand,
.brand-sub,
nav.main-nav,
nav.main-nav a {
  font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", sans-serif;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand-logo { height: 38px; width: auto; display: block; }
.brand-sub {
  font-size: clamp(0.85rem, 0.80rem + 0.3vw, 0.95rem);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
@media (max-width: 720px) {
  .topbar-inner { padding: 12px 20px; }
  .brand-logo { height: 32px; }
  .brand-sub { display: none; }
}

nav.main-nav { display: flex; align-items: center; gap: 4px; }
nav.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: clamp(0.85rem, 0.80rem + 0.3vw, 0.95rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  transition: background .15s ease, color .15s ease;
}
nav.main-nav a:hover {
  background: var(--orange-light);
  color: var(--orange-dark);
}
nav.main-nav a.active {
  background: var(--orange);
  color: white;
}

.cart-btn {
  position: relative;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px 16px;
}
.cart-btn:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--orange);
  color: var(--ink);
  font-size: 11px;
  border-radius: 100%;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.cart-count.has-items { display: inline-flex; }

/* Hero */
.hero {
  background: var(--white);
  padding: 64px 20px 44px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: 44px;
  margin: 0 0 12px;
  letter-spacing: -1px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.1;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { margin: 0; color: var(--ink-soft); max-width: 640px; margin-inline: auto; font-size: 17px; line-height: 1.5; }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0 24px;
  align-items: center;
}
.chip {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
  color: var(--ink);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.filter-spacer { flex: 1; }
.filter-bar input { max-width: 260px; }

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-media {
  aspect-ratio: 4 / 3;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-media img { transform: scale(1.04); }
.badge-stock {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--white);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}
.badge-stock.low { background: #fff3e0; color: #ef6c00; }
.badge-stock.out { background: #ffebee; color: var(--danger); }
.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-cats { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; font-weight: 600; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.3;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}
.price {
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.price-tiny { font-size: 12px; color: var(--muted); font-weight: 400; }
.card button.add {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px 0;
}
.product-detail .media {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.product-detail .media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail h1 { font-size: 32px; margin: 0 0 10px; letter-spacing: -.5px; }
.product-detail .sku { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.product-detail .price-big { font-size: 36px; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: -.5px; }
.product-detail .price-note { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.product-detail .description { color: var(--ink-soft); margin-bottom: 28px; line-height: 1.7; }
.stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #e8f5e9;
  color: var(--success);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.stock-indicator.low { background: #fff3e0; color: #ef6c00; }
.stock-indicator.out { background: #ffebee; color: var(--danger); }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.qty-stepper { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); }
.qty-stepper button { background: var(--white); color: var(--ink); padding: 8px 14px; border-radius: 0; font-weight: 700; }
.qty-stepper button:hover { background: var(--orange); color: var(--ink); }
.qty-stepper input {
  width: 60px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  padding: 8px;
}
.qty-stepper input:focus { box-shadow: none; }

/* Cart + Checkout */
.page-title { font-size: 32px; margin: 40px 0 8px; letter-spacing: -.5px; }
.page-sub { color: var(--ink-soft); margin-bottom: 32px; }

.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; padding-bottom: 60px; }
.cart-items { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  grid-template-areas: "img info qty total remove";
  gap: 16px;
  padding: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item > img { grid-area: img; width: 80px; height: 60px; object-fit: cover; border-radius: 10px; }
.cart-item .cart-item-info { grid-area: info; min-width: 0; }
.cart-item .qty-stepper { grid-area: qty; }
.cart-item .price { grid-area: total; }
.cart-item-name { font-weight: 600; }
.cart-item-sku { font-size: 12px; color: var(--muted); }
.cart-item .remove {
  grid-area: remove;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cart-item .remove:hover { background: #ffebee; color: var(--danger); }

.summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 90px;
}
.summary h3 { margin-top: 0; font-size: 18px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink-soft); }
.summary-total { display: flex; justify-content: space-between; padding: 16px 0 8px; border-top: 1px solid var(--line); margin-top: 8px; font-weight: 700; font-size: 20px; color: var(--ink); }

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

/* Checkout form */
.checkout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; padding-bottom: 60px; }
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.form-card h3 { margin-top: 0; font-size: 18px; }
.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.form-row.three { grid-template-columns: 120px 1fr 1fr; }
@media (max-width: 640px) {
  .form-row.two, .form-row.three { grid-template-columns: 1fr; }
}

.notice {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--orange-light);
  color: var(--ink);
  font-size: 14px;
  border: 1px solid #f0ddae;
  margin-bottom: 20px;
}
.notice.error { background: #ffebee; color: var(--danger); border-color: #ffcdd2; }
.notice.success { background: #e8f5e9; color: var(--success); border-color: #c8e6c9; }

/* Login gate */
.gate-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.gate-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.gate-box h2 { font-weight: 700; letter-spacing: -.3px; }
.gate-box h2 { margin: 0 0 8px; }
.gate-box p { color: var(--ink-soft); margin-bottom: 24px; font-size: 14px; }
.gate-error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* Footer */
footer.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 40px;
}

/* Utilities */
.hidden { display: none !important; }
.loading { text-align: center; padding: 80px; color: var(--muted); }
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--line);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout, .checkout-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .hero h1 { font-size: 30px; }
  nav.main-nav { display: none; }
  .cart-item { grid-template-columns: 60px 1fr auto; grid-template-areas: "img info remove" "img qty total"; gap: 10px; }
  .cart-item img { grid-area: img; width: 60px; height: 45px; }
}
