/* Mix It Up – im Stil der Produktseiten (shop.css): Mint-Karte, Dunkelblau, Petrol.
   Zuerst fürs Handy; ab 992px Vorschau links und Auswahl rechts. */
/* nichts darf die Seite seitlich verbreitern */
.studio {
  overflow-x: clip;
  --blau: #23577a;
  --petrol: #2a9d8f;
  --mint: #e8f6f4;
  --mint-rand: #c9e9e4;
  --gelb: #fcb941;
  --text: #333;
  --grau: #777;
  --rand: #e3e3e3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 90px;
}
.studio [hidden] { display: none !important; }

/* ---------- Vorschau ---------- */
.studio-buehne {
  position: relative;
  background: var(--mint);
  border: 1px solid var(--mint-rand);
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 260px;
}
.studio-untertitel { font-size: 17px; font-weight: 600; color: var(--blau); margin: 0; }

.studio-ansichten { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 6px; }
.studio-ansicht { margin: 0; text-align: center; display: none; }
.studio-ansicht.aktiv { display: block; }
.studio-ansicht canvas, .studio-ansicht img {
  width: 100%;
  max-width: 520px;
  height: auto;
  max-height: 30vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 10px rgba(35, 87, 122, .15));
}
.studio-ansicht figcaption { font-size: 13px; color: var(--grau); margin-top: 4px; }
.studio-ansichten.neu canvas, .studio-ansichten.neu img { animation: studio-neu .4s ease-out; }
@keyframes studio-neu { from { transform: scale(.97); opacity: .5; } to { transform: none; opacity: 1; } }

.studio-seitenwahl { display: flex; gap: 0; position: absolute; right: 10px; bottom: 10px; background: #fff; border: 1px solid var(--mint-rand); border-radius: 6px; overflow: hidden; }
.studio-seitenwahl button { border: 0; background: transparent; padding: 5px 12px; font-size: 13px; color: var(--grau); cursor: pointer; }
.studio-seitenwahl button.aktiv { background: var(--blau); color: #fff; }

/* Start: weisse UNDIS zur Auswahl */
.studio-start { text-align: center; padding: 6px 0 2px; }
.studio-start p { font-size: 17px; font-weight: 600; color: var(--blau); margin: 4px 0 12px; }
.studio-start-modelle { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.studio-start-modelle button {
  border: 1px solid var(--mint-rand);
  background: #fff;
  border-radius: 8px;
  padding: 10px 6px 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--blau);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: border-color .15s, box-shadow .15s;
}
.studio-start-modelle button:hover { border-color: var(--petrol); box-shadow: 0 4px 12px rgba(35, 87, 122, .12); }
.studio-start-modelle img { width: 100%; max-width: 120px; height: auto; margin-bottom: 4px; }
.studio-start-modelle .emoji { display: none; }
.studio-start-modelle small { display: block; font-weight: 400; font-size: 11px; color: var(--grau); }

.studio-laden { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(232, 246, 244, .85); border-radius: 10px; transition: opacity .3s; z-index: 3; }
.studio-laden.weg { opacity: 0; pointer-events: none; }
.studio-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(42, 157, 143, .25); border-top-color: var(--petrol); animation: studio-dreh .9s linear infinite; }
@keyframes studio-dreh { to { transform: rotate(360deg); } }

/* ---------- Schritte ---------- */
.studio-panel { min-width: 0; }
.studio-schritte { list-style: none; margin: 0; padding: 0; }
.studio-schritt { border-bottom: 1px solid var(--rand); padding: 14px 0 16px; transition: opacity .2s; }
.studio-schritt:first-child { padding-top: 0; }
.studio-schritt.gesperrt { opacity: .4; pointer-events: none; }
.studio-schritt-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.studio-schritt-kopf h2 { font-size: 17px; font-weight: 600; color: var(--blau); margin: 0; }
.studio-schritt-kopf .nr {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #bbb;
  color: var(--grau);
}
.studio-schritt.erledigt .nr { background: var(--petrol); border-color: var(--petrol); color: #fff; font-size: 0; }
.studio-schritt.erledigt .nr::before { content: '✓'; font-size: 13px; }
.studio-schritt.naechster .nr { background: var(--blau); border-color: var(--blau); color: #fff; }
.studio-schritt.naechster h2::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gelb); margin-left: 8px; vertical-align: middle; }
.studio-schritt-kopf .wahl { margin-left: auto; font-size: 14px; color: var(--petrol); text-align: right; }
.studio-schritt.hinweisen { animation: studio-hinweis 1.2s ease-out; }
@keyframes studio-hinweis { 0%, 40% { background: #fff6dc; } 100% { background: transparent; } }

/* Modell */
.studio-modelle { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.studio-modelle::-webkit-scrollbar { display: none; }
.studio-modelle button, .studio-dazu-modelle button {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d0d0d0;
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px 6px 8px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}
.studio-modelle button:hover, .studio-dazu-modelle button:hover { border-color: var(--blau); }
.studio-modelle button.aktiv { border: 2px solid var(--blau); padding: 5px 11px 5px 7px; }
.studio-modelle .emoji, .studio-dazu-modelle .emoji { font-size: 19px; }
.studio-modelle small, .studio-dazu-modelle small { display: block; font-size: 11px; color: var(--grau); }

/* Muster */
.studio-muster-werkzeug { display: flex; gap: 8px; }
.studio-muster-werkzeug input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}
.studio-muster-werkzeug input:focus { border-color: var(--blau); }
.studio-alle { flex: none; border: 1px solid var(--blau); background: #fff; color: var(--blau); border-radius: 4px; padding: 0 14px; font-size: 14px; cursor: pointer; }
.studio-alle:hover { background: var(--blau); color: #fff; }
.studio-farben { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 4px; }
.studio-farben button {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d0d0d0;
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px 3px 4px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.studio-farben button.aktiv { border-color: var(--blau); background: var(--blau); color: #fff; }
.studio-farben i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, .12); }
.studio-farben i.regenbogen { background: conic-gradient(#fcb941, #57cc99, #2a9d8f, #23577a, #e0567a, #fcb941); }

/* alle Muster in einem Feld zum Scrollen; „Aufklappen“ zeigt alle ohne Scrollen */
.studio-muster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 12px 10px;
  padding: 10px 6px 10px 2px;
  max-height: 330px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--rand);
  scrollbar-width: thin;
}
.studio-muster.alle { max-height: none; overflow: visible; border-bottom: 0; }
.studio-muster button { border: 0; background: transparent; padding: 0; cursor: pointer; font-size: 12px; color: var(--text); text-align: center; scroll-snap-align: start; }
.studio-muster .stoff {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #eee;
  box-shadow: inset 0 0 0 3px #fff, 0 2px 6px rgba(0, 0, 0, .15);
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 4px;
}
.studio-muster .name { display: block; line-height: 1.25; }
.studio-muster button:hover .stoff { transform: scale(1.05); }
.studio-muster button.aktiv .stoff { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--blau); }
.studio-muster button.aktiv .name { color: var(--blau); font-weight: 600; }
.studio-muster .leer { grid-column: 1 / -1; color: var(--grau); font-size: 14px; }

/* Gummiband */
.studio-info { font-size: 14px; color: #555; margin: 0 0 10px; }
.studio-baender { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px 6px; }
.studio-baender button { border: 0; background: transparent; cursor: pointer; font-size: 12px; color: var(--text); padding: 0; }
.studio-baender i { display: block; width: 40px; height: 40px; margin: 0 auto 4px; border-radius: 50%; box-shadow: inset 0 0 0 3px #fff, 0 1px 4px rgba(0, 0, 0, .2); }
.studio-baender .empfehlung i { background: conic-gradient(#fcb941, #57cc99, #2a9d8f, #23577a, #e0567a, #fcb941); }
.studio-baender button.aktiv i { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--blau); }
.studio-baender button.aktiv { color: var(--blau); font-weight: 600; }

/* Grösse */
.studio-groessen { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-groessen button { min-width: 64px; height: 42px; border: 1px solid #d0d0d0; background: #fff; border-radius: 4px; padding: 0 12px; font-size: 15px; color: var(--text); cursor: pointer; }
.studio-groessen button:hover { border-color: var(--blau); }
.studio-groessen button.aktiv { border-color: var(--blau); background: var(--blau); color: #fff; }
.studio-link { border: 0; background: none; color: var(--blau); font-size: 14px; padding: 12px 0 0; cursor: pointer; }
.studio-link:hover { text-decoration: underline; }
.studio-tabelle { width: 100%; max-width: 520px; display: block; margin: 10px 0 0; border-radius: 6px; }

/* ---------- Kasse: Handy unten fixiert, Computer im Ablauf ---------- */
.studio-kasse {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .1);
}
.studio-kasse-text { flex: 1; min-width: 0; line-height: 1.3; }
.studio-kasse-text strong { display: block; font-size: 16px; font-weight: 600; color: var(--blau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-kasse-text span { display: block; font-size: 13px; color: var(--grau); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-kaufen {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--blau);
  border-radius: 4px;
  padding: 0 18px;
  background: #fff;
  color: var(--blau);
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.studio-kaufen:hover { background: var(--blau); color: #fff; text-decoration: none; }
.studio-kaufen.bereit { background: var(--blau); color: #fff; }
.studio-kaufen.bereit:hover { background: #1a4460; color: #fff; }
.studio-kaufen:disabled { opacity: .5; cursor: wait; }
.studio-panel .lieferinfo { margin-top: 14px; }

/* Schon im Warenkorb */
.studio-garderobe { margin-top: 18px; padding: 12px 14px 10px; border-radius: 10px; background: var(--mint); border: 1px solid var(--mint-rand); }
.studio-garderobe-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.studio-garderobe-kopf h2 { font-size: 15px; font-weight: 600; color: var(--blau); margin: 0 0 8px; }
.studio-garderobe-kopf a { font-size: 13px; color: var(--blau); text-decoration: underline; }
.studio-garderobe-liste { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.studio-garderobe-artikel { flex: none; width: 100px; text-align: center; background: #fff; border-radius: 8px; padding: 6px; color: var(--text); line-height: 1.25; }
.studio-garderobe-artikel:hover { color: var(--blau); text-decoration: none; box-shadow: 0 2px 8px rgba(35, 87, 122, .15); }
.studio-garderobe-artikel img { width: 100%; height: 64px; object-fit: contain; display: block; margin-bottom: 4px; }
.studio-garderobe-artikel strong { display: block; font-size: 12px; font-weight: 600; }
.studio-garderobe-artikel small { display: block; font-size: 11px; color: var(--grau); }

/* Beschreibung aus dem Admin */
.studio-beschreibung { max-width: 820px; margin: 10px auto 0; text-align: center; }
.studio-beschreibung h2 { font-size: 22px; font-weight: 500; color: var(--blau); }

/* ---------- Im Warenkorb / Partnerlook ---------- */
.studio-dazu { position: fixed; inset: 0; z-index: 1500; background: rgba(20, 45, 60, .45); display: flex; align-items: flex-end; justify-content: center; }
.studio-dazu[hidden] { display: none; }
.studio-dazu-karte {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 14px 14px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  animation: studio-hoch .3s ease-out;
}
@keyframes studio-hoch { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.studio-dazu-karte canvas, .studio-dazu-karte img { width: 130px; height: auto; display: block; margin: 0 auto 4px; }
.studio-ansicht img:not([src]), .studio-dazu-karte img:not([src]) { visibility: hidden; }
.studio-dazu-karte h2 { font-size: 20px; font-weight: 600; color: var(--petrol); margin: 0 0 6px; }
.studio-dazu-karte p { font-size: 15px; color: var(--blau); font-weight: 600; margin: 0 0 12px; }
.studio-dazu-karte p .fa-heart { color: #e0567a; }
.studio-dazu-modelle { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.studio-dazu-weiter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.studio-dazu-weiter .studio-link { padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .studio-ansichten.neu canvas, .studio-ansichten.neu img, .studio-schritt.hinweisen, .studio-dazu-karte { animation: none; }
}

/* ---------- Handy: Vorschau bleibt beim Scrollen oben ---------- */
@media (max-width: 991px) {
  .studio-buehne { position: sticky; top: var(--kopf-h, 0px); z-index: 6; box-shadow: 0 6px 12px rgba(0, 0, 0, .06); }
  .studio-buehne:has(.studio-start:not([hidden])) { position: relative; top: 0; }
  .studio-ansicht figcaption { display: none; }
  .studio-untertitel { font-size: 15px; }
  .studio-ansicht canvas, .studio-ansicht img { max-height: 25vh; }
  /* Muster seitwärts wischen: senkrechtes Wischen bewegt immer die Seite */
  .studio-muster:not(.alle) {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: 78px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }
}

/* ---------- grosse Bildschirme: vorne und hinten nebeneinander ---------- */
@media (min-width: 992px) {
  .studio { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 40px; align-items: start; padding-bottom: 20px; }
  .studio-buehne { position: sticky; top: 90px; padding: 20px 20px 24px; min-height: 0; }
  .studio-ansichten { grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; align-items: end; }
  .studio-ansicht, .studio-ansicht.aktiv { display: block; }
  .studio-ansicht canvas, .studio-ansicht img { max-height: 46vh; }
  .studio-seitenwahl { display: none !important; }
  .studio-start-modelle { grid-template-columns: repeat(3, 1fr); max-width: 560px; margin: 0 auto; gap: 14px; }
  .studio-start-modelle img { max-width: 150px; }
  .studio-modelle { flex-wrap: wrap; overflow: visible; }
  .studio-kasse { position: static; padding: 16px 0 0; box-shadow: none; background: transparent; flex-wrap: wrap; }
  .studio-kasse-text { flex-basis: 100%; }
  .studio-kaufen { flex: 1; min-height: 50px; font-size: 16px; }
  .studio-dazu { align-items: center; }
  .studio-dazu-karte { border-radius: 14px; }
}
