body.tk-search-open {
    overflow: hidden;
}

.tk-search[hidden] {
    display: none !important;
}

.tk-search {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: start center;
    padding: 4.5rem 1rem 2rem;
}

.tk-search__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(17, 17, 17, 0.45);
    cursor: pointer;
}

.tk-search__panel {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(78vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0.85rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.tk-search__bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem 0.85rem 0.65rem;
    border-bottom: 1px solid #ececec;
}

.tk-search__form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.35rem 0.55rem 0.35rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.55rem;
    background: #fafafa;
}

.tk-search__form i {
    color: #777;
    flex-shrink: 0;
}

.tk-search__form input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.tk-search__submit {
    border: 0;
    border-radius: 0.4rem;
    background: #1f1f1f;
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
}

.tk-search__close {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 0.45rem;
    background: #fff;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.tk-search__meta {
    padding: 0.65rem 1rem 0.35rem;
    font-size: 0.84rem;
    color: #888;
}

.tk-search__results {
    overflow-y: auto;
    padding: 0.35rem 0.65rem 0.85rem;
}

.tk-search__hints {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.35rem 0.25rem 0.5rem;
}

.tk-search__hints button {
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    background: #fff;
    color: #444;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
}

.tk-search__hints button:hover {
    border-color: #bbb;
    color: #111;
}

.tk-search__item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem 0.45rem;
    border-radius: 0.55rem;
    color: inherit;
}

.tk-search__item:hover {
    background: #f6f6f6;
}

.tk-search__item img {
    width: 56px;
    height: 70px;
    object-fit: cover;
    border-radius: 0.35rem;
    background: #f0f0f0;
}

.tk-search__item-body {
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.tk-search__item-body strong {
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.3;
}

.tk-search__item-body small {
    color: #888;
    font-size: 0.8rem;
}

.tk-search__item-price {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
}

.tk-search__all,
.tk-search__empty a {
    display: block;
    margin-top: 0.35rem;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #222;
    border-top: 1px solid #f0f0f0;
}

.tk-search__empty {
    padding: 1rem 0.5rem 0.5rem;
    text-align: center;
    color: #777;
}

.tk-search__empty p {
    margin: 0 0 0.5rem;
}

.tk-search-page {
    padding: 1.5rem 0 3rem;
}

.tk-search-page__head {
    margin-bottom: 1.5rem;
}

.tk-search-page__head h1 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    font-weight: 700;
}

.tk-search-page__head p {
    margin: 0.85rem 0 0;
    color: #777;
}

.tk-search-page__form {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    max-width: 640px;
    padding: 0.45rem 0.5rem 0.45rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 0.55rem;
    background: #fafafa;
}

.tk-search-page__form i {
    color: #777;
}

.tk-search-page__form input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.tk-search-page__form button {
    border: 0;
    border-radius: 0.4rem;
    background: #1f1f1f;
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    padding: 0.55rem 1rem;
    cursor: pointer;
}

.tk-search-page__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
}

.tk-search-page__empty {
    text-align: center;
    padding: 3rem 1rem;
    border: 1px dashed #ddd;
    border-radius: 0.75rem;
    background: #fafafa;
}

.tk-search-page__empty i {
    font-size: 2rem;
    color: #bbb;
}

.tk-search-page__empty h2 {
    margin: 0.75rem 0 0.35rem;
    font-size: 1.25rem;
}

.tk-search-page__empty p {
    margin: 0 0 1rem;
    color: #777;
}

.tk-search-page__empty a {
    display: inline-flex;
    font-weight: 600;
    color: #111;
}

@media (max-width: 991.98px) {
    .tk-search-page__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .tk-search {
        padding: 1rem 0.65rem 1rem;
        place-items: stretch;
    }

    .tk-search__panel {
        max-height: none;
        height: 100%;
        border-radius: 0.75rem;
    }

    .tk-search__submit {
        display: none;
    }

    .tk-search-page__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }
}
