/* =========================================================================
   GALLERY — Responzivní galerie s PhotoSwipe integrací
   Závisí na: tokens.css
   =========================================================================
   Obsah:
   - Filtrační tlačítka (.stegu-filters, .stegu-filter-btn)
   - Galerie grid (.stegu-gallery-grid) — POZOR: přejmenováno z .stegu-grid,
     aby nedocházelo ke konfliktu s grid systémem v stegu-snippets.css
   - Položky galerie (.stegu-gallery-item) + hover overlay
   - PhotoSwipe lišta (.stegu-pswp-bar, .stegu-pswp-info, .stegu-pswp-btn)
   ========================================================================= */


/* =========================================================================
   FILTRY
   ========================================================================= */

.stegu-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 30px;
}

.stegu-filter-btn {
	padding: 10px 20px;
	border: none;
	background: var(--stegu-color-gray-200);
	cursor: pointer;
	border-radius: 0; /* Flat design */
	font-weight: bold;
	transition: all 0.3s;
	font-family: inherit;
	text-transform: uppercase;
	font-size: 14px;
	color: var(--stegu-text-main);
}

.stegu-filter-btn:hover {
	background: var(--stegu-color-gray-300);
}

.stegu-filter-btn.active {
	background: var(--stegu-action-primary);
	color: var(--stegu-text-inverse);
}


/* =========================================================================
   GALERIE GRID
   Přejmenováno z .stegu-grid → .stegu-gallery-grid (bez konfliktu se snippets)
   Pokud máš starší HTML se třídou .stegu-grid, přidej ji do selektoru níže.
   ========================================================================= */

.stegu-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
}


/* =========================================================================
   POLOŽKY GALERIE
   ========================================================================= */

.stegu-gallery-item {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 0; /* Flat design */
	cursor: pointer;
	transition: opacity 0.3s ease;
}

.stegu-gallery-item.is-hidden {
	display: none !important;
}

.stegu-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
	display: block;
}

.stegu-gallery-item:hover img {
	transform: scale(1.05);
}

/* Overlay s názvem produktu — text se vysune zdola při hoveru */
.stegu-gallery-item::after {
	content: attr(data-product-name);
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 15px 10px;
	background: transparent;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
	color: var(--stegu-text-inverse);
	text-align: center;
	font-weight: bold;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transform: translateY(100%);
	opacity: 0;
	transition:
		transform 0.3s ease,
		opacity 0.3s ease;
	pointer-events: none;
	box-sizing: border-box;
}

.stegu-gallery-item:hover::after {
	transform: translateY(0);
	opacity: 1;
}


/* =========================================================================
   PHOTOSWIPE LIŠTA
   ========================================================================= */

.stegu-pswp-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding-bottom: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 10000;
	box-sizing: border-box;
}

.stegu-pswp-info {
	color: var(--stegu-text-inverse);
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-right: 15px;
}

.stegu-pswp-btn {
	background: var(--stegu-action-primary);
	color: var(--stegu-text-inverse) !important;
	padding: 10px 25px;
	border-radius: 0; /* Flat design */
	text-decoration: none;
	font-weight: bold;
	white-space: nowrap;
	text-transform: uppercase;
	font-size: 14px;
	transition: background-color 0.2s ease;
	border: none;
}

.stegu-pswp-btn:hover {
	background: var(--stegu-action-primary-int);
}

@media (max-width: 600px) {
	.stegu-pswp-bar {
		flex-direction: column;
		gap: 10px;
		padding: 15px;
		text-align: center;
	}

	.stegu-pswp-info {
		margin-right: 0;
		font-size: 14px;
	}

	.stegu-pswp-btn {
		width: 100%;
		text-align: center;
	}

	.stegu-filter-btn {
		width: 100%;
	}
}
