/* === Live Search === */
/* Uložit: wp-content/themes/generatepress_child/ft-search.css */

.ft-search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}
.ft-search-trigger:hover { opacity: .7; }
.ft-search-trigger svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

/* V GP main-navigation injekce */
.main-navigation .ft-search-trigger {
    margin: 0 8px;
    color: #fff;
}

.ft-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    gap: 20px;
}
.ft-search-overlay.is-open { display: flex; }

.ft-search-preview {
    width: 480px;
    max-width: 40vw;
    align-self: flex-start;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity .15s, transform .15s;
    pointer-events: none;
    display: none;
}
.ft-search-preview.is-visible {
    opacity: 1;
    transform: translateX(0);
}
.ft-search-preview img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    display: block;
}
@media (min-width: 900px) {
    .ft-search-preview { display: block; }
}

.ft-search-box {
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    animation: ftSearchSlideIn .2s ease;
}
@keyframes ftSearchSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.ft-search-input-wrap {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    gap: 12px;
}
.ft-search-input-wrap svg.ft-search-icon {
    width: 22px; height: 22px; stroke: #888; fill: none; stroke-width: 2;
    flex-shrink: 0;
}
.ft-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 17px;
    font-family: inherit;
    color: #1a1a2e;
    background: transparent;
}
.ft-search-close {
    background: #f0f0f0;
    border: none;
    color: #555;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.ft-search-close:hover { background: #e0e0e0; }

.ft-search-results {
    max-height: 60vh;
    overflow-y: auto;
}
.ft-search-results:empty + .ft-search-empty,
.ft-search-status {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.ft-search-result {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    cursor: pointer;
    text-decoration: none;
    color: #1a1a2e;
    border-bottom: 1px solid #f0f0f0;
    transition: background .12s;
}
.ft-search-result:hover,
.ft-search-result.is-active {
    background: #f6f7f9;
}
.ft-search-result__thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #f0f0f0;
    flex-shrink: 0;
}
.ft-search-result__info { flex: 1; min-width: 0; }
.ft-search-result__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ft-search-result__price {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}
.ft-search-result__arrow {
    color: #ccc;
    font-size: 18px;
    flex-shrink: 0;
}
.ft-search-result.is-active .ft-search-result__arrow { color: #1a1a2e; }

.ft-search-showall:empty { display: none; }
.ft-search-showall .ft-search-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    text-decoration: none;
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(180deg, #f6f7f9 0%, #eef0f3 100%);
    border-bottom: 1px solid #e0e3e7;
    transition: background .12s;
}
.ft-search-showall .ft-search-more:hover {
    background: linear-gradient(180deg, #ebedf0 0%, #e2e5e9 100%);
}
.ft-search-showall .ft-search-more span { font-size: 16px; }

.ft-search-footer {
    padding: 10px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #888;
    text-align: right;
}

@media (max-width: 640px) {
    .ft-search-overlay { padding: 40px 12px 12px; }
    .ft-search-box     { border-radius: 8px; }
    .ft-search-input-wrap { padding: 12px 14px; }
    .ft-search-input   { font-size: 16px; }
    .ft-search-result  { padding: 10px 14px; gap: 10px; }
    .ft-search-result__thumb { width: 64px; height: 64px; }
    .ft-search-footer  { font-size: 10px; padding: 8px 14px; }
}

/* === Search results stránka (/?s=query) === */
.ft-search-page__header {
    max-width: 900px;
    margin: 40px auto 30px;
    padding: 0 20px;
    text-align: center;
}
.ft-search-page__eyebrow {
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: 11px;
    color: #888;
    margin: 0 0 10px;
}
.ft-search-page__title {
    font-size: 36px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px;
    line-height: 1.2;
}
.ft-search-page__count {
    color: #666;
    font-size: 15px;
    margin: 0;
}
.ft-search-page__count strong { color: #1a1a2e; }

.ft-search-page__grid {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.ft-search-page__grid ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    float: none;
    width: 100%;
}
.ft-search-page__grid ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    padding: 0 !important;
}
@media (max-width: 900px) {
    .ft-search-page__grid ul.products { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 480px) {
    .ft-search-page__grid ul.products { grid-template-columns: 1fr; }
}

.ft-search-page__empty {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px 20px;
    text-align: center;
    background: #f6f7f9;
    border-radius: 12px;
}
.ft-search-page__empty p {
    margin: 0 0 10px;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}
.ft-search-page__empty p:last-child { margin-bottom: 0; }
.ft-search-page__empty a {
    color: #1a1a2e;
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .ft-search-page__title { font-size: 24px; }
    .ft-search-page__header { margin: 24px auto 20px; }
}
