/* ============================================================
   DING³ SHOP – Global Stylesheet
   ============================================================ */

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

:root {
  --navy:       #1b3b6f;
  --navy-dark:  #0d1b35;
  --navy-mid:   #162d56;
  --pink:       #d33682;
  --pink2:      #c42f7a;
  --bg:         #0b1628;        /* Seitenhintergrund dunkel */
  --bg-card:    #152040;        /* Produktkarten */
  --bg-section: #0f1e38;        /* Abschnittshintergründe */
  --border:     rgba(255,255,255,.08);
  --text:       #e8edf5;
  --text-muted: #8a9bbf;
  --white:      #ffffff;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-width: 320px;
}

/* ── HEADER ─────────────────────────────────────────────── */
header {
  background: rgba(11, 22, 40, 0.97);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img { height: 44px; width: auto; }

nav { display: flex; gap: 10px; margin-left: auto; }
nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 7px 18px;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: border-color .2s, color .2s;
}
nav a:hover, nav a.active { border-color: var(--pink); color: var(--white); }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0d1b35 0%, #1b3b6f 45%, var(--pink) 100%);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
}
.hero-watermark {
  position: absolute;
  inset: 0;
  background: url('images/ding3-watermark.png') center/contain no-repeat;
  opacity: .07;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-logo { height: 80px; width: auto; margin-bottom: 16px; }
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--white);
  font-weight: 700;
  letter-spacing: .04em;
}
.hero p { color: rgba(255,255,255,.82); font-size: clamp(1rem, 2vw, 1.15rem); margin-top: 10px; }
.hero-made { margin-top: 10px; color: rgba(255,255,255,.65); font-size: .95rem; letter-spacing: .06em; }
.hero-made strong { font-family: 'Brush Script MT', cursive; font-size: 1.4rem; }

/* ── STRIPE NOTICE ───────────────────────────────────────── */
.stripe-notice {
  background: rgba(16, 185, 129, .08);
  border-bottom: 1px solid rgba(16, 185, 129, .2);
  text-align: center;
  padding: 10px 24px;
  font-size: 13px;
  color: #6ee7b7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── PRODUCTS SECTION ────────────────────────────────────── */
#produkte {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}
#produkte h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--white);
}
.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 44px;
  line-height: 1.65;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 28px;
}

/* ── PRODUCT CARD ────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
  border-color: rgba(211,54,130,.3);
}
.product-image {
  background: linear-gradient(135deg, #162d56 0%, var(--pink) 100%);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: none;
  transition: transform .3s ease;
}
.product-card:hover .product-image img {
  transform: scale(1.04);
}
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--pink);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.product-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.product-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.product-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pink);
}
.product-price small {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
  margin-top: -2px;
}
.btn-buy {
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.btn-buy:hover { background: var(--pink2); }
.btn-buy:active { transform: scale(.97); }
.btn-buy:disabled { background: #334; color: #667; cursor: not-allowed; }

/* ── VORTEILE SECTION ────────────────────────────────────── */
#vorteile {
  background: linear-gradient(135deg, #0d1b35 0%, #1b3b6f 55%, var(--pink) 100%);
  padding: 72px 24px;
  position: relative;
  overflow: hidden;
}
#vorteile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/ding3-watermark.png') center/420px no-repeat;
  opacity: .05;
}
.vorteile-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}
.vorteile-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
}
.vorteile-logo img { height: 52px; }
.vorteile-logo span { color: rgba(255,255,255,.8); font-size: 1.5rem; font-weight: 300; }
.vorteile-list { list-style: none; text-align: left; display: inline-block; }
.vorteile-list li {
  color: rgba(255,255,255,.92);
  font-size: 1.05rem;
  padding: 9px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  line-height: 1.5;
}
.vorteile-list li::before {
  content: '✓';
  background: var(--pink);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── CONTACT SECTION ─────────────────────────────────────── */
#kontakt {
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 24px;
  text-align: center;
}
#kontakt h2 { font-size: 1.8rem; font-weight: 700; color: var(--white); margin-bottom: 14px; }
#kontakt p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.65; }
.contact-link {
  color: var(--pink);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.contact-link:hover { text-decoration: underline; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: var(--pink);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/ding3-watermark.png') center/300px no-repeat;
  opacity: .06;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.footer-copy { color: rgba(255,255,255,.85); font-size: .88rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .88rem; transition: color .2s; }
.footer-links a:hover { color: white; }
.footer-social { display: flex; gap: 12px; }
.footer-social a img { width: 28px; height: 28px; filter: brightness(0) invert(1) opacity(.8); transition: opacity .2s; }
.footer-social a:hover img { opacity: 1; }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 20px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  z-index: 200;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #3b0a0a; border-color: rgba(239,68,68,.3); color: #fca5a5; }

/* ── PAGE LOADER ─────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(11,22,40,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.page-loader.active { opacity: 1; pointer-events: all; }
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255,255,255,.15);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PREVIEW BANNER ──────────────────────────────────────── */
.preview-banner {
  background: rgba(251,191,36,.12);
  border-bottom: 1px solid rgba(251,191,36,.25);
  color: #fde68a;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-inner { padding: 10px 16px; gap: 10px; }
  nav a { padding: 6px 12px; font-size: 13px; }
  .hero { padding: 40px 16px; }
  #produkte, #kontakt { padding: 44px 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── WARENKORB ───────────────────────────────────────────── */

/* Cart-Icon im Header */
.cart-icon-btn {
  position: relative;
  background: none;
  border: 2px solid transparent;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
}
.cart-icon-btn:hover { border-color: var(--pink); color: var(--white); }

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--pink);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

/* Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100vw;
  height: 100dvh;
  background: #0f1e38;
  border-left: 1px solid var(--border);
  z-index: 401;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.4);
}
.cart-sidebar.open { transform: translateX(0); }

/* Header */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.cart-close:hover { color: var(--white); background: rgba(255,255,255,.08); }

/* Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Empty state */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 24px;
  color: var(--text-muted);
  text-align: center;
}
.cart-empty p { font-size: .95rem; }
.btn-continue-shopping {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 20px;
  font-size: .88rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-continue-shopping:hover { border-color: var(--pink); color: var(--white); }

/* Cart item */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-size: .88rem; font-weight: 600; color: var(--white); line-height: 1.35; }
.cart-item-opts { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.cart-item-price { font-size: .92rem; font-weight: 700; color: var(--pink); margin-top: 2px; }
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cart-qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.cart-qty-ctrl button {
  background: var(--bg-card);
  border: none;
  color: var(--text);
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.cart-qty-ctrl button:hover { background: rgba(211,54,130,.2); color: var(--white); }
.cart-qty-ctrl span {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--white);
  width: 30px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 600;
}
.cart-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color .2s, background .2s;
  display: flex;
  align-items: center;
}
.cart-remove:hover { color: #f87171; background: rgba(248,113,113,.1); }

/* Footer */
.cart-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-totals { display: flex; flex-direction: column; gap: 6px; }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--text-muted);
}
.cart-total-row.total-final {
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.cart-shipping-row { font-size: .8rem; }
.shipping-free { color: #6ee7b7; }
.shipping-cost { color: var(--text-muted); }

.btn-checkout {
  width: 100%;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  letter-spacing: .02em;
}
.btn-checkout:hover { background: var(--pink2); }
.btn-checkout:active { transform: scale(.98); }
.btn-checkout:disabled { background: #334; color: #667; cursor: not-allowed; }

.btn-cart-clear {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 9px;
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-cart-clear:hover { border-color: rgba(248,113,113,.4); color: #f87171; }

/* "In den Warenkorb" Bestätigung Toast */
.cart-added-toast {
  position: fixed;
  bottom: 100px;
  right: 24px;
  background: #1a3a1a;
  border: 1px solid rgba(110,231,183,.3);
  color: #6ee7b7;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  z-index: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}
.cart-added-toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 480px) {
  .cart-sidebar { width: 100vw; }
}
