/* ============================================================
   3D TACT — Shoe Studio (footwear configurator)
   ============================================================ */

/* ---------- Studio hero ---------- */
.studio-hero {
  position: relative;
  padding: clamp(7rem, 12vh, 9.5rem) 0 clamp(2.5rem, 5vh, 4rem);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(245, 184, 0, 0.08), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.studio-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}
.studio-hero h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 1rem;
}
.studio-hero p {
  color: var(--text-2);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.6;
  max-width: 56ch;
}
.studio-hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}
.studio-hero-points li {
  position: relative;
  padding: 0.75rem 0.75rem 0.75rem 2.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: 0.875rem;
}
.studio-hero-points li::before {
  content: "";
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--yellow);
}

@media (max-width: 900px) {
  .studio-hero-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Configurator layout ---------- */
.config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 960px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

/* Sticky preview on desktop */
@media (min-width: 961px) {
  .config-preview {
    position: sticky;
    top: calc(var(--nav-h) + 1.25rem);
  }
}

/* Mobile: keep the preview stuck under the nav so changes are visible
   while you scroll and tap through the options. */
@media (max-width: 960px) {
  .config-preview {
    position: sticky;
    top: var(--nav-h);
    z-index: 6;
    background: var(--bg);
    padding-top: 0.5rem;
  }
  .preview-stage {
    aspect-ratio: 16 / 9;
  }
  .cushion-panel {
    display: none;
  }
}

/* ---------- Preview stage ---------- */
.preview-stage {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-2);
  background:
    radial-gradient(120% 90% at 50% 110%, rgba(245, 184, 0, 0.1), transparent 55%),
    var(--bg-3);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.preview-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.preview-stage.squash img {
  animation: shoeSquash 0.5s ease;
}
@keyframes shoeSquash {
  0% { transform: scale(1); }
  35% { transform: scale(1.02, 0.94) translateY(2.5%); }
  70% { transform: scale(0.99, 1.02); }
  100% { transform: scale(1); }
}

.preview-tint {
  position: absolute;
  inset: 0;
  background: #1c1c22;
  mix-blend-mode: color;
  opacity: 0.72;
  transition: background 0.35s ease;
  pointer-events: none;
}

.preview-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  background: var(--yellow);
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
}

.preview-tags {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.preview-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-2);
  background: rgba(10, 10, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.3125rem 0.625rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- Cushion meter ---------- */
.cushion-panel {
  margin-top: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
}
.cushion-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.625rem;
}
.cushion-head span {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cushion-head strong {
  font-size: 0.875rem;
  color: var(--yellow);
}
.cushion-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-4);
  overflow: hidden;
}
.cushion-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-dark));
  transition: width 0.35s ease;
}

/* ---------- Option blocks ---------- */
.config-options {
  display: grid;
  gap: 1.5rem;
}

.opt-block {
  margin: 0;
  padding: 1.125rem 1.25rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.opt-title {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0.25rem;
  margin-bottom: 0.875rem;
}
.opt-note {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Model card */
.model-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem;
  background: var(--bg-3);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-md);
}
.model-card img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  flex: none;
}
.model-card strong {
  display: block;
  font-size: 0.9375rem;
}
.model-card small {
  display: block;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 0.125rem;
}
.model-check {
  margin-left: auto;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: #000;
  font-size: 0.8125rem;
  font-weight: 800;
  border-radius: 50%;
}

/* Swatches */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.swatch {
  appearance: none;
  cursor: pointer;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
  transition:
    transform var(--t),
    border-color var(--t);
}
.swatch:hover {
  transform: scale(1.08);
}
.swatch.active {
  border-color: var(--yellow);
  transform: scale(1.1);
}
.swatch:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* Pills (fit / arch) */
.pill-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
}
@media (max-width: 480px) {
  .pill-row {
    grid-template-columns: 1fr;
  }
}
.opt-pill {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  padding: 0.75rem 0.875rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 700;
  transition:
    background var(--t),
    border-color var(--t),
    color var(--t);
}
.opt-pill small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.1875rem;
}
.opt-pill:hover {
  border-color: var(--border-2);
}
.opt-pill.active {
  background: var(--yellow-bg);
  border-color: var(--yellow);
  color: var(--yellow);
}
.opt-pill.active small {
  color: var(--text-2);
}
.opt-pill:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* Softness slider */
.softness-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.soft-end {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: none;
}
#softness {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--bg-4));
  outline: none;
  cursor: pointer;
}
#softness::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow);
  border: 4px solid var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: grab;
}
#softness::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--yellow);
  border: 4px solid var(--bg);
  cursor: grab;
}
#softness:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}
.soft-desc {
  margin: 0.875rem 0 0;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* Sizes */
.size-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}
.size-pill {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.625rem 0;
  text-align: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  transition:
    background var(--t),
    border-color var(--t),
    color var(--t);
}
.size-pill:hover {
  border-color: var(--border-2);
}
.size-pill.active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #000;
}
.size-pill:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* ---------- Order box ---------- */
.order-box {
  background: var(--bg-2);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius-md);
  padding: 1.375rem 1.375rem 1.5rem;
}
.order-box h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.order-summary {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.order-summary li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}
.order-summary li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.order-summary span {
  color: var(--text-muted);
}
.order-summary strong {
  color: var(--text);
  text-align: right;
}
.order-price {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 1.125rem;
}
.order-actions {
  display: grid;
  gap: 0.625rem;
}
.order-sub {
  display: flex;
  gap: 0.625rem;
}
.order-sub .btn {
  flex: 1;
  justify-content: center;
}
.order-toast {
  font-size: 0.8125rem;
  color: var(--yellow);
  min-height: 1.125rem;
}

/* ---------- Studio steps ---------- */
.studio-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 768px) {
  .studio-steps {
    grid-template-columns: 1fr;
  }
}
.studio-step {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.375rem;
}
.studio-step-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--yellow);
  color: #000;
  font-weight: 800;
  font-size: 0.9375rem;
  border-radius: 50%;
  margin-bottom: 0.875rem;
}
.studio-step h3 {
  font-size: 1.0625rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.studio-step p {
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Studio FAQ ---------- */
.container-narrow {
  max-width: 860px;
}
.studio-faq {
  display: grid;
  gap: 0.75rem;
}
.studio-faq details {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
}
.studio-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.0625rem 1.25rem;
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color var(--t);
}
.studio-faq summary::-webkit-details-marker {
  display: none;
}
.studio-faq summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--yellow);
  flex: none;
  transition: transform var(--t);
}
.studio-faq details[open] summary::after {
  transform: rotate(45deg);
}
.studio-faq summary:hover {
  color: var(--yellow);
}
.studio-faq details p {
  margin: 0;
  padding: 0 1.25rem 1.1875rem;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .preview-stage.squash img {
    animation: none;
  }
  .preview-stage img,
  .preview-tint,
  .cushion-fill {
    transition: none;
  }
}
