/**
 * TAZZANT catalogue UX.
 * The rules are deliberately scoped to WooCommerce catalogue pages.
 */

.tazzant-catalog-context {
	--tz-catalog-navy: #163b6d;
	--tz-catalog-aqua: #45c5b4;
	--tz-catalog-coral: #ff6b61;
	--tz-catalog-cream: #fff9f2;
	--tz-catalog-border: #eadfce;
	--tz-catalog-muted: #6f7f96;
	--tz-catalog-shadow: 0 15px 36px rgb(22 59 109 / 8%);
	background: var(--tz-catalog-cream);
}

/* The imported Kids demo owns this exact WPBakery row on the Shop page. */
.tazzant-shop-context .vc_custom_1703757865028 {
	display: none !important;
}

.tazzant-catalog-nav,
.tazzant-catalog-nav * {
	box-sizing: border-box;
}

.tazzant-catalog-nav {
	width: min(100% - 32px, 1400px);
	margin: 24px auto 30px;
	padding: 24px;
	border: 1px solid var(--tz-catalog-border);
	border-radius: 28px;
	background: #fff;
	box-shadow: var(--tz-catalog-shadow);
	color: var(--tz-catalog-navy);
}

.tazzant-catalog-nav__breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	font-size: 14px;
	color: var(--tz-catalog-muted);
}

.tazzant-catalog-nav__breadcrumb a {
	color: var(--tz-catalog-navy);
	font-weight: 700;
}

.tazzant-catalog-nav__heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 20px;
}

.tazzant-catalog-nav__heading p {
	margin: 0 0 5px;
	color: var(--tz-catalog-coral);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.tazzant-catalog-nav__heading h1 {
	margin: 0;
	color: var(--tz-catalog-navy);
	font-size: clamp(28px, 3vw, 44px);
	line-height: 1.08;
}

.tazzant-catalog-nav__heading > span {
	flex: none;
	padding: 9px 14px;
	border-radius: 999px;
	background: #eefaf8;
	color: #168f82;
	font-size: 13px;
	font-weight: 800;
}

.tazzant-catalog-nav__rail {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.tazzant-catalog-nav__card {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) 18px;
	align-items: center;
	gap: 12px;
	min-width: 0;
	padding: 14px;
	border: 1px solid #d8ece8;
	border-radius: 20px;
	background: #f2fcfa;
	color: var(--tz-catalog-navy);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tazzant-catalog-nav__card:hover,
.tazzant-catalog-nav__card:focus-visible {
	border-color: var(--tz-catalog-aqua);
	box-shadow: 0 12px 24px rgb(22 59 109 / 10%);
	color: var(--tz-catalog-navy);
	transform: translateY(-2px);
}

.tazzant-catalog-nav__card.is-coral { background: #fff5f2; border-color: #ffd8d3; }
.tazzant-catalog-nav__card.is-yellow { background: #fff9e8; border-color: #f6e3a8; }
.tazzant-catalog-nav__card.is-green { background: #f5faec; border-color: #dceabd; }
.tazzant-catalog-nav__card.is-purple { background: #f7f3ff; border-color: #e2d7fa; }

.tazzant-catalog-nav__visual {
	display: grid;
	width: 72px;
	height: 72px;
	place-items: center;
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
}

.tazzant-catalog-nav__visual img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tazzant-catalog-nav__visual svg {
	width: 31px;
	height: 31px;
	color: var(--tz-catalog-aqua);
}

.tazzant-catalog-nav__copy {
	display: grid;
	min-width: 0;
	gap: 4px;
}

.tazzant-catalog-nav__copy strong {
	overflow: hidden;
	font-size: 15px;
	line-height: 1.25;
	text-overflow: ellipsis;
}

.tazzant-catalog-nav__copy small {
	color: var(--tz-catalog-muted);
	font-size: 12px;
	font-weight: 600;
}

.tazzant-catalog-nav__card > b {
	font-size: 23px;
	font-weight: 500;
}

/* Compact, readable native WoodMart catalogue toolbar. */
.tazzant-catalog-context .shop-loop-head {
	gap: 12px;
	padding: 13px 16px;
	border: 1px solid #d8ece8;
	border-radius: 18px;
	background: #f6fcfb;
}

.tazzant-catalog-context .wd-shop-tools,
.tazzant-catalog-context .wd-products-per-page,
.tazzant-catalog-context .woocommerce-ordering {
	margin-bottom: 0;
}

.tazzant-catalog-context .wd-off-canvas-btn,
.tazzant-catalog-context .woocommerce-ordering select {
	min-height: 44px;
	border-radius: 12px;
}

.tazzant-catalog-context .woocommerce-result-count {
	color: var(--tz-catalog-navy);
	font-weight: 700;
}

/* Product consistency: stable media area, concise names and local fallback. */
.tazzant-catalog-context .wd-product .product-element-top,
.tazzant-catalog-context .tazzant-product-card__image {
	position: relative;
	display: grid;
	width: 100%;
	aspect-ratio: 1 / 1;
	place-items: center;
	overflow: hidden;
	border-radius: 18px;
	background-color: #fff;
	background-image: url('../images/tazzant-product-placeholder.svg');
	background-repeat: no-repeat;
	background-position: center;
	background-size: 72% auto;
}

.tazzant-catalog-context .wd-product .product-element-top img,
.tazzant-catalog-context .tazzant-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #fff;
}

.tazzant-catalog-context .wd-product .wd-entities-title,
.tazzant-catalog-context .tazzant-product-card h3 {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	min-height: 2.7em;
	line-height: 1.35;
}

.tazzant-catalog-context .price,
.tazzant-catalog-context .tazzant-product-card__price {
	direction: ltr;
	unicode-bidi: isolate;
	color: #2452cc;
	font-weight: 800;
}

/* Progressive enhancement: the server pagination stays public/crawlable. */
.tazzant-progressive-ready .tazzant-server-pagination,
.tazzant-progressive-ready .woocommerce-pagination.wd-pagination {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.tazzant-progressive-loader {
	display: grid;
	justify-items: center;
	gap: 10px;
	width: 100%;
	margin: 26px 0 18px;
	text-align: center;
}

.tazzant-progressive-loader__button {
	min-width: 210px;
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--tz-catalog-navy);
	box-shadow: 0 10px 22px rgb(22 59 109 / 18%);
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}

.tazzant-progressive-loader__button:hover,
.tazzant-progressive-loader__button:focus-visible { background: #0e2b52; }
.tazzant-progressive-loader__button[disabled] { cursor: wait; opacity: .7; }

.tazzant-progressive-loader__status {
	min-height: 20px;
	color: var(--tz-catalog-muted);
	font-size: 13px;
}

.tazzant-progressive-loader__sentinel {
	width: 100%;
	height: 2px;
}

.tazzant-product-is-new {
	animation: tazzant-product-reveal .35s ease both;
}

@keyframes tazzant-product-reveal {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
	.tazzant-catalog-nav__rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.tazzant-catalog-context .main-page-wrapper {
		padding-bottom: calc(100px + env(safe-area-inset-bottom));
	}

	.tazzant-catalog-nav {
		width: calc(100% - 24px);
		max-height: 278px;
		margin: 14px auto 18px;
		padding: 16px;
		overflow: hidden;
		border-radius: 23px;
	}

	.tazzant-catalog-nav__breadcrumb { display: none; }

	.tazzant-catalog-nav__heading {
		align-items: center;
		gap: 10px;
		margin-bottom: 14px;
	}

	.tazzant-catalog-nav__heading p { font-size: 10px; }
	.tazzant-catalog-nav__heading h1 { font-size: 23px; }
	.tazzant-catalog-nav__heading > span { padding: 7px 10px; font-size: 11px; }

	.tazzant-catalog-nav__rail {
		display: flex;
		gap: 10px;
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		padding: 2px 2px 12px;
		scroll-padding-inline: 2px;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.tazzant-catalog-nav__rail::-webkit-scrollbar { display: none; }

	.tazzant-catalog-nav__card {
		flex: 0 0 148px;
		grid-template-columns: 54px minmax(0, 1fr);
		gap: 9px;
		min-height: 112px;
		padding: 10px;
		scroll-snap-align: start;
	}

	.tazzant-catalog-nav__visual { width: 54px; height: 54px; border-radius: 14px; }
	.tazzant-catalog-nav__visual svg { width: 25px; height: 25px; }
	.tazzant-catalog-nav__copy strong { font-size: 13px; }
	.tazzant-catalog-nav__copy small { font-size: 11px; }
	.tazzant-catalog-nav__card > b { display: none; }

	.tazzant-catalog-context .shop-loop-head {
		position: relative;
		z-index: 3;
		margin-bottom: 16px;
		padding: 10px;
	}

	.tazzant-catalog-context .wd-products[class*="wd-columns-"] {
		--wd-col: 2 !important;
		--wd-gap: 12px !important;
	}

	.tazzant-catalog-context .wd-product .product-element-top,
	.tazzant-catalog-context .tazzant-product-card__image { border-radius: 14px; }

	.tazzant-progressive-loader { margin-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
	.tazzant-catalog-nav__card,
	.tazzant-product-is-new { animation: none; transition: none; }
}
