/* GŁÓWNY KONTENER */
#page #content .wm_slider_produktow {
    margin-bottom: 3rem;
    position: relative;
}

/* NAGŁÓWEK (Zakładki i strzałki w jednej linii) */
#page #content .wm_slider_produktow__header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
}

/* ZAKŁADKI */
#page #content .wm_slider_produktow__nav {
    display: flex;
    gap: 30px;
}

#page #content .wm_slider_produktow__tab {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 22px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
	box-shadow: none;
}

#page #content .wm_slider_produktow__tab--active,
#page #content .wm_slider_produktow__tab:hover {
    color: #49a753; /* Zmień na swój kolor zielony z obrazka */
    border-bottom: 3px solid #49a753;
}

/* STRZAŁKI (Nowy układ) */
#page #content .wm-logo-controls {
    position: absolute;
    right: 0;
    display: flex;
    gap: 10px;
    z-index: 99; /* Wymusza, by przyciski były zawsze na wierzchu i klikalne */
}

#page #content .wm-logo-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 5px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0; 
    outline: none;
}

#page #content .wm-logo-btn:hover {
    background: #f49717;
    border-color: #f49717; 
}

#page #content .wm-logo-btn img {
    width: 14px; 
    height: auto;
    display: block;
    margin: 0;
    pointer-events: none; /* Sprawia, że obrazek strzałki "przepuszcza" kliknięcie do przycisku pod spodem */
}

/* Obrócenie obrazka w lewym przycisku */
#page #content .wm-logo-prev img {
    transform: rotate(180deg);
}

/* PANELE - UKRYWANIE I POKAZYWANIE */
#page #content .wm_slider_produktow__panel {
    display: none;
    animation: fadeInSlider 0.4s ease-in-out;
}

#page #content .wm_slider_produktow__panel--active {
    display: block;
}

@keyframes fadeInSlider {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================================
   ZAMIANA SIATKI WOOCOMMERCE W POZIOMY SLIDER (CAROUSEL)
   ======================================================== */

#page #content .wm_slider_produktow__panel ul.products {
    display: flex !important;
    flex-wrap: nowrap !important; 
    overflow-x: auto !important; /* Wymuszenie fizycznego pola do przewijania */
    scroll-behavior: smooth !important;
    gap: 20px !important;                 
    margin: 0 !important;
    padding: 0 0 15px 0 !important;
    
    /* Resetowanie natywnych ustawień Astry (zabija CSS Grid) */
    grid-template-columns: none !important; 
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    
    /* Ukrywanie natywnego paska przewijania dla estetyki */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

#page #content .wm_slider_produktow__panel ul.products::-webkit-scrollbar {
    display: none;
}

/* KAFELKI PRODUKTÓW W SLIDERZE */
#page #content .wm_slider_produktow__panel ul.products li.product {
    flex: 0 0 calc(20% - 16px) !important; /* Wymusza 5 produktów w jednym rzędzie */
    max-width: calc(20% - 16px) !important;
    margin: 0 !important;
    
    border: 1px solid #eaeaea;
    box-sizing: border-box;
    padding: 15px;
    background: #fff;
    position: relative;
}
#page #content .wm_slider_produktow__panel .products li .add_to_cart_button{
	display: none;
}
#page #content .wm_slider_produktow__panel ul.products li.product .astra-shop-summary-wrap {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
/* Zaktualizowana Responsywność */
@media (max-width: 1200px) {
    #page #content .wm_slider_produktow__panel ul.products li.product {
        flex: 0 0 calc(25% - 15px) !important; /* 4 produkty na średnich ekranach (laptopy) */
        max-width: calc(25% - 15px) !important;
    }
}

@media (max-width: 1024px) {
    #page #content .wm_slider_produktow__panel ul.products li.product {
        flex: 0 0 calc(33.333% - 14px) !important; /* 3 produkty na tabletach poziomo */
        max-width: calc(33.333% - 14px) !important;
    }
}

@media (max-width: 768px) {
    #page #content .wm_slider_produktow__panel ul.products li.product {
        flex: 0 0 calc(50% - 10px) !important; /* 2 produkty na tabletach pionowo / dużych telefonach */
        max-width: calc(50% - 10px) !important;
    }
    
    #page #content .wm_slider_produktow__header {
        flex-direction: column;
        gap: 15px;
    }
    
    #page #content .wm_slider_produktow__arrows {
        position: static;
        margin-top: 10px;
    }
}

@media(max-width: 635px){
	#page #content .wm_slider_produktow__nav{
		flex-direction: column;
		gap: 10px;
		margin-bottom: 20px;
	}
	
	#page #content .wm-logo-controls{
		top: 100%;
		right: 50%;
		transform: translateX(50%);
	}
	#page #content .wm_slider_produktow__header{
		margin-bottom: 65px;
	}
	#page #content .wm-logo-controls{
		
	}
}

@media (max-width: 480px) {
    #page #content .wm_slider_produktow__panel ul.products li.product {
        flex: 0 0 85% !important; /* Na małych telefonach pokazujemy kawałek kolejnego (jako sugestia przesunięcia) */
        max-width: 85% !important;
    }
	.wm-logo-slider-header{
		justify-content: center;
	}
}