/* Půjčovna – doplňky veřejného katalogu (kategorie, města, detail, pronajímatelé, hledání, našeptávač).
   Základní komponenty jsou ve web.css (viz cms/DESIGN.md); tady jen rozvržení stránek katalogu. Tokeny z :root web.css. */

/* ------------------------------------------------------------------ obecné */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.page-body > * + * { margin-top: 32px; }
.page-body > .crumbs + * { margin-top: 14px; }
.sec-in + .sec-in { margin-top: 40px; }
.h-small { font-size: 16px; margin: 0; }
.verified { color: var(--zelena-tmava); font-weight: 600; white-space: nowrap; }
.av-img { object-fit: cover; padding: 0; background: #fff; border: 1px solid var(--ramecek); }
.tile-empty { opacity: .6; }
.subcats-after { margin-top: 14px; }
.chip .muted { font-weight: 500; }
.chip-busy { background: #fbe9e9; color: #8a3a3e; }
.btn.is-off { opacity: .35; pointer-events: none; }

/* ------------------------------------------------------------------ výpis */
.listing-full { grid-template-columns: minmax(0, 1fr); }
.listing-main { min-width: 0; }
.sort-form { margin: 0; }
.listing-bar .chips { flex: 1 1 300px; }
.listing-bar .chip-x { font-weight: 700; }
.filter-more { border-top: 1px solid var(--ramecek-2); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.filter-more summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--zelena-tmava); }
.filter-more[open] summary { margin-bottom: 8px; }
.filter-more .field { gap: 4px; margin-top: 6px; }
.cat-subcats { margin-top: 0; }
.cat-text { margin-top: 40px; }
.cat-faq { margin-top: 40px; max-width: 860px; }
.cat-links h2 { font-size: 20px; margin-bottom: 12px; }
.cat-links .chip-lg { height: auto; min-height: 36px; padding: 6px 14px; }

/* strom kategorií */
.cat-tree { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cat-tree-item { border: 1px solid var(--ramecek); border-radius: var(--radius); padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 12px; }
.cat-tree-item.is-empty { opacity: .7; }
.cat-tree-h { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; color: var(--text); align-items: center; }
.cat-tree-h .ico { grid-row: 1 / 3; }
.cat-tree-h b { font-size: 17px; line-height: 1.25; }
.cat-tree-h .muted { font-size: 13px; }
.cat-tree-h:hover b { color: var(--zelena-tmava); }
.cat-tree-item ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cat-tree-item li .muted { font-size: 12px; margin-left: 4px; }
@media (max-width: 1099px) { .cat-tree { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .cat-tree { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ detail */
.detail-page > .alert { margin-top: 16px; }
.detail-sub { margin: 0; font-size: 15px; }
.detail-sub .bi { color: var(--zelena); }
.detail-lead { font-size: 17px; font-weight: 500; margin: 0 0 10px; }
.gallery-main .gallery-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-main .gallery-ico { font-size: 120px; color: var(--zelena); opacity: .8; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; background: #fff; border-radius: var(--radius-pill); padding: 6px 12px; font-size: 13px; font-weight: 600; pointer-events: none; }
.cond-list { margin: 14px 0 0; padding-left: 20px; line-height: 1.7; font-size: 15px; }
.detail-terms { margin-top: 12px; font-size: 14px; }
.detail-more-link { margin: 12px 0 0; font-weight: 600; }
.review-text { margin: 0; }
.calc-form { display: flex; flex-direction: column; gap: 14px; }
.calc-contact { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.calc-contact legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 4px; }
.calc .field textarea { min-height: 80px; }
.calc .chk { font-size: 13px; }
.calc .chk.has-err { color: var(--cervena-tmava); }
.calc-sum .muted { font-size: 13px; }
.calc-sum .calc-err { color: var(--cervena-tmava); font-weight: 600; font-size: 13px; }
.calc-sum.loading { opacity: .6; }
.calc-actions { display: flex; gap: 10px; }
.calc-actions .btn { flex: 1; }
.calc-actions .btn.on, .calc-actions .btn.on .bi { color: var(--cervena); border-color: var(--cervena); }
.cal > button:not(:disabled) { cursor: pointer; }
.cal > button:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--zelena-svetla); }
.cal .part { background: linear-gradient(135deg, var(--pozadi) 60%, #f3d6d6 60%); }
.cal .s.b { background: var(--cervena); }
.cal-legend .lg-free { background: var(--pozadi); }
.cal-legend .lg-busy { background: #f3d6d6; }
.cal-legend .lg-sel { background: var(--zelena); }
.cal-wrap.loading { opacity: .5; }
.contact-open { padding: 4px 0; }
.locked.revealed { background: var(--tint); }

.price-term { font-variant-numeric: tabular-nums; }
.price-note { margin: 8px 0 0; }
.calc-form button[type=submit]:disabled { opacity: .55; cursor: not-allowed; }
.detail-cta { display: none; }
@media (max-width: 1023px) {
  .detail-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px var(--gutter); background: #fff; border-top: 1px solid var(--ramecek); box-shadow: 0 -4px 16px rgba(0, 40, 20, .08); }
  .tpl-portal-item .page-body { padding-bottom: 88px; }
  /* plovoucí tlačítko přístupnosti (vlevo dole, 52 px) nesmí zakrýt cenu ve spodní liště (CH-20) */
  .detail-cta { padding-left: calc(var(--gutter) + 64px); }
  .tpl-portal-item .a11y-btn { bottom: 12px; width: 48px; height: 48px; font-size: 24px; }
  .calc { scroll-margin-top: 12px; }
}
@media (max-width: 599px) {
  .params { grid-template-columns: minmax(0, 1fr); }
  .reviews { grid-template-columns: minmax(0, 1fr); }
  .gallery-main .gallery-ico { font-size: 80px; }
}

/* ------------------------------------------------------------------ pronajímatel */
.lender-hero { display: flex; gap: 20px; align-items: center; margin-top: 14px; }
.lender-hero h1 { margin: 0 0 6px; }
.lender-meta { margin: 0; font-size: 15px; }
.lender-meta .bi { color: var(--zelena); }
.lender-logo { width: 96px; height: 96px; border-radius: var(--radius); object-fit: contain; background: #fff; border: 1px solid var(--ramecek); flex: none; font-size: 34px; }
span.lender-logo { border: 0; background: var(--zelena); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.lender-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.hours { margin: 0; display: flex; flex-direction: column; font-size: 14px; }
.hours > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--ramecek); }
.hours dt { color: var(--muted); } .hours dd { margin: 0; font-weight: 600; }
.lender-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lender-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--ramecek); border-radius: var(--radius); background: #fff; color: var(--text); }
.lender-card:hover { border-color: var(--zelena-svetla); box-shadow: var(--stin); color: var(--text); }
.lender-card-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lender-card-b b { font-size: 16px; }
.lenders-filter { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 1023px) { .lender-aside { position: static; } .lender-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .lender-grid { grid-template-columns: minmax(0, 1fr); } .lender-hero { gap: 14px; } .lender-logo { width: 64px; height: 64px; font-size: 24px; } }

/* ------------------------------------------------------------------ hledání */
.search-big { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; background: var(--pozadi); border-radius: var(--radius); padding: 14px; max-width: 1100px; }
.search-big .field { flex: 1 1 160px; }
.search-big .field-grow { flex: 2 1 260px; position: relative; }
.search-big .field-date { flex: 1 1 140px; }
.search-go { display: flex; align-items: flex-end; }
.search-go .btn { height: 44px; }
.search-side { display: flex; flex-direction: column; gap: 14px; }
.search-group { display: flex; flex-direction: column; gap: 8px; }
.search-tabs b { font-weight: 800; }
@media (max-width: 599px) { .search-big .field-date { flex: 1 1 calc(50% - 6px); } .search-go, .search-go .btn { width: 100%; } }

/* ------------------------------------------------------------------ našeptávač */
.sg-host { position: relative; }
.sg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 300; background: #fff; border: 1px solid var(--ramecek-2); border-radius: var(--radius-s); box-shadow: var(--stin-velky); padding: 6px; max-height: 70vh; overflow: auto; text-align: left; min-width: 280px; }
.sg[hidden] { display: none; }
.sg-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px 4px; }
.sg a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-xs); color: var(--text); font-size: 14px; line-height: 1.3; }
.sg a:hover, .sg a.on { background: var(--tint); color: var(--zelena-tmava); }
.sg a .bi { color: var(--zelena); font-size: 16px; width: 20px; text-align: center; flex: none; }
.sg a img { width: 44px; height: 33px; object-fit: cover; border-radius: 6px; flex: none; background: var(--tint); }
.sg a span { flex: 1; min-width: 0; }
.sg a small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sg-all { font-weight: 600; border-top: 1px solid var(--ramecek); margin-top: 4px; }
.hdr-search { position: relative; }

/* ------------------------------------------------------------------ hlavička / patička */
.logo-lender img { width: 40px; height: 40px; border-radius: var(--radius-s); object-fit: contain; background: #fff; border: 1px solid var(--ramecek); }
.logo-lender .logo-name { font-size: 18px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftr-n { opacity: .6; font-size: 12px; }
.ftr .ftr-h2 { margin-top: 18px; }
.ftr ul.ftr-inline { flex-direction: row; flex-wrap: wrap; gap: 6px 12px; }

/* ------------------------------------------------------------------ 410 */
.gone { margin-top: 24px; }
.gone h1 { font-size: clamp(24px, 3vw, 32px); }

/* ------------------------------------------------------------------ mobil: lišty, podkategorie (CH-30, CH-39) */
@media (max-width: 1023px) {
  /* plovoucí tlačítko přístupnosti nad lištou detailu (cena + tlačítko), ne vedle ní */
  .detail-cta { padding-left: var(--gutter); }
  .tpl-portal-item .a11y-btn { bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 160; }
  .tpl-portal-item .page-body { padding-bottom: 96px; }
}
@media (max-width: 899px) {
  /* podkategorie: vodorovně posuvné chipy, nejvýš 2 řádky */
  .cat-subcats { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-template-columns: none; grid-auto-columns: max-content; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 6px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .cat-subcats .subcat { scroll-snap-align: start; min-height: 44px; padding: 6px 14px; border-radius: var(--radius-pill); white-space: nowrap; }
  .cat-subcats .subcat .muted { margin-left: 4px; }
  .filters { scroll-margin-top: 76px; }
}
@media (pointer: coarse), (max-width: 900px) {
  .listing-sort select, .sort-form select { min-height: 44px; }
}
