/* ============================================================
   ASSANONZA — Tasarım Stüdyosu
   Kırılımlar: 1160px (dar masaüstü), 960px (tablet → tek sütun),
               720px (mobil), 380px (küçük telefon)
   ============================================================ */

.studio-body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* PC'de stüdyo ekranı tam kaplar, kaydırma panellerin içinde olur */
@media (min-width: 961px) {
  .studio-body { height: 100dvh; overflow: hidden; }
  /* Ürün ızgarası yalnızca sol ray gizliyken gerekir */
  .tpl-grid { display: none; }
}

/* Sticky header flex kolonun ilk elemanı; stüdyo kalan yüksekliği alır */
.studio {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr) 344px;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "rail stage panel"
    "foot foot foot";
  background: #faf8f5;
}

/* ---------------- yükleniyor ---------------- */
.studio-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--ink-soft);
  font-size: 14px;
}
.studio-loading[hidden] { display: none; }
.load-err { color: var(--red); font-weight: 600; text-align: center; }

.spin {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: asnz-spin 0.8s linear infinite;
}
@keyframes asnz-spin { to { transform: rotate(360deg); } }

/* ============================================================
   SOL RAY — ürün seçimi (PC)
   ============================================================ */
.studio-rail {
  grid-area: rail;
  border-right: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rail-title {
  padding: 16px 16px 10px;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rail-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.rail-item:hover { background: var(--accent-soft); }
.rail-item.active { background: var(--accent-soft); border-color: var(--accent); }

.rail-thumb {
  grid-row: 1 / 3;
  width: 46px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2efea;
  border-radius: 3px;
  overflow: hidden;
}
.rail-thumb img { width: 100%; height: 100%; object-fit: contain; }

.rail-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.rail-price { font-size: 11.5px; color: var(--ink-soft); }

/* ============================================================
   SAHNE
   ============================================================ */
.studio-stage {
  grid-area: stage;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  position: relative;
  padding: 12px 16px 0;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.view-tabs { display: flex; gap: 6px; }

.vtab {
  position: relative;
  padding: 8px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.vtab:hover { border-color: var(--accent); color: var(--accent); }
.vtab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.vtab .dot {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.stage-tools { display: flex; gap: 6px; }

.s-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.s-icon .icon { width: 18px; height: 18px; }
.s-icon:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.s-icon:disabled { opacity: 0.35; cursor: not-allowed; }
.s-icon.danger:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.s-icon.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.s-icon.xs { width: 28px; height: 28px; border-color: transparent; }
.s-icon.xs .icon { width: 15px; height: 15px; }

.stage-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stage {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  font-size: 11.5px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  max-width: 96%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 248, 245, 0.6);
  backdrop-filter: blur(2px);
  z-index: 5;
}
.stage-busy[hidden] { display: none; }

/* seçili katman hızlı çubuğu */
.sel-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 12px;
}
.sel-bar[hidden] { display: none; }

/* ============================================================
   SAĞ PANEL
   ============================================================ */
.studio-panel {
  grid-area: panel;
  border-left: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.ptab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 2px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.ptab .icon { width: 19px; height: 19px; }
.ptab:hover { color: var(--accent); }
.ptab.active { color: var(--accent); border-bottom-color: var(--accent); }

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.pane { display: none; }
.pane.active { display: block; }

.pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}
.pane-head b { font-family: var(--font-body); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--ink-soft); font-weight: 600; }
.pane-head small { font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }

.pane-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 10px;
}
/* Müşteriye "neden değişmedi" diye söyleyen uyarı hali */
.pane-note.warn {
  color: var(--accent);
  background: rgba(138, 38, 50, 0.06);
  border: 1px solid rgba(138, 38, 50, 0.25);
  border-radius: 4px;
  padding: 8px 10px;
}

/* ---------------- ürün ızgarası ---------------- */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.tpl-grid .rail-item {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  justify-items: center;
  text-align: center;
  border: 1px solid var(--line);
  padding: 10px 8px;
  gap: 4px;
}
.tpl-grid .rail-thumb { grid-row: auto; width: 100%; height: 78px; }

.tpl-info {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.tpl-info h4 { font-family: var(--font-head); font-size: 15px; margin-bottom: 6px; }
.tpl-info p { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 10px; }

.ti-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.ti-row span { color: var(--ink-soft); flex-shrink: 0; }
.ti-row b { text-align: right; font-weight: 600; }

/* ---------------- renk kutucukları ---------------- */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
}
.swatches.sm { grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 6px; margin-bottom: 8px; }

.sw {
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--c);
  cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.sw:hover { transform: scale(1.06); }
.sw.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.color-input {
  width: 100%;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

/* ---------------- alanlar ---------------- */
.fld { margin-top: 14px; }
.fld > label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.fld .val { font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; }
.fld.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fld.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

#txt-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
  min-height: 62px;
  margin-bottom: 10px;
}
#txt-input:focus { outline: none; border-color: var(--accent); }

input[type="range"] {
  width: 100%;
  height: 26px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-track { height: 4px; background: var(--line); border-radius: 4px; }
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.chip .icon { width: 17px; height: 17px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- yazı tipi listesi ---------------- */
/* ---------------- yazı tipi listesi ----------------
   Liste kaydırılır; öğeler ASLA büzülmez. flex-shrink sıfırlanmazsa
   18 font sığmadığında her satır kendi içeriğinin yarısına iner ve
   yazılar kesilir. */
.font-search {
  position: relative;
  margin-bottom: 6px;
}
.font-search input {
  width: 100%;
  padding: 9px 12px 9px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
}
.font-search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.font-search .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ink-soft);
  pointer-events: none;
}

.font-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
/* Kaydırma çubuğu görünür olsun — liste devam ediyor belli olsun */
.font-list::-webkit-scrollbar { width: 9px; }
.font-list::-webkit-scrollbar-track { background: transparent; }
.font-list::-webkit-scrollbar-thumb {
  background: #d9d2c6;
  border-radius: 99px;
  border: 2px solid var(--surface);
}
.font-list::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.font-item {
  flex: 0 0 auto;            /* büzülme yok — kesilmenin asıl sebebi buydu */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 46px;
  text-align: left;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
}
.font-item .fi-ad {
  font-size: 19px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-item .fi-not {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.font-item:hover { background: var(--accent-soft); }
.font-item.active { background: var(--accent-soft); border-color: var(--accent); }
.font-item.active .fi-not { color: var(--accent); }

.font-bos {
  padding: 14px 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------------- görsel yükleme ---------------- */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 26px 16px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .icon { width: 26px; height: 26px; color: var(--accent); }
.drop b { font-size: 13.5px; }
.drop span { font-size: 11.5px; color: var(--ink-soft); }

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
}
.check input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.mini {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f5f2;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.mini:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.mini img { max-width: 100%; max-height: 100%; object-fit: contain; }

.group-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.gtab {
  flex-shrink: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.gtab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- katman listesi ---------------- */
.layer-list { display: flex; flex-direction: column; gap: 4px; }

.layer-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.layer-row:hover { border-color: var(--accent); }
.layer-row.active { border-color: var(--accent); background: var(--accent-soft); }
.layer-row > .icon { width: 16px; height: 16px; color: var(--ink-soft); flex-shrink: 0; }

.lr-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   ALT AKSİYON ÇUBUĞU
   ============================================================ */
.studio-foot {
  grid-area: foot;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -6px 20px rgba(43, 30, 15, 0.05);
}
.studio-foot > * { min-width: 0; }

.foot-size { display: flex; align-items: center; gap: 10px; min-width: 0; }
.foot-size > label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.size-row { display: flex; gap: 5px; flex-wrap: wrap; }

.size-btn {
  min-width: 42px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.size-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.size-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.size-btn:disabled { opacity: 0.34; cursor: not-allowed; text-decoration: line-through; }

.foot-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  min-width: 0;
}
.fp-label { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.foot-price strong { font-family: var(--font-head); font-size: 22px; color: var(--ink); }
.foot-price small {
  font-size: 11px;
  color: var(--ink-soft);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foot-actions { display: flex; gap: 8px; min-width: 0; }
.foot-actions .btn { white-space: nowrap; min-width: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Dar masaüstü — panel biraz daralır */
@media (max-width: 1160px) {
  .studio { grid-template-columns: 180px minmax(0, 1fr) 310px; }
  .rail-thumb { width: 40px; height: 46px; }
}

/* Tablet ve altı — tek sütun, ray gizlenir (ürünler panelden seçilir) */
@media (max-width: 960px) {
  .studio {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "stage" "panel" "foot";
    height: auto;
  }

  .studio-rail { display: none; }

  /* Site başlığı sabit kalırsa yapışkan sahneyle çakışır — tasarım
     sayfasında mobilde başlık normal akışta durur, sahne yapışır. */
  .studio-body .site-header { position: static; }

  .studio-stage {
    padding: 10px 12px 0;
    background: #faf8f5;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
  }

  .stage-wrap { height: min(46dvh, 400px); flex: none; }

  .studio-panel {
    border-left: none;
    border-top: none;
    min-height: 42dvh;
  }

  .panel-body { padding: 14px 14px 20px; }

  /* Alt çubuk ekranın altına sabitlenir; bedenler kendi satırında
     yatay kaydırılır (5+ beden dar ekranda alt alta düşmesin). */
  .studio-foot {
    position: sticky;
    bottom: 0;
    z-index: 30;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "size size" "price actions";
    gap: 8px 12px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  }
  .foot-size { grid-area: size; }
  .foot-price { grid-area: price; align-items: flex-start; }
  .foot-actions { grid-area: actions; }

  .size-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .size-row::-webkit-scrollbar { display: none; }
  .size-btn { flex-shrink: 0; }

  /* Yapışkan alt çubuk panel içeriğini örtmesin */
  .panel-body { padding-bottom: 150px; }
  .lbl-long { display: none; }
}

/* Mobil */
@media (max-width: 720px) {
  .stage-top { margin-bottom: 8px; }
  .vtab { padding: 7px 14px; font-size: 12px; }
  .s-icon { width: 36px; height: 36px; }

  .stage-wrap { height: min(42dvh, 340px); }
  .stage-hint { font-size: 10.5px; padding: 3px 10px; }

  /* Altı sekme de ekrana sığar — yatay kaydırma gerekmez */
  .panel-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ptab { font-size: 9.5px; padding: 9px 1px 7px; }
  .ptab .icon { width: 18px; height: 18px; }
  .ptab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

  /* İki aksiyon düğmesi yan yana sığmalı. Eşit genişlik (flex:1) VERİLMEZ —
     "Sepete Ekle" ikonuyla birlikte "Kaydet"ten geniştir; eşitlenirse
     yazısı kırpılır. Her düğme kendi içeriği kadar yer kaplar, artan
     genişliği fiyat sütunu alır. */
  .foot-actions { gap: 6px; flex-shrink: 0; }
  .foot-actions .btn {
    flex: 0 1 auto;
    padding-left: 9px;
    padding-right: 9px;
    font-size: 10.5px;
    letter-spacing: 0.02em;
  }
  .foot-price strong { font-size: 18px; }

  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); }
  .mini-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }

  /* Mobilde satırlar parmakla rahat seçilecek kadar yüksek kalır;
     liste kısalır ama öğe boyu KÜÇÜLMEZ (kesilmeye o yol açıyordu). */
  .font-list { max-height: 46dvh; }
  .font-item { min-height: 50px; padding: 8px 12px; }
  .font-item .fi-ad { font-size: 20px; }
  .font-search input { font-size: 16px; }   /* iOS yakınlaştırmasını engeller */

  .foot-price strong { font-size: 19px; }
  .size-btn { min-width: 38px; height: 36px; }

  /* Dokunmatikte tutamaçlar daha rahat yakalansın */
  .sel-bar { padding: 8px 0 10px; gap: 5px; }
}

/* Küçük telefon */
@media (max-width: 380px) {
  .studio-stage { padding: 8px 8px 0; }
  .stage-wrap { height: min(38dvh, 300px); }
  .panel-body { padding: 12px 10px 18px; }
  .foot-size > label { display: none; }
  .size-btn { min-width: 34px; height: 34px; font-size: 11.5px; padding: 0 6px; }
  .foot-price strong { font-size: 17px; }
  /* Düğmeler yan yana kalır; yerden kazanmak için sepet ikonu gizlenir */
  .foot-actions { gap: 5px; }
  .foot-actions .btn { padding-left: 7px; padding-right: 7px; }
  #btn-add-cart .icon { display: none; }
  .tpl-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .swatches { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
}

/* Yatay telefon — sahne çok kısalmasın */
@media (max-width: 960px) and (orientation: landscape) {
  .stage-wrap { height: min(64dvh, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .rail-item, .vtab, .s-icon, .chip, .mini, .sw { transition: none; }
  .spin { animation-duration: 2s; }
}

/* ============================================================
   BASKI ALANI SEKMELERİ (göğüs / sol kol / sağ kol)
   Yüz sekmelerinden görsel olarak ayrışır: bunlar aynı yüz
   üzerindeki farklı baskı yerleridir, ayrı bir yüz değildir.
   ============================================================ */
.area-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.area-tabs[hidden] { display: none; }

.atab {
  position: relative;
  padding: 6px 13px;
  border: 1px dashed var(--line);
  background: transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.atab:hover { border-color: var(--accent); color: var(--accent); }
.atab.active {
  background: var(--accent-soft);
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
}
.atab .dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 720px) {
  /* Dar ekranda alan sekmeleri kendi satırında yatay kayar */
  .area-tabs {
    order: 3;
    flex-basis: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .area-tabs::-webkit-scrollbar { display: none; }
  .atab { flex-shrink: 0; padding: 6px 11px; font-size: 11px; }
}

/* ============================================================
   BASKI ALANI DÜZENLEME — müşteri kutuyu kendi sürükler
   ============================================================ */
.area-edit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: rgba(138, 38, 50, 0.05);
}
.area-edit[hidden] { display: none; }

.ae-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ae-text b {
  font-family: "Archivo", sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.ae-text span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

.ae-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ae-size {
  font-weight: 700;
  font-size: 12.5px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  white-space: nowrap;
}
.ae-actions .chip:disabled { opacity: 0.4; cursor: not-allowed; }

/* Mobil */
@media (max-width: 720px) {
  .area-edit { padding: 8px 10px; gap: 6px; margin-top: 8px; }
  .ae-text b { font-size: 10.5px; }
  .ae-text span { font-size: 10.5px; }
  .ae-actions { width: 100%; justify-content: space-between; }
  .ae-size { font-size: 11.5px; padding: 4px 8px; }
}

@media (max-width: 380px) {
  .ae-text span { display: none; }   /* dar ekranda başlık + ölçü yeter */
  .ae-actions .chip, .ae-actions .btn { padding: 6px 9px; font-size: 11px; }
}
