/* =====================================================
details.css
===================================================== */

body.ui-internal .detail-topbar {
  position: fixed;
  top: 0;
  z-index: 1100;

  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 12px;

  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;

  pointer-events: auto; /* ⬅️ MUSI BYĆ */
}

body.ui-internal .detail-topbar.is-hidden {
  pointer-events: none; /* ⬅️ przepuszcza klik */
}

body.ui-internal .detail-topbar .topbar-back {
  pointer-events: auto;
}

/* link POWRÓT */
body.ui-internal .detail-topbar .topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: #0f172a;
  text-decoration: none;

  font-size: 15px;
  font-weight: 600;
}

/* SVG CHEVRON BACK */
body.ui-internal .detail-topbar .arrow-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;

  color: #0f172a;
}

/* tap feedback */
body.ui-internal .detail-topbar .topbar-back:active {
  opacity: .6;
}

body.ui-internal .detail-topbar .topbar-back:active .arrow-icon {
  transform: translateX(-2px);
}



/* =====================================================
   DETAIL — LAYOUT (MOBILE FIRST)
===================================================== */

.detail-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 12px 120px;
}









/* === GALERIA === */

.card-media {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 20px auto;
  aspect-ratio: 16 / 9;
  background: #e5e7eb;
  border-radius: 14px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none; /* ⬅️ obraz NIE łapie klików */
}

/* === STRZAŁKI === */

.media-arrow {
  touch-action: manipulation;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;

  background: rgba(37,99,235,.85);
  color: #fff;
  font-size: 22px;
  font-weight: 700;

  display: flex;              /* ⬅️ ZAWSZE */
  align-items: center;
  justify-content: center;

  opacity: 0;                 /* ukryte */
  pointer-events: none;       /* nieklikalne */
  transition: opacity .15s ease;

  z-index: 1200;
}

.media-arrow.left  { left: 14px; }
.media-arrow.right { right: 14px; }

/* aktywne */
.card-media.has-prev .media-arrow.left,
.card-media.has-next .media-arrow.right {
  opacity: 1;
  pointer-events: auto;
}

/* większy hitbox */
.media-arrow::after {
  content: "";
  position: absolute;
  inset: -18px;
  pointer-events: auto;
}









/* =====================================================
   DETAIL — TYTUŁ + TAGI
===================================================== */

.detail-layout h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}










/* =====================================================
   DETAIL — LOCATION / PHONE / PRICE
===================================================== */

.detail-location,
.detail-phone,
.detail-price {
  display: flex;
  flex-direction: column;
  gap: 6px;

  font-size: 15px;
  margin: 12px 0;
}


/* =====================================================
   DETAIL — PRICE (INLINE ROW) — OVERRIDE
===================================================== */

.detail-price {
  flex-direction: row;      /* ← wygrywa, bo JEST PÓŹNIEJ */
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}















/* =====================================================
   REVEAL BUTTON
===================================================== */

.reveal-btn {
  align-self: flex-start;

  padding: 8px 12px;
  border-radius: 8px;
  border: none;

  background: #f59e0b;
  color: #111;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

















/* =====================================================
   REVEALED VALUE — LOCATION
===================================================== */

.detail-location .revealed-value {
  display: block;
  padding: 8px 0;
}

/* tekst lokalizacji */
.detail-location-text {
  font-weight: 600;
  margin-bottom: 6px;
}

/* kontener linków */
.detail-location-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* pojedynczy link */
.detail-location-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #fbbf24;
}

/* ikonka mapy */
.detail-location-links img {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}












/* =====================================================
   PRICE
===================================================== */

.detail-price .price-value {
  color: #fbbf24;
  font-weight: 700;
}

.detail-price .price-unit {
  color: #9ca3af;
  font-size: 13px;
}














/* =====================================================
   DESCRIPTION
===================================================== */

.detail-description {
  margin-top: 24px;
  font-size: 1rem;
  line-height: 1.6;
  color: #d1d5db;
}

.detail-description strong {
  display: block;
  margin-bottom: 6px;
}










/* =====================================================
   HARD FIX: [hidden] MUSI UKRYWAĆ (bez !important)
   — wklej na końcu pliku
===================================================== */

.detail-location .revealed-value[hidden],
.detail-phone .revealed-value[hidden] {
  display: none;
}

.detail-location .revealed-value,
.detail-phone .revealed-value {
  display: block;
}













/* =====================================================
   TABLET +
===================================================== */

@media (min-width: 768px) {
  .detail-layout {
    padding: 20px 16px 60px;
  }

  .detail-layout h1 {
    font-size: 28px;
  }
}










/* =====================================================
   DETAIL TOPBAR — DESKTOP
===================================================== */

@media (min-width: 1024px) {
  body.ui-internal.page-show .detail-topbar,
  body.ui-internal.page-show .detail-layout {
    position: static;
    height: auto;

    background: transparent;
    border-bottom: none;
	
    max-width: 760px;
    margin: 0 auto 8px auto;	
  }
  
  body.ui-internal .detail-topbar .topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  
  .card-media {
    aspect-ratio: 16 / 9;
  }  
  
  
}