/* GCL Single Product CSS - from content-single-product.php L761-1259 - GCL-CLEANUP 2026-01-31 */
/* Style dla kontroli ilości i przycisku "Dodaj do koszyka" (jak w cart) */
.gcl-product-purchase {
	margin-top: 1.5rem;
}

.gcl-product-price {
	margin-bottom: 1rem;
	color: #e3335a;
}

.gcl-product-price .woocommerce-Price-amount,
.gcl-product-price .price {
	color: #e3335a;
}

.gcl-qty-controls {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1.5px solid #e5e7eb;
	border-radius: 30px;
	padding: 4px;
	background: #fff;
	justify-content: flex-start;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.gcl-qty-btn {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.2s;
	padding: 0;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-qty-btn svg {
	width: 16px;
	height: 16px;
	stroke-width: 2.5;
	pointer-events: none;
}

.gcl-qty-btn:hover:not(:disabled) {
	color: #111827;
	background: #f3f4f6;
	border-radius: 4px;
}

.gcl-qty-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.gcl-qty-display {
	width: 40px;
	min-width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 16px;
	color: #111827;
	text-align: center;
}


.gcl-out-of-stock {
	margin-top: 1rem;
}

/* Przycisk "Dodaj do koszyka" - zapobieganie zaznaczaniu */
.gcl-add-to-cart-form button[type="submit"],
.gcl-add-to-cart-form .fap-button {
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

/* Ogólne style dla wszystkich elementów interaktywnych w galerii */
.gcl-gallery-container * {
	-webkit-tap-highlight-color: transparent;
}

.gcl-gallery-container img,
.gcl-gallery-container a {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* RWD dla sekcji purchase */
@media (max-width: 640px) {
	.gcl-product-purchase .flex {
		flex-direction: column;
		width: 100%;
	}
	
	.gcl-qty-controls {
		width: auto;
	}
}

/* Product summary - sticky na desktop, static na mobile */
.product-summary {
	position: sticky;
	top: 24px;
	width: 100%;
	height: fit-content;
}

@media (max-width: 768px) {
	.product-summary {
		position: static;
	}
}

/* Galeria produktu - nowoczesny design 2025 */
.gcl-product-gallery-wrapper {
	position: relative;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-gallery-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Główny obraz produktu - widoczny w całości */
.gcl-gallery-main {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 12px;
	background: #f9fafb;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gcl-gallery-main-link {
	display: block;
	width: 100%;
	height: 100%;
	cursor: pointer;
	transition: opacity 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-gallery-main-link:hover {
	opacity: 0.95;
}

.gcl-gallery-main-img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	-webkit-tap-highlight-color: transparent;
}

/* Slider miniatur */
.gcl-gallery-thumbs {
	margin-top: 16px;
	width: 100%;
}

.gcl-gallery-thumbs-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.gcl-gallery-thumbs-slider .swiper-wrapper {
	display: flex;
	align-items: stretch;
}

.gcl-gallery-thumbs-slider .swiper-slide {
	height: auto;
	display: flex;
	flex-shrink: 0;
	width: auto;
}

.gcl-gallery-thumb-link {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 8px;
	border: 2px solid transparent;
	background: #f9fafb;
	transition: all 0.3s ease;
	cursor: pointer;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-gallery-thumb-link:hover {
	border-color: #e3335a;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(241, 14, 116, 0.15);
}

.gcl-gallery-thumb-link.active {
	border-color: #e3335a;
	box-shadow: 0 0 0 2px rgba(241, 14, 116, 0.2);
}

.gcl-gallery-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	-webkit-tap-highlight-color: transparent;
}

/* Nawigacja slidera miniatur - używa standardowych stylów Swiper z tematu */
.gcl-gallery-thumbs-slider {
	position: relative;
}

.gcl-gallery-thumbs-slider .swiper-button-prev,
.gcl-gallery-thumbs-slider .swiper-button-next {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	z-index: 10 !important;
	margin: 0 !important;
	left: auto !important;
	right: auto !important;
}

.gcl-gallery-thumbs-slider .swiper-button-prev {
	left: 0 !important;
	right: auto !important;
}

.gcl-gallery-thumbs-slider .swiper-button-next {
	right: 0 !important;
	left: auto !important;
}

/* Fallback: grid dla miniatur gdy Swiper nie jest dostępny */
.gcl-gallery-thumbs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	padding: 0 !important;
}

.gcl-gallery-thumbs-grid .swiper-wrapper {
	display: contents;
}

.gcl-gallery-thumbs-grid .swiper-slide {
	width: 100% !important;
	margin: 0 !important;
}

.gcl-gallery-thumbs-grid .gcl-gallery-thumbs-nav {
	display: none;
}

@media (max-width: 640px) {
	.gcl-gallery-thumbs-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Fallback dla standardowej galerii WooCommerce */
.gcl-product-gallery-wrapper .woocommerce-product-gallery__image {
	cursor: pointer;
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-product-gallery-wrapper .woocommerce-product-gallery__image img {
	transition: transform 0.3s ease;
	width: 100%;
	height: auto;
	display: block;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-product-gallery-wrapper .woocommerce-product-gallery__image:hover img {
	transform: scale(1.05);
}

/* Lightbox modal */
.gcl-lightbox {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.95);
	overflow: auto;
	animation: fadeIn 0.3s;
}

.gcl-lightbox.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

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

.gcl-lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	margin: auto;
	text-align: center;
}

.gcl-lightbox-content img {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 8px;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-lightbox-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #fff;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	z-index: 10000;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	transition: background 0.3s;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.gcl-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #fff;
	font-size: 30px;
	font-weight: bold;
	cursor: pointer;
	z-index: 10000;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	transition: background 0.3s;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.gcl-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.2);
}

.gcl-lightbox-prev {
	left: 20px;
}

.gcl-lightbox-next {
	right: 20px;
}

.gcl-lightbox-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 14px;
	background: rgba(0, 0, 0, 0.5);
	padding: 8px 16px;
	border-radius: 20px;
}

/* RWD dla galerii */
@media (max-width: 768px) {
	.gcl-gallery-main {
		aspect-ratio: 1;
		border-radius: 8px;
	}
	
	
	.gcl-lightbox-close {
		top: 10px;
		right: 15px;
		font-size: 30px;
		width: 40px;
		height: 40px;
	}
	
	.gcl-lightbox-nav {
		width: 40px;
		height: 40px;
		font-size: 24px;
	}
	
	.gcl-lightbox-prev {
		left: 10px;
	}
	
	.gcl-lightbox-next {
		right: 10px;
	}
}
