:root {
  --accent: #ff5624;
  --accent-dark: #e74618;
  --ink: #262626;
  --muted: #707070;
  --panel: rgba(255, 255, 255, 0.93);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: #eeeeec;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button,
input {
  font: inherit;
}
button {
  -webkit-tap-highlight-color: transparent;
}
canvas {
  display: block;
  outline: none;
}
.app-shell {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.topbar {
  position: absolute;
  top: 28px;
  left: 38px;
  right: 38px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #343434;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.brand-mark {
  width: 20px;
  height: 20px;
  display: inline-block;
  border: 4px solid var(--accent);
  border-radius: 4px;
  box-shadow: inset 5px 0 0 #343434;
}
.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.icon-button {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #555;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.06);
}
.icon-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.viewer-status {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  gap: 9px;
  align-items: center;
  transform: translate(-50%, -50%);
  color: #646464;
  font-size: 13px;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}
.viewer-status.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #d5d5d5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.scene-help {
  position: absolute;
  top: 78px;
  left: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 290px;
  color: #6e6e6e;
  font-size: 12px;
  line-height: 1.4;
}
.help-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

#bottom-panel {
  position: fixed;
  z-index: 2;
  right: 40px;
  bottom: 30px;
  left: 40px;
  display: grid;
  grid-template-columns: minmax(430px, 1.6fr) minmax(300px, 0.98fr) 200px;
  gap: clamp(22px, 4vw, 72px);
  align-items: center;
  padding: 21px 30px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 15px 38px rgba(18, 18, 18, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.section-title {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.module-container {
  display: flex;
  gap: clamp(10px, 1.5vw, 23px);
}
.module-card {
  width: 108px;
  text-align: center;
}
.module-card img {
  display: block;
  width: 100%;
  height: 76px;
  object-fit: contain;
  margin: -2px 0 4px;
}
.module-card span {
  display: grid;
  min-height: 30px;
  place-items: center;
  color: #3d3d3d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.18;
}
.counter-group {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  height: 37px;
  margin-top: 5px;
  padding: 4px;
  border-radius: 7px;
  background: #eeeeee;
}
.counter-group button {
  width: 24px;
  height: 24px;
  border: 1px solid #dedede;
  border-radius: 4px;
  background: #fff;
  color: #555;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}
.counter-group button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.counter-group button:active {
  transform: translateY(1px);
}
.counter-group button:disabled {
  cursor: not-allowed;
  background: #e4e4e4;
  color: #a0a0a0;
}
.counter-group button:disabled:hover {
  border-color: #dedede;
  background: #e4e4e4;
  color: #a0a0a0;
}
.counter {
  color: #393939;
  font-size: 12px;
  font-weight: 800;
}

.colors-section {
  justify-self: center;
  min-width: 280px;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-row + .color-row {
  margin-top: 10px;
}
.row-label {
  width: 50px;
  color: #5c5c5c;
  font-size: 12px;
  font-weight: 800;
}
.color-swatch {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 5px;
  background-color: transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}
.color-swatch img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.color-swatch:hover {
  transform: translateY(-2px);
}
.color-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 3px 8px rgba(255, 86, 36, 0.2);
}
.wood-swatch[data-color="#d4a373"]::after,
.wood-swatch[data-color="#5c4033"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.wood-swatch[data-color="#d4a373"]::after {
  background: rgba(212, 163, 115, 0.37);
}
.wood-swatch[data-color="#5c4033"]::after {
  background: rgba(92, 64, 51, 0.61);
}
.custom-color-wrapper {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 2px dashed var(--accent);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}
.custom-color-wrapper input {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  cursor: pointer;
  opacity: 0;
}
.custom-icon {
  color: var(--accent);
  font-size: 22px;
  font-weight: 500;
}
.custom-color-wrapper.active {
  border-style: solid;
  background: #ffede7;
}

.actions-section {
  width: 200px;
  justify-self: end;
  text-align: right;
}
.info-text {
  margin-bottom: 15px;
  color: #5f5f5f;
  font-size: 13px;
  line-height: 1.3;
}
.info-text strong {
  color: #323232;
  font-size: 20px;
}
.btn-secondary,
.btn-primary {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 0 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.btn-secondary {
  background: #ededed;
  color: #383838;
}
.btn-secondary:hover {
  background: #dfdfdf;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 12px rgba(255, 86, 36, 0.17);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 9px 17px rgba(255, 86, 36, 0.24);
}
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(1px);
}
.btn-primary:disabled {
  cursor: not-allowed;
  background: #bcbcbc;
  box-shadow: none;
}

.toast {
  position: fixed;
  z-index: 8;
  top: 30px;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 15px;
  border-radius: 8px;
  transform: translate(-50%, -16px);
  background: #333;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}
.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.order-dialog {
  width: min(420px, calc(100vw - 34px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
}
.order-dialog::backdrop {
  background: rgba(24, 24, 24, 0.32);
  backdrop-filter: blur(3px);
}
.order-dialog form {
  position: relative;
  padding: 30px;
}
.dialog-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f1f1;
  color: #575757;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
}
.order-dialog h2 {
  margin: 0 0 17px;
  font-size: 24px;
}
.order-summary {
  margin-bottom: 19px;
  border-top: 1px solid #e7e7e7;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e7e7e7;
  color: #505050;
  font-size: 13px;
}
.summary-row strong {
  color: #242424;
}
.summary-empty {
  margin: 0;
  padding: 14px 0;
  color: #6b6b6b;
  font-size: 13px;
}
.dialog-actions {
  display: flex;
  gap: 9px;
}
.dialog-actions .btn-primary,
.dialog-actions .btn-secondary {
  margin: 0;
}

@media (max-width: 1120px) {
  #bottom-panel {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
  .actions-section {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .colors-section {
    justify-self: start;
  }
}
@media (max-width: 760px) {
  body {
    overflow: auto;
  }
  .topbar {
    top: 18px;
    right: 20px;
    left: 20px;
  }
  .topbar p,
  .scene-help {
    display: none;
  }
  #bottom-panel {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: block;
    max-height: 54vh;
    padding: 17px;
    overflow-y: auto;
    border-radius: 12px;
  }
  .panel-section + .panel-section {
    margin-top: 19px;
  }
  .module-container {
    width: max-content;
    gap: 13px;
  }
  .products-section {
    overflow-x: auto;
    padding-bottom: 3px;
  }
  .colors-section {
    min-width: 0;
  }
  .actions-section {
    width: 100%;
    text-align: left;
  }
  .btn-secondary,
  .btn-primary {
    display: inline-block;
    width: calc(50% - 6px);
    margin: 0 8px 0 0;
  }
  .btn-primary {
    margin-right: 0;
  }
}

/* STUDUOS kurumsal kimliği: koyu kömür, kırık beyaz ve sıcak kırmızı. */
@font-face {
  font-family: "Urbanist";
  src: url("assets/Urbanist-Thin.otf") format("opentype");
  font-style: normal;
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("assets/Urbanist-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --accent: #d64129;
  --accent-dark: #a92d1c;
  --ink: #111111;
  --muted: #655750;
  --panel: rgba(17, 17, 17, 0.78);
  --cream: #f6ede6;
  --line: rgba(246, 237, 230, 0.18);
}
body {
  background: var(--cream);
  color: var(--cream);
  font-family: "Urbanist", Arial, sans-serif;
  font-weight: 100;
}
.topbar {
  color: var(--ink);
}
.brand {
  gap: 11px;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.brand-mark {
  display: none;
}
.brand-logo {
  width: 34px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0);
}
.topbar p {
  color: #655750;
  font-family: "Urbanist", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.icon-button {
  border-color: rgba(17, 17, 17, 0.12);
  background: rgba(246, 237, 230, 0.68);
  color: var(--ink);
  backdrop-filter: blur(12px);
}
.icon-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.viewer-status,
.scene-help {
  color: #655750;
}
.help-dot {
  background: var(--accent);
}

#bottom-panel {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: 0 22px 52px rgba(17, 17, 17, 0.24);
}
.section-title {
  color: var(--accent);
  font-family: "Urbanist", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.module-card span {
  color: var(--cream);
  font-family: "Urbanist", Arial, sans-serif;
  font-weight: 700;
}
.counter-group {
  background: rgba(246, 237, 230, 0.12);
}
.counter-group button {
  border-color: rgba(246, 237, 230, 0.17);
  background: rgba(246, 237, 230, 0.95);
  color: var(--ink);
}
.counter-group button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--cream);
}
.counter-group button:disabled,
.counter-group button:disabled:hover {
  border-color: rgba(246, 237, 230, 0.08);
  background: rgba(246, 237, 230, 0.12);
  color: rgba(246, 237, 230, 0.35);
}
.counter {
  color: var(--cream);
}
.row-label,
.info-text {
  color: rgba(246, 237, 230, 0.72);
  font-family: "Urbanist", Arial, sans-serif;
  font-weight: 700;
}
.info-text strong {
  color: var(--cream);
}
.color-swatch {
  border-radius: 3px;
}
.color-swatch.active {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px rgba(246, 237, 230, 0.2),
    0 5px 14px rgba(214, 65, 41, 0.35);
}
.custom-color-wrapper {
  border-color: var(--accent);
  background: rgba(246, 237, 230, 0.06);
}
.custom-color-wrapper.active {
  background: rgba(214, 65, 41, 0.26);
}
.btn-secondary {
  border-color: rgba(246, 237, 230, 0.12);
  background: rgba(246, 237, 230, 0.12);
  color: var(--cream);
}
.btn-secondary:hover {
  background: rgba(246, 237, 230, 0.2);
}
.btn-primary {
  background: var(--accent);
  color: var(--cream);
  box-shadow: 0 8px 20px rgba(214, 65, 41, 0.26);
}
.btn-primary:hover {
  background: var(--accent-dark);
}
.toast {
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--line);
  font-family: "Urbanist", Arial, sans-serif;
  font-weight: 700;
}
.order-dialog {
  background: var(--cream);
  color: var(--ink);
}
.eyebrow {
  color: var(--accent);
  font-weight: 700;
}
.order-dialog h2,
.summary-row strong {
  color: var(--ink);
}
.summary-row {
  border-color: rgba(17, 17, 17, 0.14);
  color: #655750;
}
.order-summary {
  border-color: rgba(17, 17, 17, 0.14);
}

/* V2 konfigüratör etkileşimleri ve daha hafif cam yüzeyler. */
:root {
  --panel: rgba(17, 17, 17, 0.54);
  --line: rgba(246, 237, 230, 0.28);
}
#bottom-panel {
  max-height: calc(100vh - 56px);
  background: linear-gradient(
    135deg,
    rgba(35, 34, 33, 0.63),
    rgba(17, 17, 17, 0.48)
  );
  backdrop-filter: blur(24px) saturate(115%);
  -webkit-backdrop-filter: blur(24px) saturate(115%);
}
.module-card {
  cursor: default;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.module-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.module-card.is-disabled {
  opacity: 0.37;
}
.module-add {
  cursor: pointer;
  border-radius: 8px;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}
.module-add:hover {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.24));
}
.module-card.is-disabled .module-add {
  cursor: not-allowed;
}
.product-count {
  display: block;
  min-height: 23px;
  margin-top: 7px;
  color: rgba(246, 237, 230, 0.65);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.product-count .counter {
  margin-right: 4px;
  color: var(--cream);
  font-size: 14px;
}
.color-row + .color-row {
  margin-top: 8px;
}
.color-swatch {
  border-radius: 50%;
  border-width: 2px;
}
.color-swatch:hover {
  transform: scale(1.1);
}
.custom-color-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}
.custom-color-wrapper input {
  border-radius: 50%;
}
.custom-icon {
  font-size: 19px;
}
.selected-remove {
  position: fixed;
  z-index: 5;
  bottom: 47px;
  left: 50%;
  min-width: 132px;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid rgba(246, 237, 230, 0.38);
  border-radius: 999px;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--cream);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  font-family: "Urbanist", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.selected-remove:hover {
  background: var(--accent-dark);
  transform: translateX(-50%) translateY(-2px);
}
.selected-remove[hidden] {
  display: none;
}
.order-capture {
  display: block;
  width: 100%;
  max-height: 260px;
  margin: 0 0 18px;
  border: 1px solid rgba(17, 17, 17, 0.13);
  border-radius: 8px;
  object-fit: cover;
  background: #eadfd6;
}
.order-code {
  margin: 0 0 9px;
  color: #655750;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.order-success {
  margin: 0 0 20px;
  color: #277b4e;
  font-family: "Urbanist", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
}
body.is-capturing .app-shell,
body.is-capturing #bottom-panel,
body.is-capturing .selected-remove,
body.is-capturing .toast {
  visibility: hidden;
}

@media (max-width: 1120px) {
  .colors-section {
    min-width: 250px;
  }
}
@media (max-width: 760px) {
  #bottom-panel {
    max-height: 62vh;
  }
  .selected-remove {
    bottom: 19px;
    min-height: 38px;
  }
  .colors-section .color-row {
    gap: 8px;
  }
  .color-swatch,
  .custom-color-wrapper {
    width: 34px;
    height: 34px;
  }
}

/* Sahne eylemleri panelin içinde değil, ürün ile panel arasındaki boşlukta durur. */
.scene-actions {
  position: fixed;
  z-index: 6;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}
.scene-actions[hidden] {
  display: none;
}
.scene-action {
  position: static;
  min-width: auto;
  min-height: 34px;
  margin: 0;
  padding: 0 14px;
  border-radius: 999px;
  transform: none;
  cursor: pointer;
  font-family: "Urbanist", Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}
.scene-actions .selected-remove {
  border: 1px solid rgba(246, 237, 230, 0.38);
  background: var(--accent);
  color: var(--cream);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.2);
}
.scene-actions .selected-remove:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}
.scene-select-all {
  border: 1px solid rgba(17, 17, 17, 0.19);
  background: rgba(246, 237, 230, 0.78);
  color: var(--ink);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
}
.scene-select-all:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.section-title {
  color: #fff8f1;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.78);
}

@media (max-width: 760px) {
  .scene-actions {
    gap: 6px;
  }
  .scene-action {
    min-height: 31px;
    padding: 0 11px;
    font-size: 9px;
  }
}
