/**
 * RSD Category Slider — style frontendowe
 * @version 1.0.4
 * @author  KD — RSD sp. z o.o. <https://rsd.com.pl>
 */

/* ── Wrapper ── */
.rsd-cat-slider-wrap {
	position: relative;
	margin: 1.5rem 0;
	display: block;
	width: 100%;
	clear: both;
}

/* ── Menu kategorii ── */
.rsd-cat-slider-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid #e5e7eb;
}

.rsd-menu-item {
	background: none;
	border: none;
	cursor: pointer;
	font-size: .9375rem;
	font-weight: 500;
	padding: 10px 22px;
	color: #6b7280;
	position: relative;
	transition: color .2s;
	letter-spacing: .01em;
	text-transform: uppercase;
}
.rsd-menu-item:hover { color: #111; }

/* ── Styl: underline (jak na screenie) ── */
.rsd-menu-style-underline .rsd-menu-item::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0; right: 0;
	height: 2px;
	background: transparent;
	transition: background .2s;
}
.rsd-menu-style-underline .rsd-menu-item--active {
	color: #111;
}
.rsd-menu-style-underline .rsd-menu-item--active::after {
	background: var(--global-palette1, #b8973d);
}

/* ── Styl: pill ── */
.rsd-menu-style-pill {
	border-bottom: none;
	gap: 8px;
	margin-bottom: 1.25rem;
}
.rsd-menu-style-pill .rsd-menu-item {
	border-radius: 999px;
	border: 1.5px solid #d1d5db;
	padding: 7px 20px;
}
.rsd-menu-style-pill .rsd-menu-item--active {
	background: var(--global-palette1, #2563eb);
	border-color: var(--global-palette1, #2563eb);
	color: #fff;
}

/* ── Styl: tabs ── */
.rsd-menu-style-tabs {
	border-bottom: 2px solid #e5e7eb;
	gap: 0;
}
.rsd-menu-style-tabs .rsd-menu-item {
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: 4px 4px 0 0;
	margin-bottom: -2px;
}
.rsd-menu-style-tabs .rsd-menu-item--active {
	border-color: #e5e7eb;
	border-bottom-color: #fff;
	background: #fff;
	color: #111;
}

/* ── Styl: minimal ── */
.rsd-menu-style-minimal {
	border-bottom: none;
	gap: 24px;
	margin-bottom: 1.25rem;
}
.rsd-menu-style-minimal .rsd-menu-item {
	padding: 4px 0;
	font-size: .875rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.rsd-menu-style-minimal .rsd-menu-item--active {
	color: var(--global-palette1, #111);
	font-weight: 700;
}

/* ── Swiper / Panel ── */
.rsd-cat-slider-panel { display: block; }
.rsd-cat-slider-panel.rsd-panel-hidden { display: none; }

.rsd-swiper {
	position: relative;
	overflow: hidden;
	padding-bottom: 2.5rem; /* miejsce na paginację */
}

/* Ochrona przed konfliktami motywu (globalne style .swiper/.swiper-slide). */
.rsd-cat-slider-wrap .rsd-swiper,
.rsd-cat-slider-wrap .swiper-wrapper,
.rsd-cat-slider-wrap .swiper-slide {
	visibility: visible !important;
	opacity: 1 !important;
}

.rsd-cat-slider-wrap .swiper-wrapper {
	display: flex;
	align-items: stretch;
}

.rsd-cat-slider-wrap .swiper-slide {
	height: auto !important;
	flex-shrink: 0;
}

/* ── Siatka produktów ── */
.rsd-slider-grid {
	display: grid;
	gap: 20px;
	width: 100%;
}
.rsd-slider-cols-1 { grid-template-columns: repeat(1, 1fr); }
.rsd-slider-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rsd-slider-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rsd-slider-cols-4 { grid-template-columns: repeat(4, 1fr); }
.rsd-slider-cols-5 { grid-template-columns: repeat(5, 1fr); }
.rsd-slider-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ── Karta produktu ── */
.rsd-slider-product {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 1px;
}

.rsd-slider-product__img-wrap {
	display: block;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	aspect-ratio: 1 / 1;
	background: #fafafa;
}
.rsd-slider-product__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
	display: block;
}
.rsd-slider-product__img-wrap:hover img {
	transform: scale(1.04);
}

.rsd-slider-product__no-img {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 2rem;
	color: #ccc;
}

.rsd-slider-product__info { padding: 0 2px; }

.rsd-slider-product__name {
	display: block;
	font-size: .875rem;
	font-weight: 500;
	color: #111 !important;
	text-decoration: none;
	line-height: 1.35;
}
.rsd-slider-product__name:hover { text-decoration: underline; }

.rsd-slider-product__price {
	font-size: .875rem;
	font-weight: 700;
	color: var(--global-palette1, #b8973d) !important;
	margin-top: 2px;
}
.rsd-slider-product__price .woocommerce-Price-amount { color: inherit; }

.rsd-slider-product__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 6px;
}

.rsd-slider-product__cart {
	display: inline-block;
	padding: 6px 14px;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

/* ── Style rogów / wariantu przycisku ── */
.rsd-btn--pill      { border-radius: 999px; }
.rsd-btn--square    { border-radius: 0; }
.rsd-btn--rounded   { border-radius: 8px; }
.rsd-btn--underline {
	border-radius: 0;
	background: transparent !important;
	border: none !important;
	padding-left: 0;
	padding-right: 0;
	color: var(--global-palette1, #b8973d) !important;
	text-decoration: underline;
}

/* ── Wyrównanie treści karty ── */
.rsd-align-center .rsd-slider-product__info  { text-align: center; }
.rsd-align-center .rsd-slider-product__actions { justify-content: center; }
.rsd-align-right  .rsd-slider-product__info  { text-align: right; }
.rsd-align-right  .rsd-slider-product__actions { justify-content: flex-end; }

/* ── Nawigacja Swiper — nadpisanie domyślnych ── */
.rsd-swiper .swiper-button-prev,
.rsd-swiper .swiper-button-next {
	color: var(--global-palette1, #111);
	width: 36px;
	height: 36px;
	background: rgba(255,255,255,.85);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.rsd-swiper .swiper-button-prev::after,
.rsd-swiper .swiper-button-next::after {
	font-size: 14px;
}

/* ── Paginacja kropki ── */
.rsd-swiper .swiper-pagination-bullet-active {
	background: var(--global-palette1, #111);
}

/* ── Empty notice ── */
.rsd-slider-empty {
	padding: 1rem;
	color: #888;
	font-size: .875rem;
}

/* ── Responsywność ── */
@media ( max-width: 900px ) {
	.rsd-slider-cols-4,
	.rsd-slider-cols-5,
	.rsd-slider-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media ( max-width: 600px ) {
	.rsd-slider-grid { grid-template-columns: repeat(2, 1fr) !important; }
	.rsd-menu-item { padding: 8px 12px; font-size: .8125rem; }
}
@media ( max-width: 380px ) {
	.rsd-slider-grid { grid-template-columns: repeat(1, 1fr) !important; }
}
