/* Esta Ev Modelleri — Esta Modern temasının değişkenlerini kullanır, yoksa kendi varsayılanları. */
.esta-models, .esta-lb {
	--em-red: var(--red, #e1141c);
	--em-red-600: var(--red-600, #b90f16);
	--em-ink: var(--ink, #111214);
	--em-ink-3: var(--ink-3, #3b3d42);
	--em-muted: var(--muted, #6b6f76);
	--em-line: var(--line, #e7e5e1);
	--em-soft: var(--bg-soft, #f4f2ee);
	--em-wa: var(--wa, #1faa59);
	--em-wa-600: var(--wa-600, #178a48);
	--em-r: var(--radius, 20px);
	--em-r-sm: var(--radius-sm, 12px);
}

.esta-models { margin: 0 0 40px; }
.esta-models *, .esta-lb * { box-sizing: border-box; }

/* Üst çubuk: adet + m² filtreleri */
.esta-models__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
/* Kaydırınca filtre şeridi sabit başlığın hemen altında kalır. */
.esta-models { --em-bg: var(--bg, #fff); --em-adminbar: 0px; --em-stick: calc(var(--header-h, 76px) + var(--em-adminbar)); }
.admin-bar .esta-models { --em-adminbar: 32px; }
.esta-models__bar--sticky {
	position: sticky; top: var(--em-stick); z-index: 30;
	padding: 12px 0; margin-top: -12px; margin-bottom: 12px;
	background: var(--em-bg); box-shadow: 0 0 0 100vmax var(--em-bg); clip-path: inset(0 -100vmax);
}
/* Yapışınca tam genişlikte ince alt çizgi (ikinci gölge 1 px aşağıda kalır). */
.esta-models__bar--sticky.is-stuck { box-shadow: 0 0 0 100vmax var(--em-bg), 0 1px 0 100vmax var(--em-line); clip-path: inset(0 -100vmax -1px); }
.esta-models__lead { display: flex; align-items: center; gap: 18px; min-width: 0; }
.esta-models__count { margin: 0; color: var(--em-muted); font-size: .95rem; white-space: nowrap; }
/* Tek Katlı / Çift Katlı sekmeleri: diğer sayfaya geçen bağlantılar. */
.esta-models__tabs { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 4px; border-radius: 999px; background: var(--em-soft); }
.esta-models__tab {
	display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 999px;
	font-size: .9rem; font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none; color: var(--em-muted);
	transition: background .2s, color .2s, box-shadow .2s;
}
.esta-models__tab:hover { color: var(--em-ink); }
.esta-models__tab.is-active { background: #fff; color: var(--em-ink); box-shadow: 0 1px 2px rgba(17, 18, 20, .08), 0 4px 12px -4px rgba(17, 18, 20, .18); cursor: default; }
.esta-models__tab:focus-visible { outline: 2px solid var(--em-red); outline-offset: 2px; }
.esta-models__count b { color: var(--em-ink); font-size: 1.15rem; margin-right: 2px; }
.esta-models__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.esta-models__chip {
	appearance: none; border: 1px solid var(--em-line); background: #fff; color: var(--em-ink-3);
	font: inherit; font-size: .88rem; font-weight: 600; line-height: 1; padding: 10px 14px; border-radius: 999px; cursor: pointer;
	display: inline-flex; align-items: center; gap: 7px; transition: background .2s, color .2s, border-color .2s;
}
.esta-models__chip i { font-style: normal; font-weight: 700; font-size: .75rem; color: var(--em-muted); background: var(--em-soft); border-radius: 999px; padding: 3px 7px; }
.esta-models__chip:hover { border-color: var(--em-ink); color: var(--em-ink); }
.esta-models__chip.is-active { background: var(--em-ink); border-color: var(--em-ink); color: #fff; }
.esta-models__chip.is-active i { background: rgba(255,255,255,.16); color: #fff; }
.esta-models__chip:focus-visible { outline: 2px solid var(--em-red); outline-offset: 2px; }

/* Izgara */
.esta-models__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.esta-model { margin: 0; padding: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--em-line); border-radius: var(--em-r); overflow: hidden; transition: box-shadow .3s, transform .3s, border-color .3s; }
.esta-model:hover { box-shadow: 0 24px 48px -28px rgba(17, 18, 20, .35); transform: translateY(-3px); border-color: transparent; }
.esta-model[hidden] { display: none; }

.esta-model__media {
	appearance: none; border: 0; padding: 0; margin: 0; background: var(--em-soft); cursor: zoom-in; display: block; width: 100%;
	position: relative; aspect-ratio: 16 / 10; overflow: hidden; color: inherit; font: inherit; border-radius: 0;
}
.esta-model__media img, .esta-model__img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.esta-model:hover .esta-model__media img { transform: scale(1.04); }
.esta-model__media:focus-visible { outline: 3px solid var(--em-red); outline-offset: -3px; }

/* Katalogdaki gibi kırmızı kod + koyu m² rozeti */
.esta-model__badge, .esta-lb__badge {
	display: inline-flex; flex-direction: column; align-items: stretch; text-align: center; border-radius: 10px; overflow: hidden;
	box-shadow: 0 8px 20px -10px rgba(0,0,0,.55); line-height: 1.1; font-variant-numeric: tabular-nums;
}
.esta-model__badge { position: absolute; top: 14px; left: 14px; min-width: 84px; }
.esta-model__badge b, .esta-lb__badge b { background: var(--em-red); color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .01em; padding: 7px 12px 6px; }
.esta-model__badge span, .esta-lb__badge span { background: rgba(17,18,20,.92); color: #fff; font-weight: 700; font-size: .92rem; padding: 6px 12px 7px; }
.esta-lb__badge span:empty { display: none; }

.esta-model__zoom {
	position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px;
	background: rgba(17,18,20,.6); color: #fff; font-size: .8rem; font-weight: 700; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
	transition: background .2s;
}
.esta-model__zoom .esta-icon { width: 15px; height: 15px; }
.esta-model:hover .esta-model__zoom { background: var(--em-red); }

.esta-model__body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 20px; }
.esta-model__info { min-width: 0; }
.esta-model__title { margin: 0 0 4px; font-size: 1.2rem; line-height: 1.15; color: var(--em-ink); letter-spacing: -.01em; text-transform: none; }
.esta-model__title::before, .esta-model__title::after { content: none !important; }
.esta-model__tag { display: inline-block; vertical-align: 3px; margin-left: 6px; padding: 3px 8px; border-radius: 999px; background: #fdecec; color: var(--em-red); font-size: .72rem; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.esta-model__meta { margin: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--em-muted); font-size: .9rem; line-height: 1.3; }
.esta-model__meta .esta-icon { width: 16px; height: 16px; color: var(--em-red); }
.esta-model__meta span:first-of-type { color: var(--em-ink); font-weight: 700; }
.esta-model__meta .sep { color: var(--em-line); font-weight: 400; }

.esta-model__thumbs { display: flex; gap: 8px; flex: 0 0 auto; }
.esta-model__thumb {
	appearance: none; padding: 0; margin: 0; border: 1px solid var(--em-line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in;
	width: 64px; height: 48px; position: relative; transition: border-color .2s, transform .2s;
}
.esta-model__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.esta-model__thumb--plan img, .esta-model__thumb--cephe img { object-fit: contain; padding: 3px; }
.esta-model__thumb span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.esta-model__thumb:hover { border-color: var(--em-ink); transform: translateY(-1px); }
.esta-model__thumb:focus-visible { outline: 2px solid var(--em-red); outline-offset: 2px; }

.esta-models__none { grid-column: 1 / -1; color: var(--em-muted); text-align: center; padding: 40px 0; }

@media (max-width: 1100px) {
	.esta-models__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
}
@media (max-width: 782px) {
	.admin-bar .esta-models { --em-adminbar: 46px; }
}
@media (max-width: 640px) {
	.esta-models__bar { margin-bottom: 18px; flex-wrap: nowrap; gap: 12px; }
	.esta-models__bar--sticky { padding: 10px 0; margin-top: -10px; margin-bottom: 8px; }
	.esta-models__count { flex: 0 0 auto; font-size: .85rem; }
	.esta-models__count b { font-size: 1.05rem; }
	.esta-models__chips { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 0 0; padding: 2px 16px 2px 0; scrollbar-width: none; }
	.esta-models__chips::-webkit-scrollbar { display: none; }
	.esta-models__chip { flex: 0 0 auto; }
	/* Sekmeler varsa: üst satırda sekmeler + adet, alt satırda kenardan kenara kayan m² filtreleri. */
	.esta-models__bar--tabs { flex-wrap: wrap; row-gap: 10px; }
	.esta-models__bar--tabs .esta-models__lead { flex: 1 1 100%; justify-content: space-between; gap: 12px; }
	.esta-models__bar--tabs .esta-models__chips { flex: 1 1 100%; margin: 0 calc(-1 * var(--gutter, 16px)); padding: 2px var(--gutter, 16px); }
	.esta-models__bar--tabs .esta-models__chip { padding: 9px 13px; }
	.esta-models__tab { padding: 10px 16px; }
	.esta-models__grid { grid-template-columns: 1fr; gap: 18px; }
	.esta-model { border-radius: 16px; }
	.esta-model:hover { transform: none; }
	.esta-model__body { padding: 14px 14px 14px 16px; }
	.esta-model__badge { top: 12px; left: 12px; min-width: 76px; }
	.esta-model__badge b { font-size: .92rem; padding: 6px 10px 5px; }
	.esta-model__badge span { font-size: .85rem; padding: 5px 10px 6px; }
	.esta-model__thumb { width: 56px; height: 44px; }
}

/* ======================================================================
   Galeri penceresi
   ====================================================================== */
html.esta-lb-open, html.esta-lb-open body { overflow: hidden !important; }

.esta-lb {
	position: fixed; inset: 0; z-index: 100000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
	background: #0c0d0f; color: #fff; opacity: 0; transition: opacity .25s ease;
	font-family: var(--font, inherit); -webkit-tap-highlight-color: transparent;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.esta-lb[hidden] { display: none; }
.esta-lb.is-open { opacity: 1; }
.esta-lb button { font-family: inherit; }

.esta-lb__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 10px; }
.esta-lb__title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.esta-lb__badge { flex-direction: row; box-shadow: none; }
.esta-lb__badge b { font-size: 1.05rem; padding: 8px 12px; }
.esta-lb__badge span { font-size: 1rem; padding: 8px 12px; background: rgba(255,255,255,.12); }
.esta-lb__tip { color: rgba(255,255,255,.72); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esta-lb__tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.esta-lb__counter { color: rgba(255,255,255,.7); font-size: .9rem; font-variant-numeric: tabular-nums; margin-right: 6px; }
.esta-lb__btn {
	appearance: none; border: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
	background: rgba(255,255,255,.08); color: #fff; transition: background .2s;
}
.esta-lb__btn:hover, .esta-lb__btn[aria-pressed="true"] { background: rgba(255,255,255,.2); }
.esta-lb__btn:focus-visible, .esta-lb__nav:focus-visible, .esta-lb__thumb:focus-visible, .esta-lb__model:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.esta-lb__stage { position: relative; min-width: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 4px 84px; touch-action: pan-y pinch-zoom; }
.esta-lb__frame { position: relative; min-width: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.esta-lb__img {
	display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 14px;
	user-select: none; -webkit-user-drag: none; transition: opacity .25s ease, transform .3s ease; cursor: zoom-in;
	box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
.esta-lb__img.is-loading { opacity: 0; }
.esta-lb__frame.is-plan .esta-lb__img { background: #fff; padding: clamp(10px, 2vw, 28px); }

/* Yakınlaştırma: görsel doğal boyutunda, kaydırarak gezilir */
.esta-lb__frame.is-zoomed { overflow: auto; display: block; cursor: zoom-out; -webkit-overflow-scrolling: touch; }
.esta-lb__frame.is-zoomed .esta-lb__img { max-width: none; max-height: none; width: var(--zw, 200%); cursor: zoom-out; border-radius: 0; margin: 0 auto; }

.esta-lb__spinner { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: esta-spin .8s linear infinite; opacity: 0; pointer-events: none; transition: opacity .2s; }
.esta-lb__frame.is-busy .esta-lb__spinner { opacity: 1; }
@keyframes esta-spin { to { transform: rotate(360deg); } }

.esta-lb__nav {
	appearance: none; border: 0; position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%;
	display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.1); color: #fff; z-index: 2; transition: background .2s;
}
.esta-lb__nav:hover { background: var(--em-red); }
.esta-lb__nav--prev { left: 16px; }
.esta-lb__nav--next { right: 16px; }
.esta-lb__nav[disabled] { opacity: .25; pointer-events: none; }

.esta-lb__bottom {
	display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); grid-template-areas: "mprev thumbs mnext" "cta cta cta";
	align-items: center; gap: 12px 16px; padding: 12px 20px 18px;
}
.esta-lb__thumbs { grid-area: thumbs; display: flex; gap: 10px; min-width: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; position: relative; }
.esta-lb__thumbs::-webkit-scrollbar { display: none; }
/* Sığdığında ortalı, taşınca soldan başlar ve kayar (center taşmada ilk görselleri keserdi). */
.esta-lb__thumb:first-child { margin-left: auto; }
.esta-lb__thumb:last-child { margin-right: auto; }
.esta-lb__thumb {
	appearance: none; border: 2px solid transparent; padding: 0; margin: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; flex: 0 0 auto;
	width: 96px; height: 64px; position: relative; opacity: .55; transition: opacity .2s, border-color .2s;
}
.esta-lb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.esta-lb__thumb.is-plan img { object-fit: contain; padding: 3px; }
.esta-lb__thumb span {
	position: absolute; left: 0; right: 0; bottom: 0; font-size: .68rem; font-weight: 700; color: #fff; padding: 10px 4px 3px; line-height: 1.1;
	background: linear-gradient(transparent, rgba(0,0,0,.75)); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.esta-lb__thumb:hover { opacity: .9; }
.esta-lb__thumb[aria-selected="true"] { opacity: 1; border-color: var(--em-red); }

.esta-lb__models { grid-area: mprev; display: flex; white-space: nowrap; }
.esta-lb__models--end { grid-area: mnext; justify-content: flex-end; }
.esta-lb__model {
	appearance: none; border: 0; background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
	padding: 8px 10px; border-radius: 12px; text-align: left; transition: background .2s;
}
.esta-lb__model--next { text-align: right; }
.esta-lb__model:hover { background: rgba(255,255,255,.08); }
.esta-lb__model small { display: block; font-size: .72rem; color: rgba(255,255,255,.6); font-weight: 600; letter-spacing: .02em; }
.esta-lb__model b { display: block; font-size: .95rem; }
.esta-lb__model[hidden] { display: none; }

.esta-lb__cta { grid-area: cta; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.esta-lb__quote, .esta-lb__wa {
	appearance: none; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
	font-weight: 700; font-size: .95rem; line-height: 1; padding: 14px 22px; border-radius: 999px; transition: background .2s, transform .2s;
}
.esta-lb__quote { background: var(--em-red); color: #fff; box-shadow: 0 12px 28px -14px rgba(225, 20, 28, .9); }
.esta-lb__quote:hover { background: var(--em-red-600); color: #fff; }
.esta-lb__wa { background: rgba(255,255,255,.1); color: #fff; }
.esta-lb__wa:hover { background: var(--em-wa); color: #fff; }
.esta-lb__wa[hidden] { display: none; }

/* Teklif formu galerinin üstünde açılsın */
html.quote-open .esta-lb { z-index: 9990; }

@media (max-width: 900px) {
	.esta-lb__stage { padding: 4px 12px; }
	.esta-lb__nav { width: 44px; height: 44px; background: rgba(17,18,20,.55); }
	.esta-lb__nav--prev { left: 18px; }
	.esta-lb__nav--next { right: 18px; }
	.esta-lb__tip { display: none; }
}
@media (max-width: 640px) {
	.esta-lb__top { padding: 10px 12px 6px; }
	.esta-lb__badge b { font-size: .95rem; padding: 7px 10px; }
	.esta-lb__badge span { font-size: .9rem; padding: 7px 10px; }
	.esta-lb__btn { width: 40px; height: 40px; }
	.esta-lb__counter { font-size: .82rem; margin-right: 2px; }
	.esta-lb__stage { padding: 0; }
	.esta-lb__img { border-radius: 0; box-shadow: none; }
	.esta-lb__frame.is-plan .esta-lb__img { border-radius: 10px; }
	.esta-lb__nav { width: 40px; height: 40px; }
	.esta-lb__nav--prev { left: 8px; }
	.esta-lb__nav--next { right: 8px; }
	.esta-lb__bottom { grid-template-columns: auto 1fr auto; padding: 10px 12px 14px; gap: 10px 6px; }
	.esta-lb__thumbs { gap: 6px; }
	.esta-lb__thumb { width: 64px; height: 46px; border-radius: 9px; }
	.esta-lb__thumb span { display: none; }
	.esta-lb__model { padding: 6px; gap: 4px; }
	.esta-lb__model small { display: none; }
	.esta-lb__model b { font-size: .8rem; }
	.esta-lb__cta { flex-wrap: nowrap; }
	.esta-lb__quote { flex: 1 1 auto; padding: 14px 16px; font-size: .92rem; }
	.esta-lb__wa { flex: 0 0 auto; padding: 14px 16px; }
	.esta-lb__wa span { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
	.esta-lb__bottom { grid-template-areas: "mprev thumbs mnext cta"; grid-template-columns: auto 1fr auto auto; padding: 6px 12px 8px; }
	.esta-lb__thumb { height: 40px; width: 56px; }
	.esta-lb__thumb span { display: none; }
	.esta-lb__top { padding: 6px 12px 4px; }
}
@media (prefers-reduced-motion: reduce) {
	.esta-lb, .esta-lb__img, .esta-model, .esta-model__media img { transition: none !important; }
}
