/* Next.js studio shell: catalog | video | next steps | chat | sandbox, checkout on the last row. */

body {
  background: var(--bg);
}

.topbar {
  height: 72px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 0 22px;
  background: var(--topbar);
  color: var(--topbar-ink);
  border-bottom: 1px solid rgba(248, 244, 240, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(70, 50, 40, 0.08);
}

.tool {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(248, 244, 240, 0.22);
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
}

.stage {
  position: relative;
  grid-template-columns: 248px minmax(300px, calc(400px + 1.75rem)) minmax(112px, 240px) minmax(280px, 1fr) minmax(320px, 1.18fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px 16px;
}

.checkout {
  grid-column: 1 / -1;
  margin: 0;
}

.kicker,
.rail-label {
  color: var(--cyan);
  letter-spacing: 0.18em;
}

.rail-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.col-steps {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  overflow: auto;
}

.col-steps .cta-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}

.col-steps .cta {
  min-height: 48px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--cta-hi), var(--cta-lo));
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 0 rgba(70, 50, 40, 0.08),
    0 6px 12px rgba(70, 50, 40, 0.06);
}

.col-live .video-frame {
  margin: 0 14px 14px;
  width: calc(100% - 28px);
  max-width: 400px;
  align-self: center;
}

.product {
  grid-template-columns: 46px minmax(0, 1fr) 10px;
  gap: 10px;
  border-radius: 14px;
}

.product.is-selected {
  border-color: var(--active-line);
  background: linear-gradient(180deg, var(--active-hi), var(--active-lo));
}

.thumb {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(180, 160, 140, 0.35);
}

.pname {
  font-family: "Cormorant Garamond", Palatino, Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.chev { display: none; }

.product::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  justify-self: center;
}

.count {
  height: auto;
  padding: 4px 10px;
  border: 1px solid var(--active-line);
  background: var(--hover);
  color: var(--cyan-2);
}

.reopen {
  position: absolute;
  top: 50%;
  right: 16px;
  z-index: 12;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border-radius: 0 14px 14px 0;
  border-right: 0;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  background: linear-gradient(180deg, var(--sandbox-hi), var(--sandbox-lo));
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 0 rgba(70, 50, 40, 0.08),
    0 6px 12px rgba(70, 50, 40, 0.06);
}

body.is-sandbox-closed .stage {
  grid-template-columns: 248px minmax(300px, calc(400px + 1.75rem)) minmax(112px, 240px) minmax(280px, 1fr);
}

body.is-sandbox-closed .reopen { display: inline-flex; }

body.is-video-focus .stage {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

body.is-video-focus .col-steps,
body.is-video-focus .checkout { display: none; }

@media (max-width: 1400px) {
  .stage { min-width: 0; }
}

@media (max-width: 1180px) {
  .stage {
    min-width: 1360px;
    height: 820px;
  }
}
