/* ==========================================================================
   BA ORGANIC - PREMIUM HIGH-CONVERSION PRODUCT PAGE STYLING
   Optimized for Pakistani Cash on Delivery Market & Modern Mobile First CRO
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Clean Up / Hide Distracting Default WooCommerce & Astra Elements
   -------------------------------------------------------------------------- */
.single-product form.cart:not(#ba-onpage-order-form) .quantity,
.single-product form.cart:not(#ba-onpage-order-form) .single_add_to_cart_button,
.ast-single-product-payments,
.elementor-element-da092c6,
.elementor-element-92fec7c {
	display: none !important;
}

/* --------------------------------------------------------------------------
   2. Product Gallery Transformation (Modern Luxury Presentation)
   -------------------------------------------------------------------------- */
.woocommerce-product-gallery {
	position: relative !important;
	border-radius: 18px !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
	border-radius: 18px !important;
	overflow: hidden !important;
	background: #FFFFFF !important;
	border: 1.5px solid #E5E7EB !important;
	box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05) !important;
	transition: all 0.3s ease !important;
}

.woocommerce-product-gallery .woocommerce-product-gallery__image img {
	aspect-ratio: 1 / 1 !important;
	object-fit: contain !important;
	display: block !important;
	margin: 0 auto !important;
	max-height: 520px !important;
	width: 100% !important;
	background: radial-gradient(circle at center, #FFFFFF 65%, #F4F7F4 100%) !important;
	padding: 16px !important;
}

/* Floating Pills on Gallery */
.ba-gallery-floating-badges {
	position: absolute;
	top: 14px;
	left: 14px;
	right: 14px;
	z-index: 9;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
}

.ba-badge-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 700;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.ba-badge-herbal {
	background: #0F5132;
	color: #FFFFFF;
	border: 1px solid #198754;
}

.ba-badge-cod {
	background: #111827;
	color: #FBBF24;
	border: 1px solid #374151;
}

/* Gallery Thumbnails Grid */
.woocommerce-product-gallery .flex-control-thumbs,
.woocommerce-product-gallery .thumbnails,
.woocommerce-product-gallery ol.flex-control-nav {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 10px !important;
	margin-top: 14px !important;
	padding: 0 !important;
	list-style: none !important;
	justify-content: flex-start !important;
}

.woocommerce-product-gallery .flex-control-thumbs li,
.woocommerce-product-gallery .thumbnails a {
	flex: 0 0 calc(20% - 8px) !important;
	max-width: 85px !important;
	aspect-ratio: 1 / 1 !important;
	border-radius: 12px !important;
	border: 2px solid #E5E7EB !important;
	overflow: hidden !important;
	cursor: pointer !important;
	transition: all 0.25s ease !important;
	background: #FFFFFF !important;
}

.woocommerce-product-gallery .flex-control-thumbs li:hover,
.woocommerce-product-gallery .thumbnails a:hover {
	border-color: #0F5132 !important;
	transform: translateY(-2px) !important;
}

.woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs li.active {
	border-color: #0F5132 !important;
	box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.2) !important;
	transform: translateY(-2px) !important;
}

.woocommerce-product-gallery .flex-control-thumbs li img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
}

/* --------------------------------------------------------------------------
   3. Product Summary Typography & Price Styling
   -------------------------------------------------------------------------- */
.summary.entry-summary {
	padding-left: 10px;
}

.summary.entry-summary .product_title {
	font-size: 30px !important;
	font-weight: 800 !important;
	color: #111827 !important;
	line-height: 1.25 !important;
	margin-bottom: 8px !important;
	letter-spacing: -0.02em !important;
}

.summary.entry-summary .woocommerce-product-rating {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	margin-bottom: 12px !important;
}

.summary.entry-summary .star-rating {
	color: #F59E0B !important;
	font-size: 15px !important;
}

.summary.entry-summary .woocommerce-review-link {
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #0F5132 !important;
}

.summary.entry-summary p.price {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
	margin: 12px 0 16px !important;
}

.summary.entry-summary p.price del {
	font-size: 18px !important;
	color: #9CA3AF !important;
	font-weight: 500 !important;
	text-decoration: line-through !important;
}

.summary.entry-summary p.price ins {
	font-size: 32px !important;
	font-weight: 800 !important;
	color: #0F5132 !important;
	text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   4. Value Stack Micro-Cards (Benefits Breakdown)
   -------------------------------------------------------------------------- */
.ba-product-value-stack {
	background: #F8FAF9;
	border: 1px solid #D1FAE5;
	border-radius: 14px;
	padding: 16px;
	margin: 18px 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	direction: rtl;
	text-align: right;
}

.ba-value-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.ba-value-icon {
	font-size: 20px;
	flex-shrink: 0;
	line-height: 1.2;
}

.ba-value-content strong {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #064E3B;
	margin-bottom: 2px;
}

.ba-value-content p {
	font-size: 11px;
	color: #4B5563;
	margin: 0;
	line-height: 1.35;
}

/* --------------------------------------------------------------------------
   5. Direct On-Page Cash on Delivery Order Box
   -------------------------------------------------------------------------- */
.ba-onpage-order-box {
	background: #FFFFFF;
	border: 2px solid #0F5132;
	border-radius: 18px;
	padding: 24px;
	margin: 24px 0 32px;
	box-shadow: 0 12px 35px -8px rgba(15, 81, 50, 0.16);
	direction: rtl;
	text-align: right;
	position: relative;
}

.ba-order-header {
	text-align: center;
	margin-bottom: 20px;
	border-bottom: 1px solid #E5E7EB;
	padding-bottom: 14px;
}

.ba-order-header__tag {
	display: inline-block;
	background: #FEF3C7;
	color: #92400E;
	font-size: 13px;
	font-weight: 800;
	padding: 4px 14px;
	border-radius: 9999px;
	margin-bottom: 8px;
}

.ba-order-header__title {
	font-size: 22px;
	font-weight: 800;
	color: #064E3B;
	margin: 0 0 6px;
	line-height: 1.3;
}

.ba-order-header__sub {
	font-size: 13px;
	color: #4B5563;
	margin: 0;
	line-height: 1.5;
}

/* Form Sections */
.ba-form-section {
	margin-bottom: 18px;
}

.ba-section-label {
	display: block;
	font-size: 14px;
	font-weight: 800;
	color: #111827;
	margin-bottom: 10px;
}

/* Bundle Options Radios */
.ba-bundle-radios {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ba-bundle-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #F9FAFB;
	border: 1.5px solid #D1D5DB;
	border-radius: 12px;
	padding: 14px 16px;
	cursor: pointer;
	position: relative;
	transition: all 0.2s ease;
}

.ba-bundle-option:hover,
.ba-bundle-option.is-active {
	background: #F0FDF4;
	border-color: #0F5132;
	box-shadow: 0 4px 12px rgba(15, 81, 50, 0.1);
}

.ba-bundle-option input[type=radio] {
	margin-left: 12px;
	margin-right: 0;
	accent-color: #0F5132;
	width: 20px;
	height: 20px;
}

.ba-bundle-option--recommended {
	border-color: #0F5132;
	padding-top: 18px;
}

.ba-popular-pill {
	position: absolute;
	top: -10px;
	right: 18px;
	background: #0F5132;
	color: #FFFFFF;
	font-size: 10px;
	font-weight: 800;
	padding: 2px 10px;
	border-radius: 9999px;
	letter-spacing: 0.02em;
}

.ba-bundle-info {
	flex: 1;
}

.ba-bundle-name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #111827;
}

.ba-bundle-sub {
	display: block;
	font-size: 12px;
	color: #6B7280;
	margin-top: 2px;
}

.ba-bundle-price {
	font-size: 16px;
	font-weight: 800;
	color: #0F5132;
	direction: ltr;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ba-save-badge {
	background: #FEF3C7;
	color: #92400E;
	font-size: 11px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 4px;
}

/* Fields */
.ba-field-group {
	margin-bottom: 14px;
}

.ba-field-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #1F2937;
	margin-bottom: 6px;
}

.ba-req {
	color: #DC2626;
}

.ba-input {
	width: 100%;
	height: 46px;
	background: #F9FAFB;
	border: 1.5px solid #D1D5DB;
	border-radius: 10px;
	padding: 0 14px;
	font-size: 14px;
	color: #111827;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.ba-textarea {
	height: 72px;
	padding: 10px 14px;
	resize: vertical;
}

.ba-input:focus {
	outline: none;
	background: #FFFFFF;
	border-color: #0F5132;
	box-shadow: 0 0 0 3px rgba(15, 81, 50, 0.15);
}

.ba-field-hint {
	display: block;
	font-size: 11px;
	color: #6B7280;
	margin-top: 4px;
}

/* Total Strip */
.ba-total-strip {
	background: #F0FDF4;
	border: 1px dashed #0F5132;
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 18px;
}

.ba-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 15px;
	font-weight: 700;
	color: #111827;
}

.ba-total-highlight {
	font-size: 20px;
	color: #0F5132;
	font-weight: 800;
	direction: ltr;
}

.ba-delivery-note {
	font-size: 12px;
	color: #047857;
	margin-top: 4px;
	font-weight: 600;
}

/* Error Box */
.ba-error-box {
	background: #FEE2E2;
	color: #991B1B;
	border: 1px solid #F87171;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 14px;
	text-align: center;
}

/* Submit CTA Button */
.ba-submit-wrapper {
	text-align: center;
	margin-bottom: 16px;
}

.ba-submit-btn {
	width: 100%;
	background: linear-gradient(135deg, #0F5132 0%, #198754 100%);
	color: #FFFFFF;
	border: none;
	border-radius: 14px;
	padding: 16px 24px;
	font-size: 17px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 8px 24px -4px rgba(15, 81, 50, 0.4);
	transition: all 0.25s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.ba-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px -4px rgba(15, 81, 50, 0.5);
	background: linear-gradient(135deg, #0B3D25 0%, #157347 100%);
}

.ba-submit-btn:active {
	transform: translateY(0);
}

.ba-submit-sub {
	font-size: 12px;
	color: #4B5563;
	margin: 8px 0 0;
	font-weight: 600;
}

/* Trust Bar */
.ba-trust-bar {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	border-top: 1px solid #E5E7EB;
	padding-top: 14px;
	text-align: center;
}

.ba-trust-item {
	font-size: 11px;
	font-weight: 600;
	color: #4B5563;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.ba-t-icon {
	font-size: 16px;
}

/* --------------------------------------------------------------------------
   6. In-Place Success Confirmation Screen (Zero Page Shift)
   -------------------------------------------------------------------------- */
.ba-order-success {
	text-align: center;
	padding: 20px 10px;
}

.ba-success-icon {
	font-size: 54px;
	line-height: 1;
	margin-bottom: 12px;
}

.ba-success-title {
	font-size: 22px;
	font-weight: 800;
	color: #064E3B;
	margin: 0 0 8px;
}

.ba-success-order-id {
	font-size: 15px;
	color: #1F2937;
	margin: 0 0 14px;
}

.ba-success-order-id strong {
	color: #0F5132;
	font-size: 18px;
}

.ba-success-text {
	font-size: 13px;
	color: #4B5563;
	line-height: 1.6;
	margin: 0 0 18px;
}

.ba-success-summary {
	background: #F9FAFB;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 20px;
	text-align: right;
}

.ba-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	font-size: 13px;
	border-bottom: 1px solid #F3F4F6;
}

.ba-summary-row:last-child {
	border-bottom: none;
}

.ba-text-green {
	color: #0F5132;
	font-weight: 800;
}

.ba-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #25D366;
	color: #FFFFFF !important;
	text-decoration: none !important;
	font-size: 15px;
	font-weight: 700;
	padding: 14px 24px;
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
	transition: all 0.25s ease;
	width: 100%;
	box-sizing: border-box;
}

.ba-whatsapp-btn:hover {
	background: #1EBE5D;
	transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   7. Mobile Sticky Purchase Bar
   -------------------------------------------------------------------------- */
.ba-mobile-sticky-bar {
	display: none;
}

@media (max-width: 768px) {
	.ba-product-value-stack {
		grid-template-columns: 1fr;
	}

	.ba-trust-bar {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.ba-mobile-sticky-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 99998;
		background: #FFFFFF;
		padding: 10px 14px;
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
		border-top: 1.5px solid #E5E7EB;
		gap: 10px;
	}

	.ba-sticky-thumb img {
		border-radius: 8px;
		border: 1px solid #E5E7EB;
		display: block;
	}

	.ba-sticky-info {
		flex: 1;
		min-width: 0;
	}

	.ba-sticky-title {
		font-size: 13px;
		font-weight: 700;
		color: #111827;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.ba-sticky-price {
		display: flex;
		align-items: center;
		gap: 6px;
		margin-top: 2px;
	}

	.ba-sticky-sale {
		font-size: 14px;
		font-weight: 800;
		color: #0F5132;
	}

	.ba-sticky-free {
		font-size: 10px;
		font-weight: 700;
		background: #D1FAE5;
		color: #065F46;
		padding: 1px 6px;
		border-radius: 4px;
	}

	.ba-sticky-btn {
		background: linear-gradient(135deg, #0F5132 0%, #198754 100%);
		color: #FFFFFF;
		border: none;
		border-radius: 10px;
		padding: 10px 14px;
		font-size: 13px;
		font-weight: 800;
		cursor: pointer;
		display: flex;
		align-items: center;
		gap: 6px;
		white-space: nowrap;
		box-shadow: 0 4px 12px rgba(15, 81, 50, 0.3);
	}

	/* Adjust bottom margin on product page so content is not hidden by sticky bar */
	body.single-product {
		padding-bottom: 70px;
	}
}
