/* Stüdyo + ürün sayfası — mobil güçlendirme (site.css üzerine) */

.modularStudio,
.studio {
  overflow-x: clip;
  max-width: 100vw;
}

.designerShell,
.studioLayout,
.workArea,
.designCanvas {
  min-width: 0;
  max-width: 100%;
}

.designCanvas .canvasModule {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  min-width: 96px !important;
  height: 28% !important;
}
.designCanvas .canvasModule.drawer,
.designCanvas .canvasModule.night {
  height: 24% !important;
}
.designCanvas .canvasModule.door { height: 28% !important; }
.designCanvas .canvasModule.panel { height: 42% !important; }
.designCanvas .canvasModule.mirror { height: 38% !important; max-width: 34% !important; }
.designCanvas .canvasModule.basin { height: 14% !important; }
.designCanvas .canvasModule.shelf { height: 7% !important; }
.designCanvas .canvasModule.productAsset {
  min-width: 120px !important;
  height: 32% !important;
}
.designCanvas .canvasModule.productAsset > img {
  width: 168% !important;
  height: 182% !important;
  inset: -38% -34% !important;
  object-fit: contain !important;
}
.scene-bedroom .designCanvas .canvasModule.productAsset.night {
  min-width: 140px !important;
  height: 36% !important;
}
.scene-bedroom .designCanvas .canvasModule.productAsset.night > img {
  width: 180% !important;
  height: 195% !important;
  inset: -42% -38% !important;
}

.studioMobileBar {
  display: none;
}

@media (max-width: 900px) {
  .modularStudio { padding: 36px 4vw 110px !important; }
  .modularStudio .studioTop { margin-bottom: 28px; max-width: none; }
  .modularStudio .studioTop h1 {
    font-size: clamp(36px, 11vw, 52px) !important;
    line-height: 0.9 !important;
    margin: 14px 0 10px !important;
  }
  .modularStudio .studioTop > p:last-child { font-size: 14px; }

  .designTabs {
    margin: 0 -4vw 12px !important;
    padding: 0 4vw 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .designTabs::-webkit-scrollbar { display: none; }
  .designTabs button {
    flex: 0 0 auto;
    min-width: 132px;
  }

  .designerShell {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    width: 100%;
    box-shadow: 0 10px 36px rgba(49, 44, 34, 0.1) !important;
  }

  .workArea { order: -2 !important; }
  .properties {
    order: -1 !important;
    border: 0 !important;
    padding: 18px 16px !important;
    display: grid;
    gap: 12px;
  }
  .partsPanel {
    order: 0 !important;
    border: 0 !important;
    border-top: 1px solid #ddd9cf !important;
    max-height: 42vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 16px 24px !important;
  }

  .designCanvas {
    min-height: min(78vw, 480px) !important;
    height: min(78vw, 480px);
  }
  .designCanvas .canvasModule {
    min-width: 110px !important;
    height: 32% !important;
  }
  .designCanvas .canvasModule.productAsset {
    min-width: 132px !important;
    height: 38% !important;
  }
  .designCanvas .canvasModule.productAsset > img {
    width: 178% !important;
    height: 192% !important;
    inset: -42% -38% !important;
  }
  .scene-bedroom .designCanvas .canvasModule.productAsset.night {
    min-width: 150px !important;
    height: 42% !important;
  }
  .canvasBar {
    padding: 0 12px !important;
    height: 48px !important;
    font-size: 12px;
  }
  .canvasBar small { display: none !important; }
  .canvasFooter { height: 44px !important; padding: 0 12px !important; font-size: 11px; }
  .sceneInfo { top: 10px !important; right: 10px !important; padding: 7px 9px !important; }

  .partList {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    display: grid !important;
  }
  .partList button,
  .sanitary button,
  .nightstandGroup button {
    min-height: 48px;
    padding: 8px !important;
    font-size: 12px;
  }
  .sanitary,
  .nightstandGroup {
    grid-template-columns: 1fr 1fr !important;
    display: grid !important;
    gap: 6px !important;
  }
  .nightstandGroup h3 { grid-column: 1 / -1; font-size: 12px; }

  .properties .panelNo { display: none; }
  .properties h2 { font-size: 18px; margin: 0 0 4px; }
  .properties .noSelection { font-size: 13px; color: #777; }
  .moduleActions { grid-template-columns: 1fr 1fr !important; }
  .moduleActions button { min-height: 42px; }

  .designTotal {
    position: static;
    margin-top: 4px !important;
  }
  .properties .add {
    width: 100%;
    min-height: 48px;
  }

  /* Alt sabit sepet çubuğu */
  .studioMobileBar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #20211d;
    color: #fff;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  }
  .studioMobileBar small {
    display: block;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: #b0aaa0;
    margin-bottom: 2px;
  }
  .studioMobileBar b {
    font: 500 20px Georgia, "Times New Roman", serif;
  }
  .studioMobileBar button {
    border: 0;
    background: #b0956b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 14px 18px;
    min-height: 48px;
    cursor: pointer;
    white-space: nowrap;
  }
  .studioMobileBar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  .properties .add,
  .designTotal { display: none !important; }

  /* Ürün detay */
  .studio { padding: 40px 4vw 48px !important; }
  .studioTop h1 { font-size: clamp(34px, 10vw, 50px) !important; }
  .studioLayout {
    grid-template-columns: 1fr !important;
    width: 100%;
  }
  .preview { min-height: min(70vw, 420px) !important; }
  .config { padding: 22px 18px 28px !important; }
  .config .add { width: 100%; min-height: 48px; }
  .sizeChoices,
  .choices {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .sizeOpt,
  .matOpt,
  .shapeOpt { min-height: 44px; }

  footer {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 48px 6vw 100px !important;
  }
  .chatButton { bottom: 18px; right: 14px; }
  body:has(.studioMobileBar) .chatButton { bottom: 78px; }
}

@media (max-width: 480px) {
  .designCanvas {
    min-height: 340px !important;
    height: 340px;
  }
  .partList,
  .sanitary,
  .nightstandGroup {
    grid-template-columns: 1fr !important;
  }
  .canvasModule { min-width: 100px !important; }
}
