/* ==========================================================
   ATC Site Enhancements — Structured Tour Content
   Version 1.0.0
========================================================== */

.single-product .woocommerce-product-details__short-description {
	margin: 18px 0 24px;
	padding: 18px 20px;
	border-left: 4px solid #c7a76c;
	background: #f7f7f4;
	color: #263548;
	line-height: 1.75;
}

.single-product .woocommerce-product-details__short-description > :first-child {
	margin-top: 0;
}

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

.atcse-tour-content {
	clear: both;
	width: 100%;
	margin: 34px 0 42px;
	color: #243247;
}

.atcse-tour-content,
.atcse-tour-content * {
	box-sizing: border-box;
}

.atcse-tour-content-inner {
	width: min(100%, 1180px);
	margin-inline: auto;
}

.atcse-main-title,
.atcse-section-title {
	color: #14532d;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.atcse-main-title {
	margin: 0 0 20px;
	font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.atcse-section-title {
	margin: 0 0 18px;
	font-size: clamp(1.4rem, 2.3vw, 1.9rem);
}

.atcse-quick-details,
.atcse-section {
	margin: 0 0 28px;
}

.atcse-details-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}

.atcse-detail-card {
	min-height: 112px;
	padding: 20px 18px;
	border: 1px solid #d9e4dd;
	border-top: 4px solid #c7a76c;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(20, 83, 45, 0.07);
}

.atcse-detail-label,
.atcse-detail-value {
	display: block;
}

.atcse-detail-label {
	margin-bottom: 9px;
	color: #64748b;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	line-height: 1.35;
	text-transform: uppercase;
}

.atcse-detail-value {
	color: #173d2a;
	font-size: 1rem;
	line-height: 1.5;
}

.atcse-section {
	padding: clamp(22px, 3vw, 34px);
	border: 1px solid #e0e7e3;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 34px rgba(15, 63, 34, 0.06);
}

.atcse-prose,
.atcse-prose p,
.atcse-prose li {
	color: #334155;
	font-size: 1rem;
	line-height: 1.8;
}

.atcse-prose > :first-child {
	margin-top: 0;
}

.atcse-prose > :last-child {
	margin-bottom: 0;
}

.atcse-check-list {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.atcse-check-list li {
	position: relative;
	margin: 0;
	padding: 0 0 0 30px;
	color: #334155;
	font-size: 1rem;
	line-height: 1.65;
}

.atcse-check-list li::before {
	position: absolute;
	top: 0.28em;
	left: 0;
	display: grid;
	width: 20px;
	height: 20px;
	place-items: center;
	border-radius: 50%;
	background: #eaf5ee;
	color: #14532d;
	content: "✓";
	font-size: 0.76rem;
	font-weight: 800;
}

.atcse-two-column-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
}

.atcse-two-column-grid .atcse-section {
	height: 100%;
	margin-bottom: 0;
}

.atcse-inclusions {
	border-top: 4px solid #14532d;
}

.atcse-bring {
	border-top: 4px solid #c7a76c;
}

@media (max-width: 1050px) {
	.atcse-details-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.single-product .woocommerce-product-details__short-description {
		padding: 16px;
	}

	.atcse-tour-content {
		margin-top: 26px;
	}

	.atcse-details-grid,
	.atcse-two-column-grid {
		grid-template-columns: 1fr;
	}

	.atcse-detail-card {
		min-height: 0;
	}

	.atcse-section {
		padding: 22px 18px;
	}
}

/* ==========================================================
   Version 1.1.0 — Description alignment and Related Tours
========================================================== */

/*
 * The theme constrains the Description panel more than the structured
 * Tour Details section. These rules remove the extra inner max-width and
 * side offsets while preserving the existing two-column booking layout.
 */
body.single-product .woocommerce-tabs.wc-tabs-wrapper,
body.single-product .woocommerce-tabs .woocommerce-Tabs-panel,
body.single-product .woocommerce-tabs .product-description {
	max-width: none;
}

body.single-product .woocommerce-tabs .woocommerce-Tabs-panel,
body.single-product .woocommerce-tabs .product-description {
	width: 100%;
	margin-right: 0;
	margin-left: 0;
}

body.single-product .woocommerce-tabs .product-description {
	padding-right: 0;
	padding-left: 0;
}

body.single-product .woocommerce-tabs .product-description > :first-child {
	margin-top: 0;
}

body.single-product .woocommerce-tabs .product-description > :last-child {
	margin-bottom: 0;
}

/* Keep the top Description / booking row aligned with the same visual frame
 * used by Tour Details where the theme allows the wrapper to grow.
 */
body.single-product div.product > .woocommerce-tabs,
body.single-product div.product > .summary {
	box-sizing: border-box;
}

/* Related Tours — modern equal-height cards. */
body.single-product .related.products {
	clear: both;
	width: min(100%, 1180px);
	margin: 48px auto 0;
	padding: 38px 0 8px;
	border-top: 1px solid #e1e9e4;
}

body.single-product .related.products > h2 {
	margin: 0 0 26px;
	color: #14532d;
	font-size: clamp(1.9rem, 3.5vw, 2.7rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.15;
	text-align: center;
}

body.single-product .related.products ul.products {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0 !important;
	padding: 0 !important;
}

body.single-product .related.products ul.products::before,
body.single-product .related.products ul.products::after {
	display: none !important;
}

body.single-product .related.products ul.products li.product {
	position: relative;
	display: flex;
	float: none !important;
	flex-direction: column;
	width: 100% !important;
	min-width: 0;
	height: 100%;
	margin: 0 !important;
	padding: 0 0 18px !important;
	overflow: hidden;
	border: 1px solid #dce7e0;
	border-top: 4px solid #c7a76c;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(15, 63, 34, 0.08);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.single-product .related.products ul.products li.product:hover {
	transform: translateY(-4px);
	border-color: #c7a76c;
	box-shadow: 0 18px 42px rgba(15, 63, 34, 0.14);
}

body.single-product .related.products ul.products li.product > a.woocommerce-LoopProduct-link,
body.single-product .related.products ul.products li.product > a.woocommerce-loop-product__link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

body.single-product .related.products ul.products li.product img {
	display: block;
	width: 100%;
	max-width: none;
	aspect-ratio: 4 / 3;
	margin: 0 0 16px !important;
	object-fit: cover;
	transition: transform 240ms ease;
}

body.single-product .related.products ul.products li.product:hover img {
	transform: scale(1.025);
}

body.single-product .related.products ul.products li.product .woocommerce-loop-product__title,
body.single-product .related.products ul.products li.product h2,
body.single-product .related.products ul.products li.product h3 {
	min-height: 3.2em;
	margin: 0 !important;
	padding: 0 18px 10px !important;
	color: #14532d;
	font-size: 1.08rem !important;
	font-weight: 700;
	line-height: 1.45;
	text-align: left;
}

body.single-product .related.products ul.products li.product .price {
	display: block;
	margin: auto 0 0 !important;
	padding: 2px 18px 16px;
	color: #1f2937 !important;
	font-size: 1rem !important;
	font-weight: 700;
	text-align: left;
}

body.single-product .related.products ul.products li.product .price del {
	margin-right: 5px;
	color: #7b8794;
	font-weight: 500;
	opacity: 1;
}

body.single-product .related.products ul.products li.product .price ins {
	color: #14532d;
	font-weight: 800;
	text-decoration: none;
}

body.single-product .related.products ul.products li.product .star-rating {
	margin: 0 18px 12px !important;
}

body.single-product .related.products ul.products li.product .button,
body.single-product .related.products ul.products li.product a.button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-height: 48px;
	margin: auto 18px 0 !important;
	padding: 12px 18px !important;
	border: 1px solid #c7a76c !important;
	border-radius: 10px !important;
	background: #c7a76c !important;
	box-shadow: none !important;
	color: #102f20 !important;
	font-size: 0.94rem !important;
	font-weight: 800 !important;
	letter-spacing: 0.025em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body.single-product .related.products ul.products li.product .button:hover,
body.single-product .related.products ul.products li.product a.button:hover {
	border-color: #14532d !important;
	background: #14532d !important;
	color: #fff !important;
	transform: translateY(-1px);
}

body.single-product .related.products ul.products li.product .added_to_cart {
	margin: 10px 18px 0;
	color: #14532d;
	font-weight: 700;
	text-align: center;
}

@media (max-width: 980px) {
	body.single-product .related.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	body.single-product .related.products {
		margin-top: 34px;
		padding-top: 28px;
	}

	body.single-product .related.products ul.products {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	body.single-product .related.products ul.products li.product .woocommerce-loop-product__title,
	body.single-product .related.products ul.products li.product h2,
	body.single-product .related.products ul.products li.product h3 {
		min-height: 0;
	}
}

/* ==========================================================
   Version 1.2.0 — Wider Description row and catalog-only excerpt
========================================================== */

/* The short description remains stored in WooCommerce and can still be used
 * in product catalogs. It is hidden only on individual tour pages. */
body.single-product .woocommerce-product-details__short-description {
	display: none !important;
}

/* The Description and booking form are placed inside a shared frame with the
 * same maximum width used by the structured Tour Details content. */
body.single-product .atcse-main-product-row {
	display: grid;
	grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.95fr);
	align-items: start;
	gap: clamp(34px, 4.5vw, 68px);
	width: min(calc(100vw - 40px), 1180px);
	max-width: 1180px;
	margin: 0 50% 38px;
	transform: translateX(-50%);
	box-sizing: border-box;
}

body.single-product .atcse-main-product-row > .woocommerce-tabs,
body.single-product .atcse-main-product-row > .summary {
	float: none !important;
	clear: none !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	box-sizing: border-box;
}

body.single-product .atcse-main-product-row > .woocommerce-tabs .woocommerce-Tabs-panel,
body.single-product .atcse-main-product-row > .woocommerce-tabs .product-description {
	width: 100% !important;
	max-width: none !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
	padding-right: 0 !important;
	padding-left: 0 !important;
}

/* Fallback for themes where Description and Summary cannot safely be wrapped. */
@media (min-width: 1025px) {
	body.single-product.atcse-layout-fallback div.product > .woocommerce-tabs,
	body.single-product.atcse-layout-fallback div.product > .summary {
		max-width: none !important;
	}
}

@media (max-width: 1024px) {
	body.single-product .atcse-main-product-row {
		grid-template-columns: 1fr;
		gap: 28px;
		width: min(calc(100vw - 32px), 760px);
		margin-bottom: 30px;
	}
}

@media (max-width: 600px) {
	body.single-product .atcse-main-product-row {
		width: min(calc(100vw - 24px), 760px);
		gap: 22px;
	}
}

/* ==========================================================
   Version 1.3.0 — Reliable full-width Description / booking row
========================================================== */

/* Version 1.2 depended on the Description and Summary being siblings. The
 * theme nests them in separate wrappers, so JavaScript now moves only those
 * two WooCommerce blocks into this shared row and aligns it precisely with
 * the rendered Tour Details frame. */
body.single-product .atcse-layout-parent {
	overflow: visible !important;
}

body.single-product .atcse-main-product-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(360px, 0.95fr);
	align-items: start;
	gap: clamp(38px, 4vw, 62px);
	width: 100%;
	max-width: none;
	margin: 0 0 38px;
	transform: none;
	box-sizing: border-box;
}

body.single-product .atcse-main-product-row > .woocommerce-tabs,
body.single-product .atcse-main-product-row > .summary {
	float: none !important;
	clear: none !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	box-sizing: border-box;
}

body.single-product .atcse-main-product-row > .woocommerce-tabs,
body.single-product .atcse-main-product-row > .woocommerce-tabs .woocommerce-Tabs-panel,
body.single-product .atcse-main-product-row > .woocommerce-tabs .product-description {
	width: 100% !important;
	max-width: none !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
	padding-right: 0 !important;
	padding-left: 0 !important;
}

/* Remove theme offsets that can survive when the blocks are moved. */
body.single-product.atcse-layout-active .atcse-main-product-row > .woocommerce-tabs,
body.single-product.atcse-layout-active .atcse-main-product-row > .summary {
	position: relative;
	right: auto !important;
	left: auto !important;
	transform: none !important;
}

@media (max-width: 1024px) {
	body.single-product .atcse-main-product-row {
		grid-template-columns: 1fr;
		gap: 28px;
		width: 100%;
		max-width: none;
		margin: 0 0 30px;
		left: auto !important;
		transform: none !important;
	}
}


/* ==========================================================
   Version 1.3.1 — Hide the redundant Description tab title
========================================================== */

/* WooCommerce prints a one-item tab navigation labelled "Description"
 * above the actual tour heading. Hide only that navigation on individual
 * tour pages; the Description content and "About This Tour" remain visible. */
body.single-product .atcse-main-product-row > .woocommerce-tabs > ul.tabs.wc-tabs,
body.single-product .atcse-main-product-row > .woocommerce-tabs > ul.wc-tabs {
	display: none !important;
}

body.single-product .atcse-main-product-row > .woocommerce-tabs .woocommerce-Tabs-panel {
	margin-top: 0 !important;
	padding-top: 0 !important;
}
