/* =====================================================================
   Weinshop – Stylesheet (modernes Design)
   Keine externen Ressourcen (keine Google Fonts o. Ä.) -> DSGVO-freundlich.
   Farben & Maße zentral als CSS-Variablen: hier anpassen, wirkt überall.
   ===================================================================== */

:root {
  --wine:        #7d2231;   /* Bordeaux – Hauptakzent              */
  --wine-deep:   #571522;   /* dunkler Bordeaux                   */
  --gold:        #b8925a;   /* warmes Gold – feiner Akzent        */
  --ink:         #1c1613;   /* fast-schwarz, warm (Text/Logo)     */
  --charcoal:    #24201d;   /* dunkle Flächen                     */
  --bg:          #f7f3ec;   /* Seitenhintergrund (warmes Creme)   */
  --paper:       #ffffff;   /* Karten                             */
  --muted:       #8a7d70;   /* gedämpfter Text                    */
  --line:        #ebe3d6;   /* Trennlinien                        */
  --ok:          #2e7d47;
  --err:         #b3261e;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(28,22,19,.06);
  --shadow:    0 6px 24px -8px rgba(28,22,19,.18);
  --shadow-lg: 0 20px 50px -18px rgba(28,22,19,.32);
  --wrap: 1140px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: Georgia, "Times New Roman", "Iowan Old Style", serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
}

a { color: var(--wine); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.eyebrow {
  font-family: system-ui, sans-serif;
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 700; color: var(--gold);
}

/* ---------- Kopfbereich ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247,243,236,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 12px 24px; max-width: var(--wrap); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { position: relative; display: inline-flex; }
.brand-logo-img {
  height: 52px; width: auto; display: block;
  animation: logoIn .9s var(--ease) both;
  transition: transform .3s var(--ease);
}
.brand:hover .brand-logo-img { transform: scale(1.05); }
/* Gold-Schimmer: nur auf den Logo-Formen (Original-Logo als Maske) */
.brand-logo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("../img/logo.png") center / contain no-repeat;
          mask: url("../img/logo.png") center / contain no-repeat;
  background: linear-gradient(120deg, transparent 43%, rgba(184,146,90,.85) 50%, transparent 57%);
  background-size: 250% 100%; background-repeat: no-repeat;
  background-position: 150% 0;
  animation: logoSheen 7s ease-in-out 1.4s infinite;
}
@keyframes logoIn { from { opacity: 0; transform: translateY(-6px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes logoSheen { 0% { background-position: 150% 0; } 22%, 100% { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) {
  .brand-logo-img, .brand-logo::after { animation: none; }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.15rem; font-weight: 600; color: var(--ink); font-family: Georgia, serif; }
.brand-sub { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--ink); font-size: .92rem; padding: 8px 14px; border-radius: 30px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.main-nav a:hover { background: rgba(125,34,49,.08); color: var(--wine); text-decoration: none; }

.cart-toggle {
  position: relative; border: 1px solid var(--ink); background: var(--ink);
  border-radius: 30px; padding: 9px 18px; cursor: pointer;
  font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 9px;
  color: #fff; transition: transform .2s var(--ease), background .2s var(--ease);
}
.cart-toggle:hover { transform: translateY(-1px); background: var(--wine); }
.cart-count {
  background: var(--gold); color: var(--ink); border-radius: 20px;
  min-width: 22px; height: 22px; padding: 0 6px; font-size: .78rem;
  display: inline-grid; place-items: center; font-weight: 800;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 85% -10%, rgba(184,146,90,.20), transparent 55%),
    linear-gradient(155deg, #2a2420 0%, var(--wine-deep) 62%, var(--wine) 100%);
  color: #fff; text-align: center; padding: 84px 24px 92px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 14px 0 18px;
}
.hero p { color: #efe4de; font-size: 1.1rem; margin: 0 auto; max-width: 560px; }
.hero-divider { width: 64px; height: 2px; background: var(--gold); margin: 26px auto 0; border: 0; }

/* ---------- Kategorie-Filter ---------- */
.filter-bar {
  position: sticky; top: 77px; z-index: 30;
  background: rgba(247,243,236,.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.filter-inner {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 14px 24px; max-width: var(--wrap); margin: 0 auto;
}
.filter-label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-right: 6px; font-weight: 700; }
.chip {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  border-radius: 30px; padding: 7px 16px; font-size: .86rem; cursor: pointer;
  transition: all .18s var(--ease); font-weight: 500;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Produktliste ---------- */
main { padding: 44px 0 72px; }
.category-block { margin-bottom: 52px; scroll-margin-top: 140px; }
.category-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 22px; }
.category-title { font-size: 1.7rem; margin: 0; }
.category-rule { flex: 1; height: 1px; background: var(--line); }

.product-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.product-card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 24px; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.product-card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--wine), var(--gold));
  border-radius: 3px; opacity: 0; transition: opacity .25s var(--ease);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #e0d5c4; }
.product-card:hover::before { opacity: 1; }
.product-card h3 { margin: 0 0 4px; font-size: 1.18rem; }
.product-year { color: var(--gold); font-weight: 700; font-size: .82rem; letter-spacing: .02em; }
.product-desc { color: var(--muted); font-size: .9rem; margin: 6px 0 16px; flex: 1; }
.product-meta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.product-size { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.product-price { font-size: 1.4rem; font-weight: 600; color: var(--ink); font-family: Georgia, serif; }
.product-price small { font-size: .68rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }

.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--bg); }
.qty-stepper button {
  width: 36px; height: 42px; border: 0; background: transparent; color: var(--ink);
  font-size: 1.3rem; cursor: pointer; line-height: 1; transition: background .15s var(--ease), color .15s var(--ease);
}
.qty-stepper button:hover { background: var(--ink); color: #fff; }
.qty-stepper input {
  width: 44px; height: 42px; border: 0; text-align: center; font-size: 1rem; background: transparent;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line); -moz-appearance: textfield; color: var(--ink);
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-btn {
  flex: 1; border: 0; background: var(--wine); color: #fff; border-radius: var(--r-sm);
  padding: 11px 12px; font-size: .9rem; cursor: pointer; font-weight: 600; letter-spacing: .01em;
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.add-btn:hover { background: var(--wine-deep); transform: translateY(-1px); }
.soldout-tag { color: var(--err); font-weight: 700; font-size: .88rem; }

/* ---------- Warenkorb (Seitenpanel) ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(24,20,17,.5);
  backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: .25s; z-index: 50;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-panel {
  position: fixed; top: 0; right: 0; height: 100%; width: min(460px, 100%);
  background: var(--bg); z-index: 60; transform: translateX(100%);
  transition: transform .32s var(--ease); display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.cart-panel.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; background: var(--ink); color: #fff; }
.cart-head h2 { color: #fff; margin: 0; font-size: 1.25rem; }
.cart-close { background: none; border: 0; color: #fff; font-size: 1.7rem; cursor: pointer; line-height: 1; opacity: .8; }
.cart-close:hover { opacity: 1; }
.cart-body { flex: 1; overflow-y: auto; padding: 12px 24px; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 56px; }
.cart-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item-main { flex: 1; }
.cart-item-name { font-weight: 600; }
.cart-item-sub { font-size: .8rem; color: var(--muted); margin-top: 1px; }
.cart-item-right { text-align: right; }
.cart-item-price { font-weight: 600; color: var(--ink); font-family: Georgia, serif; font-size: 1.05rem; }
.cart-remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .78rem; text-decoration: underline; padding: 0; }
.cart-remove:hover { color: var(--err); }
.mini-stepper { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.mini-stepper button { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; cursor: pointer; color: var(--ink); font-size: 1rem; transition: .15s; }
.mini-stepper button:hover { background: var(--ink); color: #fff; }
.mini-stepper span { min-width: 22px; text-align: center; font-weight: 600; }

.cart-foot { padding: 20px 24px; border-top: 1px solid var(--line); background: var(--paper); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.cart-total .amount { color: var(--ink); font-family: Georgia, serif; font-size: 1.5rem; }
.cart-note { font-size: .76rem; color: var(--muted); margin: 0 0 14px; }
.checkout-btn {
  width: 100%; border: 0; background: var(--wine); color: #fff; padding: 15px;
  border-radius: var(--r-sm); font-size: 1.02rem; font-weight: 700; cursor: pointer;
  transition: background .2s var(--ease); letter-spacing: .01em;
}
.checkout-btn:hover { background: var(--wine-deep); }
.checkout-btn:disabled { background: var(--muted); cursor: not-allowed; }

/* ---------- Checkout / Formular ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(24,20,17,.55);
  backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 70; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg); border-radius: var(--r-lg); width: min(640px, 100%);
  box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.4rem; }
.modal-close { background: none; border: 0; font-size: 1.7rem; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 26px; }

.order-summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; margin-bottom: 24px; }
.order-summary h3 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-family: system-ui, sans-serif; }
.order-summary ul { list-style: none; margin: 0; padding: 0; }
.order-summary li { display: flex; justify-content: space-between; padding: 4px 0; font-size: .92rem; }
.order-summary .sum-line { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 1.05rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .78rem; margin-bottom: 6px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field .req { color: var(--wine); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: .95rem; background: var(--paper); font-family: inherit; color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(125,34,49,.12);
}
.field textarea { resize: vertical; min-height: 74px; }

.consent { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px; font-size: .88rem; color: var(--ink); }
.consent input { margin-top: 3px; accent-color: var(--wine); width: 17px; height: 17px; flex: none; }

.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.captcha-box { display: flex; align-items: center; gap: 12px; margin-top: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; flex-wrap: wrap; }
.captcha-box label { font-weight: 600; font-size: .92rem; }
.captcha-box input { width: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 1rem; font-family: inherit; }
.captcha-box input:focus { outline: 0; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(125,34,49,.12); }

.form-actions { margin-top: 24px; display: flex; gap: 12px; justify-content: flex-end; }
.btn-secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-sm); padding: 13px 22px; cursor: pointer; font-size: .95rem; font-weight: 500; transition: .18s; }
.btn-secondary:hover { border-color: var(--ink); }
.btn-primary { background: var(--wine); border: 0; color: #fff; border-radius: var(--r-sm); padding: 13px 28px; cursor: pointer; font-size: 1rem; font-weight: 700; transition: background .2s var(--ease); }
.btn-primary:hover { background: var(--wine-deep); }
.btn-primary:disabled { background: var(--muted); cursor: wait; }

.form-msg { margin-top: 16px; padding: 13px 16px; border-radius: var(--r-sm); display: none; font-size: .92rem; }
.form-msg.show { display: block; }
.form-msg.error { background: #fdecea; color: var(--err); border: 1px solid #f5c6c0; }
.form-msg.success { background: #e7f5ec; color: var(--ok); border: 1px solid #bfe3cc; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #e9e0d7; padding: 56px 24px 28px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; max-width: var(--wrap); margin: 0 auto; }
.footer-brand-logo { height: 64px; width: auto; filter: invert(1) brightness(1.6); margin-bottom: 14px; }
.footer-grid h4 { color: #fff; font-family: Georgia, serif; margin: 0 0 12px; font-size: 1.05rem; }
.footer-grid a { color: #e9e0d7; }
.footer-grid a:hover { color: var(--gold); }
.footer-grid p { color: #c9bdb1; margin: 6px 0; font-size: .92rem; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; color: #b3a798; max-width: var(--wrap); margin-left: auto; margin-right: auto; }

/* ---------- Statische Seiten (Impressum etc.) ---------- */
.legal { background: var(--paper); max-width: 820px; margin: 40px auto; padding: 44px 52px; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.legal h1 { margin-top: 0; font-size: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 30px; }
.legal a.back { display: inline-block; margin-bottom: 22px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .main-nav { display: none; }
  /* Auf dem Handy trägt das Logo bereits den Namen -> Text-Schriftzug ausblenden */
  .brand-text { display: none; }
  .header-inner { padding: 12px 16px; gap: 10px; }
  .brand-logo-img { height: 46px; }
  .cart-toggle { padding: 9px 14px; font-size: .84rem; }
  .hero { padding: 60px 20px 66px; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.2rem); }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { top: 72px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .legal { padding: 26px 22px; margin: 16px; }
  .modal-overlay { padding: 16px; }
}
