:root{
  --bg:#fbf7f1;
  --panel:#ffffff;
  --card:#ffffff;
  --text:#2a241e;
  --muted:#6f6256;
  --brand:#c07a3a;
  --brand2:#2f6f5d;
  --border: rgba(42,36,30,.10);
  --shadow: 0 14px 40px rgba(34,26,18,.10);
  --radius: 18px;
  --max: 1160px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1000px 500px at 18% -10%, rgba(192,122,58,.18), transparent 55%),
    radial-gradient(900px 420px at 92% 10%, rgba(47,111,93,.14), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.7), rgba(251,247,241,1)),
    var(--bg);
  color:var(--text);
  line-height:1.55;
}

a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
button{font:inherit}
.container{width:min(var(--max), calc(100% - 40px)); margin:0 auto}

.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(251,247,241,.75);
  border-bottom:1px solid var(--border);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:16px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  min-width: 220px;
}
.brand img{
  width:44px; height:44px; object-fit:contain;   object-position: center;
  filter: drop-shadow(0 10px 18px rgba(192,122,58,.15));
}
.brand .title{
  display:flex; flex-direction:column; line-height:1.1;
}
.brand .title strong{font-size:16px; letter-spacing:.2px}
.brand .title span{font-size:12px; color:var(--muted)}

.links{
  display:flex; gap:14px; flex-wrap:wrap; justify-content:center;
}
.links a{
  padding:8px 10px;
  border-radius:12px;
  color:var(--muted);
  border:1px solid transparent;
}
.links a:hover{
  color:var(--text);
  border-color: var(--border);
  background: rgba(42,36,30,.03);
}

.actions{
  display:flex; align-items:center; gap:10px; min-width:220px; justify-content:flex-end;
}

.btn{
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.72);
  color:var(--text);
  cursor:pointer;
  box-shadow: 0 8px 22px rgba(34,26,18,.06);
}
.btn:hover{background: rgba(255,255,255,.92)}
.btn.primary{
  border-color: rgba(192,122,58,.40);
  background: linear-gradient(135deg, rgba(192,122,58,.20), rgba(47,111,93,.12));
}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 12px; border-radius:14px;
  border:1px solid var(--border);
  color:var(--muted);
  background: rgba(255,255,255,.55);
}

.hero{padding:44px 0 26px}
.heroGrid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:22px;
  align-items:stretch;
}
.heroCard{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.70));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.heroCopy{padding:26px}
.kicker{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(192,122,58,.28);
  background: rgba(192,122,58,.10);
  color: #6b3f1e;
  font-size:12px;
}
h1{
  margin:14px 0 10px;
  font-size:42px;
  line-height:1.05;
  letter-spacing:-.6px;
}
p.lead{
  margin:0;
  color:var(--muted);
  font-size:16px;
  max-width: 54ch;
}
.heroCtas{
  display:flex; gap:12px; flex-wrap:wrap;
  margin-top:18px;
}
.heroMedia{position:relative; min-height:360px}
.heroMedia img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.96;
}
.heroMedia::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(600px 240px at 30% 10%, rgba(192,122,58,.20), transparent 60%),
    linear-gradient(180deg, rgba(251,247,241,.10), rgba(251,247,241,.92));
}

.section{padding:22px 0}
.sectionHead{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:14px; flex-wrap:wrap;
  margin-bottom:12px;
}
.sectionHead h2{margin:0; font-size:22px; letter-spacing:-.2px}
.sectionHead .muted{color:var(--muted); font-size:14px}

.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
.grid4{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
}

.card{
  border:1px solid var(--border);
  background: rgba(255,255,255,.78);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(34,26,18,.08);
  overflow:hidden;
}
.cardPad{padding:16px}
.card h3{margin:0 0 6px; font-size:16px}
.card p{margin:0; color:var(--muted); font-size:14px}

.pillRow{display:flex; gap:8px; flex-wrap:wrap}
.pill{
  border:1px solid var(--border);
  background: rgba(255,255,255,.65);
  color: var(--muted);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  user-select:none;
}
.pill.active{
  color: var(--text);
  border-color: rgba(192,122,58,.35);
  background: rgba(192,122,58,.10);
}

.galleryGrid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:10px;
}
.thumb{
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  border:1px solid var(--border);
  cursor:pointer;
  background: rgba(255,255,255,.75);
}
.thumb img{
  width:100%;
  height:160px;
  object-fit:contain;   object-position: center;
  transition: transform .25s ease;
}
.thumb:hover img{transform: scale(1.04)}
.thumb .cap{
  position:absolute; left:10px; right:10px; bottom:10px;
  font-size:12px;
  color:#2a241e;
  background: rgba(255,255,255,.75);
  border:1px solid rgba(42,36,30,.10);
  border-radius: 12px;
  padding:8px 10px;
  backdrop-filter: blur(10px);
}

.product{display:contain; flex-direction:column; object-fit:contain; height:100%}
.product img{height: 250px; object-fit:contain ;object-position: center;}
.priceRow{
  display:flex; align-items:center; justify-content:space-between; gap:10px;  object-position: center;
  margin-top:10px;
}
.price{font-weight:700}
.small{color:var(--muted); font-size:12px}

.footer{
  margin-top:26px;
  padding:22px 0 34px;
  border-top:1px solid var(--border);
  color:var(--muted);
}
.footerGrid{
  display:grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap:16px;
}
.footer a{color:var(--muted)}
.footer a:hover{color:var(--text)}
.copy{
  margin-top:14px;
  font-size:12px;
  color: rgba(111,98,86,.9);
}

/* Lightbox */
.lightbox{
  position:fixed; inset:0;
  display:none;
  place-items:center;
  background: rgba(34,26,18,.55);
  z-index:200;
  padding: 18px;
}
.lightbox.open{display:grid}
.lbPanel{
  width:min(1100px, 100%);
  border-radius: 18px;
  border:1px solid rgba(42,36,30,.14);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 90px rgba(34,26,18,.35);
  overflow:hidden;
}
.lbTop{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid rgba(42,36,30,.12);
}
.lbTitle{font-size:13px; color:var(--muted)}
.lbBtns{display:flex; gap:8px}
.iconBtn{
  width:38px; height:38px;
  border-radius:12px;
  border:1px solid rgba(42,36,30,.14);
  background: rgba(255,255,255,.75);
  color:var(--text);
  cursor:pointer;
}
.iconBtn:hover{background: rgba(255,255,255,.95)}
.lbBody{position:relative; background: #f4efe7}
.lbImg{
  width:100%;
  height:min(72vh, 720px);
  object-fit:contain;   object-position: center;
  transform: scale(1);
  transform-origin:center;
}
.lbHint{
  position:absolute;
  left:12px; bottom:12px;
  padding:8px 10px;
  border-radius:12px;
  font-size:12px;
  color:#2a241e;
  background: rgba(255,255,255,.70);
  border:1px solid rgba(42,36,30,.12);
}

/* Responsive */
@media (max-width: 980px){
  .heroGrid{grid-template-columns:1fr}
  .actions{min-width:auto}
  .galleryGrid{grid-template-columns: repeat(3, 1fr)}
  .grid3{grid-template-columns:1fr}
  .grid4{grid-template-columns: repeat(2, 1fr)}
  h1{font-size:36px}
}
@media (max-width: 560px){
  .links{display:none}
  .galleryGrid{grid-template-columns: repeat(2, 1fr)}
  .thumb img{height:140px}
}
/* --- SHOP: Produktbilder IMMER zentriert (robust) --- */
#productGrid .product > a{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px; /* gleiche Höhe wie dein Wunsch */
  background: rgba(255,255,255,.65);
  padding: 10px;
}

#productGrid .product > a > img{
  width: auto !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
  margin: 0 auto;
}
/* =========================
   SHOP CARDS: Preis über Button
   Button wird nie abgeschnitten
   ========================= */

/* Für Startseite Shop-Grid & Shopseite gleichermaßen */
.product .productBody{
  display:flex;
  flex-direction:column;
  gap:8px;
  height: 100%;
}

.product .price{
  font-weight:800;
  margin-top: 2px;
}

/* Button immer volle Breite, kein Quetschen */
.product .addBtn{
  width:100%;
  margin-top: 4px;
  white-space: normal;        /* falls mal lang */
  line-height: 1.15;
  padding: 12px 14px;
}

/* Falls irgendwo noch priceRow existiert: macht es stabil */
.priceRow{
  display:flex;
  flex-direction: column;     /* Preis über Button */
  gap:10px;
  align-items: stretch;
}

/* Media-Container für Produktbild: verhindert links "kleben" */
.product .productMedia{
  display:flex;
  align-items:center;
  justify-content:center;
  height:250px;               /* Bildhöhe */
  padding:10px;
  background: rgba(255,255,255,.65);
}

/* Bild zentriert und maximal sichtbar */
.product .productMedia img{
  width:auto !important;
  max-width:100% !important;
  height:100% !important;
  max-height:100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display:block;
}

/* =========================
   LIGHTBOX MOBILE FIX:
   Close Button nicht abgeschnitten
   ========================= */

.lightbox .lbPanel{
  max-height: 100vh;
  height: 100vh;
  border-radius: 0;           /* mobile fullscreen */
}

.lightbox .lbTop{
  position: sticky;
  top: 0;
  z-index: 5;
  padding-top: env(safe-area-inset-top); /* iPhone Notch */
}

.lightbox .lbBtns{
  flex-wrap: wrap;            /* falls wenig Platz */
  justify-content: flex-end;
  gap:8px;
}

.lightbox .lbBody{
  height: calc(100vh - 56px - env(safe-area-inset-top));
  padding-bottom: env(safe-area-inset-bottom);
}

/* Buttons etwas kompakter auf kleinen Screens */
@media (max-width: 520px){
  .iconBtn{ padding:8px 10px; }
  .lightbox .lbTitle{ max-width: 55vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

/* =========================
   PRODUKT-CARDS:
   Button immer auf gleicher Höhe
   ========================= */

.product{
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Bild oben fix */
.product .productMedia{
  flex: 0 0 auto;
}

/* Inhalt nimmt variablen Platz ein */
.product .productBody{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;     /* nimmt Resthöhe ein */
}

/* Titel + Text dürfen wachsen */
.product .productBody h3,
.product .productBody .small{
  flex: 0 0 auto;
}

/* Preis bleibt über dem Button */
.product .productBody .price{
  margin-top: 6px;
  font-weight: 800;
}

/* ⭐ DER WICHTIGE TEIL ⭐ */
.product .productBody .addBtn{
  margin-top: auto;   /* schiebt Button IMMER nach unten */
  width: 100%;
}
/* damit Cards in grid4 gleich hoch werden */
.grid4 { align-items: stretch; }