:root{
  --bg:#0b0d10;
  --bg2:#0f1218;
  --card:#121623;
  --text:#eef1f6;
  --muted:#aab3c2;
  --line:rgba(255,255,255,.10);
  --accent:#7dd3fc;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius:18px;
  --max: 1120px;
}

[data-theme="light"]{
  --bg:#ffffff;
  --bg2:#f6f7fb;
  --card:#ffffff;
  --text:#0b0d10;
  --muted:#5c677a;
  --line:rgba(10,10,10,.10);
  --accent:#2563eb;
  --shadow: 0 18px 60px rgba(10,10,10,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 20% -10%, rgba(125,211,252,.18), transparent 55%),
              radial-gradient(900px 500px at 90% 0%, rgba(37,99,235,.12), transparent 50%),
              var(--bg);
  color:var(--text);
  line-height:1.55;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.9}
img{max-width:100%; display:block}
.container{width:min(var(--max), calc(100% - 40px)); margin:0 auto}

.skip-link{
  position:absolute; left:-999px; top:10px;
  background:var(--card); border:1px solid var(--line);
  padding:10px 12px; border-radius:12px;
}
.skip-link:focus{left:12px; z-index:9999}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg), transparent 35%);
  border-bottom: 1px solid var(--line);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
}
.brand{display:flex; align-items:baseline; gap:8px}
.brand__mark{
  display:inline-grid; place-items:center;
  width:34px; height:34px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(125,211,252,.35), rgba(37,99,235,.25));
  border:1px solid var(--line);
  font-weight:800; letter-spacing:.3px;
}
.brand__text{font-weight:700; letter-spacing:.2px}

.nav{display:flex; align-items:center; gap:16px}
.nav__menu{display:flex; align-items:center; gap:16px}
.nav__toggle{display:none}

.theme{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 10%);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 10%);
  color:var(--text);
  box-shadow: none;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{transform: translateY(-1px)}
.btn--primary{
  background: linear-gradient(135deg, rgba(125,211,252,.35), rgba(37,99,235,.25));
  border-color: color-mix(in srgb, var(--accent), var(--line) 55%);
}
.btn--ghost{background: transparent}

.hero{position:relative; padding:56px 0 26px}
.hero__bg{
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(900px 480px at 20% 20%, rgba(125,211,252,.14), transparent 60%),
    radial-gradient(800px 440px at 80% 10%, rgba(37,99,235,.10), transparent 55%);
  opacity:.9;
}
.hero__inner{
  position:relative;
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:28px;
  align-items:center;
}
.eyebrow{
  display:inline-block;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: color-mix(in srgb, var(--card), transparent 20%);
  color:var(--muted);
  margin:0 0 12px;
}
h1{font-size: clamp(34px, 4vw, 54px); line-height:1.05; margin:0 0 12px}
h2{font-size: clamp(24px, 2.4vw, 32px); margin:0 0 10px}
h3{margin:0 0 8px}
.lead{font-size:1.05rem; color: color-mix(in srgb, var(--text), var(--muted) 25%); margin:0 0 16px}
.muted{color:var(--muted)}
.small{font-size:.92rem}
.fineprint{font-size:.92rem; color:var(--muted); margin:12px 0 0}

.hero__actions{display:flex; gap:12px; flex-wrap:wrap; margin:14px 0 18px}
.hero__meta{display:flex; gap:10px; flex-wrap:wrap}
.pill{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 18%);
  padding:8px 10px;
  border-radius:999px;
  color:var(--muted);
  font-size:.92rem;
}

.icon-pill{
  display:inline-grid;
  place-items:center;
  width:40px; height:40px;
  border-radius:999px;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 18%);
}
.icon{width:18px; height:18px; fill: currentColor; color: var(--text);}

.hero__shot{
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero__shot img{width:100%; height:100%; object-fit:cover; aspect-ratio: 4/5}

.section{padding:46px 0}
.section--alt{background: color-mix(in srgb, var(--bg2), transparent 10%); border-top:1px solid var(--line); border-bottom:1px solid var(--line)}
.section__head{margin-bottom:18px}
.section__head--row{display:flex; justify-content:space-between; gap:16px; align-items:flex-end; flex-wrap:wrap}
.section__foot{margin-top:18px; display:flex; justify-content:flex-end}

.filters{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  border:1px solid var(--line);
  background: transparent;
  color:var(--muted);
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
}
.chip.is-active{
  background: color-mix(in srgb, var(--card), transparent 8%);
  color:var(--text);
  border-color: color-mix(in srgb, var(--accent), var(--line) 70%);
}

/* Masonry (columns) - stable breakpoints */
.masonry{
  column-gap: 14px;
  columns: 3; /* Desktop */
}
.masonry__item{
  width:100%;
  border:0;
  padding:0;
  margin:0 0 14px;
  display:block;
  break-inside: avoid;
  background: transparent;
  cursor: zoom-in;
  border-radius: 16px;
  overflow:hidden;
  border:1px solid var(--line);
}
.masonry__item img{
  width:100%;
  height:auto;
  transition: transform .25s ease;
}
.masonry__item:hover img{transform: scale(1.02)}

.two-col{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:start;
}

/* About grid */
.about-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:18px;
}
.about-box{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 10%);
  border-radius: var(--radius);
  padding:16px;
}
.about-box p{margin:0}

/* Profile card */
.profile-card{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 10%);
  border-radius: var(--radius);
  padding:18px;
  position: sticky;
  top: 88px;
}
.profile-card__top{display:flex; gap:12px; align-items:center}
.profile-card__img{
  width:64px; height:64px;
  border-radius: 18px;
  object-fit: cover;
  border:1px solid var(--line);
}
.kicker{margin:0; font-weight:700}
.profile-card__actions{display:grid; gap:10px; margin-top:14px}

.form{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 10%);
  border-radius: var(--radius);
  padding:18px;
}
.form__row{display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px}
label{display:grid; gap:8px; color:var(--muted); font-size:.95rem}
input, textarea{
  border:1px solid var(--line);
  border-radius: 14px;
  padding:12px 12px;
  background: color-mix(in srgb, var(--bg), transparent 10%);
  color:var(--text);
  outline:none;
}
input:focus, textarea:focus{border-color: color-mix(in srgb, var(--accent), var(--line) 60%)}
.form__actions{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:12px}
.toast{
  margin-top:12px;
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg2), transparent 10%);
}

.footer{
  border-top:1px solid var(--line);
  padding:22px 0;
}
.footer__inner{display:flex; justify-content:space-between; gap:16px; align-items:center; flex-wrap:wrap}
.footer__links{display:flex; gap:14px; color:var(--muted)}

/* Lightbox */
.lightbox{
  position:fixed; inset:0; z-index:80;
  display:grid; place-items:center;
  background: rgba(0,0,0,.78);
  padding:18px;
}
.lightbox__img{
  max-width:min(1200px, 96vw);
  max-height: 82vh;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow);
}
.lightbox__close{
  position:fixed; top:18px; right:18px;
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.35);
  color:#fff;
  cursor:pointer;
  z-index: 81;
}
.lightbox__cap{
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  margin: 0 auto;
  max-width: min(1200px, 96vw);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: #fff;
  z-index: 81;
  font-size: .95rem;
}

/* Shop */
.products{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:14px;
}
.product{
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--card), transparent 10%);
  border-radius: var(--radius);
  overflow:hidden;
}
.product__img{aspect-ratio: 4/3; object-fit:cover}
.product__body{padding:14px}
.product__title{margin:0 0 6px}
.product__meta{margin:0 0 12px; color:var(--muted)}
.product__row{display:flex; justify-content:space-between; gap:10px; align-items:center}
.select{
  border:1px solid var(--line);
  background: transparent;
  color:var(--text);
  border-radius: 12px;
  padding:10px 12px;
}

.cart-btn{
  border:1px solid var(--line);
  background: transparent;
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
}
.cart-badge{
  margin-left:6px;
  display:inline-grid; place-items:center;
  min-width:22px; height:22px;
  padding:0 6px;
  border-radius:999px;
  background: color-mix(in srgb, var(--accent), transparent 70%);
  border:1px solid var(--line);
  font-size:.85rem;
}

.drawer{position:fixed; inset:0; z-index:90}
.drawer__backdrop{position:absolute; inset:0; background: rgba(0,0,0,.55)}
.drawer__panel{
  position:absolute; right:0; top:0; height:100%;
  width:min(460px, 92vw);
  background: var(--bg);
  border-left:1px solid var(--line);
  padding:16px;
  display:flex; flex-direction:column;
}
.drawer__head{display:flex; justify-content:space-between; align-items:center; gap:10px}
.icon-btn{
  width:42px; height:42px; border-radius:14px;
  border:1px solid var(--line);
  background: transparent;
  color:var(--text);
  cursor:pointer;
}
.drawer__body{
  margin-top:12px;
  display:grid;
  gap:10px;
  overflow:auto;
  padding-right:6px;
  flex:1;
}
.cart-item{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  display:grid;
  gap:6px;
  background: color-mix(in srgb, var(--card), transparent 10%);
}
.cart-item__top{display:flex; justify-content:space-between; gap:10px; align-items:flex-start}
.cart-item__name{margin:0}
.cart-item__meta{margin:0; color:var(--muted); font-size:.92rem}
.cart-item__actions{display:flex; gap:8px; align-items:center}
.qty-btn{
  border:1px solid var(--line);
  background: transparent;
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}
.drawer__foot{border-top:1px solid var(--line); padding-top:12px}
.totals{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px}

.note{
  margin-top:18px;
  border:1px dashed var(--line);
  border-radius: var(--radius);
  padding:18px;
  background: color-mix(in srgb, var(--bg2), transparent 10%);
}

/* Edit mode */
.editable{
  outline: 2px dashed color-mix(in srgb, var(--accent), transparent 40%);
  outline-offset: 4px;
  border-radius: 10px;
}
.editable-tile{
  position: relative;
}
.editable-tile::after{
  content:"Rechtsklick: Titel ändern";
  position:absolute;
  bottom:10px; left:10px;
  padding:6px 8px;
  border-radius:10px;
  background: rgba(0,0,0,.45);
  color:#fff;
  font-size:.8rem;
  opacity:0;
  transition: opacity .15s ease;
}
.editable-tile:hover::after{opacity:1}
.editor{margin-top:14px; display:grid; gap:10px}

/* Responsive */
@media (max-width: 1000px){
  .masonry{ columns: 2; }
}

@media (max-width: 960px){
  .hero__inner{grid-template-columns:1fr; }
  .hero{padding-top:30px}
  .two-col{grid-template-columns:1fr}
  .profile-card{position:relative; top:auto}
  .about-grid{grid-template-columns:1fr}
  .products{grid-template-columns:1fr}
  .nav__toggle{display:inline-flex}
  .nav__menu{
    position:absolute;
    right:20px; top:64px;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:12px;
    width:min(320px, calc(100vw - 40px));
    background: color-mix(in srgb, var(--bg), transparent 8%);
    border:1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .nav__menu.is-open{display:flex}
  .nav__burger{
    width:18px; height:2px; background: var(--text);
    position:relative; display:inline-block;
  }
  .nav__burger::before,.nav__burger::after{
    content:""; position:absolute; left:0; width:18px; height:2px; background: var(--text);
  }
  .nav__burger::before{top:-6px}
  .nav__burger::after{top:6px}
}

@media (max-width: 640px){
  .masonry{ columns: 1; }
}

/* Safety: ensure hidden overlays are never visible */
.lightbox[hidden],
.drawer[hidden]{
  display:none !important;
}