/* Jednoduchy funkcni vzhled webove aplikace pro nemovitosti.
   Zaklad (typografie, formulare) zajistuje Pico.css, tady jsou doplnky. */

.kontejner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---- navigace ---- */
.hlavni-nav {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}
.hlavni-nav .uzivatel {
  font-weight: bold;
  opacity: .8;
}
.hlavni-nav .odhlasit {
  padding: .3rem .8rem;
  font-size: .85rem;
}

/* ---- flash zpravy ---- */
.flash {
  padding: .7rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.flash-ok    { background: #e7f6ec; color: #1c6b35; }
.flash-chyba { background: #fdecec; color: #97231f; }

/* ---- prihlaseni / chybova stranka ---- */
.prihlaseni {
  max-width: 420px;
  margin: 3rem auto;
}

/* ---- filtr ---- */
.filtr {
  background: var(--pico-card-background-color, #f6f8fa);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.filtr-mrizka {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .6rem 1rem;
}
.filtr-mrizka label,
.filtr label { margin-bottom: 0; }
.filtr-spodek {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  margin-top: .9rem;
}
.filtr-spodek button,
.filtr-spodek [role="button"] {
  width: auto;
  margin: 0;
}
.prepinac {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
}
.znacka {
  background: #1f6feb;
  color: #fff;
  padding: .15rem .6rem;
  border-radius: 12px;
  font-size: .8rem;
}
.pocet { color: var(--pico-muted-color); }

/* ---- mrizka karet ---- */
.mrizka {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}
.karta {
  margin: 0;
  padding: 0;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.karta-foto {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #eceff1;
}
.karta-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bez-foto {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #90a4ae;
  font-size: .9rem;
}
.karta-telo { padding: .7rem .8rem; }
.karta-nazev {
  font-weight: 600;
  display: block;
  line-height: 1.3;
}
.karta-cena {
  font-size: 1.1rem;
  font-weight: 700;
  margin: .3rem 0 .2rem;
}
.bez-ceny { color: var(--pico-muted-color); font-weight: 400; font-size: .95rem; }
.karta-info {
  color: var(--pico-muted-color);
  font-size: .85rem;
  margin: 0;
}
.karta-neaktivni { opacity: .65; }

/* stitky pres fotku */
.stitek {
  position: absolute;
  top: .5rem;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
}
.stitek-neaktivni { left: .5rem; background: #b71c1c; color: #fff; }
.stitek-oblibena  { right: .5rem; background: #ffb300; color: #3e2723;
                    font-size: 1rem; padding: .1rem .4rem; }

/* ---- strankovani ---- */
.strankovani {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.neaktivni-odkaz { color: var(--pico-muted-color); opacity: .5; }
.prazdno { padding: 2rem 0; color: var(--pico-muted-color); }

/* ---- detail ---- */
.detail-zahlavi {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.detail-zahlavi form { margin: 0; }
.detail-zahlavi button { width: auto; margin: 0; white-space: nowrap; }
.oblibena-aktiv { background: #ffb300; border-color: #ffb300; color: #3e2723; }
.detail-cena {
  font-size: 1.7rem;
  font-weight: 800;
  margin: .3rem 0;
}
.cena-pozn { color: var(--pico-muted-color); margin-top: 0; }

/* galerie */
.galerie { margin: 1rem 0; }
.galerie-hlavni {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  background: #11151c;
  border-radius: 8px;
}
.nahledy {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  margin-top: .5rem;
  padding-bottom: .3rem;
}
.nahledy img {
  width: 90px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  flex: 0 0 auto;
  opacity: .8;
}
.nahledy img:hover { opacity: 1; }
.galerie-tip { color: var(--pico-muted-color); font-size: .85rem; margin: .4rem 0 0; }

/* lightbox - fotka pres celou obrazovku */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .93);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-foto {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, .6);
}
.lb-ovladani {
  position: absolute;
  width: auto;
  margin: 0;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}
.lb-ovladani:hover { background: rgba(255, 255, 255, .32); }
.lb-zavrit {
  top: 1rem;
  right: 1rem;
  font-size: 1.7rem;
  padding: .15rem .7rem;
}
.lb-predchozi,
.lb-dalsi {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  padding: .3rem 1rem;
}
.lb-predchozi { left: 1rem; }
.lb-dalsi { right: 1rem; }
.lb-pocitadlo {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, .55);
  padding: .25rem .9rem;
  border-radius: 12px;
  font-size: .9rem;
}

/* parametry */
.parametry th {
  text-align: left;
  width: 38%;
  color: var(--pico-muted-color);
  font-weight: 600;
}

/* popis */
.popis { white-space: pre-line; line-height: 1.6; }
.popisek { color: var(--pico-muted-color); font-size: .9rem; }

/* vystraha u neaktivnich */
.vystraha {
  background: #fff4e5;
  border-left: 4px solid #ef6c00;
  padding: .8rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* mapa */
.mapa-box  { height: 340px; border-radius: 8px; }
.mapa-velka { height: 70vh; min-height: 420px; border-radius: 8px; }

/* adresa */
.adresa-form { margin: 1rem 0; }
.adresa-form summary { cursor: pointer; font-weight: 600; }
.adresa-form button { width: auto; }

/* komentare */
.komentar {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 6px;
  padding: .6rem .9rem;
  margin-bottom: .6rem;
}
.komentar-hlava { margin: 0 0 .3rem; }
.komentar-hlava small { color: var(--pico-muted-color); margin-left: .5rem; }
.komentar-text { margin: 0; white-space: pre-line; }
.komentar-form { margin-top: 1rem; }
.komentar-form button { width: auto; }

/* responzivni drobnosti */
@media (max-width: 600px) {
  .detail-cena { font-size: 1.35rem; }
  .hlavni-nav { font-size: .9rem; }
}
