/*
 * Native WooCommerce category discovery and guide placement.
 * Reversible with EP_Core_Tools::CATEGORY_EXPERIENCE_OPTION.
 */

body.ep-core-category-experience {
	--ep-cat-border: #d8e4ee;
	--ep-cat-ink: #152238;
	--ep-cat-muted: #64748a;
	--ep-cat-blue: #285d9c;
	--ep-cat-soft: #f5f9fd;
	--ep-cat-aqua: #15a9c9;
}

/* Kadence Elements remain stored in WordPress and return when the module is off. */
body.ep-core-category-experience main#main > .ep-inline-ebook-banner,
body.ep-core-category-experience main#main > .kb-row-layout-wrap:has(.ep-subcat-cards) {
	display: none !important;
}

/* The existing Kadence guide stays stored as a rollback source on articles. */
body.single-post .ep-inline-ebook-banner,
body.single-post .kb-row-layout-wrap:has(.ep-inline-ebook-banner) {
	display: none !important;
}

/* Keep one accessible H1; the full term copy is rendered after the catalogue. */
body.ep-core-category-experience .entry-header .archive-description {
	display: none !important;
}

body.ep-core-category-experience .entry-header.product-archive-title {
	margin-bottom: clamp(20px, 3vw, 34px) !important;
}

body.ep-core-category-experience .ep-category-nav {
	background: #fff;
	border: 1px solid var(--ep-cat-border);
	border-radius: 20px;
	box-shadow: 0 10px 32px rgba(25, 55, 88, .055);
	box-sizing: border-box;
	margin: 0 0 clamp(24px, 3vw, 38px);
	overflow: hidden;
	padding: clamp(18px, 2.3vw, 28px);
	width: 100%;
}

body.ep-core-category-experience .ep-category-nav__head {
	align-items: flex-end;
	border-bottom: 1px solid #e8eef4;
	display: flex;
	gap: 20px;
	justify-content: space-between;
	margin-bottom: 18px;
	padding-bottom: 16px;
}

body.ep-core-category-experience .ep-category-nav__head span {
	color: var(--ep-cat-blue);
	display: block;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .11em;
	margin-bottom: 5px;
	text-transform: uppercase;
}

body.ep-core-category-experience .ep-category-nav__head h2 {
	color: var(--ep-cat-ink);
	font-size: clamp(21px, 2.1vw, 30px);
	letter-spacing: -.025em;
	line-height: 1.15;
	margin: 0;
}

body.ep-core-category-experience .ep-category-nav__head p {
	color: var(--ep-cat-muted);
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 2px;
	white-space: nowrap;
}

body.ep-core-category-experience .ep-category-nav__grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.ep-core-category-experience .ep-category-nav__card {
	align-items: center;
	background: var(--ep-cat-soft);
	border: 1px solid transparent;
	border-radius: 15px;
	box-sizing: border-box;
	color: var(--ep-cat-ink);
	display: grid;
	gap: 13px;
	grid-template-columns: 68px minmax(0, 1fr) 18px;
	min-height: 108px;
	overflow: hidden;
	padding: 12px 14px 12px 12px;
	text-decoration: none !important;
	transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.ep-core-category-experience .ep-category-nav__image {
	align-items: center;
	background: #fff;
	border: 1px solid #e4ebf2;
	border-radius: 12px;
	box-sizing: border-box;
	display: flex;
	height: 68px;
	justify-content: center;
	overflow: hidden;
	padding: 6px;
	width: 68px;
}

body.ep-core-category-experience .ep-category-nav__image img {
	height: 100% !important;
	margin: 0 !important;
	max-width: 100% !important;
	object-fit: contain;
	width: 100% !important;
}

body.ep-core-category-experience .ep-category-nav__image svg {
	fill: none;
	height: 42px;
	stroke: #1b304a;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.4;
	width: 42px;
}

body.ep-core-category-experience .ep-category-nav__copy {
	min-width: 0;
}

body.ep-core-category-experience .ep-category-nav__copy strong,
body.ep-core-category-experience .ep-category-nav__copy small {
	display: block;
}

body.ep-core-category-experience .ep-category-nav__copy strong {
	font-size: 16px;
	font-weight: 780;
	line-height: 1.25;
}

body.ep-core-category-experience .ep-category-nav__copy small {
	color: var(--ep-cat-muted);
	font-size: 12px;
	font-weight: 650;
	margin-top: 5px;
}

body.ep-core-category-experience .ep-category-nav__arrow {
	border-right: 2px solid var(--ep-cat-blue);
	border-top: 2px solid var(--ep-cat-blue);
	height: 7px;
	justify-self: end;
	transform: rotate(45deg);
	width: 7px;
}

@media (hover:hover) and (pointer:fine) {
	body.ep-core-category-experience .ep-category-nav__card:hover {
		background: #fff;
		border-color: #a9c2dc;
		box-shadow: 0 9px 22px rgba(28, 69, 112, .10);
		transform: translateY(-2px);
	}
}

body.ep-core-category-experience .ep-category-nav__card:focus-visible {
	outline: 3px solid rgba(40, 93, 156, .3);
	outline-offset: 2px;
}

body.ep-core-category-experience .woocommerce ul.products > .ep-category-guide--loop,
body.ep-core-category-experience .ep-category-guide {
	background: linear-gradient(118deg, #0c1c32 0%, #123a5a 64%, #126f88 100%);
	border: 0 !important;
	border-radius: 18px;
	box-shadow: 0 14px 34px rgba(9, 31, 54, .16);
	box-sizing: border-box;
	clear: both;
	float: none !important;
	grid-column: 1 / -1;
	height: auto !important;
	list-style: none;
	margin: 2px 0 !important;
	max-width: none !important;
	min-width: 0;
	overflow: hidden;
	padding: 0 !important;
	position: relative;
	width: 100% !important;
}

body.ep-core-category-experience .ep-category-guide::after,
body.single-post .ep-post-guide::after {
	border: 1px solid rgba(89, 226, 232, .18);
	border-radius: 50%;
	content: "";
	height: 220px;
	position: absolute;
	right: -82px;
	top: -110px;
	width: 220px;
}

body.ep-core-category-experience .ep-category-guide > a {
	align-items: center;
	box-sizing: border-box;
	color: #fff;
	display: grid;
	gap: 8px 24px;
	grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.35fr) auto;
	min-height: 150px;
	padding: 24px 28px;
	position: relative;
	text-decoration: none !important;
	z-index: 1;
}

body.ep-core-category-experience .ep-category-guide__eyebrow {
	color: #61d6e1;
	font-size: 11px;
	font-weight: 850;
	grid-column: 1;
	letter-spacing: .1em;
	text-transform: uppercase;
}

body.ep-core-category-experience .ep-category-guide strong {
	font-size: clamp(22px, 2.4vw, 34px);
	grid-column: 1;
	letter-spacing: -.025em;
	line-height: 1.08;
}

body.ep-core-category-experience .ep-category-guide > a > span:not(.ep-category-guide__eyebrow) {
	color: #d7e5f1;
	font-size: 15px;
	grid-column: 2;
	grid-row: 1 / span 2;
	line-height: 1.55;
}

body.ep-core-category-experience .ep-category-guide b {
	align-items: center;
	background: #fff;
	border-radius: 12px;
	color: #173a60;
	display: inline-flex;
	font-size: 14px;
	gap: 12px;
	grid-column: 3;
	grid-row: 1 / span 2;
	justify-content: center;
	min-height: 48px;
	padding: 0 18px;
	white-space: nowrap;
}

body.ep-core-category-experience .ep-category-description {
	clear: both;
	margin: clamp(34px, 5vw, 64px) 0 0;
}

body.ep-core-category-experience .ep-category-description details {
	background: #fff;
	border: 1px solid var(--ep-cat-border);
	border-radius: 18px;
	box-shadow: 0 8px 26px rgba(24, 52, 82, .045);
	overflow: hidden;
}

body.ep-core-category-experience .ep-category-description summary {
	align-items: center;
	cursor: pointer;
	display: grid;
	gap: 3px 18px;
	grid-template-columns: 1fr auto;
	list-style: none;
	padding: 20px 22px;
}

body.ep-core-category-experience .ep-category-description summary::-webkit-details-marker {
	display: none;
}

body.ep-core-category-experience .ep-category-description summary span {
	color: var(--ep-cat-blue);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: .1em;
	text-transform: uppercase;
}

body.ep-core-category-experience .ep-category-description summary strong {
	color: var(--ep-cat-ink);
	font-size: 20px;
	grid-column: 1;
}

body.ep-core-category-experience .ep-category-description summary i {
	border-bottom: 2px solid var(--ep-cat-blue);
	border-right: 2px solid var(--ep-cat-blue);
	grid-column: 2;
	grid-row: 1 / span 2;
	height: 8px;
	transform: rotate(45deg);
	transition: transform .16s ease;
	width: 8px;
}

body.ep-core-category-experience .ep-category-description details[open] summary i {
	transform: rotate(225deg);
}

body.ep-core-category-experience .ep-category-description__content {
	border-top: 1px solid #e8eef4;
	color: #46566b;
	font-size: 15px;
	line-height: 1.7;
	padding: 8px 22px 24px;
}

body.ep-core-category-experience .ep-category-description__content h2,
body.ep-core-category-experience .ep-category-description__content h3 {
	color: var(--ep-cat-ink);
	font-size: 20px;
	margin: 22px 0 8px;
}

body.single-post .ep-post-guide {
	background: linear-gradient(118deg, #0c1c32, #154d6c);
	border-radius: 16px;
	margin: 28px 0;
	overflow: hidden;
	position: relative;
}

body.single-post .ep-post-guide a {
	align-items: center;
	color: #fff;
	display: grid;
	gap: 5px 18px;
	grid-template-columns: 1fr auto;
	padding: 20px 22px;
	position: relative;
	text-decoration: none !important;
	z-index: 1;
}

body.single-post .ep-post-guide span {
	color: #66d9e3;
	font-size: 11px;
	font-weight: 850;
	letter-spacing: .1em;
	text-transform: uppercase;
}

body.single-post .ep-post-guide strong {
	font-size: 20px;
	grid-column: 1;
}

body.single-post .ep-post-guide b {
	background: #fff;
	border-radius: 10px;
	color: #173a60;
	grid-column: 2;
	grid-row: 1 / span 2;
	padding: 11px 15px;
	white-space: nowrap;
}

@media (max-width: 1024px) {
	body.ep-core-category-experience .ep-category-nav__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.ep-core-category-experience .ep-category-guide > a {
		grid-template-columns: minmax(180px, .85fr) minmax(260px, 1.4fr);
	}

	body.ep-core-category-experience .ep-category-guide b {
		grid-column: 1;
		grid-row: 3;
		justify-self: start;
	}
}

@media (max-width: 767px) {
	body.ep-core-category-experience .entry-header.product-archive-title {
		margin-bottom: 18px !important;
	}

	body.ep-core-category-experience .ep-category-nav {
		border-radius: 16px;
		margin-bottom: 22px;
		padding: 15px;
	}

	body.ep-core-category-experience .ep-category-nav__head {
		align-items: flex-start;
		margin-bottom: 13px;
		padding-bottom: 13px;
	}

	body.ep-core-category-experience .ep-category-nav__head p {
		display: none;
	}

	body.ep-core-category-experience .ep-category-nav__head h2 {
		font-size: 20px;
	}

	body.ep-core-category-experience .ep-category-nav__grid {
		gap: 9px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.ep-core-category-experience .ep-category-nav__card {
		align-content: center;
		gap: 8px;
		grid-template-columns: 48px minmax(0, 1fr);
		min-height: 112px;
		padding: 10px;
	}

	body.ep-core-category-experience .ep-category-nav__image {
		height: 48px;
		width: 48px;
	}

	body.ep-core-category-experience .ep-category-nav__copy strong {
		font-size: 14px;
	}

	body.ep-core-category-experience .ep-category-nav__copy small {
		font-size: 10px;
	}

	body.ep-core-category-experience .ep-category-nav__arrow {
		display: none;
	}

	body.ep-core-category-experience .ep-category-guide > a {
		display: block;
		min-height: 0;
		padding: 22px;
	}

	body.ep-core-category-experience .ep-category-guide strong,
	body.ep-core-category-experience .ep-category-guide > a > span,
	body.ep-core-category-experience .ep-category-guide b {
		display: block;
	}

	body.ep-core-category-experience .ep-category-guide strong {
		font-size: 24px;
		margin-top: 7px;
	}

	body.ep-core-category-experience .ep-category-guide > a > span:not(.ep-category-guide__eyebrow) {
		font-size: 14px;
		margin-top: 10px;
	}

	body.ep-core-category-experience .ep-category-guide b {
		margin-top: 16px;
		min-height: 0;
		padding: 13px 15px;
		text-align: center;
	}

	body.single-post .ep-post-guide a {
		display: block;
	}

	body.single-post .ep-post-guide b {
		display: block;
		margin-top: 14px;
		text-align: center;
	}
}

@media (max-width: 359px) {
	body.ep-core-category-experience .ep-category-nav__grid {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.ep-core-category-experience .ep-category-nav__card,
	body.ep-core-category-experience .ep-category-description summary i {
		transition: none;
	}
}
