/* Gerkon Yapı, Roma model detayı, V4 (gerçek referans ölçümlerine göre)
   Koto yönünde sade ürün sayfası: ad ve künye, tek ana görsel, çizimler,
   teknik detaylar, iletişim. Her bilgi sayfada bir kez yer alır.
   Tokenlar ortak V2/V3 kararına göre sabitlendi. Önek: rm- (Roma). */


.page-model {
  --rm-paper: #FAFAF8;
  --rm-ink: #171817;
  --rm-grey: #ECEDE8;
  --rm-muted: #62665F;
  --rm-rule: #DCDDD6;
  --rm-red: #AE2926;
  --rm-red-dark: #8F211F;
  --rm-white: #FFFFFF;
  --rm-scrim: rgba(23, 24, 23, 0.72);
  --rm-plate: #252820;
  --rm-hover-line: #B4B7AE;
  --rm-select: #E8C9C6;
  /* Font: ortak common.css içindeki yerel Manrope (400/500) */
  --rm-head: var(--display, Manrope, "Segoe UI", sans-serif);
  --rm-body: var(--sans, Manrope, "Segoe UI", sans-serif);
  --rm-tap: 44px;

  background: var(--rm-paper);
  color: var(--rm-ink);
  font-family: var(--rm-body);
  caret-color: var(--rm-red);
  scrollbar-color: var(--rm-hover-line) var(--rm-paper);
}
.page-model ::selection { background: var(--rm-select); color: var(--rm-ink); }
.page-model :focus-visible { outline: 2px solid var(--rm-red); outline-offset: 3px; }
.page-model img[data-missing] { visibility: hidden; }

/* ---------- Ortak parçalar ---------- */
.rm-h2 {
  margin: 0;
  font: 400 clamp(1.625rem, 2.6vw, 2.25rem)/1.15 var(--rm-head);
  letter-spacing: -0.015em;
}
.rm-h3 {
  margin: 36px 0 8px;
  font: 500 1.0625rem/1.3 var(--rm-head);
}
.rm-note {
  margin: 16px 0 0;
  max-width: 52ch;
  font: 400 0.8125rem/1.55 var(--rm-body);
  color: var(--rm-muted);
}
.rm-textlink {
  display: inline-flex;
  align-items: center;
  min-height: var(--rm-tap);
  margin-top: 8px;
  color: var(--rm-ink);
  font: 500 1rem/1 var(--rm-body);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.rm-textlink:hover { color: var(--rm-red); }
.rm-icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }


/* ---------- 1. Ad, büyük görsel, künye ----------
   Koto (/homes): kısa başlık + tek satır alt bilgi, hemen ardından geniş
   ürün görseli; ölçülebilir bilgi görselin altında, küçük ve sakin. */
.rm-hero { padding-top: clamp(12px, 2vw, 24px); }

.rm-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 0.875rem/1.4 var(--rm-body);
  color: var(--rm-muted);
}
.rm-crumbs a { display: inline-flex; align-items: center; min-height: var(--rm-tap); color: inherit; text-decoration: none; }
.rm-crumbs a:hover { color: var(--rm-ink); text-decoration: underline; text-underline-offset: 3px; }
.rm-crumbs [aria-current] { color: var(--rm-ink); }

.rm-hero__top { padding-bottom: clamp(20px, 3vw, 36px); }
.rm-title {
  margin: 4px 0 0;
  font: 400 clamp(2.5rem, 4.4vw, 3.75rem)/1.02 var(--rm-head);
  letter-spacing: -0.02em;
}
.rm-lead {
  max-width: 52ch;
  margin: 12px 0 0;
  font: 400 clamp(1.0625rem, 1.25vw, 1.1875rem)/1.5 var(--rm-body);
  letter-spacing: 0.005em;
  color: var(--rm-muted);
}

.rm-hero__media { margin-block: 0; }
.rm-hero__frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--rm-grey);
  overflow: hidden;
  cursor: zoom-in;
}
.rm-hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - 140px);
  object-fit: cover;
  object-position: 50% 62%;
}
.rm-hero__media figcaption,
.rm-drawing figcaption {
  margin-top: 10px;
  max-width: 90ch;
  font: 400 0.8125rem/1.5 var(--rm-body);
  color: var(--rm-muted);
}

.rm-hero__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px clamp(32px, 5vw, 80px);
  padding-top: clamp(28px, 4vw, 48px);
}

/* Künye: yatay, küçük; değerler ölçü değil bilgi olarak okunur */
.rm-spec {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, auto));
  justify-content: start;
  gap: 0 clamp(24px, 3.5vw, 56px);
  margin: 0;
}
.rm-spec div { display: grid; gap: 4px; }
.rm-spec dt { font: 400 0.875rem/1.3 var(--rm-body); color: var(--rm-muted); }
.rm-spec dd { margin: 0; font: 400 1.25rem/1.25 var(--rm-head); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Sayfa içi gezinme */
.rm-pagenav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 24px;
}
.rm-pagenav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--rm-tap);
  color: var(--rm-ink);
  font: 400 0.9375rem/1 var(--rm-body);
  text-decoration: underline;
  text-decoration-color: var(--rm-hover-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 150ms ease, color 150ms ease;
}
.rm-pagenav a:hover { color: var(--rm-red); text-decoration-color: currentColor; }

/* ---------- 2. Çizimler ---------- */
.rm-plan {
  padding-block: clamp(64px, 9vw, 128px) clamp(48px, 7vw, 96px);
  scroll-margin-top: 16px;
}
.rm-plan__grid {
  display: grid;
  grid-template-columns: minmax(240px, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.rm-facts { position: sticky; top: 24px; }
.rm-facts__lead {
  margin: 14px 0 0;
  max-width: 34ch;
  font: 400 1rem/1.55 var(--rm-body);
  color: var(--rm-muted);
}

.rm-rooms { margin: 0; padding: 0; list-style: none; }
.rm-rooms li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font: 400 0.9375rem/1.4 var(--rm-body);
}
.rm-rooms li span:last-child { color: var(--rm-muted); font-variant-numeric: tabular-nums; }

/* Pafta dizini: katalogdaki çizimlerin küçük görselleri */
.rm-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
  margin-bottom: 20px;
}
.rm-tabs [role="tab"] {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rm-muted);
  font: 400 0.875rem/1.3 var(--rm-body);
  text-align: left;
  cursor: pointer;
}
.rm-thumb {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 4 / 3;
  padding: 8px;
  border-radius: 3px;
  background: var(--rm-grey);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 150ms ease;
}
.rm-thumb img { width: 100%; height: 100%; object-fit: contain; }
.rm-thumb--dark { background: var(--rm-plate); }
.rm-tabs [role="tab"]:hover { color: var(--rm-ink); }
.rm-tabs [role="tab"]:hover .rm-thumb { box-shadow: inset 0 0 0 1px var(--rm-hover-line); }
.rm-tabs [role="tab"][aria-selected="true"] { color: var(--rm-ink); font-weight: 500; }
.rm-tabs [role="tab"][aria-selected="true"] .rm-thumb { box-shadow: inset 0 0 0 2px var(--rm-ink); }

.rm-panel { outline-offset: 4px; }
.rm-drawing { margin: 0; }
.rm-drawing__frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 360px;
  padding: clamp(20px, 4vw, 56px);
  border: 0;
  border-radius: 4px;
  background: var(--rm-grey);
  cursor: zoom-in;
}
.rm-drawing__frame img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(76vh, 820px);
  object-fit: contain;
}

.rm-zoomhint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--rm-paper);
  color: var(--rm-ink);
  font: 500 0.8125rem/1 var(--rm-body);
  box-shadow: 0 1px 2px rgba(23, 24, 23, 0.12);
}
.rm-drawing__frame:hover .rm-zoomhint,
.rm-drawing__frame:focus-visible .rm-zoomhint,
.rm-hero__frame:hover .rm-zoomhint,
.rm-hero__frame:focus-visible .rm-zoomhint { background: var(--rm-ink); color: var(--rm-paper); }

/* Eksik görsel yer tutucusu */
.asset-missing { position: relative; }
.asset-missing::after {
  content: attr(data-missing-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  font: 400 0.875rem/1.4 var(--rm-body);
  color: var(--rm-muted);
}

/* ---------- 3. Teknik detaylar ---------- */
.rm-tech {
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 9vw, 128px);
  scroll-margin-top: 16px;
}
.rm-tech__grid {
  display: grid;
  grid-template-columns: minmax(240px, 4fr) minmax(0, 8fr);
  gap: 28px clamp(32px, 5vw, 80px);
  align-items: start;
}
.rm-tech__lead {
  margin: 14px 0 0;
  max-width: 34ch;
  font: 400 1rem/1.55 var(--rm-body);
  color: var(--rm-muted);
}
.rm-tech__body { display: grid; gap: 40px; }

.rm-table {
  width: 100%;
  border-collapse: collapse;
  font: 400 0.9375rem/1.45 var(--rm-body);
}
.rm-table caption {
  padding-bottom: 10px;
  text-align: left;
  font: 500 1.125rem/1.3 var(--rm-head);
  border-bottom: 1px solid var(--rm-ink);
}
.rm-table th,
.rm-table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--rm-rule);
  text-align: left;
  vertical-align: baseline;
}
.rm-table th { width: 32%; padding-right: 20px; font-weight: 400; color: var(--rm-muted); }
.rm-table td { padding-right: 20px; }
.rm-table .rm-src {
  width: 1%;
  padding-right: 0;
  white-space: nowrap;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--rm-muted);
  font-variant-numeric: tabular-nums;
}

.rm-scope { max-width: 68ch; }
.rm-scope summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--rm-tap);
  font: 500 0.9375rem/1.3 var(--rm-body);
  cursor: pointer;
  list-style: none;
}
.rm-scope summary::-webkit-details-marker { display: none; }
.rm-scope summary::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 150ms ease;
}
.rm-scope[open] summary::before { transform: rotate(45deg); }
.rm-scope summary:hover { color: var(--rm-red); }
.rm-scope p {
  margin: 4px 0 12px 19px;
  font: 400 0.9375rem/1.6 var(--rm-body);
  color: var(--rm-muted);
}

/* ---------- 4. İletişim (tanıtım) ---------- */
.rm-contact {
  padding-block: clamp(56px, 8vw, 112px);
  background: var(--rm-grey);
  scroll-margin-top: 16px;
}
.rm-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 32px clamp(32px, 6vw, 96px);
}
.rm-contact__text {
  max-width: 40ch;
  margin: 16px 0 0;
  font: 400 1.0625rem/1.6 var(--rm-body);
}

/* ---------- Büyütme penceresi ---------- */
.page-model dialog.rm-zoom {
  width: min(96vw, 1400px);
  height: min(92vh, 1000px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--rm-paper);
  color: var(--rm-ink);
  overflow: hidden;
}
.page-model dialog.rm-zoom[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.page-model dialog.rm-zoom::backdrop { background: var(--rm-scrim); }
.rm-zoom__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 12px 10px clamp(16px, 2.5vw, 24px);
  border-bottom: 1px solid var(--rm-rule);
}
.rm-zoom__title { margin: 0; font: 500 1.125rem/1.2 var(--rm-head); }
.rm-zoom__tools { display: flex; align-items: center; gap: 4px; }
.rm-zoom__tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--rm-tap);
  min-height: var(--rm-tap);
  padding: 0 12px;
  border: 1px solid var(--rm-rule);
  border-radius: 4px;
  background: transparent;
  color: var(--rm-ink);
  font: 500 0.9375rem/1 var(--rm-body);
  cursor: pointer;
}
.rm-zoom__tools button svg { display: block; margin: auto; }
.rm-zoom__tools button:hover { background: var(--rm-grey); }
.rm-zoom__tools button:disabled { opacity: 0.35; cursor: default; }
.rm-zoom__tools output {
  min-width: 4.2em;
  text-align: center;
  font: 500 0.875rem/1 var(--rm-body);
  font-variant-numeric: tabular-nums;
}
.rm-zoom__tools .rm-zoom__close { margin-left: 8px; background: var(--rm-ink); border-color: var(--rm-ink); color: var(--rm-paper); }
.rm-zoom__tools .rm-zoom__close:hover { background: var(--rm-red-dark); border-color: var(--rm-red-dark); }

.rm-zoom__stage {
  overflow: auto;
  scrollbar-color: var(--rm-hover-line) var(--rm-grey);
  background: var(--rm-grey);
  cursor: grab;
  overscroll-behavior: contain;
}
.rm-zoom__stage.is-dragging { cursor: grabbing; }
.rm-zoom__stage.is-fit { display: grid; place-items: center; cursor: zoom-in; }
.rm-zoom__stage img { display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.rm-zoom__stage.is-fit img { max-width: 100%; max-height: 100%; width: auto !important; height: auto; object-fit: contain; }
.rm-zoom__caption {
  margin: 0;
  padding: 10px clamp(16px, 2.5vw, 24px);
  border-top: 1px solid var(--rm-rule);
  font: 400 0.8125rem/1.5 var(--rm-body);
  color: var(--rm-muted);
}

@media (prefers-reduced-motion: reduce) {
  .page-model *, .page-model *::before, .page-model *::after { transition: none !important; animation: none !important; }
}

/* ---------- Duyarlı düzen ---------- */
@media (max-width: 1024px) {
  .rm-plan__grid,
  .rm-tech__grid { grid-template-columns: minmax(0, 1fr); }
  .rm-facts { position: static; }
  .rm-hero__info { grid-template-columns: minmax(0, 1fr); }
  .rm-pagenav { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .rm-title { font-size: clamp(2.25rem, 11vw, 3rem); }
  .rm-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .rm-spec div:first-child { grid-column: 1 / -1; }
  .rm-hero__media { width: 100%; }
  .rm-hero__frame { border-radius: 0; }
  .rm-hero__img { aspect-ratio: 4 / 3; max-height: none; }
  .rm-hero__media figcaption { width: calc(100% - var(--page-gutter, 20px) * 2); margin-inline: auto; }
  .rm-pagenav { gap: 0 20px; }

  .rm-tabs { gap: 8px; max-width: none; }
  .rm-tabs [role="tab"] { font-size: 0.8125rem; min-height: 44px; }
  .rm-thumb { padding: 4px; }
  .rm-drawing__frame { min-height: 260px; padding: 16px; }

  .rm-table th { width: 40%; }
  .rm-contact__grid { grid-template-columns: minmax(0, 1fr); }

  .page-model dialog.rm-zoom { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .rm-zoom__tools output { min-width: 3.4em; }
}

@media (max-width: 380px) {
  .rm-zoom__tools [data-zoom-reset] { display: none; }
}

.rm-table__scope { display: block; margin-top: 10px; font: 400 0.8125rem/1.6 var(--rm-body); color: var(--rm-muted); }

.rm-zoom__tools button svg{display:block;margin:auto}.rm-zoom__tools button{display:inline-flex;align-items:center;justify-content:center}
.rm-table__scope{display:block;font:400 13px/1.6 var(--sans);color:var(--muted);margin-top:10px}.rm-pagenav{flex-wrap:wrap}
.page-model{--rm-head:var(--display);--rm-body:var(--sans)}.rm-title{font-weight:300}.rm-h2{font-weight:400}
.rm-tablabel{display:block;padding-top:8px;background:var(--rm-paper)}
