/**
 * Cults Shop – stylowanie sklepu 3D
 * Układ poziomy z przewijaniem w lewo/prawo
 */

.cults-shop {
	display: flex;
	flex-shrink: 0;
	height: 100%;
	align-items: stretch;
	padding: 0 2vw;
}

.cults-shop-grid {
	display: grid;
	grid-template-rows: 1fr 1fr;
	grid-auto-flow: column;
	grid-auto-columns: min(max(280px, 25vw), 380px);
	gap: 2rem;
	align-items: stretch;
	padding: 2rem 0;
}

.cults-shop-item {
	min-width: 0;
	background: #161616;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cults-shop-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cults-shop-item-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Galeria */
.cults-shop-gallery-wrap {
	position: relative;
	aspect-ratio: 1;
	background: #222;
	overflow: hidden;
}

.cults-shop-gallery {
	position: relative;
	width: 100%;
	height: 100%;
}

.cults-shop-gallery-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.cults-shop-gallery-slide.active {
	opacity: 1;
	z-index: 1;
	pointer-events: auto;
}

.cults-shop-gallery-slide img,
.cults-shop-gallery-slide video.cults-shop-gallery-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cults-shop-gallery-slide.is-video video.cults-shop-gallery-video {
	display: block;
}

/* GIF – animacja */
.cults-shop-gallery-slide.is-gif img.cults-shop-img-gif {
	image-rendering: auto;
}

.cults-shop-gallery-slide.is-gif::after {
	content: 'GIF';
	position: absolute;
	bottom: 8px;
	left: 8px;
	font-size: 10px;
	font-weight: 600;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 2px 6px;
	border-radius: 3px;
	z-index: 2;
}

.cults-shop-gallery-slide.is-video::after {
	content: '';
	position: absolute;
	bottom: 8px;
	left: 8px;
	width: 24px;
	height: 24px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat center;
	background-size: contain;
	z-index: 2;
}

.cults-shop-gallery-prev,
.cults-shop-gallery-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	transition: background 0.2s;
	border-radius: 4px;
}

.cults-shop-gallery-prev:hover,
.cults-shop-gallery-next:hover {
	background: rgba(0, 0, 0, 0.8);
}

.cults-shop-gallery-prev {
	left: 8px;
}

.cults-shop-gallery-next {
	right: 8px;
}

.cults-shop-gallery-counter {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 4px;
	z-index: 2;
}

/* Ikona opisu – lewy górny róg */
.cults-shop-info-btn {
	position: absolute;
	top: 12px;
	left: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.cults-shop-info-btn:hover {
	background: rgba(0, 0, 0, 0.8);
}

.cults-shop-info-btn svg {
	display: block;
}

.cults-shop-discount-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: #c41e3a;
	color: #fff;
	font-size: 14px;
	font-weight: bold;
	padding: 4px 8px;
	border-radius: 4px;
	z-index: 2;
}

/* Popup z opisem */
.cults-shop-popup {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	margin: 0;
	box-sizing: border-box;
}

.cults-shop-popup-hidden {
	display: none !important;
}

body.cults-shop-popup-open {
	overflow: hidden;
}

.cults-shop-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

.cults-shop-popup-content {
	position: relative;
	background: #161616;
	color: #fff;
	width: min(420px, calc(100vw - 4rem));
	max-width: 420px;
	max-height: min(70vh, calc(100vh - 4rem));
	margin: auto;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cults-shop-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
	z-index: 2;
	transition: background 0.2s;
}

.cults-shop-popup-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.cults-shop-popup-title {
	margin: 0;
	padding: 1.25rem 2.5rem 0.75rem 1.25rem;
	font-size: 1.1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.cults-shop-popup-body {
	padding: 1.25rem;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
	font-size: 0.9rem;
	line-height: 1.6;
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
}

.cults-shop-popup-body p {
	margin: 0 0 0.75em 0;
}

.cults-shop-popup-body p:last-child {
	margin-bottom: 0;
}

.cults-shop-popup-body a {
	color: var(--cults-main-color, #f1c487);
	text-decoration: none;
}

.cults-shop-popup-body a:hover {
	text-decoration: underline;
}

.cults-shop-popup-body ul,
.cults-shop-popup-body ol {
	margin: 0 0 0.75em 0;
	padding-left: 1.5em;
}

.cults-shop-popup-body li {
	margin-bottom: 0.25em;
}

.cults-shop-popup-body strong {
	font-weight: 600;
}

.cults-shop-popup-body em {
	font-style: italic;
}

/* Info */
.cults-shop-info {
	padding: 1rem 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cults-shop-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.3;
}

.cults-shop-title a {
	color: inherit;
	text-decoration: none;
}

.cults-shop-title a:hover {
	text-decoration: underline;
}

.cults-shop-price-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.cults-shop-price {
	font-weight: bold;
	font-size: 1.1rem;
	color: var(--cults-main-color, #f1c487);
}

.cults-shop-price-old {
	font-size: 0.9rem;
	color: #888;
	text-decoration: line-through;
}

.cults-shop-btn {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.5rem 1rem;
	background: var(--cults-main-color, #f1c487);
	color: #161616;
	text-decoration: none;
	font-weight: 600;
	border-radius: 4px;
	transition: background 0.2s, color 0.2s;
	text-align: center;
}

.cults-shop-btn:hover {
	background: #e5b876;
	color: #161616;
}

/* Tryb pionowy (win-v) – klasyczny przewijanie w dół */
html.win-v .cults-shop {
	display: block;
	height: auto;
	padding: 2rem 0;
}

html.win-v .cults-shop-grid {
	grid-template-rows: auto auto;
	grid-auto-flow: column;
	grid-auto-columns: min(380px, 45%);
	justify-content: center;
}

html.win-v .cults-shop-item {
	min-width: 0;
}

/* Błędy */
.cults-shop-error,
.cults-shop-empty {
	padding: 2rem;
	text-align: center;
	color: #888;
}
