*{box-sizing:border-box}
:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#202124;background:#f4f4f2}
body{margin:0}
.app{max-width:1250px;margin:0 auto;padding:34px 22px 50px}
header{display:flex;justify-content:space-between;gap:25px;align-items:flex-start;margin-bottom:24px}
.eyebrow{font-size:11px;letter-spacing:.14em;font-weight:800;color:#6d675f}
h1{font-size:32px;line-height:1.05;margin:7px 0 10px}
header p{margin:0;color:#6b6b67;max-width:700px}
.badge{background:#fff;border:1px solid #ddd9d2;border-radius:999px;padding:9px 13px;font-size:12px;font-weight:700;white-space:nowrap}
.grid{display:grid;grid-template-columns:360px minmax(0,1fr);gap:20px}
.panel{background:#fff;border:1px solid #ddd9d2;border-radius:18px}
.controls{padding:20px}
section+section{margin-top:24px;border-top:1px solid #eeeae3;padding-top:22px}
h2{font-size:15px;margin:0 0 12px}
.upload{display:block;border:1px dashed #bbb5aa;border-radius:12px;padding:13px;text-align:center;cursor:pointer;background:#faf9f6;font-size:13px;font-weight:700}
.upload input{display:none}
.preview{margin-top:12px;height:150px;border-radius:12px;overflow:hidden;background:#f1f0ed;display:flex;align-items:center;justify-content:center;text-align:center;color:#8b8984;font-size:12px}
.preview img{width:100%;height:100%;object-fit:cover}
.products{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.product{border:1px solid #ddd9d2;border-radius:12px;overflow:hidden;background:#fff;cursor:pointer;padding:0;text-align:left}
.product.selected{outline:3px solid #1f6feb;outline-offset:1px}
.product img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}
.product span{display:block;padding:8px 9px;font-size:12px;font-weight:700}
.primary,.secondary{border:0;border-radius:11px;padding:13px 15px;font:inherit;font-weight:800;cursor:pointer}
.primary{width:100%;background:#1f6feb;color:#fff}
.primary:disabled,.secondary:disabled{opacity:.45;cursor:not-allowed}
.secondary{background:#f0efeb;color:#262626}
.status{margin-top:10px;font-size:12px;line-height:1.45;color:#777}
.small{font-size:11px;color:#777;line-height:1.5}
.resultPanel{min-height:680px;padding:20px}
.resultHead{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:15px}
.resultHead h2{margin-bottom:3px}
.resultHead span{font-size:12px;color:#777}
.result{min-height:590px;border-radius:14px;background:#f3f2ef;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px;overflow:hidden}
.result.empty{color:#777}
.result img{max-width:100%;max-height:680px;width:auto;height:auto;display:block;border-radius:10px}
.resultIcon{width:54px;height:54px;border-radius:16px;background:#202124;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900;margin-bottom:15px}
.result h3{margin:0 0 7px;font-size:18px;color:#333}
.result p{margin:0;max-width:450px;font-size:13px;line-height:1.5}
.loading{gap:12px}
.spinner{width:36px;height:36px;border:4px solid #d7d5cf;border-top-color:#1f6feb;border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:900px){.grid{grid-template-columns:1fr}.resultPanel{min-height:520px}.result{min-height:430px}}
@media(max-width:520px){.app{padding:20px 12px}header{display:block}header h1{font-size:27px}.badge{display:inline-block;margin-top:12px}.resultHead{align-items:flex-start;flex-direction:column}.secondary{width:100%}}

.timing{margin-top:12px;padding:11px 12px;border:1px solid #e6e2db;border-radius:10px;background:#faf9f6;font-size:11px;line-height:1.6;color:#666}
.timing strong{color:#222}
.timing .row{display:flex;justify-content:space-between;gap:12px}

.roomUploadChoices{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.roomUploadChoices .upload{min-height:74px}
.roomUploadChoices .upload span{font-size:14px}
@media (max-width:560px){
  .roomUploadChoices{grid-template-columns:1fr}
}

/* V5.1 - yüklenen oda/desen önizlemeleri */
.productPreviewWrap{margin-top:12px}
.preview.room-preview,
.preview.product-preview{height:180px}
.preview img{object-fit:contain;background:#f1f0ed}
.preview.has-image{padding:0}
@media(max-width:520px){
  .preview.room-preview,
  .preview.product-preview{height:190px}
}

/* V5.2 - Oda fotoğrafı için tek seçim butonu */
.hiddenFileInput{display:none !important}
.roomSelectBtn{
  width:100%;
  border-style:solid;
  font-size:14px;
  min-height:56px;
}

/* V5.2 - Native confirm yerine mobil uyumlu fotoğraf seçim penceresi */
body.modal-open{overflow:hidden}
.photo-modal[hidden]{display:none}
.photo-modal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:18px}
.photo-modal-backdrop{position:absolute;inset:0;background:rgba(20,20,20,.58);backdrop-filter:blur(2px)}
.photo-modal-card{position:relative;width:min(440px,100%);background:#fff;border-radius:22px;padding:26px;box-shadow:0 20px 60px rgba(0,0,0,.25);text-align:center;z-index:1}
.photo-modal-close{position:absolute;right:13px;top:10px;width:38px;height:38px;border:0;border-radius:50%;background:#f1f0ed;font-size:25px;line-height:1;cursor:pointer}
.photo-modal-icon{width:56px;height:56px;margin:0 auto 14px;border-radius:17px;background:#eef3ff;display:flex;align-items:center;justify-content:center;font-size:27px}
.photo-modal-card h3{margin:0 30px 8px;font-size:21px}
.photo-modal-card p{margin:0 auto 20px;max-width:360px;color:#70706c;font-size:13px;line-height:1.5}
.photo-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.photo-choice{border:1px solid #dedbd5;background:#faf9f6;border-radius:15px;padding:17px 10px;cursor:pointer;text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;font:inherit}
.photo-choice:hover{border-color:#1f6feb;background:#f7f9ff}
.photo-choice span{font-size:26px}
.photo-choice strong{font-size:14px}
.photo-choice small{font-size:11px;color:#777}
@media(max-width:520px){
  .photo-modal{align-items:flex-end;padding:10px}
  .photo-modal-card{border-radius:22px 22px 16px 16px;padding:24px 18px 20px}
  .photo-modal-actions{grid-template-columns:1fr}
  .photo-choice{min-height:67px;display:grid;grid-template-columns:42px 1fr;text-align:left;justify-items:start;padding:12px 15px}
  .photo-choice span{grid-row:1 / span 2;align-self:center}
  .photo-choice strong,.photo-choice small{align-self:end}
}

.newVisualBtn{width:100%;margin-top:9px;border:1px solid #ddd8d0}
