/* ==========================================================
   GM PRODUCT EXPERIENCE
   File: assets/css/section/hero.css
   Description: Ürün Hero yerleşimi ve galeri sabitleme
   Version: 1.1.0
   ========================================================== */


/* ----------------------------------------------------------
   1. Ana Hero kapsayıcısı
   ---------------------------------------------------------- */

.gm-product-page .gm-product-hero {
	width: 100%;
	margin: 0;
	padding: 0;
}

.gm-product-page .gm-product-hero__inner {
	width: min(100%, 1440px);
	margin: 0 auto;
	padding:
		clamp(28px, 3vw, 46px)
		clamp(24px, 3vw, 48px)
		clamp(54px, 5vw, 82px);
}


/* ----------------------------------------------------------
   2. Bilgi solda, galeri sağda
   ---------------------------------------------------------- */

.gm-product-page .gm-product-hero__grid {
	display: grid;
	grid-template-columns:
		minmax(390px, 0.78fr)
		minmax(0, 1.22fr);
	column-gap: clamp(30px, 3.2vw, 52px);
	align-items: start;

	width: 100%;
	min-width: 0;
}

.gm-product-page .gm-product-hero__summary {
	grid-column: 1;
	grid-row: 1;

	width: 100%;
	min-width: 0;
}

.gm-product-page .gm-product-hero__gallery {
	grid-column: 2;
	grid-row: 1;

	width: 100%;
	min-width: 0;

	position: sticky;
	top: 120px;
	align-self: start;
}


/* ----------------------------------------------------------
   3. Galeri ana yapısı
   ---------------------------------------------------------- */

.gm-product-page .gm-product-gallery {
	width: 100%;
	min-width: 0;
	margin: 0;
}

.gm-product-page .gm-product-gallery__stage {
	position: relative;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	min-height: 0;

	overflow: hidden;

	background: #ffffff;
	border-radius: 12px;
}


/* ----------------------------------------------------------
   4. Ana görsel
   ---------------------------------------------------------- */

.gm-product-page .gm-product-gallery__main-link {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;

	padding: 0;
	margin: 0;

	overflow: hidden;
	touch-action: pan-y pinch-zoom;
	user-select: none;
	-webkit-user-drag: none;
}

.gm-product-page .gm-product-gallery__main-image {
	display: block;

	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;

	margin: 0;

	object-fit: contain;
	object-position: center;

	background: transparent;
}


/* WordPress tarafından eklenebilecek ölçü kurallarını geçersiz kılar. */

.gm-product-page .gm-product-gallery__stage img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;

	object-fit: contain;
	object-position: center;
}


/* ----------------------------------------------------------
   5. Görsel sayacı
   ---------------------------------------------------------- */

.gm-product-page .gm-product-gallery__counter {
	position: absolute;
	right: 18px;
	bottom: 18px;
	z-index: 2;

	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;

	min-width: 54px;
	min-height: 34px;
	padding: 6px 12px;

	border-radius: 999px;
	background: rgba(31, 48, 66, 0.82);

	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	color: #ffffff;

	pointer-events: none;
}


/* ----------------------------------------------------------
   6. Küçük görseller
   ---------------------------------------------------------- */

.gm-product-page .gm-product-gallery__thumbs {
	display: flex;
	align-items: center;
	gap: 12px;

	width: 100%;
	margin: 16px 0 0;
	padding: 0 0 4px;

	overflow-x: auto;
	overflow-y: hidden;

	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.gm-product-page .gm-product-gallery__thumb {
	flex: 0 0 82px;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 82px;
	height: 82px;
	padding: 0;

	overflow: hidden;

	border: 1px solid #e2ded6;
	border-radius: 8px;
	background: #ffffff;

	cursor: pointer;

	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		opacity 0.2s ease;
}

.gm-product-page .gm-product-gallery__thumb:hover {
	border-color: #b59b74;
}

.gm-product-page .gm-product-gallery__thumb.is-active {
	border-color: #b59b74;
	box-shadow: 0 0 0 2px rgba(181, 155, 116, 0.18);
}

.gm-product-page .gm-product-gallery__thumb img {
	display: block;

	width: 100% !important;
	height: 100% !important;

	object-fit: cover;
	object-position: center;
}


/* ----------------------------------------------------------
   7. Tablet
   ---------------------------------------------------------- */

@media (max-width: 1100px) {

	.gm-product-page .gm-product-hero__inner {
		padding-left: 24px;
		padding-right: 24px;
	}

	.gm-product-page .gm-product-hero__grid {
		grid-template-columns:
			minmax(350px, 0.82fr)
			minmax(0, 1.18fr);
		column-gap: 32px;
	}

	.gm-product-page .gm-product-gallery__stage { height: auto; }

}


/* ----------------------------------------------------------
   8. Mobil ve küçük tablet
   Galeri üstte, bilgiler altta
---------------------------------------------------------- */

@media (max-width: 860px) {

	.gm-product-page .gm-product-hero__inner {
		padding:
			24px
			18px
			56px;
	}

	.gm-product-page .gm-product-hero__grid {
		display: flex;
		flex-direction: column;
		gap: 32px;
	}

	.gm-product-page .gm-product-hero__gallery {
		order: 1;

		position: relative;
		top: auto;

		width: 100%;
		min-width: 0;
	}

	.gm-product-page .gm-product-hero__summary {
		order: 2;

		width: 100%;
		min-width: 0;
	}

	.gm-product-page .gm-product-gallery__stage { height: auto; }

}


/* ----------------------------------------------------------
   9. Dar mobil
   ---------------------------------------------------------- */

@media (max-width: 520px) {

	.gm-product-page .gm-product-hero__inner {
		padding-left: 14px;
		padding-right: 14px;
	}

	.gm-product-page .gm-product-gallery__stage {
		height: auto;
		border-radius: 8px;
	}

	.gm-product-page .gm-product-gallery__counter {
		right: 12px;
		bottom: 12px;

		min-width: 48px;
		min-height: 30px;
		padding: 5px 10px;

		font-size: 12px;
	}

	.gm-product-page .gm-product-gallery__thumbs {
		gap: 9px;
		margin-top: 12px;
	}

	.gm-product-page .gm-product-gallery__thumb {
		flex-basis: 64px;

		width: 64px;
		height: 64px;
	}

}

/* ==========================================================
   10. Product Tabs
   ========================================================== */

.gm-product-content {
	width: 100%;
	padding: 0 0 72px;
}

.gm-product-content__inner {
	width: min(100%, 1440px);
	margin: 0 auto;
	padding: 0 clamp(24px,3vw,48px);
}

.gm-product-content .woocommerce-tabs {
	background: #fff;
	border: 1px solid #ece7df;
	border-radius: 16px;
	overflow: hidden;
}

.gm-product-content .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;

	margin: 0;
	padding: 0;

	list-style: none;

	background: #faf8f5;
	border-bottom: 1px solid #ece7df;
}

.gm-product-content .woocommerce-tabs ul.tabs::before,
.gm-product-content .woocommerce-tabs ul.tabs::after {
	display: none;
}

.gm-product-content .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.gm-product-content .woocommerce-tabs ul.tabs li::before,
.gm-product-content .woocommerce-tabs ul.tabs li::after {
	display: none;
}

.gm-product-content .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 18px 28px;

	font-family: inherit;
	font-size: 15px;
	font-weight: 600;

	color: #4b4b4b;
	text-decoration: none;

	transition: .25s;
}

.gm-product-content .woocommerce-tabs ul.tabs li.active a {
	color: #b59b74;
}

.gm-product-content .woocommerce-Tabs-panel {
	padding: 36px;
	margin: 0;
}

.gm-product-content .woocommerce-Tabs-panel > h2:first-child {
	display: none;
}

@media (max-width:860px){

	.gm-product-content .woocommerce-tabs ul.tabs{
		overflow:auto;
		flex-wrap:nowrap;
	}

	.gm-product-content .woocommerce-tabs ul.tabs li{
		flex:0 0 auto;
	}

	.gm-product-content .woocommerce-Tabs-panel{
		padding:24px;
	}

}
