/*
 * Panel podpowiedzi wyszukiwarki — renderowany przez assets/js/main.js (initializeSearchSuggest).
 * Kolor akcentu z --bs-primary (per-serwis, ustawiany w views/header.php).
 */
.ss-panel {
    position: absolute;
    z-index: 1050;
    background: #fff;
    color: #212529;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    text-align: left;
}

.ss-close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 1;
    border: 0;
    background: transparent;
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1;
    padding: .35rem .5rem;
}
.ss-close:hover { color: #212529; }

.ss-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}
.ss-body.ss-no-side { grid-template-columns: minmax(0, 1fr); }

.ss-side {
    background: #f6f7f8;
    padding: 1.25rem;
}
.ss-main { padding: 1.25rem 2.75rem 1.25rem 1.5rem; }

.ss-main-row {
    display: grid;
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
}
.ss-main-row.ss-single { grid-template-columns: minmax(200px, 320px); }

.ss-heading {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .75rem;
}

.ss-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}
.ss-list a {
    display: block;
    padding: .3rem 0;
    color: inherit;
    font-size: .875rem;
    text-decoration: none;
}
.ss-list a:hover { color: var(--bs-primary); }

.ss-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.ss-chip {
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    background: #fff;
    color: inherit;
    font-size: .8rem;
    padding: .2rem .7rem;
}
.ss-chip:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.ss-panel mark {
    background: rgba(var(--bs-primary-rgb, 13, 110, 253), .15);
    color: inherit;
    padding: 0 .05em;
    border-radius: 2px;
}

/* Produkty */
.ss-product,
.ss-featured-item {
    color: inherit;
    text-decoration: none;
    border-radius: .5rem;
}
.ss-product:hover,
.ss-featured-item:hover {
    background: #f6f7f8;
    color: inherit;
}

.ss-featured-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: .5rem;
}
.ss-featured-item .ss-product-img {
    width: 100%;
    aspect-ratio: 1;
}
.ss-featured-item .ss-product-info { align-items: center; }
.ss-featured-item .ss-product-name {
    font-size: .95rem;
    margin-top: .75rem;
}
.ss-featured-item .ss-product-price { font-size: 1.15rem; }

.ss-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .25rem 1rem;
}
.ss-product {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem;
}
.ss-product .ss-product-img {
    width: 72px;
    height: 72px;
}

.ss-product-img {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ss-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ss-product-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ss-product-name {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .85rem;
    line-height: 1.3;
}
.ss-product-price {
    font-weight: 600;
    margin-top: .25rem;
}
.ss-product-price.ss-promo { color: #dc3545; }
.ss-product-stock {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.ss-in-stock { color: #198754; }
.ss-out-of-stock { color: #6c757d; }

.ss-show-all {
    display: block;
    width: 100%;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.ss-empty {
    margin: 0;
    padding: .5rem 0;
    color: #6c757d;
}

/* Pasek producentów */
.ss-brands {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1.25rem;
    background: #eef0f2;
}
.ss-brands-label { font-weight: 600; }
.ss-brands-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.ss-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    min-width: 110px;
    padding: .35rem .75rem;
    background: #fff;
    border-radius: .35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    color: inherit;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.ss-brand img {
    max-height: 32px;
    max-width: 120px;
    object-fit: contain;
}
.ss-brand:hover { box-shadow: 0 0 0 2px var(--bs-primary); }

@media (max-width: 1199.98px) {
    .ss-main-row { grid-template-columns: 200px minmax(0, 1fr); }
    .ss-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Mobile: element flow w rozwijanej wyszukiwarce, jedna kolumna, produkty przed kategoriami */
.ss-panel.ss-mobile {
    position: relative;
    width: 100%;
    max-height: 70vh;
    margin-top: .5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.ss-mobile .ss-body {
    display: flex;
    flex-direction: column;
}
.ss-mobile .ss-side {
    order: 2;
    padding: .75rem 1rem;
}
.ss-mobile .ss-main { padding: .75rem 2.5rem .75rem 1rem; }
.ss-mobile .ss-main-row { display: block; }
.ss-mobile .ss-heading { margin-bottom: .4rem; }
.ss-mobile .ss-featured-item {
    flex-direction: row;
    text-align: left;
    gap: .75rem;
}
.ss-mobile .ss-featured-item .ss-product-img {
    width: 72px;
    height: 72px;
    aspect-ratio: auto;
}
.ss-mobile .ss-featured-item .ss-product-info { align-items: flex-start; }
.ss-mobile .ss-featured-item .ss-product-name {
    margin-top: 0;
    font-size: .85rem;
}
.ss-mobile .ss-featured-item .ss-product-price { font-size: 1rem; }
.ss-mobile .ss-products { margin-top: .5rem; }
.ss-mobile .ss-grid { grid-template-columns: minmax(0, 1fr); }
.ss-mobile .ss-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    margin-bottom: .5rem;
}
.ss-mobile .ss-brands { padding: .6rem 1rem; }
.ss-mobile .ss-brand {
    height: 38px;
    min-width: 0;
}
