/* Wrapper główny - flexbox */
.search-wrapper {
    display: flex;
    width: 100%;
    border: 1px solid #ddd;
    background: white;
    margin-top: 5px;
}

/* Kolumna 1 - Kategoria + Lista produktów */
.column-1 {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

/* Lista kategorii */
/* Lista kategorii w kolumnie (jedna pod drugą) */
.search-categories {
    display: flex;
    flex-direction: column; /* Układa kategorie jedna pod drugą */
    gap: 8px;
}

/* Pojedyncza kategoria */
.search-category-item {
    display: block; /* Każda kategoria zajmuje całą szerokość */
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    transition: background 0.3s ease;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

/* Hover efekt dla kategorii */
.search-category-item:hover {
    background: #f5f5f5;
}


/* Lista produktów */
.results-list {
    display: flex;
    flex-direction: column; /* Produkty jeden pod drugim */
    width: 100%;
    overflow-y: auto;
    max-height: 300px;
}

/* Wpisy produktów i kategorii */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    transition: background 0.3s ease;
}

/* Produkty mają obrazek */
.search-result-item img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
}

/* Kategorie wyglądają jak produkty, ale bez obrazka */
.search-result-category {
    padding-left: 15px;
    font-weight: bold;
}

/* Hover efekt dla produktów */
.search-result-item:hover {
    background: #f5f5f5;
}

/* Panel boczny domyślnie ukryty */
.column-2 {
    width: 0;
    padding: 10px;
    text-align: center;
    border-left: 1px solid transparent;
    overflow: hidden;
    transition: width 0.5s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    display: none;
}

/* Gdy panel boczny jest widoczny */
.search-wrapper.show-details .column-1 {
    width: 40%;
}
@media (max-width: 700px) {
    .search-wrapper.show-details .column-1 {
       width: 100% !important;
    }
}

.search-wrapper.show-details .column-2 {
    display: block;
    width: 60%;
    opacity: 1;
    border-left: 1px solid #ddd;
}

@media (max-width: 700px) {
    .search-wrapper.show-details .column-2 {
        display: none !important;
    }
}


/* Stylizacja kontenera Swiper */
.swiper-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

/* Obrazki w slajdach */
.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Przeniesienie kropek na dół */
.swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 10;
}

/* Stylizacja strzałek */
.swiper-button-prev,
.swiper-button-next {
    color: white;
    background: transparent;
    padding: 10px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: transparent;
}
.swiper-button-prev::after,
.swiper-button-next::after {
    color: #FCD792;
    font-size: 1.7em;
}

.swiper-button-prev {
    left: 10px;
}

.swiper-button-next {
    right: 10px;
}

.swiper-pagination-bullet{
    background: transparent;
    border: solid 1px #FCD792;
    opacity: 1;
} 
.swiper-pagination-bullet-active{
    background: #FCD792;
    border: solid 1px #FCD792; 
}

/* Opis produktu */
.product-details h2 {
    font-size: 20px;
    margin-top: 10px;
}

.product-details p {
    font-size: 14px;
    color: #555;
}

.btn {
    display: inline-block;
    padding: 8px 12px;
    background: #FCD792;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

.btn:hover {
    background: #e1ba71;
}

.searchbar-container strong {
    color: black;
    font-weight: bold;
}

/* Kontener dla inputa i przycisku X */
.searchbar-container {
    align-items: center;
    width: 100%;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 5px;
    background: white;
    position: absolute;
    z-index: 20;
}

/* Pole wyszukiwania */
#search-input {
    width: 100%;
    padding: 5px 10px;
    border: none;
    outline: none;
    font-size: 16px;
}

/* Przycisk X do czyszczenia */
#clear-search {
    position: absolute;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #aaa !important;
    display: none; /* Ukryty, dopóki coś nie zostanie wpisane */
}

/* Hover efekt na X */
#clear-search:hover {
    color: #333;
}
