/**
 * Altinkenti CRO - Product Page Styles
 * Mobile-first, performance-optimized, Shoptimizer-compatible.
 *
 * Naming: BEM with `ak-` prefix to avoid parent theme collisions.
 * Specificity: kept low; uses class selectors only (no !important).
 *
 * @package Altinkenti
 * @since 1.3.0
 */

/* ==========================================================================
   AYAR BADGE
   ========================================================================== */

.ak-ayar-badge {
	display: inline-block;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-radius: 3px;
	background: linear-gradient(135deg, #d4a843 0%, #f5d060 100%);
	color: #1a1a1a;
	margin-bottom: 8px;
	line-height: 1.4;
}

.ak-ayar-badge.ak-ayar-22 {
	background: linear-gradient(135deg, #c9952a 0%, #f5d060 100%);
}

.ak-ayar-badge.ak-ayar-14 {
	background: linear-gradient(135deg, #e8c252 0%, #fbe88a 100%);
}

.ak-ayar-badge.ak-ayar-8 {
	background: linear-gradient(135deg, #deb960 0%, #f7e5a0 100%);
}

/* ==========================================================================
   TRUST BAR
   ========================================================================== */

.ak-trust-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 0;
	margin: 12px 0;
	border-top: 1px solid #f0f0f0;
	border-bottom: 1px solid #f0f0f0;
}

.ak-trust-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #2d6b2d;
	font-weight: 500;
}

.ak-trust-item svg {
	color: #2d6b2d;
	flex-shrink: 0;
}

/* ==========================================================================
   PAYMENT MESSAGING
   ========================================================================== */

.ak-payment-messaging {
	margin: 14px 0;
	padding: 12px 14px;
	background: #fafaf7;
	border: 1px solid #f0ead6;
	border-radius: 6px;
}

.ak-havale-discount,
.ak-installment-info {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #333;
	line-height: 1.5;
}

.ak-havale-discount {
	margin-bottom: 6px;
}

.ak-havale-discount strong,
.ak-installment-info strong {
	color: #1a1a1a;
}

.ak-havale-discount em {
	color: #2d6b2d;
	font-style: normal;
	font-weight: 600;
}

.ak-payment-messaging svg {
	color: #8b7332;
	flex-shrink: 0;
}

/* ==========================================================================
   URGENCY / SCARCITY
   ========================================================================== */

.ak-urgency {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	margin: 10px 0;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
}

.ak-urgency--low-stock {
	background: #fff5f5;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.ak-urgency--low-stock svg {
	color: #dc2626;
}

.ak-urgency--general {
	background: #fefce8;
	border: 1px solid #fde68a;
	color: #92400e;
}

.ak-urgency--general svg {
	color: #d97706;
}

/* ==========================================================================
   REVIEW SUMMARY
   ========================================================================== */

.ak-review-summary {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.ak-review-summary__stars {
	display: flex;
	align-items: center;
	gap: 1px;
}

.ak-review-summary__count {
	font-size: 12px;
	color: #666;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ak-review-summary__count:hover {
	color: #333;
}

/* ==========================================================================
   WHY BUY BLOCK
   ========================================================================== */

.ak-why-buy {
	margin: 20px 0 16px;
	padding: 16px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.ak-why-buy__title {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px;
	padding: 0;
	color: #1a1a1a;
}

.ak-why-buy__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ak-why-buy__list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 6px 0;
	font-size: 13px;
	color: #374151;
	line-height: 1.5;
}

.ak-why-buy__list li svg {
	color: #2d6b2d;
	flex-shrink: 0;
	margin-top: 2px;
}

/* ==========================================================================
   STORE LEGITIMACY
   ========================================================================== */

.ak-store-legitimacy {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 12px 0;
	padding: 10px 0;
	font-size: 13px;
}

.ak-store-legitimacy__item {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #555;
}

.ak-store-legitimacy__whatsapp {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #25d366;
	color: #fff;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease;
}

.ak-store-legitimacy__whatsapp:hover,
.ak-store-legitimacy__whatsapp:focus {
	background: #1da851;
	color: #fff;
}

.ak-store-legitimacy__whatsapp svg {
	width: 14px;
	height: 14px;
}

/* ==========================================================================
   SOCIAL PROOF
   ========================================================================== */

.ak-social-proof {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	font-size: 13px;
	color: #555;
}

.ak-social-proof svg {
	color: #6b7280;
	flex-shrink: 0;
}

/* ==========================================================================
   SHIPPING REASSURANCE
   Rendered in woocommerce_after_single_product_summary — needs to match
   Shoptimizer's container width (.product-details-wrapper = max 1170px).
   ========================================================================== */

.ak-shipping-reassurance {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	padding: 24px 1em;
	margin: 0 auto 24px;
	max-width: 1170px;
	border-bottom: 1px solid #f0f0f0;
}

.ak-shipping-reassurance__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	text-align: left;
}

.ak-shipping-reassurance__item svg {
	color: #8b7332;
	flex-shrink: 0;
	margin-top: 2px;
}

.ak-shipping-reassurance__item div {
	display: flex;
	flex-direction: column;
}

.ak-shipping-reassurance__item strong {
	font-size: 13px;
	color: #1a1a1a;
	margin-bottom: 2px;
}

.ak-shipping-reassurance__item span {
	font-size: 11px;
	color: #6b7280;
	line-height: 1.4;
}

/* ==========================================================================
   FAQ ACCORDION
   Rendered in woocommerce_after_single_product_summary — needs to match
   Shoptimizer's container width (.product-details-wrapper = max 1170px).
   ========================================================================== */

.ak-faq-section {
	margin: 24px auto;
	max-width: 1170px;
	padding-top: 40px;
}

.ak-faq-section__title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 16px;
	padding: 0;
	color: #1a1a1a;
}

.ak-faq-item {
	border-bottom: 1px solid #e5e7eb;
}

.ak-faq-item:first-child {
	border-top: 1px solid #e5e7eb;
}

.ak-faq-item__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 0;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	text-align: left;
	line-height: 1.4;
	font-family: inherit;
}

.ak-faq-item__question:hover,
.ak-faq-item__question:focus-visible {
	color: #8b7332;
	outline: none;
}

.ak-faq-item__question:focus-visible {
	outline: 2px solid #8b7332;
	outline-offset: 2px;
	border-radius: 2px;
}

.ak-faq-item__question svg {
	flex-shrink: 0;
	transition: transform 0.2s ease;
	margin-left: 12px;
}

.ak-faq-item__question[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.ak-faq-item__answer {
	padding: 0 0 14px;
	font-size: 13px;
	color: #4b5563;
	line-height: 1.6;
}

.ak-faq-item__answer[hidden] {
	display: none;
}

.ak-faq-item__answer p {
	margin: 0;
}

/* ==========================================================================
   MOBILE STICKY ADD TO CART
   Fixed height prevents CLS. Safe-area padding for iPhone notch/home bar.
   ========================================================================== */

.ak-sticky-atc {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: #fff;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	transform: translateY(100%);
	transition: transform 0.3s ease;
	padding: 10px 16px;
	padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	display: none; /* Hidden on desktop by default */
}

.ak-sticky-atc.is-visible {
	transform: translateY(0);
}

.ak-sticky-atc__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
}

.ak-sticky-atc__product {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.ak-sticky-atc__image {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
}

.ak-sticky-atc__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ak-sticky-atc__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ak-sticky-atc__title {
	font-size: 12px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ak-sticky-atc__price {
	font-size: 13px;
	font-weight: 700;
	color: #8b7332;
}

.ak-sticky-atc__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	background: #1a1a1a;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	border-radius: 4px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease;
	flex-shrink: 0;
}

.ak-sticky-atc__button:hover,
.ak-sticky-atc__button:focus {
	background: #333;
	color: #fff;
}

/* ==========================================================================
   CTA PROMINENCE ENHANCEMENT
   Scoped to .single-product to avoid PLP interference.
   Works WITH Shoptimizer's existing button layout (float + calc width).
   We only enhance color/weight, not dimensions.
   ========================================================================== */

.single-product div.product .summary .single_add_to_cart_button {
	font-weight: 700;
	border-radius: 6px;
	text-transform: none;
	letter-spacing: 0;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.single-product div.product .summary .single_add_to_cart_button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   SHOPTIMIZER COMPATIBILITY
   Ensure CRO blocks render correctly within Shoptimizer's
   product-details-wrapper structure.
   ========================================================================== */

/* Shoptimizer wraps summary content; ensure our blocks don't break flow */
.single-product div.product .summary .ak-trust-bar,
.single-product div.product .summary .ak-payment-messaging,
.single-product div.product .summary .ak-urgency,
.single-product div.product .summary .ak-why-buy,
.single-product div.product .summary .ak-store-legitimacy,
.single-product div.product .summary .ak-social-proof {
	clear: both;
}

/* When Shoptimizer uses skinny gallery (pdp-g-skinny), summary is narrower */
.pdp-g-skinny .ak-shipping-reassurance {
	grid-template-columns: repeat(2, 1fr);
}

/* Ensure after-summary blocks don't overflow on any screen */
.ak-shipping-reassurance,
.ak-faq-section {
	box-sizing: border-box;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
	.ak-sticky-atc {
		display: block;
	}

	.ak-shipping-reassurance {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		padding: 16px 1em;
	}

	.ak-store-legitimacy {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.ak-trust-bar {
		gap: 8px;
	}

	.ak-trust-item {
		font-size: 11px;
	}

	.ak-faq-section {
		padding: 0 1em;
	}
}

@media (max-width: 480px) {
	.ak-shipping-reassurance {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.ak-payment-messaging {
		padding: 10px 12px;
	}

	.ak-why-buy {
		padding: 12px;
	}

	.ak-faq-item__question {
		font-size: 13px;
	}
}

@media (min-width: 993px) {
	.ak-shipping-reassurance,
	.ak-faq-section {
		padding-left: 2.617924em;
		padding-right: 2.617924em;
	}
}

/* ==========================================================================
   REDUCED MOTION
   Respect user preference for reduced motion.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.ak-sticky-atc {
		transition: none;
	}

	.ak-faq-item__question svg {
		transition: none;
	}

	.single-product div.product .summary .single_add_to_cart_button:hover {
		transform: none;
	}
}
