/* Parduotuvės puslapių antraštės (hero) ir breadcrumbs.
 * Taikoma tik WooCommerce puslapiams (body.woocommerce-page): parduotuvė, kategorijos,
 * prekė, krepšelis, atsiskaitymas, paskyra. Ne parduotuvės puslapiai nepaliečiami.
 */

body.woocommerce-page {
	--dsp-green: #033521;
	--dsp-green-hover: #0a4a30;
	--dsp-mint: #d5efe0;
	--dsp-mint-light: #ecf7f1;
	--dsp-muted: #5b6b62;
	--dsp-sep: #9db3a7;
}

/* ================================================================
 * 1. Hero kortelė (parduotuvė, kategorijos, krepšelis, atsiskaitymas, paskyra)
 * Vietoj pilno pločio juostos — suapvalinta mėtinė kortelė konteinerio plotyje,
 * kaip paslaugų puslapių hero kortelės. Plaukiojanti antraštė jos nebedengia.
 * ================================================================ */
body.woocommerce-page .hero-section[data-type="type-2"] {
	background: transparent;
	padding-top: 40px;
}

body.woocommerce-page .hero-section[data-type="type-2"] > header.entry-header {
	--container-padding: 44px 56px 48px;
	--min-height: 0px;
	--itemSpacing: 14px;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background-color: var(--dsp-mint-light);
	background-image:
		radial-gradient(circle at 100% 0%, rgba(213, 239, 224, 0.95) 0, rgba(213, 239, 224, 0.95) 150px, transparent 151px),
		radial-gradient(circle at 100% 0%, transparent 0, transparent 214px, rgba(3, 53, 33, 0.07) 215px, rgba(3, 53, 33, 0.07) 216px, transparent 217px),
		linear-gradient(120deg, #f3faf6 0%, var(--dsp-mint-light) 55%, #e3f3ea 100%);
	border: 1px solid rgba(3, 53, 33, 0.06);
	border-radius: 16px;
	box-shadow: 0 4px 30px rgba(30, 30, 30, 0.03);
}

/* Pavadinimas */
body.woocommerce-page .hero-section[data-type="type-2"] .page-title {
	font-size: clamp(30px, 1.4vw + 20px, 46px);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: var(--dsp-green);
	max-width: 22ch;
	text-wrap: balance;
}

/* Kategorijos aprašymas */
body.woocommerce-page .hero-section[data-type="type-2"] .page-description {
	max-width: 640px;
	font-size: 16px;
	line-height: 1.65;
	color: #3d4f45;
}
body.woocommerce-page .hero-section[data-type="type-2"] .page-description p {
	margin: 0 0 0.6em;
}

/* Turinys po hero: mažesnis tarpas, nes hero dabar atskira kortelė */
body.woocommerce-page .hero-section[data-type="type-2"] + .ct-container,
body.woocommerce-page .hero-section[data-type="type-2"] + .ct-container-full {
	padding-top: 44px;
}

/* ================================================================
 * 2. Breadcrumbs (visuose parduotuvės puslapiuose)
 * Sakinio raidės vietoj didžiųjų, „pill“ forma, aiški dabartinė vieta.
 * ================================================================ */
body.woocommerce-page .ct-breadcrumbs[data-source="default"] {
	--theme-text-transform: none;
	--theme-font-size: 14px;
	--theme-font-weight: 500;
	--theme-line-height: 1.4;
	--theme-letter-spacing: 0;
	display: inline-flex;
	flex-wrap: nowrap;
	align-items: center;
	align-self: flex-start;
	max-width: 100%;
	min-height: 34px;
	padding: 0 16px;
	border-radius: 999px;
	color: var(--dsp-muted);
	white-space: nowrap;
}

body.woocommerce-page .hero-section[data-type="type-2"] .ct-breadcrumbs[data-source="default"] {
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(3, 53, 33, 0.07);
}

body.woocommerce-page .hero-section[data-type="type-1"] .ct-breadcrumbs[data-source="default"] {
	background: var(--dsp-mint-light);
	border: 1px solid rgba(3, 53, 33, 0.05);
}

body.woocommerce-page .ct-breadcrumbs[data-source="default"] > span {
	flex: 0 0 auto;
}

body.woocommerce-page .ct-breadcrumbs[data-source="default"] a {
	display: inline-block;
	padding-block: 10px;
	margin-block: -10px;
	color: var(--dsp-green);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

body.woocommerce-page .ct-breadcrumbs[data-source="default"] a:hover,
body.woocommerce-page .ct-breadcrumbs[data-source="default"] a:focus-visible {
	color: var(--dsp-green-hover);
	text-decoration-color: currentColor;
}

body.woocommerce-page .ct-breadcrumbs[data-source="default"] a:focus-visible {
	outline: 2px solid var(--dsp-green);
	outline-offset: 2px;
	border-radius: 3px;
}

body.woocommerce-page .ct-breadcrumbs[data-source="default"] > span .ct-separator {
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	margin: 0 10px;
	color: var(--dsp-sep);
}

/* Dabartinis puslapis: blankesnis, ilgas pavadinimas trumpinamas daugtaškiu */
body.woocommerce-page .ct-breadcrumbs[data-source="default"] > .last-item {
	flex: 0 1 auto;
	min-width: 0;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--dsp-muted);
	font-weight: 500;
}

/* Prekės puslapis: breadcrumbs virš galerijos */
body.single-product .hero-section[data-type="type-1"] {
	margin-top: -16px;
	--margin-bottom: 28px;
}

/* ================================================================
 * 3. Antraštės krepšelio ikona (visame svetainės header)
 * Didesnis paspaudimo plotas (44px) be maketo pokyčio, ryškesnis skaičiaus ženkliukas.
 * ================================================================ */
#header [data-id="cart"] .ct-cart-item {
	position: relative;
}
#header [data-id="cart"] .ct-cart-item::after {
	content: "";
	position: absolute;
	inset: -12px;
}
#header [data-id="cart"] .ct-dynamic-count-cart {
	min-width: 18px;
	width: auto;
	height: 18px;
	padding: 0 5px;
	top: -10px;
	right: -10px;
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	letter-spacing: 0;
	background-color: #033521;
	color: #fff;
	border-radius: 999px;
	box-shadow: 0 0 0 2px #fdfdfd;
	font-variant-numeric: tabular-nums;
}

/* ================================================================
 * 4. Planšetė
 * ================================================================ */
@media (max-width: 999.98px) {
	body.woocommerce-page .hero-section[data-type="type-2"] {
		padding-top: 20px;
	}
	body.woocommerce-page .hero-section[data-type="type-2"] > header.entry-header {
		--container-padding: 32px 36px 36px;
		border-radius: 14px;
	}
	body.woocommerce-page .hero-section[data-type="type-2"] + .ct-container,
	body.woocommerce-page .hero-section[data-type="type-2"] + .ct-container-full {
		padding-top: 36px;
	}
	body.single-product .hero-section[data-type="type-1"] {
		margin-top: -32px;
		--margin-bottom: 22px;
	}
}

/* ================================================================
 * 5. Mobilus
 * ================================================================ */
@media (max-width: 689.98px) {
	body.woocommerce-page .hero-section[data-type="type-2"] {
		padding-top: 14px;
	}
	body.woocommerce-page .hero-section[data-type="type-2"] > header.entry-header {
		--container-padding: 20px 20px 24px;
		--itemSpacing: 12px;
		border-radius: 14px;
		background-image:
			radial-gradient(circle at 100% 0%, rgba(213, 239, 224, 0.95) 0, rgba(213, 239, 224, 0.95) 84px, transparent 85px),
			linear-gradient(120deg, #f3faf6 0%, var(--dsp-mint-light) 60%, #e3f3ea 100%);
	}
	body.woocommerce-page .hero-section[data-type="type-2"] .page-title {
		font-size: 28px;
		line-height: 1.15;
	}
	body.woocommerce-page .hero-section[data-type="type-2"] .page-description {
		font-size: 15px;
		line-height: 1.6;
	}
	body.woocommerce-page .hero-section[data-type="type-2"] + .ct-container,
	body.woocommerce-page .hero-section[data-type="type-2"] + .ct-container-full {
		padding-top: 24px;
	}

	body.woocommerce-page .ct-breadcrumbs[data-source="default"] {
		--theme-font-size: 13px;
		min-height: 32px;
		padding: 0 14px;
	}
	body.woocommerce-page .ct-breadcrumbs[data-source="default"] a {
		padding-block: 12px;
		margin-block: -12px;
	}
	body.woocommerce-page .ct-breadcrumbs[data-source="default"] > span .ct-separator {
		margin: 0 8px;
	}

	body.single-product .hero-section[data-type="type-1"] {
		margin-top: -26px;
		--margin-bottom: 16px;
	}
	/* Prekės pavadinimas jau matomas po galerija: mobiliajame rodom tik kelią iki kategorijos */
	body.single-product .hero-section[data-type="type-1"] .ct-breadcrumbs > .last-item,
	body.single-product .hero-section[data-type="type-1"] .ct-breadcrumbs > span:has(+ .last-item) .ct-separator {
		display: none;
	}
}

/* Header'io šešėlis neskaidrioje būsenoje (parduotuvės puslapiai) — toks pat kaip kituose puslapiuose,
   kur jį duoda skaidraus / prilipusio header'io nustatymai */
[data-header*="type-1"] .ct-header [data-row*="middle"]:not([data-transparent-row="yes"]) {
	--theme-box-shadow: 0px 10px 20px rgba(43, 61, 79, 0.2);
}
