/* ===========================================================================
   Hasine Koç — Single Product (Mermerica-style)
   =========================================================================== */

:root {
	--hk-bg: #ffffff;
	--hk-fg: #171717;
	--hk-neutral-50:  #fafafa;
	--hk-neutral-100: #f5f5f5;
	--hk-neutral-200: #e5e5e5;
	--hk-neutral-300: #d4d4d4;
	--hk-neutral-400: #a3a3a3;
	--hk-neutral-500: #737373;
	--hk-neutral-600: #525252;
	--hk-neutral-700: #404040;
	--hk-neutral-800: #262626;
	--hk-neutral-900: #171717;
	--hk-red-100:     #fee2e2;
	--hk-red-600:     #dc2626;
	--hk-red-800:     #991b1b;
	--hk-green-100:   #dcfce7;
	--hk-green-800:   #166534;
}

/* ---------- Base ---------- */
.single-product .site-content,
.single-product .elementor-location-single {
	background: var(--hk-bg);
	color: var(--hk-fg);
}

/* ===========================================================================
   Sticky right info panel (desktop only)
   ---------------------------------------------------------------------------
   Elementor Pro 4.0.4 column-level "sticky" setting did not emit data-settings
   on our template — we drive sticky from CSS instead.

   Critical bits learned the hard way:
   - The sticky target must be a flex item whose container has align-items
     other than "stretch", or itself have align-self:flex-start. Elementor's
     .elementor-container default is align-items: stretch, which forces both
     columns to the same (tallest) height and breaks sticky. So we override
     the container's align-items here.
   - No ancestor (html, body, .site-content, section, container) may have
     overflow other than visible. WP block themes' :where(body) sets margin:0
     but no overflow; Elementor's section is fine. We make sure with overflow
     overrides on the immediate ancestors.
   - position: sticky needs a usable scroll context. The 2-column section's
     container is the scroll context; left column (gallery) drives its full
     height, right column stays short and sticks.
   =========================================================================== */
@media (min-width: 1024px) {
	/* Container: don't stretch the right column to match the gallery. */
	body.single-product .elementor-section.elementor-top-section > .elementor-container {
		align-items: flex-start !important;
	}
	/* Make sure no ancestor traps us with overflow. */
	body.single-product .elementor-section.elementor-top-section,
	body.single-product .elementor-section.elementor-top-section > .elementor-container {
		overflow: visible !important;
	}
	/* Right column itself: sticky. */
	body.single-product .elementor-section.elementor-top-section > .elementor-container > .elementor-top-column.elementor-col-50:nth-child(2),
	.hk-sticky-panel {
		position: sticky !important;
		top: 32px !important;
		align-self: flex-start !important;
		z-index: 1;
	}
}

@media (max-width: 1023px) {
	body.single-product .elementor-section.elementor-top-section > .elementor-container > .elementor-top-column.elementor-col-50:nth-child(2),
	.hk-sticky-panel {
		position: static !important;
		top: auto !important;
	}
}

/* ---------- Vendor + stock badges ---------- */
.hk-badges-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.hk-vendor-badge {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--hk-neutral-500);
}
.hk-stock-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.hk-stock-pill.in {
	background: var(--hk-green-100);
	color: var(--hk-green-800);
}
.hk-stock-pill.out {
	background: var(--hk-red-100);
	color: var(--hk-red-800);
}

/* ---------- Title ---------- */
.elementor-widget-woocommerce-product-title h1.product_title {
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.15;
	font-weight: 700;
	color: var(--hk-neutral-900);
	margin: 0 0 16px;
	letter-spacing: -0.01em;
}

/* ---------- Price ---------- */
.elementor-widget-woocommerce-product-price .price {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--hk-neutral-900);
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
}
.elementor-widget-woocommerce-product-price .price del {
	font-size: 1rem;
	color: var(--hk-neutral-400);
	font-weight: 400;
}
.elementor-widget-woocommerce-product-price .price ins {
	background: transparent;
	text-decoration: none;
}
.hk-discount-pill {
	display: inline-block;
	padding: 2px 8px;
	background: var(--hk-red-100);
	color: var(--hk-red-800);
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 600;
}

/* ---------- Divider ---------- */
.hk-divider {
	height: 1px;
	background: var(--hk-neutral-200);
	margin: 24px 0;
	border: 0;
}

/* ===========================================================================
   Variation form — turn <select> into pill buttons
   =========================================================================== */
.hk-variations-wrapper .variations {
	margin: 0;
}
.hk-variations-wrapper .variations,
.hk-variations-wrapper .variations tbody,
.hk-variations-wrapper .variations tr,
.hk-variations-wrapper .variations td,
.hk-variations-wrapper .variations th {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
}
.hk-variations-wrapper .variations label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hk-neutral-900);
	margin: 0 0 10px;
	letter-spacing: 0.02em;
}
.hk-variations-wrapper .variations select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
.hk-pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
}
.hk-pill {
	min-width: 56px;
	padding: 10px 16px;
	background: #fff;
	border: 1px solid var(--hk-neutral-200);
	color: var(--hk-neutral-900);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 200ms ease;
	user-select: none;
	text-align: center;
}
.hk-pill:hover {
	border-color: var(--hk-neutral-400);
}
.hk-pill.is-active {
	background: var(--hk-neutral-900);
	color: #fff;
	border-color: var(--hk-neutral-900);
}
.hk-pill.is-disabled {
	opacity: 0.4;
	pointer-events: none;
	text-decoration: line-through;
}
.hk-variations-wrapper .reset_variations {
	font-size: 0.75rem;
	color: var(--hk-neutral-500);
	margin-left: 8px;
}

/* ===========================================================================
   Custom measurements form
   =========================================================================== */
.hk-measurements {
	display: none;
	margin: 8px 0 16px;
	padding: 16px;
	background: var(--hk-neutral-50);
	border: 1px solid var(--hk-neutral-200);
	border-radius: 4px;
}
.hk-measurements.is-visible {
	display: block;
}
.hk-measurements__title {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hk-neutral-900);
	margin: 0 0 4px;
}
.hk-measurements__hint {
	font-size: 0.75rem;
	color: var(--hk-neutral-500);
	margin: 0 0 12px;
}
.hk-measurements__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-bottom: 10px;
}
.hk-measurements__field label {
	display: block;
	font-size: 0.75rem;
	color: var(--hk-neutral-600);
	margin-bottom: 4px;
}
.hk-measurements__field input,
.hk-measurements__note textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--hk-neutral-200);
	background: #fff;
	font-size: 0.875rem;
	color: var(--hk-neutral-900);
	border-radius: 0;
	transition: border-color 150ms ease;
	-webkit-appearance: none;
	appearance: none;
}
.hk-measurements__field input:focus,
.hk-measurements__note textarea:focus {
	outline: none;
	border-color: var(--hk-neutral-900);
}
.hk-measurements__note textarea {
	resize: vertical;
	min-height: 72px;
	font-family: inherit;
}

/* ===========================================================================
   Add-to-cart + WhatsApp buttons
   =========================================================================== */
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button,
.hk-add-to-cart-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 56px;
	background: var(--hk-neutral-900);
	color: #fff;
	border: 0;
	border-radius: 0;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 200ms ease, transform 100ms ease;
}
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button:hover {
	background: var(--hk-neutral-800);
}
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button:active {
	transform: scale(0.985);
}
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button.disabled,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button[disabled] {
	background: var(--hk-neutral-200);
	color: var(--hk-neutral-500);
	cursor: not-allowed;
}
/* Hide quantity selector — Mermerica style is qty=1 */
.elementor-widget-woocommerce-product-add-to-cart .quantity {
	display: none !important;
}

.hk-whatsapp-btn .elementor-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 48px;
	background: #fff;
	color: var(--hk-neutral-900);
	border: 1px solid var(--hk-neutral-200);
	border-radius: 0;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background 200ms ease, border-color 200ms ease;
}
.hk-whatsapp-btn .elementor-button:hover {
	background: var(--hk-neutral-100);
	border-color: var(--hk-neutral-400);
}

/* ===========================================================================
   Trust badges grid (2x2)
   =========================================================================== */
.hk-trust-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	padding: 20px 0;
	border-top: 1px solid var(--hk-neutral-200);
	border-bottom: 1px solid var(--hk-neutral-200);
	margin: 24px 0;
}
.hk-trust {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.hk-trust__icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	color: var(--hk-neutral-700);
}
.hk-trust__title {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--hk-neutral-900);
	margin: 0 0 2px;
	line-height: 1.3;
}
.hk-trust__sub {
	font-size: 0.75rem;
	color: var(--hk-neutral-500);
	margin: 0;
	line-height: 1.4;
}

/* ===========================================================================
   Tabs / Accordion (Description + Details)
   =========================================================================== */
.hk-tabs {
	margin-top: 32px;
}
.elementor-widget-woocommerce-product-data-tabs .wc-tabs {
	border-bottom: 1px solid var(--hk-neutral-200);
	margin-bottom: 24px;
	padding: 0;
}
.elementor-widget-woocommerce-product-data-tabs .wc-tabs li {
	margin: 0 24px 0 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
}
.elementor-widget-woocommerce-product-data-tabs .wc-tabs li::before,
.elementor-widget-woocommerce-product-data-tabs .wc-tabs li::after {
	display: none;
}
.elementor-widget-woocommerce-product-data-tabs .wc-tabs li a {
	padding: 12px 0;
	color: var(--hk-neutral-500);
	font-size: 0.875rem;
	font-weight: 500;
	border-bottom: 2px solid transparent;
	transition: color 200ms ease, border-color 200ms ease;
}
.elementor-widget-woocommerce-product-data-tabs .wc-tabs li.active a,
.elementor-widget-woocommerce-product-data-tabs .wc-tabs li a:hover {
	color: var(--hk-neutral-900);
	border-bottom-color: var(--hk-neutral-900);
}

/* Elementor accordion (Details) — chevron rotation */
.hk-accordion .elementor-accordion-item,
.hk-accordion .e-n-accordion-item {
	border-top: 1px solid var(--hk-neutral-200);
	border-radius: 0 !important;
	background: transparent;
}
.hk-accordion .elementor-tab-title {
	padding: 18px 0 !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	color: var(--hk-neutral-900) !important;
	background: transparent !important;
	border: 0 !important;
}
.hk-accordion .elementor-tab-title.elementor-active .elementor-accordion-icon i {
	transform: rotate(180deg);
	transition: transform 200ms ease;
}
.hk-accordion .elementor-tab-content {
	padding: 0 0 18px !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--hk-neutral-600) !important;
	font-size: 0.875rem !important;
	line-height: 1.7 !important;
}

/* ===========================================================================
   Product gallery — Elementor Pro Product Images widget
   Desktop: vertical stacked. Mobile: native flex-slider with thumbnails.
   =========================================================================== */
@media (min-width: 1024px) {
	.elementor-widget-woocommerce-product-images .woocommerce-product-gallery {
		display: flex;
		flex-direction: column;
		gap: 8px;
		width: 100% !important;
	}
	.elementor-widget-woocommerce-product-images .woocommerce-product-gallery .flex-control-thumbs {
		display: none;
	}
	.elementor-widget-woocommerce-product-images .flex-viewport {
		height: auto !important;
	}
	.elementor-widget-woocommerce-product-images .woocommerce-product-gallery__wrapper {
		display: flex !important;
		flex-direction: column;
		gap: 8px;
		transform: none !important;
		width: 100% !important;
	}
	.elementor-widget-woocommerce-product-images .woocommerce-product-gallery__image {
		width: 100% !important;
		float: none !important;
	}
	.elementor-widget-woocommerce-product-images .woocommerce-product-gallery__image img {
		width: 100%;
		height: auto;
		background: var(--hk-neutral-50);
	}
	.elementor-widget-woocommerce-product-images .flex-direction-nav {
		display: none;
	}
}
@media (max-width: 1023px) {
	.elementor-widget-woocommerce-product-images .flex-control-thumbs {
		margin-top: 8px;
		display: flex;
		gap: 8px;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.elementor-widget-woocommerce-product-images .flex-control-thumbs::-webkit-scrollbar {
		display: none;
	}
	.elementor-widget-woocommerce-product-images .flex-control-thumbs li {
		width: 64px !important;
		height: 64px !important;
		flex-shrink: 0;
	}
	.elementor-widget-woocommerce-product-images .flex-control-thumbs li img {
		opacity: 0.7;
		transition: opacity 200ms ease;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.elementor-widget-woocommerce-product-images .flex-control-thumbs li img.flex-active,
	.elementor-widget-woocommerce-product-images .flex-control-thumbs li img:hover {
		opacity: 1;
		outline: 2px solid var(--hk-neutral-900);
		outline-offset: 2px;
	}
}

/* WooCommerce sale flash on gallery */
.woocommerce span.onsale {
	background: var(--hk-red-600);
	color: #fff;
	border-radius: 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	padding: 4px 10px;
	min-height: auto;
	min-width: auto;
	line-height: 1.4;
}

/* ===========================================================================
   Breadcrumb
   =========================================================================== */
.elementor-widget-woocommerce-breadcrumb .woocommerce-breadcrumb {
	font-size: 0.8125rem;
	color: var(--hk-neutral-500);
	margin-bottom: 24px;
}
.elementor-widget-woocommerce-breadcrumb .woocommerce-breadcrumb a {
	color: var(--hk-neutral-500);
	transition: color 150ms ease;
}
.elementor-widget-woocommerce-breadcrumb .woocommerce-breadcrumb a:hover {
	color: var(--hk-neutral-900);
}

/* ===========================================================================
   Related products
   =========================================================================== */
.elementor-widget-woocommerce-product-related .related.products > h2 {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--hk-neutral-900);
	margin: 0 0 24px;
	letter-spacing: -0.01em;
}
.elementor-widget-woocommerce-product-related ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--hk-neutral-900);
	margin: 12px 0 4px;
}
.elementor-widget-woocommerce-product-related ul.products li.product .price {
	font-size: 0.875rem;
	color: var(--hk-neutral-700);
}
@media (max-width: 767px) {
	.elementor-widget-woocommerce-product-related ul.products {
		display: flex !important;
		overflow-x: auto;
		gap: 16px;
		scrollbar-width: none;
		scroll-snap-type: x mandatory;
	}
	.elementor-widget-woocommerce-product-related ul.products::-webkit-scrollbar { display: none; }
	.elementor-widget-woocommerce-product-related ul.products li.product {
		flex: 0 0 60%;
		margin: 0 !important;
		scroll-snap-align: start;
	}
}

/* ===========================================================================
   Bilgi Akordeonu (Kargo & İade / Beden Ölçüsü)
   Ölçü formunun yerine geçti — native <details>/<summary>, JS gerektirmez.
   =========================================================================== */
.hk-accordion {
	margin: 20px 0 8px;
	border-top: 1px solid var(--hk-neutral-200);
}
.hk-acc__item {
	border-bottom: 1px solid var(--hk-neutral-200);
}
.hk-acc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 2px;
	cursor: pointer;
	list-style: none;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--hk-neutral-900);
	user-select: none;
}
.hk-acc__head::-webkit-details-marker { display: none; }
.hk-acc__head:hover { color: var(--hk-neutral-600); }
.hk-acc__icon {
	position: relative;
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
}
.hk-acc__icon::before,
.hk-acc__icon::after {
	content: "";
	position: absolute;
	background: var(--hk-neutral-700);
	transition: transform 0.25s ease, opacity 0.25s ease;
}
.hk-acc__icon::before { top: 6px; left: 0; width: 14px; height: 2px; }            /* yatay */
.hk-acc__icon::after  { top: 0; left: 6px; width: 2px; height: 14px; }            /* dikey */
.hk-acc__item[open] .hk-acc__icon::after { opacity: 0; transform: scaleY(0); }    /* açıkken - */
.hk-acc__body {
	padding: 0 2px 18px;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--hk-neutral-600);
	animation: hk-acc-fade 0.25s ease;
}
.hk-acc__body p { margin: 0; }
@keyframes hk-acc-fade {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ===========================================================================
   Sepete Ekle butonu — kesin siyah zemin + beyaz yazı
   (Elementor/tema global mor buton rengini ezmek için yüksek özgüllük + !important)
   =========================================================================== */
.single-product .single_add_to_cart_button,
.single-product .single_add_to_cart_button.button,
.single-product .single_add_to_cart_button.button.alt,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button {
	background-color: #171717 !important;
	background-image: none !important;
	color: #ffffff !important;
	border-color: #171717 !important;
}
.single-product .single_add_to_cart_button:hover,
.single-product .single_add_to_cart_button.button:hover,
.single-product .single_add_to_cart_button.button.alt:hover,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button:hover,
.single-product .single_add_to_cart_button:focus,
.elementor-widget-woocommerce-product-add-to-cart .single_add_to_cart_button:focus {
	background-color: #262626 !important;
	color: #ffffff !important;
	border-color: #262626 !important;
}
