/*
 * shop-archive.css — listing produktów: pasek narzędzi, filtry, wiersze.
 */

.gmb-archive__topbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--gmb-sp-3);
	margin-bottom: var(--gmb-sp-4);
}

.gmb-archive__title {
	margin: 0;
	font-size: var(--gmb-fs-h2);
}

.gmb-archive__count {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: var(--gmb-text-muted);
}

.gmb-archive__ordering select,
.woocommerce-ordering select {
	min-width: 220px;
	font-size: 13px;
}

.gmb-archive__intro {
	margin-bottom: var(--gmb-sp-5);
	padding: var(--gmb-sp-4);
	background: var(--gmb-surface);
	border: 1px solid var(--gmb-border);
	border-radius: var(--gmb-radius-card);
}

.gmb-archive__layout {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: var(--gmb-sp-5);
	align-items: start;
}

/* ==========================================================================
   Filtry
   ========================================================================== */

.gmb-filters__inner {
	position: sticky;
	top: var(--gmb-sp-4);
	background: var(--gmb-surface);
	border: 1px solid var(--gmb-border);
	border-radius: var(--gmb-radius-card);
	padding: var(--gmb-sp-4);
}

.gmb-filters__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--gmb-sp-3);
	padding-bottom: var(--gmb-sp-3);
	border-bottom: 1px solid var(--gmb-border);
}

.gmb-filters__title {
	margin: 0;
	font-size: 15px;
}

.gmb-filters__clear {
	font-size: 12px;
	color: var(--gmb-primary);
}

.gmb-filters__group + .gmb-filters__group {
	margin-top: var(--gmb-sp-3);
	padding-top: var(--gmb-sp-3);
	border-top: 1px solid var(--gmb-border);
}

.gmb-filters__group-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: var(--gmb-sp-2);
}

.gmb-filters__group-title svg {
	transition: transform var(--gmb-transition);
}

.gmb-filters__group.is-collapsed .gmb-filters__group-title svg {
	transform: rotate(-90deg);
}

.gmb-filters__group.is-collapsed .gmb-filters__group-body {
	display: none;
}

.gmb-filters__cats {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 260px;
	overflow-y: auto;
}

.gmb-filters__cats a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--gmb-sp-2);
	padding: 5px 0;
	font-size: 13px;
}

.gmb-filters__cats span {
	font-size: 11px;
	color: var(--gmb-text-muted);
}

.gmb-filters__cats .is-active > a {
	color: var(--gmb-primary);
	font-weight: 600;
}

.gmb-filters__checkbox {
	display: flex;
	align-items: center;
	gap: var(--gmb-sp-2);
	font-size: 13px;
	font-weight: 400;
	cursor: pointer;
}

.gmb-filters__checkbox input {
	width: auto;
	accent-color: var(--gmb-primary);
}

.gmb-filters__widgets .widget {
	padding: 0;
	border: 0;
	background: none;
	margin-top: var(--gmb-sp-4);
}

.gmb-filters__apply,
.gmb-filters__mobile-toggle {
	display: none;
}

/* ==========================================================================
   Wiersz produktu
   ========================================================================== */

.gmb-product-rows {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--gmb-sp-3);
}

.gmb-product-row {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr) 220px;
	gap: var(--gmb-sp-4);
	padding: var(--gmb-sp-4);
	background: var(--gmb-surface);
	border: 1px solid var(--gmb-border);
	border-radius: var(--gmb-radius-card);
	transition: border-color var(--gmb-transition), box-shadow var(--gmb-transition);
}

.gmb-product-row:hover {
	border-color: rgba(var(--gmb-primary-rgb), .5);
	box-shadow: var(--gmb-shadow-sm);
}

.gmb-product-row__img {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
}

.gmb-product-row__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.gmb-product-row__img .gmb-badge {
	position: absolute;
	top: 0;
	left: 0;
}

.gmb-product-row__info {
	min-width: 0;
}

.gmb-product-row__title {
	display: block;
	margin-bottom: var(--gmb-sp-2);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.gmb-product-row__desc {
	margin: 0 0 var(--gmb-sp-2);
	font-size: 13px;
	color: var(--gmb-text-muted);
}

.gmb-product-row__attrs {
	list-style: none;
	margin: 0 0 var(--gmb-sp-2);
	padding: 0;
	display: grid;
	gap: 2px;
	font-size: 12px;
	color: var(--gmb-text-muted);
}

.gmb-product-row__attrs span {
	font-weight: 600;
	color: var(--gmb-text);
}

.gmb-product-row__delivery {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 12px;
	color: var(--gmb-success);
}

.gmb-product-row__buy {
	display: flex;
	flex-direction: column;
	gap: var(--gmb-sp-2);
	padding-left: var(--gmb-sp-4);
	border-left: 1px solid var(--gmb-border);
	text-align: right;
}

.gmb-product-row__price {
	font-size: 22px;
	font-weight: 800;
}

.gmb-product-row__price ins {
	text-decoration: none;
	color: var(--gmb-success);
}

.gmb-product-row__price del {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--gmb-text-muted);
}

.gmb-product-row__details {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	font-size: 12px;
	color: var(--gmb-text-muted);
}

/* ==========================================================================
   Warianty mobilne
   ========================================================================== */

@media (max-width: 1024px) {
	.gmb-archive__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.gmb-filters {
		position: fixed;
		inset: 0;
		z-index: 250;
		background: rgba(var(--gmb-text-rgb), .45);
		visibility: hidden;
		opacity: 0;
		transition: opacity var(--gmb-transition), visibility var(--gmb-transition);
	}

	.gmb-filters.is-open {
		visibility: visible;
		opacity: 1;
	}

	.gmb-filters__inner {
		position: absolute;
		inset-block: 0;
		left: 0;
		width: min(320px, 90vw);
		border-radius: 0;
		overflow-y: auto;
	}

	.gmb-filters__apply {
		display: flex;
		margin-top: var(--gmb-sp-4);
	}

	.gmb-filters__mobile-toggle {
		position: fixed;
		bottom: var(--gmb-sp-4);
		left: 50%;
		transform: translateX(-50%);
		z-index: 240;
		display: inline-flex;
		align-items: center;
		gap: var(--gmb-sp-2);
		padding: var(--gmb-sp-3) var(--gmb-sp-5);
		background: var(--gmb-text);
		color: #fff;
		border-radius: 999px;
		box-shadow: var(--gmb-shadow-lg);
		font-size: 14px;
		font-weight: 700;
	}
}

@media (max-width: 767px) {
	.gmb-product-row {
		grid-template-columns: 110px minmax(0, 1fr);
		gap: var(--gmb-sp-3);
	}

	.gmb-product-row__buy {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		padding-left: 0;
		padding-top: var(--gmb-sp-3);
		border-left: 0;
		border-top: 1px solid var(--gmb-border);
		text-align: left;
	}

	.gmb-product-row__buy .gmb-btn {
		width: auto;
		flex: 1;
	}

	.gmb-product-row__details {
		display: none;
	}
}
