/**
 * Eventswala - single product page design layer.
 *
 * Scoped to .single-product so nothing leaks into the shop, cart or checkout.
 * Colours come from CSS variables injected by includes/class-ewb-design.php.
 */

.single-product {
	--ewb-ink: #16181d;
	--ewb-muted: #667085;
	--ewb-line: #e6e8ec;
	--ewb-surface: #fff;
	--ewb-soft: #f4f5f7;
	--ewb-shadow: 0 1px 2px rgba( 16, 24, 40, 0.04 ), 0 8px 24px rgba( 16, 24, 40, 0.06 );
}

/* ------------------------------------------------------------------
 * Breadcrumb + title
 * --------------------------------------------------------------- */

.single-product .woocommerce-breadcrumb {
	font-size: 13px;
	color: var( --ewb-muted );
	margin-bottom: 14px;
	letter-spacing: 0.01em;
}

.single-product .woocommerce-breadcrumb a {
	color: var( --ewb-muted );
	text-decoration: none;
}

.single-product .woocommerce-breadcrumb a:hover {
	color: var( --ewb-accent );
}

.single-product .entry-summary .product_title {
	font-size: clamp( 24px, 3.2vw, 34px );
	line-height: 1.22;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var( --ewb-ink );
	margin: 0 0 12px;
}

/* ------------------------------------------------------------------
 * Price block
 * --------------------------------------------------------------- */

.single-product .entry-summary p.price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var( --ewb-line );
}

.single-product .entry-summary p.price ins {
	order: 1;
	text-decoration: none;
	font-size: clamp( 26px, 3.4vw, 34px );
	font-weight: 800;
	color: var( --ewb-ink );
	letter-spacing: -0.02em;
	background: none;
}

.single-product .entry-summary p.price del {
	order: 2;
	opacity: 1;
	font-size: 17px;
	font-weight: 500;
	color: var( --ewb-muted );
	text-decoration: line-through;
}

.single-product .entry-summary p.price > .amount {
	font-size: clamp( 26px, 3.4vw, 34px );
	font-weight: 800;
	color: var( --ewb-ink );
	letter-spacing: -0.02em;
}

.ewb-discount-badge {
	order: 3;
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: #e7f7ee;
	color: #067a46;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

/* ------------------------------------------------------------------
 * Short description
 * --------------------------------------------------------------- */

.single-product .woocommerce-product-details__short-description {
	font-size: 15px;
	line-height: 1.72;
	color: #475467;
	margin-bottom: 20px;
}

.single-product .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------
 * Book Now button
 * --------------------------------------------------------------- */

.single-product form.cart .single_add_to_cart_button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin-top: 4px;
	padding: 16px 24px;
	border: none;
	border-radius: var( --ewb-radius, 10px );
	background: linear-gradient( 180deg, var( --ewb-accent ) 0%, var( --ewb-accent-dark ) 100% );
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.08 ), 0 6px 16px var( --ewb-accent-soft );
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.single-product form.cart .single_add_to_cart_button::after {
	content: "";
	width: 8px;
	height: 8px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate( 45deg );
	transition: transform 0.15s ease;
}

.single-product form.cart .single_add_to_cart_button:hover,
.single-product form.cart .single_add_to_cart_button:focus {
	background: linear-gradient( 180deg, var( --ewb-hover ) 0%, var( --ewb-hover-dark ) 100% );
	transform: translateY( -2px );
	box-shadow: 0 2px 4px rgba( 16, 24, 40, 0.12 ), 0 12px 28px rgba( 16, 24, 40, 0.18 );
	color: #fff;
}

.single-product form.cart .single_add_to_cart_button:hover::after {
	transform: rotate( 45deg ) translate( 2px, -2px );
}

.single-product form.cart .single_add_to_cart_button:active {
	transform: translateY( 0 );
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.12 );
}

.single-product form.cart .single_add_to_cart_button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px var( --ewb-hover-ring );
}

@media ( prefers-reduced-motion: reduce ) {
	.single-product form.cart .single_add_to_cart_button,
	.single-product form.cart .single_add_to_cart_button::after {
		transition: none;
	}

	.single-product form.cart .single_add_to_cart_button:hover {
		transform: none;
	}
}

/* ------------------------------------------------------------------
 * Trust badges
 * --------------------------------------------------------------- */

.ewb-badges {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 10px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

@media ( max-width: 420px ) {
	.ewb-badges {
		grid-template-columns: 1fr;
	}
}

.ewb-badge {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 12px;
	border: 1px solid var( --ewb-line );
	border-radius: var( --ewb-radius, 10px );
	background: var( --ewb-surface );
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ewb-badge:hover {
	border-color: var( --ewb-accent-ring );
	box-shadow: var( --ewb-shadow );
}

.ewb-badge__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var( --ewb-accent-soft );
	color: var( --ewb-accent );
}

.ewb-badge__icon svg {
	width: 19px;
	height: 19px;
	display: block;
}

.ewb-badge__text {
	display: block;
	min-width: 0;
}

.ewb-badge__text strong {
	display: block;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: var( --ewb-ink );
}

.ewb-badge__text small {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var( --ewb-muted );
}

/* ------------------------------------------------------------------
 * Badges under the product image
 *
 * Astra floats div.images and div.summary at 50% from 922px up, and stacks
 * them below that.
 *
 * The badges are printed after the summary (see class-ewb-design.php for why),
 * then floated back up into the left column with clear:left. On mobile no
 * float applies, so the source order gives image -> booking form -> badges,
 * which is the order we want there anyway.
 * --------------------------------------------------------------- */

@media ( min-width: 922px ) {
	.single-product .ewb-badges--gallery {
		float: left;
		clear: left;
		width: 50%;
		box-sizing: border-box;
		padding-right: 2em;
		margin-top: 16px;
	}
}

@media ( max-width: 921px ) {
	.single-product .ewb-badges--gallery {
		margin-top: 24px;
	}
}

/* ------------------------------------------------------------------
 * Gallery
 * --------------------------------------------------------------- */

.single-product .woocommerce-product-gallery__wrapper img {
	border-radius: var( --ewb-radius, 10px );
}

.single-product .woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	padding: 0;
	list-style: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li {
	margin: 0;
	width: auto;
	flex: 0 0 calc( 25% - 6px );
}

.single-product .woocommerce-product-gallery .flex-control-thumbs img {
	border-radius: 8px;
	border: 2px solid transparent;
	opacity: 0.7;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover,
.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	opacity: 1;
	border-color: var( --ewb-accent );
}

/* ------------------------------------------------------------------
 * Vertical thumbnails on the left of the main image
 * --------------------------------------------------------------- */

@media ( min-width: 922px ) {
	.single-product .woocommerce-product-gallery.ewb-thumbs-left {
		display: flex;
		flex-direction: row-reverse; /* DOM is viewport then thumbs */
		align-items: flex-start;
		gap: 14px;
	}

	.single-product .ewb-thumbs-left .flex-viewport,
	.single-product .ewb-thumbs-left > .woocommerce-product-gallery__wrapper {
		flex: 1 1 auto;
		min-width: 0;
		margin-bottom: 0 !important;
	}

	.single-product .ewb-thumbs-left .ewb-thumbs-col,
	.single-product .ewb-thumbs-left > .flex-control-thumbs {
		flex: 0 0 86px;
		width: 86px;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin: 0;
		padding: 0;
	}

	.single-product .ewb-thumbs-left .ewb-thumbs-col .flex-control-thumbs {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		gap: 8px;
		margin: 0;
		padding: 0;
		max-height: 460px;
		overflow-y: auto;
		scrollbar-width: none;
	}

	.single-product .ewb-thumbs-left .flex-control-thumbs::-webkit-scrollbar {
		display: none;
	}

	.single-product .ewb-thumbs-left .flex-control-thumbs li {
		flex: 0 0 auto;
		width: 100% !important;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.single-product .ewb-thumbs-left .flex-control-thumbs img {
		width: 100%;
		height: auto;
		border-radius: 8px;
	}

	/* Up / down arrows, shown by JS only when the list overflows */
	.single-product .ewb-thumb-nav {
		display: flex;
		flex: 0 0 auto;
		align-items: center;
		justify-content: center;
		height: 28px;
		padding: 0;
		border: 1px solid var( --ewb-line );
		border-radius: 8px;
		background: #fff;
		color: #475467;
		cursor: pointer;
		transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
	}

	.single-product .ewb-thumb-nav::before {
		content: "";
		width: 8px;
		height: 8px;
		border-top: 2px solid currentColor;
		border-right: 2px solid currentColor;
	}

	.single-product .ewb-thumb-nav--up::before {
		transform: rotate( -45deg );
		margin-top: 3px;
	}

	.single-product .ewb-thumb-nav--down::before {
		transform: rotate( 135deg );
		margin-bottom: 3px;
	}

	.single-product .ewb-thumb-nav:hover:not( :disabled ) {
		border-color: var( --ewb-accent );
		color: var( --ewb-accent );
	}

	.single-product .ewb-thumb-nav:disabled {
		opacity: 0.35;
		cursor: default;
	}
}

/* Hidden until JS proves the list actually overflows. Uses the hidden
 * attribute so the arrows stay invisible even if this file fails to load. */
.single-product .ewb-thumb-nav[hidden] {
	display: none;
}

/* Below the desktop breakpoint the thumbnails stay a horizontal row. */
@media ( max-width: 921px ) {
	.single-product .ewb-thumbs-left .ewb-thumb-nav {
		display: none;
	}

	.single-product .ewb-thumbs-left .flex-control-thumbs {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}
}

/* ------------------------------------------------------------------
 * Tabs
 * --------------------------------------------------------------- */

.single-product .woocommerce-tabs {
	margin-top: 52px;
	clear: both;
}

/* Segmented pill bar. Astra sets overflow:hidden and pseudo-element borders
 * on ul.tabs, both of which have to go. */
.single-product .woocommerce-tabs ul.tabs {
	display: inline-flex;
	flex-wrap: nowrap;
	gap: 4px;
	width: auto;
	max-width: 100%;
	margin: 0 0 4px !important;
	padding: 5px !important;
	border: none;
	border-radius: 999px;
	background: var( --ewb-soft );
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.single-product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
	display: none;
}

.single-product .woocommerce-tabs ul.tabs::before,
.single-product .woocommerce-tabs ul.tabs::after {
	display: none !important;
}

.single-product .woocommerce-tabs ul.tabs li {
	flex: 0 0 auto;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	border-radius: 999px;
	box-shadow: none !important;
}

.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after {
	display: none !important;
}

.single-product .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 10px 22px;
	margin: 0;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	color: var( --ewb-muted );
	text-decoration: none;
	transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.single-product .woocommerce-tabs ul.tabs li a:hover {
	color: var( --ewb-ink );
	background: rgba( 255, 255, 255, 0.65 );
}

.single-product .woocommerce-tabs ul.tabs li.active a,
.single-product .woocommerce-tabs ul.tabs li[aria-selected="true"] a {
	background: var( --ewb-surface );
	color: var( --ewb-accent );
	font-weight: 700;
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.06 ), 0 4px 12px rgba( 16, 24, 40, 0.08 );
}

.single-product .woocommerce-tabs ul.tabs li a:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var( --ewb-accent-ring );
}

/* ------------------------------------------------------------------
 * Tab panels
 * --------------------------------------------------------------- */

.single-product .woocommerce-tabs .panel {
	margin-top: 24px;
	padding: 0;
	border: none;
	font-size: 16px;
	line-height: 1.8;
	color: #475467;
}

/* WooCommerce prints an h2 ("Description") that repeats the tab label. */
.single-product .woocommerce-tabs .panel > h2:first-child {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.single-product .woocommerce-tabs .panel > p:first-of-type {
	font-size: 17px;
	line-height: 1.7;
	color: var( --ewb-ink );
}

.single-product .woocommerce-tabs .panel p {
	margin: 0 0 16px;
}

/* Spec lists read as a checklist rather than plain discs.
 * Scoped to the description panel so the reviews list (ul.commentlist, which
 * also lives inside a .panel) keeps its own layout. */
.single-product .woocommerce-Tabs-panel--description ul {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 240px, 1fr ) );
	gap: 8px 24px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.single-product .woocommerce-Tabs-panel--description ul li {
	position: relative;
	margin: 0;
	padding: 8px 0 8px 32px;
	list-style: none;
	color: var( --ewb-ink );
	font-size: 15px;
	line-height: 1.6;
}

.single-product .woocommerce-Tabs-panel--description ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var( --ewb-accent-soft ) url( "data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17.5 19 7'/%3E%3C/svg%3E" ) center / 12px 12px no-repeat;
}

.single-product .woocommerce-Tabs-panel--description ol {
	padding-left: 20px;
}

.single-product .woocommerce-tabs .panel table {
	width: 100%;
	border-collapse: collapse;
}

.single-product .woocommerce-tabs .panel table th,
.single-product .woocommerce-tabs .panel table td {
	padding: 10px 12px;
	border: 1px solid var( --ewb-line );
	text-align: left;
}

/* ------------------------------------------------------------------
 * Reviews tab
 * --------------------------------------------------------------- */

.single-product #reviews .commentlist {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.single-product #reviews .commentlist li .comment_container {
	display: flex;
	gap: 14px;
	padding: 16px;
	border: 1px solid var( --ewb-line );
	border-radius: calc( var( --ewb-radius, 10px ) + 2px );
	background: var( --ewb-surface );
}

.single-product #reviews .commentlist li img.avatar {
	position: static;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
}

.single-product #reviews .commentlist li .comment-text {
	margin: 0;
	padding: 0;
	border: none;
	width: auto;
}

.single-product #reviews .woocommerce-noreviews {
	padding: 18px;
	border: 1px dashed var( --ewb-line );
	border-radius: calc( var( --ewb-radius, 10px ) + 2px );
	background: var( --ewb-soft );
	color: var( --ewb-muted );
}

.single-product #review_form .comment-form input[type="text"],
.single-product #review_form .comment-form input[type="email"],
.single-product #review_form .comment-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #d9dee3;
	border-radius: var( --ewb-radius, 10px );
	font-size: 15px;
}

.single-product #review_form .comment-form input:focus,
.single-product #review_form .comment-form textarea:focus {
	outline: none;
	border-color: var( --ewb-accent );
	box-shadow: 0 0 0 3px var( --ewb-accent-soft );
}

.single-product #review_form .comment-form .submit {
	padding: 13px 26px;
	border: none;
	border-radius: var( --ewb-radius, 10px );
	background: var( --ewb-accent );
	color: #fff;
	font-weight: 700;
	transition: background-color 0.15s ease;
}

.single-product #review_form .comment-form .submit:hover {
	background: var( --ewb-hover );
	color: #fff;
}

@media ( max-width: 544px ) {
	.single-product .woocommerce-tabs {
		margin-top: 36px;
	}

	.single-product .woocommerce-tabs ul.tabs {
		display: flex;
		width: 100%;
	}

	.single-product .woocommerce-tabs ul.tabs li a {
		padding: 10px 16px;
	}
}

/* ------------------------------------------------------------------
 * Booking widget, tuned to sit inside the new layout
 * --------------------------------------------------------------- */

.single-product .ewb-booking {
	padding: 18px;
	border: 1px solid var( --ewb-line );
	border-radius: calc( var( --ewb-radius, 10px ) + 2px );
	background: #fbfbfc;
}

.single-product .ewb-booking .ewb-input,
.single-product .ewb-booking .ewb-select {
	border-radius: var( --ewb-radius, 10px );
}

.single-product .ewb-booking .ewb-input:focus,
.single-product .ewb-booking .ewb-select:focus {
	border-color: var( --ewb-accent );
	box-shadow: 0 0 0 3px var( --ewb-accent-soft );
}

.single-product .ewb-booking .ewb-pincode-toggle,
.single-product .ewb-booking .ewb-area-item:hover,
.single-product .ewb-booking .ewb-area-item:focus {
	color: var( --ewb-accent );
}

.single-product .ewb-booking .ewb-area-item:hover,
.single-product .ewb-booking .ewb-area-item:focus {
	border-color: var( --ewb-accent );
	background: var( --ewb-accent-soft );
}

.single-product .ewb-booking .ewb-summary__row--total {
	color: var( --ewb-ink );
}
