/* Modelová stránka katalogu (App\ModelPage) - drobečky, logo, úvod, obsah pod nabídkou.
   Samostatný soubor, aby se nemusel měnit style.css. Načítá se na stránce výpisu aut.
   Na konci je i obecná oprava řádku s řazením na úzkém displeji (platí pro celý výpis). */

#model-bottom-slot .model-bottom {
    width: 100%;
    max-width: none;
}
/* Drobečková navigace nad nadpisem; nadpis se pak nevytahuje nahoru záporným okrajem. */
#model-crumbs-slot:not(:empty) { margin-top: -1.5rem; }
#model-crumbs-slot:not(:empty) + .results-title-row { margin-top: 0; }
.model-crumbs .breadcrumb { font-size: 0.9rem; background: transparent; padding: 0; }
.model-crumbs .breadcrumb a { color: #212529; text-decoration: none; font-weight: 600; }
.model-crumbs .breadcrumb a:hover { text-decoration: underline; }

/* Malé logo značky vedle H1 (logo se nezalamuje nad nadpis, ten se zalamuje vedle něj) */
.results-title-row { display: flex; align-items: center; gap: 0.75rem; }
.results-title-row h1 { flex: 1 1 0; min-width: 0; }
#model-logo-slot:empty { display: none; }
.model-logo { height: 32px; width: auto; max-width: 96px; object-fit: contain; display: block; }

/* Krátký úvod nad nabídkou (bez počtů a cen), aby se na mobilu rychle došlo k vozům */
#model-intro-slot:empty { display: none; }
.model-intro { margin: 0 0 1rem; }
.model-intro-text { margin: 0 0 0.5rem; max-width: 60rem; }
@media (max-width: 575.98px) {
    .model-intro-text { font-size: 0.95rem; margin-bottom: 0.35rem; }
}

/* Obsah pod nabídkou (společné pro všechny modelové stránky; všechna pravidla jsou omezena na .model-bottom) */
#model-bottom-slot:empty { display: none; }
.model-bottom { margin-top: 2.5rem; max-width: 60rem; }
.model-bottom .model-block { margin-top: 2.25rem; }
.model-bottom .model-block:first-child { margin-top: 0; }
.model-bottom .model-block-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.5rem; }
.model-bottom .model-block-lead { color: #495057; margin: 0 0 1rem; }

/* Průvodce výběrem: decentní bílé karty, 2 vedle sebe na desktopu, 1 na mobilu */
.model-bottom .model-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.model-bottom .model-card { background: #fff; border: 1px solid #dee2e6; border-radius: 0.5rem; padding: 1rem 1.15rem; min-width: 0; }
.model-bottom .model-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 0.35rem; }
.model-bottom .model-card p { margin: 0; color: #495057; overflow-wrap: anywhere; }
@media (min-width: 768px) {
    .model-bottom .model-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}

/* Informace o modelu: samostatný, jemně odlišený blok */
.model-bottom .model-block--facts { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 0.5rem; padding: 1.5rem 1.25rem; }
.model-bottom .model-fact { margin-top: 1.25rem; min-width: 0; }
.model-bottom .model-block-lead + .model-fact, .model-bottom .model-block-title + .model-fact { margin-top: 0.5rem; }
.model-bottom .model-fact h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 0.4rem; }
.model-bottom .model-fact p { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.model-bottom .model-fact ul { margin: 0 0 0.6rem; padding-left: 1.25rem; }
.model-bottom .model-fact li { margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.model-bottom .model-table-wrap { margin: 0.5rem 0 0.6rem; max-width: 100%; overflow-x: auto; }
.model-bottom .model-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.95rem; }
.model-bottom .model-table caption { caption-side: top; text-align: left; font-weight: 600; padding: 0 0 0.5rem; color: #212529; }
.model-bottom .model-table th, .model-bottom .model-table td { padding: 0.55rem 0.75rem; border: 1px solid #dee2e6; text-align: left; vertical-align: top; }
.model-bottom .model-table thead th { background: #f1f3f5; font-weight: 600; white-space: nowrap; }
.model-bottom .model-table tbody th { font-weight: 600; }
.model-bottom .model-table-note { font-size: 0.875rem; color: #6c757d; margin: 0 0 0.6rem; }
@media (max-width: 767.98px) {
    .model-bottom .model-block--facts { padding: 1.25rem 1rem; }
    .model-bottom .model-table-wrap { overflow-x: visible; }
    .model-bottom .model-table, .model-bottom .model-table tbody, .model-bottom .model-table tr, .model-bottom .model-table th, .model-bottom .model-table td { display: block; width: 100%; }
    .model-bottom .model-table caption { display: block; width: 100%; }
    .model-bottom .model-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .model-bottom .model-table tr { border: 1px solid #dee2e6; border-radius: 0.4rem; margin-bottom: 0.6rem; overflow: hidden; }
    .model-bottom .model-table th, .model-bottom .model-table td { border: 0; border-top: 1px solid #e9ecef; padding: 0.4rem 0.75rem; overflow-wrap: anywhere; }
    .model-bottom .model-table tbody th { border-top: 0; background: #f1f3f5; }
    .model-bottom .model-table td::before { content: attr(data-label); display: block; font-size: 0.8rem; color: #6c757d; font-weight: 400; }
}

/* Časté otázky: details/summary s decentním plus/minus a viditelným fokusem */
.model-bottom .model-faq-list { border-top: 1px solid #dee2e6; }
.model-bottom .model-faq-item { border-bottom: 1px solid #dee2e6; }
.model-bottom .model-faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0.25rem; font-weight: 600; }
.model-bottom .model-faq-item summary::-webkit-details-marker { display: none; }
.model-bottom .model-faq-item summary::after { content: "+"; flex: 0 0 auto; width: 1.5rem; height: 1.5rem; line-height: 1.4rem; text-align: center; font-size: 1.25rem; font-weight: 400; color: #6c757d; border: 1px solid #ced4da; border-radius: 50%; }
.model-bottom .model-faq-item[open] summary::after { content: "\2212"; }
.model-bottom .model-faq-item summary:hover { color: #000; }
.model-bottom .model-faq-item summary:focus-visible { outline: 3px solid #0d6efd; outline-offset: 2px; border-radius: 0.25rem; }
.model-bottom .model-faq-body { padding: 0 0.25rem 1rem; }
.model-bottom .model-faq-body p { margin: 0; color: #495057; }

/* Související nabídka a hlídání: oddělený závěrečný blok */
.model-bottom .model-block--closing { background: #fff; border: 1px solid #dee2e6; border-radius: 0.5rem; padding: 1.5rem 1.25rem; }
.model-bottom .model-closing-lead { margin: 0 0 0.35rem; color: #495057; }
.model-bottom .model-closing-links { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.model-bottom .model-closing-links a { font-weight: 600; }
.model-bottom .model-closing-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.model-bottom .model-closing-links + .model-closing-cta { padding-top: 1rem; border-top: 1px solid #e9ecef; }
.model-bottom .model-closing-hint { color: #6c757d; font-size: 0.9rem; }
@media (max-width: 575.98px) {
    .model-bottom .model-block-title { font-size: 1.3rem; }
    .model-bottom .model-block--closing { padding: 1.25rem 1rem; }
    .model-bottom .model-closing-cta .btn { width: 100%; }
}

/* Řádek s počtem výsledků, přepínačem zobrazení, velikostí stránky a řazením: na mobilu se zalamuje místo přetékání */
@media (max-width: 767.98px) {
    .results-controls-row { flex-wrap: wrap; gap: 0.5rem; }
    .results-controls-row .view-controls { flex-wrap: wrap; gap: 0.5rem; width: 100%; }
    .results-controls-row .view-controls > * { margin-right: 0 !important; }
    .results-controls-row .view-controls .form-select-sm { min-width: 0; flex: 1 1 8rem; }
}
