/* =========================================================
   ALAP ELEMEK: TÁBLA, BADGE, GOMB, GRID, CARD, BREADCRUMB
   ========================================================= */

/* ---- Táblázat ------------------------------------------------ */

.ar-table-wrapper {
  width: 100%;
  overflow-x: auto;              /* ha nem fér ki, scroll */
}

.ar-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.ar-table th,
.ar-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.ar-table th {
  font-weight: 600;
}

/* Megnevezés oszlop törhet több sorba */
.ar-table td:nth-child(3),
.ar-table th:nth-child(3) {
  white-space: normal;
}

/* Ár oszlop jobbra, egy sorban */
.ar-table th:last-child,
.ar-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* Státusz-badge középre */
.ar-table td:nth-last-child(2),
.ar-table th:nth-last-child(2) {
  text-align: center;
}

/* Mobilra feszesebb */
@media (max-width: 768px) {
  .ar-table {
    min-width: 700px;
  }
  .ar-table th,
  .ar-table td {
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
  }
}

/* ---- Badge --------------------------------------------------- */

.ar-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  color: #fff;
}

.ar-badge--elado    { background: #3a7bf2; }
.ar-badge--foglalva { background: #f59e0b; }
.ar-badge--eladva   { background: #ef4444; }

/* ---- Gombok -------------------------------------------------- */

.ar-btn {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-decoration: none;
  width: fit-content;
  margin: 0 auto;
}

.ar-btn:hover       { border-color: #bbb; }
.ar-btn--ghost      { background: #0A1673; color: #fff; }

.ar-btn--primary {
  background: #00bcd4;
  color: #fff;
  border-color: #00bcd4;
}

.ar-btn--primary:hover {
  filter: brightness(0.95);
}

/* ---- Grid ---------------------------------------------------- */

.ar-grid {
  display: grid;
  gap: 1.5rem;
}

.ar-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ar-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ar-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Tablet: max 2 oszlop */
@media (max-width: 1024px) {
  .ar-grid--cols-3,
  .ar-grid--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobil: 1 oszlop */
@media (max-width: 640px) {
  .ar-grid--cols-2,
  .ar-grid--cols-3,
  .ar-grid--cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ---- Kártyák ------------------------------------------------- */

.ar-card {
  border: 1px solid #eee;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 10px 15px -3px #2A6FB366;
}

.ar-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fafafa;
}

.ar-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ar-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.ar-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ar-card__title {
  margin: 0 0 6px;
  font-size: 18px;
}

.ar-card__meta {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  gap: 12px;
  color: #555;
  font-size: 14px;
}

/* Projekt-kártya extra elemei */
.ar-card--project .ar-card__thumb {
  aspect-ratio: 4 / 3;
}

.ar-card__project-address {
  margin: 0 0 6px;
  font-size: 14px;
  color: #666;
}

.ar-card__excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 10px;
}

/* ---- Breadcrumb ---------------------------------------------- */

.ar-breadcrumb {
  font-size: 13px;
  margin-bottom: 12px;
  color: #666;
}

.ar-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.ar-breadcrumb a:hover {
  text-decoration: underline;
}

.ar-breadcrumb__sep {
  margin: 0 4px;
}

.ar-breadcrumb__current {
  font-weight: 500;
}


/* =========================================================
   PROJEKT / ÉPÜLET / SZINT VÁLASZTÓK
   ========================================================= */

.ar-building-selector,
.ar-floor-selector,
.ar-table-wrapper {
  margin: 16px 0 24px;
}

/* Épületválasztó */

.ar-building-selector__title,
.ar-floor-selector__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.ar-building-selector__list,
.ar-floor-selector__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ar-building-selector__item,
.ar-floor-selector__item {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 14px;
  text-decoration: none;
  color: #333;
  background: #fff;
}

.ar-building-selector__item:hover,
.ar-floor-selector__item:hover {
  border-color: #00bcd4;
}

.ar-building-selector__item--active,
.ar-floor-selector__item--active {
  background: #00bcd4;
  color: #fff;
  border-color: #00bcd4;
}


/* =========================================================
   HOTSPOT MAP-EK (PROJEKT / ÉPÜLET / SZINT / LAKÁS)
   ========================================================= */

.ar-hotspot-map {
  position: relative;
  max-width: 100%;
  margin: 16px 0;
}

.ar-hotspot-map img {
  width: 100%;
  height: auto;
  display: block;
}

.ar-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  text-decoration: none;
}

/* Alap kör: betű/szám középen, plusz jel nélkül */
.ar-hotspot__dot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: #433d3d;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ar-hotspot--unit-on-floor:hover .ar-hotspot__dot {
  background: #00bcd4;
  box-shadow: 0 0 8px rgba(0,188,212,0.7);
  transform: scale(1.06);
}

/* eladott lakás halványabb, de hoverre azért jelezhet */
.ar-hotspot--unit-on-floor.ar-hotspot--sold .ar-hotspot__dot {
  opacity: 0.6;
}

/* Tooltip doboz */
.ar-hotspot__tooltip {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -8px);
  background: #5b4f4d;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* kis háromszög alul */
.ar-hotspot__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #5b4f4d transparent transparent transparent;
}

.ar-hotspot__tooltip-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.ar-hotspot__tooltip-meta {
  opacity: 0.9;
}

/* hover + fókusz esetén jelenjen meg */
.ar-hotspot--unit-on-floor:hover .ar-hotspot__tooltip,
.ar-hotspot--unit-on-floor:focus .ar-hotspot__tooltip {
  opacity: 1;
  transform: translate(-50%, -14px);
}
/* régi plusz jel teljes tiltása */
.ar-hotspot__dot::before {
  content: none !important;
}

/* Projekt overview – épületek */
.ar-hotspot-map--buildings .ar-hotspot__dot {
  width: 3rem;
  height: 3rem;
}

/* Szint- és lakás-hotspotok kicsit kisebbek */
.ar-hotspot-map--floors .ar-hotspot__dot,
.ar-hotspot-map--floor-units .ar-hotspot__dot {
  width: 2.2rem;
  height: 2.2rem;
}

/* Állapot szerinti színezés */

.ar-hotspot--building .ar-hotspot__dot {
  background: #433d3d;
}

.ar-hotspot--active-building .ar-hotspot__dot {
  background: #00bcd4;
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.8);
}

.ar-hotspot--floor .ar-hotspot__dot {
  background: #433d3d;
}

.ar-hotspot--active-floor .ar-hotspot__dot {
  background: #00bcd4;
  box-shadow: 0 0 8px rgba(0, 188, 212, 0.8);
}

.ar-hotspot--unit-on-floor .ar-hotspot__dot {
  background: #433d3d;
}

/* eladott egység halványabb/piros */
.ar-hotspot--sold .ar-hotspot__dot,
.ar-hotspot--unit-on-floor.ar-hotspot--sold .ar-hotspot__dot {
  background: #b3261e;
  opacity: 0.8;
}

/* =========================================================
   ÉPÜLET OLDAL
   ========================================================= */

.ar-building-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}

.ar-building-page__back {
  margin-bottom: 15px;
}

.ar-building-page__back a {
  color: #0077bb;
  text-decoration: none;
  font-size: 14px;
}

.ar-building-page__back a:hover {
  text-decoration: underline;
}

.ar-building-page__title {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 700;
}

.ar-building-page table {
  width: 100%;
  margin-bottom: 30px;
}

.ar-building-page .ar-unit-grid {
  margin-top: 20px;
}

/* =========================================================
   UNIT OLDALAK – RÉGI (ar-unit) + ÚJ (ar-unit--detail) LAYOUT
   ========================================================= */

/* --- Régebbi ar-unit layout – ha még használod valahol ------- */

.ar-unit {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

.ar-unit__top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .ar-unit__top {
    grid-template-columns: 1fr;
  }
}

.ar-unit__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.ar-unit__image--placeholder {
  border-radius: 8px;
  border: 1px dashed #ddd;
  padding: 40px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

.ar-unit__sidebar {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ar-unit__status {
  margin-bottom: 4px;
}

.ar-unit__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.ar-unit__project {
  margin: 0;
  font-size: 14px;
  color: #555;
}

.ar-unit__price {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 600;
}

.ar-unit__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px 16px;
  background: #fff;
}

.ar-unit__meta-item {
  min-width: 120px;
  display: flex;
  flex-direction: column;
}

.ar-unit__meta-label {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ar-unit__meta-value {
  font-size: 14px;
  font-weight: 500;
}

.ar-unit__excerpt {
  font-size: 15px;
  color: #444;
}

.ar-unit__content {
  font-size: 15px;
}

/* --- Új, részletes unit layout – ar-unit--detail -------------- */

.ar-unit--detail {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 0.5rem 1rem 3rem;
}

.ar-unit--detail .ar-breadcrumb {
  margin-bottom: 0.75rem;
}

/* fejléc: bal oldalt cím + státusz, jobb oldalt ár */

.ar-unit__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ar-unit__header-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ar-unit__title {
  font-size: 1.8rem;
  margin: 0 0 0.25rem !important;
}

.ar-unit__project {
  margin-top: 0;
  font-size: 0.95rem;
  color: #666;
}

.ar-unit__price {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
}

.ar-unit__status {
  margin: 0 0 0.4rem;
  display: inline-block;
}

/* kétoszlopos rész */

.ar-unit__layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.ar-unit__layout-left {
  flex: 0 0 60%;
}

.ar-unit__floorplan-big {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  background: #f7f7f7;
}

.ar-unit__floorplan-big img {
  display: block;
  width: 100%;
  height: auto;
}

.ar-unit__layout-right {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* fact kártyák */

.ar-unit__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.ar-unit-fact {
  background: #262626;
  color: #fff;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 68px;
}

.ar-unit-fact__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.ar-unit-fact__value {
  font-size: 1rem;
  font-weight: 600;
}

.ar-unit-fact--highlight {
  background: #444;
}

/* beltér / kültér listák */

.ar-unit__section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.ar-unit__rooms,
.ar-unit__outdoor {
  border-radius: 8px;
  background: #fafafa;
  padding: 1rem 1.2rem;
}

.ar-unit-rooms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
}

.ar-unit-rooms-list__item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.ar-unit-rooms-list__name {
  color: #555;
}

.ar-unit-rooms-list__size {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ar-unit-rooms-list__total {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
  font-weight: 600;
  font-size: 0.98rem;
}

/* kültér első sor */
.ar-unit__outdoor .ar-unit-rooms-list__item {
  border-top: 1px solid #e3e3e3;
  margin-top: 0.4rem;
}

/* kapcsolat box */

.ar-unit__contact {
  border-radius: 8px;
  background: #fff;
  padding: 1rem 1.2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.ar-unit__contact-name {
  font-weight: 600;
  margin: 0 0 0.3rem;
}

.ar-unit__contact-line {
  margin: 0.1rem 0;
  font-size: 0.95rem;
}

/* leírás */

.ar-unit--detail .ar-unit__excerpt {
  margin-top: 2.5rem;
  max-width: 800px;
}

.ar-unit--detail .ar-unit__content {
  margin-top: 1.5rem;
}

/* responsive a részletes layoutra */

@media (max-width: 960px) {
  .ar-unit__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ar-unit__layout {
    flex-direction: column;
  }

  .ar-unit__layout-left,
  .ar-unit__layout-right {
    flex: 0 0 100%;
  }
}

@media (max-width: 600px) {
  .ar-unit--detail {
    padding: 0.5rem 0.75rem 2.5rem;
  }

  .ar-unit__title {
    font-size: 1.5rem;
  }

  .ar-unit__facts {
    grid-template-columns: 1fr 1fr;
  }
}
/* ===== Floor poligon overlay ======================================= */

/* Alaprajz wrapper + kép */
.ar-hotspot-map.ar-hotspot-map--floor-units {
  position: relative;
  max-width: 100%;
}

.ar-hotspot-map.ar-hotspot-map--floor-units > img {
  display: block;
  width: 100%;
  height: auto;
}

/* SVG overlay a kép felett */
.ar-floor-units-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* a click menjen a hotspotokra, ne a poligonra */
  display: block;
}

/* Alap: a poligon NE látszódjon, de hoverelhető legyen JS-ből */
.ar-floor-unit-shape {
  fill: transparent;
  stroke: transparent;
  stroke-width: 0.35;
  opacity: 0;
  pointer-events: auto; /* kell, ha közvetlenül a poligonra is hoverezel */
  transition: opacity 0.2s ease, fill 0.2s ease, stroke 0.2s ease;
}

/* Aktív (hoverelt) poligon – “eladó” default állapot */
.ar-floor-unit-shape.is-active {
  opacity: 0.85;
  fill: rgba(0, 188, 212, 0.35);
  stroke: #00bcd4;
}

/* Foglalt – sárgás árnyalat aktív állapotban */
.ar-floor-unit-shape.ar-floor-unit--status-foglalva.is-active {
  fill: rgba(255, 193, 7, 0.55);
  stroke: #f59e0b;
}

/* Eladva – piros árnyalat aktív állapotban */
.ar-floor-unit-shape.ar-floor-unit--status-eladva.is-active {
  fill: rgba(239, 68, 68, 0.55);
  stroke: #ef4444;
}

/* Hotspot pötty finom kiemelése */
.ar-hotspot--unit-on-floor.is-active .ar-hotspot__dot {
  transform: scale(1.05);
}
