/*
 * Nekretnine Xpert — detail-page UX layer
 * V49: one scoped visual system for listing detail pages.
 * Loaded only on route-oglas so the rest of the site remains untouched.
 */
body.route-oglas {
  --detail-ink: #11181f;
  --detail-muted: #66717a;
  --detail-soft: #8a949c;
  --detail-line: #e4ddd1;
  --detail-cream: #f5f1e8;
  --detail-card: #ffffff;
  --detail-gold: #b7841f;
  --detail-gold-soft: #f6edd9;
  --detail-dark: #101820;
  background: var(--detail-cream);
}

body.route-oglas main { background: var(--detail-cream); }
body.route-oglas .container { max-width: 1240px; }

body.route-oglas .detail-topbar {
  padding: 30px 0 34px;
  background: linear-gradient(180deg, #111a21 0%, #0f171e 100%);
}
body.route-oglas .detail-back {
  font-size: 12px;
  font-weight: 700;
  color: #dce2e6;
}
body.route-oglas .detail-top-meta { gap: 8px; margin-top: 18px; }
body.route-oglas .detail-top-meta span {
  font-size: 11px;
  line-height: 1;
  padding: 8px 11px;
  border-radius: 999px;
  color: #eef2f4;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.09);
}
body.route-oglas .detail-top-meta .detail-meta-badge {
  color: #171b20;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 800;
}
body.route-oglas .detail-topbar h1 {
  max-width: 980px;
  margin: 17px 0 0;
  color: #fff;
  font-size: clamp(34px, 3.35vw, 46px);
  line-height: 1.08;
  letter-spacing: -.04em;
  text-wrap: balance;
}

body.route-oglas .detail-redesign { padding: 30px 0 100px; }
body.route-oglas .detail-main-grid {
  grid-template-columns: minmax(0,1.58fr) minmax(320px,.62fr);
  gap: 24px;
}

body.route-oglas .gallery-shell {
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(18,23,29,.07);
}
body.route-oglas .gallery-main {
  height: 560px;
  background: #e8e3d9;
}
body.route-oglas .gallery-main > img { background: #e8e3d9; }
body.route-oglas .gallery-nav,
body.route-oglas .gallery-full {
  border-color: rgba(255,255,255,.22);
  background: rgba(10,16,22,.62);
  backdrop-filter: blur(6px);
}
body.route-oglas .gallery-nav { width: 46px; height: 46px; font-size: 24px; }
body.route-oglas .gallery-nav.prev { left: 16px; }
body.route-oglas .gallery-nav.next { right: 16px; }
body.route-oglas .gallery-counter {
  top: 16px; right: 16px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 700;
}
body.route-oglas .gallery-full { right: 16px; bottom: 16px; }
body.route-oglas .gallery-thumbs {
  gap: 10px;
  padding: 10px;
  background: #f2eee6;
}
body.route-oglas .gallery-thumb {
  width: 86px; height: 62px; flex-basis: 86px;
  border-radius: 10px;
}

body.route-oglas .detail-primary-info {
  margin-top: 22px;
  padding: 0 0 18px;
  align-items: flex-end;
  gap: 18px;
}
body.route-oglas .detail-label {
  margin-bottom: 7px;
  color: #8c6d35;
  font-size: 10px;
  letter-spacing: .16em;
}
body.route-oglas .detail-price-line {
  gap: 12px;
  align-items: center;
}
body.route-oglas .detail-price-line strong {
  font-family: Manrope, sans-serif;
  font-size: clamp(34px, 3.2vw, 46px);
  color: var(--detail-ink);
  letter-spacing: -.045em;
}
body.route-oglas .detail-price-line > span:not(.detail-price-drop) {
  color: #9a7320;
  font-size: 13px;
  font-weight: 800;
}
body.route-oglas .detail-price-drop {
  order: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f7ead2;
  color: #9c6e11;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
body.route-oglas .detail-price-line strong { order: 1; }
body.route-oglas .detail-price-line > span:not(.detail-price-drop) { order: 3; }

body.route-oglas .detail-credit-note {
  min-width: 0;
  max-width: 510px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fbf7ef;
  border: 1px solid #eadfc5;
}
body.route-oglas .detail-credit-note span {
  font-size: 10px;
  letter-spacing: .08em;
}
body.route-oglas .detail-credit-note strong {
  font-size: 19px;
}
body.route-oglas .detail-credit-note small {
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.45;
}
body.route-oglas .detail-actions { gap: 8px; }
body.route-oglas .save-large,
body.route-oglas .share-btn,
body.route-oglas .compare-large {
  min-height: 46px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 11px;
}

body.route-oglas .credit-calculator {
  margin-top: 22px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid #e4d7b9;
  background: linear-gradient(135deg,#fffdf9 0%,#f7f1e4 100%);
  box-shadow: 0 12px 34px rgba(18,23,29,.045);
}
body.route-oglas .credit-calc-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
body.route-oglas .credit-calculator h2 {
  margin: 8px 0 8px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -.035em;
}
body.route-oglas .credit-calculator-intro {
  max-width: 680px;
  margin: 0;
  color: #61707b;
  font-size: 13px;
  line-height: 1.6;
}
body.route-oglas .credit-calc-context {
  flex: 0 0 auto;
  padding: 12px 14px;
  border: 1px solid #e7d9b8;
  border-radius: 12px;
  background: rgba(255,255,255,.62);
  text-align: right;
}
body.route-oglas .credit-calc-context span {
  display: block;
  margin-bottom: 4px;
  color: #8b785a;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
body.route-oglas .credit-calc-context b {
  color: #8c6a22;
  font-size: 11px;
}
body.route-oglas .credit-calc-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-top: 22px;
}
body.route-oglas .credit-calc-field {
  display: block;
  min-width: 0;
}
body.route-oglas .credit-calc-field > span {
  display: block;
  color: #2c353c;
  font-size: 12px;
  font-weight: 800;
}
body.route-oglas .credit-calc-field > small {
  display: block;
  margin: 4px 0 8px;
  color: #8a9297;
  font-size: 10px;
  line-height: 1.35;
}
body.route-oglas .credit-input-wrap {
  position: relative;
}
body.route-oglas .credit-input-wrap input {
  width: 100%;
  height: 50px;
  padding: 0 42px 0 14px;
  border: 1px solid #ddd6c9;
  border-radius: 12px;
  background: #fff;
  color: #172027;
  font: 700 15px/1 "DM Sans",sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: border-color .16s ease, box-shadow .16s ease;
}
body.route-oglas .credit-input-wrap input:focus {
  border-color: #c89b45;
  box-shadow: 0 0 0 3px rgba(200,155,69,.14);
}
body.route-oglas .credit-input-wrap em {
  position: absolute;
  top: 50%; right: 13px;
  transform: translateY(-50%);
  color: #8d7546;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
body.route-oglas .credit-calc-results {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  margin-top: 18px;
}
body.route-oglas .credit-calc-results > div {
  padding: 18px;
  border: 1px solid #162029;
  border-radius: 15px;
  background: #111920;
}
body.route-oglas .credit-calc-results > div.is-primary {
  background: linear-gradient(145deg,#16212a,#10171e);
  border-color: rgba(207,164,70,.45);
  box-shadow: inset 0 0 0 1px rgba(218,178,84,.07);
}
body.route-oglas .credit-calc-results span {
  display: block;
  color: #aebbc4;
  font-size: 10px;
  font-weight: 700;
}
body.route-oglas .credit-calc-results b {
  display: block;
  margin-top: 8px;
  color: #fff;
  font: 800 24px/1 "Manrope",sans-serif;
  letter-spacing: -.025em;
}
body.route-oglas .credit-calc-results .is-primary b { color: #e5b84f; font-size: 28px; }
body.route-oglas .credit-calc-results small {
  display: block;
  margin-top: 7px;
  color: #7f8b93;
  font-size: 9px;
}
body.route-oglas .credit-calc-note {
  display: block;
  margin-top: 12px;
  color: #7b848b;
  font-size: 10px;
  line-height: 1.45;
}

body.route-oglas .detail-keyfacts { gap: 10px; margin-top: 20px; }
body.route-oglas .detail-keyfacts > div {
  min-height: 96px;
  padding: 14px;
  border-radius: 15px;
}
body.route-oglas .detail-keyfacts span,
body.route-oglas .detail-secondary-facts span {
  margin-top: 10px;
  color: #7a858d;
  font-size: 10px;
}
body.route-oglas .detail-keyfacts b,
body.route-oglas .detail-secondary-facts b {
  margin-top: 4px;
  color: #1b242b;
  font-size: 12px;
  line-height: 1.35;
}
body.route-oglas .detail-keyfacts i { width: 34px; height: 34px; border-radius: 9px; }
body.route-oglas .detail-secondary-facts { margin-top: 12px; }
body.route-oglas .detail-secondary-facts > div { padding: 15px; }

body.route-oglas .detail-local-note {
  margin-top: 12px;
  padding: 14px 16px;
}
body.route-oglas .detail-local-note strong { font-size: 12px; }
body.route-oglas .detail-local-note span:not(.detail-local-icon) { font-size: 9px; }
body.route-oglas .detail-local-note a { font-size: 10px; }

body.route-oglas .detail-block:not(.credit-calculator) {
  margin-top: 18px;
  padding: 28px;
  border-radius: 18px;
}
body.route-oglas .detail-block h2 {
  margin: 8px 0 12px;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -.03em;
}
body.route-oglas .detail-section-kicker {
  color: #8e7446;
  font-size: 10px;
  letter-spacing: .17em;
}
body.route-oglas .feature-grid { gap: 9px; margin-top: 15px; }
body.route-oglas .feature-grid span {
  padding: 11px 12px;
  font-size: 11px;
  line-height: 1.35;
}
body.route-oglas .detail-desc {
  color: #47545e;
  font-size: 14px;
  line-height: 1.75;
}
body.route-oglas .read-more { font-size: 11px; }
body.route-oglas .tour-box { padding: 2px 0; }
body.route-oglas .tour-box h3 { font-size: 24px; }
body.route-oglas .tour-box p { font-size: 12px; line-height: 1.55; }

body.route-oglas .agent-card-premium {
  top: 104px;
  padding: 22px;
  border-radius: 18px;
}
body.route-oglas .agent-card-premium h3 { font-size: 27px; line-height: 1.05; }
body.route-oglas .agent-card-premium p { font-size: 12px; line-height: 1.55; }
body.route-oglas .agent-card-premium .btn { min-height: 46px; font-size: 11px; }
body.route-oglas .agent-mini-grid span { font-size: 9px; }
body.route-oglas .agent-mini-grid b { font-size: 10px; }
body.route-oglas .agent-price-note b { font-size: 20px; }
body.route-oglas .agent-price-note span { font-size: 9px; }

body.route-oglas .detail-related .section-top h2 { margin-bottom: 0; }
body.route-oglas .detail-related .section-top > a { font-size: 11px; }

@media (max-width: 1100px) {
  body.route-oglas .detail-main-grid { grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); }
  body.route-oglas .credit-calc-head { flex-direction: column; }
  body.route-oglas .credit-calc-context { text-align: left; }
  body.route-oglas .credit-calc-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  body.route-oglas .detail-topbar h1 { font-size: clamp(32px,6vw,42px); }
  body.route-oglas .detail-main-grid { grid-template-columns: 1fr; }
  body.route-oglas .gallery-main { height: 500px; }
  body.route-oglas .credit-calc-grid,
  body.route-oglas .credit-calc-results { grid-template-columns: 1fr 1fr; }
  body.route-oglas .credit-calc-results > div:last-child { grid-column: 1/-1; }
  body.route-oglas .detail-primary-info { align-items: flex-start; flex-direction: column; }
  body.route-oglas .detail-credit-note { max-width: none; width: 100%; box-sizing: border-box; }
}

@media (max-width: 640px) {
  body.route-oglas .detail-topbar { padding: 24px 0 28px; }
  body.route-oglas .detail-top-meta { gap: 6px; flex-wrap: wrap; }
  body.route-oglas .detail-top-meta span { font-size: 10px; padding: 7px 9px; }
  body.route-oglas .detail-topbar h1 { font-size: clamp(29px,8vw,38px) !important; line-height: 1.04; }
  body.route-oglas .detail-redesign { padding-top: 18px; }
  body.route-oglas .gallery-main { height: min(72vw,390px); min-height: 245px; }
  body.route-oglas .gallery-thumb { width: 70px; height: 52px; flex-basis: 70px; }
  body.route-oglas .detail-price-line strong { font-size: 34px; }
  body.route-oglas .detail-price-drop { font-size: 10px; min-height: 28px; }
  body.route-oglas .detail-actions { width: 100%; }
  body.route-oglas .credit-calculator { padding: 20px; border-radius: 17px; }
  body.route-oglas .credit-calculator h2 { font-size: 25px; }
  body.route-oglas .credit-calculator-intro { font-size: 12px; }
  body.route-oglas .credit-calc-grid { grid-template-columns: 1fr; }
  body.route-oglas .credit-calc-results { grid-template-columns: 1fr; }
  body.route-oglas .credit-calc-results > div:last-child { grid-column: auto; }
  body.route-oglas .detail-block:not(.credit-calculator) { padding: 20px; border-radius: 16px; }
  body.route-oglas .detail-block h2 { font-size: 24px; }
  body.route-oglas .detail-desc { font-size: 13.5px; line-height: 1.72; }
  body.route-oglas .feature-grid { grid-template-columns: 1fr 1fr; }
  body.route-oglas .feature-grid span { font-size: 10.5px; }
  body.route-oglas .agent-card-premium { padding: 19px; }
}

@media (max-width: 430px) {
  body.route-oglas .feature-grid { grid-template-columns: 1fr; }
  body.route-oglas .detail-keyfacts,
  body.route-oglas .detail-secondary-facts { grid-template-columns: 1fr 1fr; }
  body.route-oglas .credit-calc-results b { font-size: 22px; }
}
