#div-buscador {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 10050;
    background: #fff;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

#div-buscador.is-open {
    display: flex !important;
    flex-direction: column;
}

.pb-search-panel {
    background: #fff;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pb-search-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #eef2f7;
    gap: 16px;
    flex-shrink: 0;
    background: #fff;
}

.pb-search-header-main {
    flex: 1;
    min-width: 0;
}

.pb-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pb-search-input-wrap:focus-within {
    border-color: #1ebea5;
    box-shadow: 0 0 0 3px rgba(30, 190, 165, 0.2);
    background: #fff;
}

.pb-search-input-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.pb-search-input {
    flex: 1;
    border: none;
    background: transparent;
    height: 48px;
    font-size: 16px;
    color: #0f172a;
    outline: none;
    min-width: 0;
}

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

.pb-search-input-clear {
    border: none;
    background: #e2e8f0;
    color: #475569;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.pb-search-input-clear:hover {
    background: #cbd5e1;
}

.pb-search-meta {
    color: #64748b;
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

.pb-search-close {
    border: none;
    background: #f1f5f9;
    color: #334155;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.pb-search-close:hover {
    background: #e2e8f0;
}

.pb-search-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.pb-search-filters {
    border-right: 1px solid #eef2f7;
    padding: 20px 16px;
    overflow-y: auto;
    background: #fafbfc;
}

.pb-search-filters h3 {
    margin: 0 0 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
}

.pb-filter-group {
    margin-bottom: 22px;
}

.pb-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pb-filter-chip {
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pb-filter-chip:hover {
    border-color: #1ebea5;
    color: #0f766e;
}

.pb-filter-chip.is-active {
    background: #1ebea5;
    border-color: #1ebea5;
    color: #fff;
}

.pb-search-results {
    padding: 20px 24px 28px;
    overflow-y: auto;
    background: #fff;
}

.pb-search-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    background: #fff;
}

.pb-search-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pb-search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.pb-search-card-img {
    background: #fff;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    position: relative;
}

.pb-search-card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pb-search-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e9fffb;
    color: #27c1a9;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}

.pb-search-card-body {
    padding: 12px;
}

.pb-search-card-title {
    font-size: 13px;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 6px;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pb-search-card-brand {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.pb-search-card-price {
    font-size: 18px;
    font-weight: 700;
    color: #e11d48;
    margin: 0;
}

.pb-search-card-delivery {
    font-size: 12px;
    color: #16a34a;
    margin-top: 4px;
}

.pb-search-empty,
.pb-search-hint,
.pb-search-loading {
    text-align: center;
    padding: 64px 20px;
    color: #64748b;
}

.pb-search-loading img {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.pb-search-loading p {
    margin: 0;
    color: #64748b;
}

.pb-search-footer {
    border-top: 1px solid #eef2f7;
    padding: 14px 24px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    background: #fff;
}

.pb-search-view-all {
    background: #1ebea5;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.pb-search-view-all:hover {
    background: #17a892;
}

#buscador.is-focused {
    box-shadow: 0 0 0 3px rgba(30, 190, 165, 0.25);
}

body.pb-search-open {
    overflow: hidden !important;
}

body.pb-search-open .scroller,
body.pb-search-open .pagecontainer {
    overflow: hidden !important;
}

@media (max-width: 1400px) {
    .pb-search-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

@media (max-width: 991px) {
    .pb-search-header {
        padding: 12px 16px;
    }

    .pb-search-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .pb-search-filters {
        border-right: none;
        border-bottom: 1px solid #eef2f7;
        max-height: 160px;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        gap: 20px;
        padding: 12px 16px;
    }

    .pb-filter-group {
        margin-bottom: 0;
        min-width: 240px;
        flex-shrink: 0;
    }

    .pb-search-results {
        padding: 16px;
    }

    .pb-search-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 767px) {
    .pb-search-input {
        height: 44px;
        font-size: 15px;
    }

    .pb-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .pb-search-header {
        padding: 10px 12px;
        gap: 10px;
    }

    .pb-search-results {
        padding: 12px;
    }

    .pb-search-card-title {
        font-size: 12px;
        min-height: 32px;
    }

    .pb-search-card-price {
        font-size: 16px;
    }

    .pb-search-filters {
        max-height: 130px;
    }
}
