/* Модальное окно умного поиска */
.prpanda-search-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prpanda-search-modal--open {
    opacity: 1;
    visibility: visible;
}

.prpanda-search-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.prpanda-search-modal-content {
    position: relative;
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.prpanda-search-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.prpanda-search-close:hover {
    color: #1e293b;
}

.prpanda-search-modal-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.prpanda-search-form-inner {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.prpanda-search-form-inner:focus-within {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.prpanda-search-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 0.75rem 3rem 0.75rem 1rem;
    font-size: 1rem;
    color: #1e293b;
    background: transparent;
    border: none;
    outline: none;
}

.prpanda-search-input::placeholder {
    color: #94a3b8;
}

.prpanda-search-submit {
    position: absolute;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: #64748b;
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.prpanda-search-submit:hover {
    color: #ea580c;
    background: rgba(234, 88, 12, 0.08);
}

/* Виджет: форма в сайдбаре */
.widget_prpanda_smart_search .prpanda-search-form-inner {
    border-radius: 0.5rem;
}

.widget_prpanda_smart_search .prpanda-search-input {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.widget_prpanda_smart_search .prpanda-search-submit {
    width: 2rem;
    height: 2rem;
    right: 0.25rem;
    font-size: 0.875rem;
}

/* Сетка товаров на странице результатов: 5 в ряд на больших экранах */
.prpanda-search-results .prpanda-search-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .prpanda-search-results .prpanda-search-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .prpanda-search-results .prpanda-search-products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Пагинация на странице результатов (как в каталоге) */
.prpanda-search-results .prpanda-search-pagination {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.prpanda-search-results .prpanda-search-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.prpanda-search-results .prpanda-search-pagination .page-numbers li {
    margin: 0;
}

.prpanda-search-results .prpanda-search-pagination .page-numbers a,
.prpanda-search-results .prpanda-search-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #1e293b;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.prpanda-search-results .prpanda-search-pagination .page-numbers a:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.prpanda-search-results .prpanda-search-pagination .page-numbers .current {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
    cursor: default;
}

.prpanda-search-results .prpanda-search-pagination .page-numbers .prev,
.prpanda-search-results .prpanda-search-pagination .page-numbers .next {
    font-size: 0.875rem;
}

.prpanda-search-results .prpanda-search-pagination .page-numbers .dots {
    border: none;
    background: transparent;
    cursor: default;
}
