/* ============================================================================
 * shop5 — basic.css
 * Core CSS pro shop5 widgety (paralela k js/basic.js).
 *
 * Loaduje se z _page.php pres <link rel="stylesheet"> kdyz je aktivovany
 * jakykoliv core widget (zatim fulltext2).
 * ========================================================================== */


/* ============================================================================
 * Fulltext 2 — modalni vyhledavac (js/fulltext2.js)
 * Pouziva se kdyz je v admin nastaveni "fulltext2_zapnuto" = ano.
 * ========================================================================== */

#ft2-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 99998;
    display: none;
}
#ft2-backdrop.open { display: block; }

#ft2-modal {
    position: fixed;
    left: 0; right: 0; top: 0;
    max-width: 1400px;
    margin: 10px auto;
    max-height: calc(100vh - 20px);
    z-index: 99999;
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, .2);
    overflow: hidden;
}
#ft2-modal.open { display: flex; }

/* Header s nadpisem + Zavrit tlacitkem */
#ft2-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid #e5e5e5;
}
#ft2-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #222;
}
#ft2-close {
    cursor: pointer;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 13px;
    color: #444;
}
#ft2-close:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* Input row */
#ft2-input-wrap { padding: 14px 22px; }
#ft2-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 15px;
    padding: 11px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    outline: none;
    color: #222;
    background: #fff;
}
#ft2-input::placeholder { color: #999; }
#ft2-input:focus {
    border-color: #3c8dbc;
    box-shadow: 0 0 0 2px rgba(60, 141, 188, .15);
}

#ft2-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 22px 22px;
}
#ft2-footer {
    border-top: 1px solid #e5e5e5;
    padding: 10px 22px;
    background: #fafafa;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;          /* fixni vyska — nescrolluje s #ft2-body */
}
#ft2-footer #ft2-meta { flex: 1 1 auto; text-align: left; }
/* Tlacitko "Zobrazit vsechny vysledky" — vzdy viditelne ve spodni liste */
.ft2-all-btn {
    flex: 0 0 auto;
    display: inline-block;
    padding: 9px 18px;
    background: #3c8dbc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
}
.ft2-all-btn:hover { background: #357ca5; }

.ft2-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top-color: #3c8dbc;
    border-radius: 50%;
    animation: ft2spin .7s linear infinite;
}
@keyframes ft2spin {
    to { transform: rotate(360deg); }
}

/* Sekce */
.ft2-section { margin-bottom: 18px; }
.ft2-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #246;
    margin: 0 0 10px 0;
    font-weight: 700;
}
.ft2-section-title .ft2-section-icon {
    color: #3c8dbc;
    font-size: 14px;
}

/* Staticke odkazy — chipy. Kategorie urcuje barvu (CSS vars). */
.ft2-static-cat { margin-bottom: 14px; }
.ft2-static-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ft2-static-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 13px;
    text-decoration: none;
    background: var(--ft2-chip-bg, #eef5fa);
    color: var(--ft2-chip-fg, #246);
    border: 1px solid var(--ft2-chip-border, #b8d4e3);
    transition: background .15s, transform .05s;
}
.ft2-static-chip:hover {
    background: var(--ft2-chip-hover, #d6e8f3);
    text-decoration: none;
}
.ft2-static-chip:active { transform: translateY(1px); }

/* Kategorie chipy ve vyhledanych vysledcich (modra) */
.ft2-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ft2-cat-chip {
    display: inline-block;
    padding: 6px 14px;
    background: #eef5fa;
    color: #246;
    border-radius: 18px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #b8d4e3;
}
.ft2-cat-chip:hover {
    background: #3c8dbc;
    color: #fff;
    border-color: #3c8dbc;
}

/* Clanky / dalsi info */
.ft2-articles {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ft2-articles li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}
.ft2-articles a {
    color: #246;
    text-decoration: none;
}
.ft2-articles a:hover { text-decoration: underline; }
.ft2-articles .ft2-typ-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    margin-right: 8px;
    background: #888;
    color: #fff;
    border-radius: 3px;
    vertical-align: middle;
}

/* Zbozi karty */
.ft2-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.ft2-product-card {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-decoration: none;
    color: #222;
    transition: box-shadow .15s;
}
.ft2-product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    border-color: #3c8dbc;
}
.ft2-product-card .ft2-prod-name {
    font-size: 14px;
    line-height: 1.3;
}
/* Produktova karta s foto/cenou/dostupnosti (bod 1) */
.ft2-product-card.ft2-has-foto {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.ft2-prod-foto {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ft2-prod-foto img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.ft2-prod-info { flex: 1 1 auto; min-width: 0; }
.ft2-prod-meta {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}
.ft2-prod-cena { font-weight: bold; color: #c0392b; font-size: 14px; }
.ft2-prod-dostupnost { font-size: 12px; color: #2e7d32; }

/* "Zobrazit dalsi" rozbalovak per sekce (bod 2) */
.ft2-more-btn-wrap { margin-top: 10px; text-align: center; }
.ft2-more-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #3c8dbc;
    font-size: 13px;
    cursor: pointer;
}
.ft2-more-btn:hover { background: #f0f7fc; border-color: #3c8dbc; }

.ft2-empty {
    color: #888;
    padding: 20px;
    text-align: center;
    font-style: italic;
}

/* ============================================================================
 * Fulltext 2 — vysledky z kategorii/clanku na strance vyhledavani
 * (Sablony\Sekce\Kategorie::renderFulltextVysledkyExtra — pod nadpisem,
 *  nad vypisem produktu). Chipy a seznam clanku reuse .ft2-cat-chips/.ft2-articles.
 * ========================================================================== */
.ft2-vysledky-extra {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 10px 0 24px;
}
.ft2-vysledky-nadpis {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #246;
    margin: 0 0 10px 0;
    font-weight: 700;
}
/* skryte polozky nad limit — odkryjou se po kliknuti na "Zobrazit více" */
.ft2-vysledky-sekce:not(.ft2-rozbaleno) .ft2-extra-item { display: none; }
.ft2-extra-more-wrap { margin-top: 10px; }
.ft2-extra-more-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #3c8dbc;
    font-size: 13px;
    cursor: pointer;
}
.ft2-extra-more-btn:hover { background: #f0f7fc; border-color: #3c8dbc; }

@media (max-width: 700px) {
    #ft2-modal {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
    #ft2-input { font-size: 16px; }
    #ft2-title { font-size: 16px; }
}
