/* ==========================================================
   trberlin-style single product layout
   Wysokość desktopu narzuca środkowa kolumna z galerią
   Prawa kolumna ma własny scroll przy długich tabach
   ========================================================== */

body.single-product .qodef-page-title {
	display: none !important;
}

body.single-product #qodef-page-content.qodef-grid,
body.single-product #qodef-page-content .qodef-grid-inner {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.single-product .qodef-trberlin-grid {
	padding: 0 50px;
	box-sizing: border-box;
}

/* ---------------- SIATKA I KOLUMNY ---------------- */

.qodef-trberlin-single .qodef-trberlin-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 40px;
	align-items: stretch;
	padding: 0 !important;
}

.qodef-trberlin-col {
	position: relative;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
}

/* Prawa kolumna */

.qodef-trberlin-col--right {
	padding-right: 0;
}

/* Układ zawartości bocznych kolumn */

.qodef-trberlin-sticky {
	position: relative;
	width: 100% !important;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* ---------------- BREADCRUMBS, TITLE, PRICE ---------------- */

.qodef-trberlin-breadcrumbs,
.qodef-trberlin-breadcrumbs .woocommerce-breadcrumb {
	font-size: 11px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #999;
	margin-bottom: 18px;
}

.qodef-trberlin-breadcrumbs a {
	color: #999;
	text-decoration: none;
}

.qodef-trberlin-col--left .product_title {
	font-size: 28px;
	line-height: 36px;
	margin: 0 0 12px !important;
	text-align: center;
}

.qodef-trberlin-price {
	font-size: 16px;
	line-height: 24px;
	margin-bottom: 0;
}

.qodef-trberlin-price .price ins {
	text-decoration: none;
}

/* ---------------- FORMULARZ I KOSZYK ---------------- */

.qodef-trberlin-add-to-cart .variations {
	margin-bottom: 20px;
}

.qodef-trberlin-add-to-cart .variations td.label {
	display: none;
}

.qodef-trberlin-add-to-cart table.variations,
.qodef-trberlin-add-to-cart table.variations tbody,
.qodef-trberlin-add-to-cart table.variations tr,
.qodef-trberlin-add-to-cart table.variations td {
	display: block;
	width: auto;
}

.qodef-trberlin-add-to-cart .reset_variations {
	display: none !important;
}

.qodef-trberlin-add-to-cart .variable-items-wrapper {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.qodef-trberlin-add-to-cart .variable-item {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid transparent;
	cursor: pointer;
}

.qodef-trberlin-add-to-cart .variable-item.selected,
.qodef-trberlin-add-to-cart .variable-item:hover {
	border-color: #222;
}

.qodef-trberlin-add-to-cart select {
	width: 100%;
	max-width: 260px;
	padding: 10px 12px;
	border: 1px solid #ddd;
	background: #fff;
}

.qodef-trberlin-add-to-cart .single_add_to_cart_button,
.qodef-trberlin-add-to-cart button.button {
	width: 100%;
	max-width: 260px;
	background: #111;
	color: #fff;
	border: none;
	padding: 16px 20px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 12px;
	cursor: pointer;
}

.qodef-trberlin-add-to-cart .single_add_to_cart_button:hover {
	background: #000;
}

.qodef-trberlin-add-to-cart .quantity {
	margin-bottom: 12px;
}

.qodef-trberlin-wishlist {
	margin-top: 16px;
	text-align: center;
	max-width: 260px;
}

.qodef-trberlin-wishlist a.add_to_wishlist {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #ddd;
	border-radius: 50%;
}

.qodef-yith-wcwl--predefined.single-product .yith-wcwl-add-to-wishlist span,
.qodef-yith-wcwl--predefined .yith-wcwl-add-to-wishlist a:before {
	display: none !important;
}

.yith-wcwl-add-button .add_to_wishlist svg.yith-wcwl-icon-svg,
.yith-wcwl-add-button .add_to_wishlist img {
	margin-right: 0 !important;
	height: 20px;
}

/* ---------------- AKORDEON ---------------- */

.qodef-trberlin-accordion {
	width: 100%;
	margin: auto;
}

.qodef-trberlin-accordion-item {
	border-bottom: 1px solid #e5e5e5;
}

.qodef-trberlin-accordion-title {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: none;
	padding: 16px 0;
	font-size: 11px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	cursor: pointer;
}

.qodef-trberlin-accordion-icon {
	position: relative;
	width: 10px;
	height: 10px;
}

.qodef-trberlin-accordion-icon::before,
.qodef-trberlin-accordion-icon::after {
	content: '';
	position: absolute;
	background: #111;
}

.qodef-trberlin-accordion-icon::before {
	top: 50%;
	left: 0;
	width: 100%;
	height: 1px;
	transform: translateY(-50%);
}

.qodef-trberlin-accordion-icon::after {
	left: 50%;
	top: 0;
	width: 1px;
	height: 100%;
	transform: translateX(-50%);
	transition: transform 0.2s ease;
}

.qodef-trberlin-accordion-item.qodef--active .qodef-trberlin-accordion-icon::after {
	transform: translateX(-50%) rotate(90deg);
	opacity: 0;
}

.qodef-trberlin-accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.qodef-trberlin-accordion-item.qodef--active .qodef-trberlin-accordion-content {
	max-height: 1000px;
}

.qodef-trberlin-accordion-content-inner {
	padding: 0 0 20px;
	font-size: 13px;
	line-height: 1.7;
	color: #555;
}

/* ---------------- HEADER / FOOTER ---------------- */

.qodef-header--divided #qodef-page-header-inner {
	border-bottom: 1px solid #e5e5e5;
}

#qodef-page-footer-top-area-inner,
#qodef-page-footer-bottom-area-inner {
	border-top: 1px solid #e5e5e5;
}

/* ---------------- GALERIA ---------------- */

#wpgs-gallery {
	margin-bottom: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
	overflow: hidden !important;
}

/* Główne okno galerii */
#wpgs-gallery .wcgs-carousel {
	width: 100% !important;
	max-width: 100% !important;
	aspect-ratio: 3 / 4 !important;
	overflow: hidden !important;
}

/* Tego nie wolno blokować, bo Swiper przesuwa wrapper przez transform */
#wpgs-gallery .wcgs-carousel > .spswiper-wrapper {
	width: auto !important;
	height: 100% !important;
	aspect-ratio: auto !important;
	overflow: visible !important;
}

/* Nie narzucamy width: 100%, bo Swiper sam wylicza szerokość slajdu */
#wpgs-gallery .wcgs-carousel > .spswiper-wrapper > .spswiper-slide {
	height: 100% !important;
	aspect-ratio: auto !important;
	overflow: hidden !important;
}

/* Dopiero wewnętrzny kontener zdjęcia ma proporcję */
#wpgs-gallery .wcgs-carousel .wcgs-slider-image {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 3 / 4 !important;
	overflow: hidden !important;
}

/* Zdjęcie wypełnia slajd */
#wpgs-gallery .wcgs-carousel img.wcgs-slider-image-tag {
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	display: block !important;
	object-fit: cover !important;
	object-position: top center !important;
}

/* Miniatur nie ruszamy proporcjami głównego zdjęcia */
#wpgs-gallery .gallery-navigation-carousel,
#wpgs-gallery .gallery-navigation-carousel .spswiper-wrapper,
#wpgs-gallery .gallery-navigation-carousel .spswiper-slide,
#wpgs-gallery .gallery-navigation-carousel img {
	aspect-ratio: auto !important;
	overflow: visible;
}

/* ---------------- STRONA KATEGORII ---------------- */

.qodef-filter-holder{
	padding: 0 1.5rem;
}
.qodef-yith-wcqv--predefined .yith-wcqv-button:before{
	margin-right: 0px;
}
.qodef-woo-product-list .qodef-woo-product-image-inner .yith-wcqv-button{
	right: 18px;
    top: 52px;
}
.qodef-yith-wcwl--predefined .yith-wcwl-add-to-wishlist a:after{
	display: none;
}
.qodef-woo-product-list.qodef-item-layout--boxed-below .qodef-woo-product-content .added_to_cart, .qodef-woo-product-list.qodef-item-layout--boxed-below .qodef-woo-product-content .button:not(.yith-wcqv-button), .qodef-woo-product-list.qodef-item-layout--boxed-below .qodef-woo-product-content{
	border-color: #e5e5e5 !important;
}
.qodef-woo-product-list .qodef-woo-product-image{
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
}
.qodef-woo-product-list .qodef-woo-product-image img{
	width: 100%;
   height: 100%;
   display: block;
   object-fit: cover;
   object-position: center;
}
.qodef-page-title .qodef-m-content.qodef-content-full-width{
	padding: 0 1.5rem !important;
}
.qodef-woo-product-list h2.qodef-woo-product-title{
	font-size: 13px !important;
	line-height: 21px !important;
	text-transform: uppercase;
	font-weight: 500;
}
/* ---------------- DESKTOP ---------------- */

@media (min-width: 1025px) {

	.qodef-trberlin-single .qodef-trberlin-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 40px;
		align-items: stretch;
		overflow: visible;
	}

	.qodef-trberlin-col {
		min-width: 0;
		min-height: 0;
	}

	/* Te dwie kolumny nie mogą powiększać wysokości całego grida */

	.qodef-trberlin-col--left,
	.qodef-trberlin-col--right {
		position: relative;
		min-height: 0;
		overflow: hidden;
	}

	/* Zawartość lewej i prawej kolumny wypełnia wysokość narzuconą przez galerię */

	.qodef-trberlin-col--left > .qodef-trberlin-sticky,
	.qodef-trberlin-col--right > .qodef-trberlin-sticky {
		position: absolute;
		inset: 0;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		min-height: 0;
	}

	/* Lewa kolumna wyśrodkowana względem zdjęcia */

	.qodef-trberlin-col--left > .qodef-trberlin-sticky {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		overflow: hidden;
	}

	/* Prawa kolumna ma własny scroll */

	.qodef-trberlin-col--right > .qodef-trberlin-sticky {
		display: block;
		overflow-y: auto;
		overflow-x: hidden;
		padding-right: 15px;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}

	.qodef-trberlin-col--right > .qodef-trberlin-sticky::-webkit-scrollbar {
		width: 4px;
	}

	.qodef-trberlin-col--right > .qodef-trberlin-sticky::-webkit-scrollbar-thumb {
		background: #ddd;
		border-radius: 2px;
	}

	.qodef-trberlin-col--right > .qodef-trberlin-sticky::-webkit-scrollbar-track {
		background: transparent;
	}

	.qodef-trberlin-col--right .qodef-trberlin-accordion {
		width: 100%;
		margin-top: 0 !important;
		margin-bottom: 0 !important;
		padding-top: 24px;
		padding-bottom: 24px;
	}

	/* Długi otwarty tab nie rozpycha strony */

	.qodef-trberlin-col--right .qodef-trberlin-accordion-item.qodef--active .qodef-trberlin-accordion-content {
		max-height: none !important;
		overflow: visible;
		transition: none;
	}

	#qodef-woo-page.qodef--single form.cart {
		margin-top: 48px;
	}
}

/* ---------------- MOBILE / TABLET ---------------- */

@media (max-width: 1024px) {

	.qodef-trberlin-single .qodef-trberlin-grid {
		grid-template-columns: 1fr;
		row-gap: 30px;
		height: auto !important;
		overflow: hidden !important;
	}

	.qodef-trberlin-col--left,
	.qodef-trberlin-col--right {
		overflow: visible;
	}

	.qodef-trberlin-col--left > .qodef-trberlin-sticky,
	.qodef-trberlin-col--right > .qodef-trberlin-sticky {
		position: static;
		inset: auto;
		height: auto !important;
		max-height: none !important;
		overflow: visible;
		padding-right: 0;
	}

	.qodef-trberlin-sticky {
		position: static;
	}

	.qodef-trberlin-col--right {
		max-height: none !important;
		overflow-y: visible !important;
		padding-right: 0;
	}

	.qodef-trberlin-accordion {
		margin-top: 0;
		margin-bottom: 0;
	}

	#qodef-woo-page.qodef--single form.cart {
		margin-top: 40px !important;
	}
}

/* ---------------- DUŻE EKRANY ---------------- */

@media (min-width: 1441px) {

	.qodef-content-grid-1300 .qodef-content-grid {
		width: calc(100% - 3rem) !important;
		padding: 0 !important;
	}

	#qodef-page-footer-top-area-inner {
		padding: 3rem 1.5rem !important;
	}

	.qodef-header--divided #qodef-page-header-inner,
	#qodef-page-footer-bottom-area-inner {
		padding: 1.5rem !important;
	}

	.qodef-trberlin-accordion {
		max-width: 80%;
	}

	#qodef-woo-page.qodef--single form.cart:not(.variations_form) .quantity {
		margin-right: 0;
	}

	#qodef-woo-page.qodef--single .qodef-trberlin-add-to-cart form {
		display: flex;
		flex-direction: column;
		gap: 16px;
		margin-top: 40px;
	}
}

