/* Beauty Moments — Shop-Demo Styling (Test-Run) */
:root {
  --ink: #2c2824;
  --ink-soft: #6b6258;
  --paper: #faf9f7;
  --paper-2: #f2ede6;
  --paper-3: #e8e0d5;
  --line: #e4ddd2;
  --accent: #7d8b6a;
  --accent-dark: #5f6d4e;
  --accent-warm: #d98a4f;
  --white: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
  --shadow: 0 18px 50px rgba(44, 40, 36, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--paper); }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}

body.noscroll { overflow: hidden; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Header ---------- */
.shop-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1.5rem, env(safe-area-inset-right)) 1rem
    max(1.5rem, env(safe-area-inset-left));
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-back {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav-back:hover { color: var(--ink); }

.nav-brand {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cart-btn {
  position: relative;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.2s, transform 0.15s;
}
.cart-btn:hover { border-color: var(--accent); transform: translateY(-1px); }

.cart-badge {
  display: inline-block;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  line-height: 20px;
  text-align: center;
}
/* Snipcart befüllt .snipcart-items-count; leer = kein Artikel -> ausblenden */
.cart-badge:empty { display: none; }

/* ---------- Demo-Banner ---------- */
.demo-banner {
  background: var(--ink);
  color: #f2ede6;
  text-align: center;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  padding: 0.55rem 1rem;
}
.demo-banner strong { color: #fff; }

/* ---------- Intro ---------- */
.shop-intro {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem max(1.5rem, env(safe-area-inset-right)) 1.5rem
    max(1.5rem, env(safe-area-inset-left));
  text-align: center;
}
.shop-intro .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.shop-intro h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: 0.01em; }
.shop-intro p { color: var(--ink-soft); max-width: 560px; margin: 1rem auto 0; }

/* ---------- Grid ---------- */
.shop-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem max(1.5rem, env(safe-area-inset-right)) 5rem
    max(1.5rem, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-media {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: var(--paper-2);
  aspect-ratio: 1 / 1;
}
.card-media svg { display: block; width: 100%; height: 100%; }

.card-tag {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.card-body { padding: 1.2rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-cat {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.card-name { font-size: 1.18rem; line-height: 1.25; }
.card-sub { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.2rem; }
.card-short { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.7rem; }

.card-price { margin-top: auto; padding-top: 1rem; display: flex; align-items: baseline; gap: 0.6rem; }
.price { font-family: var(--serif); font-size: 1.3rem; }
.base { font-size: 0.72rem; color: var(--ink-soft); }

.card-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-solid { background: var(--ink); color: var(--white); flex: 1; }
.btn-solid:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-block { width: 100%; margin-top: 1rem; }

/* ---------- Overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(28, 24, 20, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Modal (Detail) ---------- */
.modal {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: min(960px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 16px;
  padding: 1.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  z-index: 2;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink-soft);
}
.modal-close:hover { color: var(--ink); }

.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

.gallery-main {
  background: var(--paper-2);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.gallery-main svg { width: 100%; height: 100%; display: block; }
.gallery-thumbs { display: flex; gap: 0.6rem; margin-top: 0.7rem; }
.thumb {
  width: 70px; height: 70px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--paper-2);
  padding: 0;
}
.thumb.active { border-color: var(--accent); }
.thumb svg { width: 100%; height: 100%; display: block; }

.detail-name { font-size: 1.7rem; margin-top: 0.3rem; }
.detail-rating { display: flex; align-items: center; gap: 0.6rem; margin: 0.7rem 0; }
.detail-rating-meta { font-size: 0.78rem; color: var(--ink-soft); }
.review-stars { color: var(--accent-warm); letter-spacing: 0.1em; }
.detail-price { display: flex; align-items: baseline; gap: 0.7rem; margin: 0.6rem 0 1rem; }
.detail-price .price { font-size: 1.6rem; }
.detail-desc { color: var(--ink-soft); font-size: 0.92rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 1rem; }
.field span { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.field select, .field input {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
}
.field select:focus, .field input:focus { outline: 2px solid var(--accent-soft, #b9c4a8); border-color: var(--accent); }

.qty-row { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.3rem; flex-wrap: wrap; }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.qty button { border: 0; background: var(--white); width: 38px; height: 38px; font-size: 1.1rem; color: var(--ink); }
.qty button:hover { background: var(--paper-2); }
.qty span { min-width: 34px; text-align: center; font-size: 0.95rem; }
.qty-sm button { width: 30px; height: 30px; font-size: 1rem; }
.btn-add-detail { flex: 1; min-width: 200px; }

.ship-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.9rem; }

.modal-section { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.modal-section h3 { font-size: 1.15rem; margin-bottom: 1rem; }

.reviews { display: grid; gap: 1rem; }
.review { background: var(--white); border: 1px solid var(--line); border-radius: 11px; padding: 1rem 1.1rem; }
.review-top { display: flex; align-items: center; gap: 0.8rem; }
.review-verified { font-size: 0.68rem; letter-spacing: 0.06em; color: var(--accent-dark); }
.review-text { margin: 0.5rem 0; font-size: 0.92rem; }
.review-meta { font-size: 0.76rem; color: var(--ink-soft); }

.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.related-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.15s;
}
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-media { width: 100%; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.related-media svg { width: 100%; height: 100%; display: block; }
.related-name { font-size: 0.82rem; line-height: 1.2; }
.related-price { font-family: var(--serif); font-size: 0.95rem; }

/* ---------- Drawer ---------- */
.drawer {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 1.2rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.drawer-empty { color: var(--ink-soft); text-align: center; margin-top: 2rem; }
.drawer-foot { border-top: 1px solid var(--line); padding: 1.2rem 1.4rem max(1.4rem, env(safe-area-inset-bottom)); }

.line { display: grid; grid-template-columns: 60px 1fr auto; gap: 0.8rem; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.line-media { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; background: var(--paper-2); }
.line-media svg { width: 100%; height: 100%; display: block; }
.line-name { font-size: 0.92rem; line-height: 1.2; }
.line-variant { font-size: 0.74rem; color: var(--ink-soft); margin: 0.15rem 0 0.4rem; }
.line-right { text-align: right; }
.line-price { font-family: var(--serif); }
.line-remove { border: 0; background: transparent; color: var(--ink-soft); font-size: 0.72rem; text-decoration: underline; padding: 0.3rem 0 0; }
.line-remove:hover { color: var(--ink); }

.sum-row { display: flex; justify-content: space-between; font-size: 0.92rem; margin: 0.35rem 0; }
.sum-muted { color: var(--ink-soft); }
.sum-total { font-family: var(--serif); font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 0.6rem; margin-top: 0.6rem; }

/* ---------- Checkout ---------- */
.checkout {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: min(900px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 16px;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.checkout.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }

.co-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.co-main h2 { font-size: 1.7rem; }
.co-demo { font-size: 0.82rem; color: var(--ink-soft); margin: 0.5rem 0 1.4rem; padding: 0.6rem 0.8rem; background: var(--paper-3); border-radius: 9px; }

.express-label { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.6rem; }
.express-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.xbtn {
  border: 0;
  border-radius: 9px;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.2s;
}
.xbtn:hover { transform: translateY(-1px); opacity: 0.92; }
.xbtn-apple { background: #000; color: #fff; }
.xbtn-gpay { background: #fff; color: #3c4043; border: 1px solid #dadce0; }
.xbtn-gpay span { color: #4285f4; font-weight: 700; }
.xbtn-paypal { background: #ffc439; color: #003087; }
.xbtn-paypal em { font-style: italic; color: #002f86; }

.or-divider { text-align: center; margin: 1.4rem 0 0.4rem; position: relative; color: var(--ink-soft); font-size: 0.76rem; }
.or-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.or-divider span { position: relative; background: var(--paper); padding: 0 0.8rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field-sm { max-width: 140px; }
.btn-pay { margin-top: 1.4rem; }
.co-fineprint { font-size: 0.72rem; color: var(--ink-soft); text-align: center; margin-top: 0.7rem; }

.co-summary { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem; align-self: start; }
.co-summary h3 { font-size: 1.1rem; margin-bottom: 0.9rem; }
.co-lines { display: grid; gap: 0.5rem; margin-bottom: 0.9rem; }
.co-line { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.86rem; }
.co-vat { font-size: 0.76rem; color: var(--ink-soft); margin-top: 0.5rem; }

.co-success { text-align: center; padding: 2rem 1rem; max-width: 520px; margin: 0 auto; }
.co-check {
  width: 64px; height: 64px; margin: 0 auto 1.2rem;
  border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 2rem; line-height: 64px;
}
.co-success h2 { font-size: 1.5rem; }
.co-success p { color: var(--ink-soft); margin: 1rem 0 1.6rem; }

/* ---------- Footer ---------- */
.shop-footer {
  text-align: center;
  padding: 2.5rem 1.5rem max(2.5rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-grid, .co-grid { grid-template-columns: 1fr; }
  .co-summary { order: -1; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .shop-grid { grid-template-columns: 1fr; }
  .card-actions { flex-direction: column; }
  .related { grid-template-columns: repeat(3, 1fr); }
  .nav-brand { display: none; }
}
