/**
 * Refresh v1 — vizualinis atnaujinimas (žr. inc/ps-refresh.php).
 *
 * Viskas apribota `body.ps-refresh`: išjungus modulį (arba ?ps_refresh=0)
 * svetainė grįžta į ankstesnę išvaizdą be jokių likučių.
 *
 * Kryptis: modernus komercinis žvejybos e-shop — vienas skaitomas
 * šriftas (Fira Sans), grafitinis tekstas, vienas akcentas #e83a17,
 * minimalūs šešėliai, 6px kampai, aiškūs pirkimo veiksmai.
 */

/* ================================================================
   1. TOKENAI — WoodMart kintamieji perrašomi body lygyje
   ================================================================ */

body.ps-refresh {
	--ps-r-accent: #e83a17;
	--ps-r-accent-hover: #c9330f;
	--ps-r-accent-soft: #fdf1ed;
	--ps-r-ink: #1f2328;
	--ps-r-ink-2: #4b5563;
	--ps-r-muted: #6b7280;
	--ps-r-line: #e5e7eb;
	--ps-r-surface: #f6f5f3;
	--ps-r-radius: 6px;
	--ps-r-font: "Fira Sans", Arial, Helvetica, sans-serif;

	--wd-primary-color: var(--ps-r-accent);
	--wd-text-color: var(--ps-r-ink-2);
	--wd-link-color: var(--ps-r-ink);
	--wd-link-color-hover: var(--ps-r-accent);

	--wd-title-font: var(--ps-r-font);
	--wd-title-font-weight: 700;
	--wd-title-color: var(--ps-r-ink);

	--wd-entities-title-font: var(--ps-r-font);
	--wd-entities-title-font-weight: 600;
	--wd-entities-title-color: var(--ps-r-ink);
	--wd-entities-title-color-hover: var(--ps-r-accent);

	--wd-widget-title-font: var(--ps-r-font);
	--wd-widget-title-font-weight: 700;
	--wd-widget-title-color: var(--ps-r-ink);
	--wd-widget-title-font-size: 14px;

	--wd-header-el-font: var(--ps-r-font);
	--wd-header-el-font-weight: 600;
	--wd-header-el-font-size: 14px;
	--wd-header-el-transform: none;

	--btn-accented-bgcolor: var(--ps-r-accent);
	--btn-accented-bgcolor-hover: var(--ps-r-accent-hover);

	color: var(--ps-r-ink-2);
}

/* Antraštės: tvirtos, kompaktiškos, be plataus display šrifto. */
body.ps-refresh :is(h1, h2, h3, h4, h5, h6, .title, .wd-el-title, .product_title) {
	font-family: var(--ps-r-font);
	letter-spacing: -.01em;
}

body.ps-refresh .product_title {
	font-size: clamp(24px, 2.2vw, 30px);
	font-weight: 700;
	line-height: 1.2;
}

/* ================================================================
   2. MYGTUKAI — vienoda sistema
   ================================================================ */

body.ps-refresh :is(.button, .btn, button.button, .single_add_to_cart_button, .checkout-button, #place_order, .wd-buy-now-btn) {
	border-radius: var(--ps-r-radius);
	font-family: var(--ps-r-font);
	font-weight: 700;
	letter-spacing: .02em;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

body.ps-refresh :is(.single_add_to_cart_button, .checkout-button, #place_order, .add_to_cart_button, .wd-add-btn .button) {
	background-color: var(--ps-r-accent);
	border-color: var(--ps-r-accent);
	color: #fff;
}

body.ps-refresh :is(.single_add_to_cart_button, .checkout-button, #place_order, .add_to_cart_button, .wd-add-btn .button):hover {
	background-color: var(--ps-r-accent-hover);
	border-color: var(--ps-r-accent-hover);
	color: #fff;
}

body.ps-refresh :is(.button, .btn, a, button, input, select, summary):focus-visible {
	outline: 2px solid var(--ps-r-accent);
	outline-offset: 2px;
}

/* ================================================================
   3. ŽENKLIUKAI — plokšti, vienodi, be švytėjimo
   ================================================================ */

body.ps-refresh .product-labels .product-label {
	min-width: 0;
	min-height: 0;
	padding: 4px 8px;
	border-radius: 4px;
	font-family: var(--ps-r-font);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
}

body.ps-refresh .product-labels .product-label.onsale {
	background: var(--ps-r-accent);
	color: #fff;
}

/* „Top prekė“ (Code Snippet #18) — grafitinis ženkliukas vietoj
   oranžinio gradiento su švytėjimu. */
body.ps-refresh .ps-top-badge {
	padding: 4px 9px;
	border-radius: 4px;
	background: var(--ps-r-ink);
	box-shadow: none;
	color: #fff;
	font-family: var(--ps-r-font);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	animation: none;
}

body.ps-refresh .ps-top-badge::before,
body.ps-refresh .ps-top-badge::after {
	display: none;
}

body.ps-refresh .ps-top-badge__fire {
	display: none;
}

/* Apatinis kairysis nuotraukos kampas: viršuje dešinėje yra wishlist
   širdelė (mobile), viršuje kairėje — nuolaidos ženkliukas. */
body.ps-refresh .product-grid-item .ps-top-badge {
	top: auto;
	right: auto;
	bottom: 10px;
	left: 10px;
}

body.ps-refresh .ps-top-product .product-wrapper {
	animation: none;
}

body.ps-refresh .ps-top-product .product-wrapper::after {
	display: none;
}

/* Produkto puslapio „Top prekė“ žyma — be gradiento */
body.ps-refresh .ps-top-single-note {
	border: 0;
	border-radius: 4px;
	background: var(--ps-r-accent-soft);
	color: var(--ps-r-accent-hover);
}

/* ================================================================
   4. PAIEŠKA — pagrindinis prekių radimo įrankis, aiškiai matomas
   ================================================================ */

@media (min-width: 1025px) {
	body.ps-refresh .whb-general-header-inner .whb-col-center .dgwt-wcas-search-input {
		height: 48px;
		padding-left: 18px;
		border: 1.5px solid #d6dae0;
		border-radius: var(--ps-r-radius);
		background: #fff;
		color: var(--ps-r-ink);
		font-size: 15px;
	}

	body.ps-refresh .whb-general-header-inner .whb-col-center .dgwt-wcas-search-input:focus {
		border-color: var(--ps-r-accent);
		box-shadow: 0 0 0 3px rgba(232, 58, 23, .12);
	}

	/* FiboSearch „burbulo“ mygtuko trikampis (::before) likdavo matomas
	   kaip „◀“, nes pats mygtukas ps-mega-menu.css padarytas permatomas. */
	body.ps-refresh .whb-general-header-inner .dgwt-wcas-search-submit::before {
		display: none !important;
	}
}

/* ================================================================
   5. PRODUKTO KORTELĖS — subtilus hover, aiški kaina
   ================================================================ */

body.ps-refresh .product-grid-item .price {
	color: var(--ps-r-ink);
	font-size: 16px;
	font-weight: 700;
}

body.ps-refresh .product-grid-item .price ins,
body.ps-refresh .product-grid-item .price > .amount {
	color: var(--ps-r-accent);
}

@media (min-width: 1025px) {
	body.ps-refresh .product-grid-item .product-element-top img {
		transition: transform .3s ease;
	}

	body.ps-refresh .product-grid-item:hover .product-element-top img {
		transform: scale(1.04);
	}
}

/* ================================================================
   6. PRODUKTO PUSLAPIS — pirkimo zona
   ================================================================ */

body.ps-refresh.single-product .summary .price {
	margin-bottom: 18px;
	color: var(--ps-r-accent);
	font-size: 30px;
	font-weight: 800;
	line-height: 1.1;
}

body.ps-refresh.single-product .summary .price del {
	color: var(--ps-r-muted);
	font-size: 18px;
	font-weight: 400;
}

body.ps-refresh.single-product .summary .single_add_to_cart_button,
body.ps-refresh.single-product .summary .wd-buy-now-btn {
	min-height: 50px;
	padding-right: 28px;
	padding-left: 28px;
	font-size: 15px;
}

body.ps-refresh.single-product .summary .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 190px;
}

body.ps-refresh.single-product .summary .wd-buy-now-btn {
	border: 1.5px solid var(--ps-r-ink);
	background: #fff;
	color: var(--ps-r-ink);
}

body.ps-refresh.single-product .summary .wd-buy-now-btn:hover {
	background: var(--ps-r-ink);
	color: #fff;
}

body.ps-refresh.single-product .summary .quantity input.qty,
body.ps-refresh.single-product .summary .quantity :is(.minus, .plus) {
	min-height: 50px;
}

/* Pasitikėjimo žinutės */
body.ps-refresh .ps-trust-list {
	display: grid;
	gap: 8px;
	margin: 16px 0 18px;
	padding: 14px 16px;
	border: 1px solid var(--ps-r-line);
	border-radius: var(--ps-r-radius);
	background: var(--ps-r-surface);
	list-style: none;
}

body.ps-refresh .ps-trust-list li {
	position: relative;
	margin: 0;
	padding-left: 24px;
	color: var(--ps-r-ink);
	font-size: 14px;
	line-height: 1.4;
}

body.ps-refresh .ps-trust-list li::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 2px;
	width: 11px;
	height: 6px;
	border-bottom: 2px solid var(--ps-r-accent);
	border-left: 2px solid var(--ps-r-accent);
	transform: rotate(-45deg);
}

/* Meta (kategorijos, žymos, gamintojas) — po pirkimo zona, antraeilė */
body.ps-refresh.single-product .summary .product_meta {
	padding-top: 14px;
	border-top: 1px solid var(--ps-r-line);
	color: var(--ps-r-muted);
	font-size: 13px;
}

body.ps-refresh.single-product .summary .product_meta a {
	color: var(--ps-r-ink-2);
}

body.ps-refresh.single-product .summary .product_meta a:hover {
	color: var(--ps-r-accent);
}

/* ================================================================
   7. SEKCIJŲ ANTRAŠTĖS, FOOTER, TABS
   ================================================================ */

body.ps-refresh .footer-container :is(.widget-title, h5, h4) {
	color: #fff;
	font-size: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

body.ps-refresh .wd-nav-tabs > li > a .nav-link-text,
body.ps-refresh .wd-accordion-title-text {
	font-family: var(--ps-r-font);
	font-weight: 700;
	letter-spacing: .02em;
}

/* ================================================================
   8. SHOP / GRUPĖS JUOSTA (.ps-shop-band, inc/ps-refresh-groups.php)
   Tamsus grafitas + žvejybos patternas (SVG kaip mask — spalva CSS'e),
   H1, trumpas tekstas ir greiti įėjimai į grupes.
   ================================================================ */

body.ps-refresh .ps-shop-band {
	position: relative;
	isolation: isolate;
	/* .wd-shop-tools flex elementas: be min-width: 0 slenkanti mygtukų
	   eilė išplėsdavo bloką per ekrano plotį (mobile). */
	flex: 1 1 100%;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0 0 22px;
	padding: 30px 32px 26px;
	overflow: hidden;
	border-radius: var(--ps-r-radius);
	background: #151a21;
	color: #d5d9df;
}

body.ps-refresh .ps-shop-band::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: #fff;
	opacity: .07;
	-webkit-mask: url("../images/ps-fishing-pattern.svg") 0 0 / 220px 220px repeat;
	mask: url("../images/ps-fishing-pattern.svg") 0 0 / 220px 220px repeat;
	pointer-events: none;
}

/* Akcento brūkšnys kairėje — ta pati kalba kaip aktyvūs meniu punktai */
body.ps-refresh .ps-shop-band::after {
	content: "";
	position: absolute;
	top: 30px;
	bottom: 26px;
	left: 0;
	width: 3px;
	background: var(--ps-r-accent);
}

body.ps-refresh .ps-shop-band__title {
	margin: 0 0 8px;
	color: #fff;
	font-size: clamp(24px, 2.4vw, 32px);
	font-weight: 800;
	line-height: 1.15;
}

body.ps-refresh .ps-shop-band__lead {
	max-width: 760px;
	margin: 0 0 18px;
	color: #c3c9d1;
	font-size: 15px;
	line-height: 1.6;
}

body.ps-refresh .ps-shop-band__back {
	display: inline-flex;
	gap: 6px;
	margin-bottom: 8px;
	color: #aeb5be;
	font-size: 13px;
	text-decoration: none;
}

body.ps-refresh .ps-shop-band__back:hover {
	color: #fff;
}

body.ps-refresh .ps-shop-band__chips ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.ps-refresh .ps-shop-band__chips li {
	margin: 0;
}

body.ps-refresh .ps-shop-band__chips a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 4px;
	background: rgba(255, 255, 255, .04);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color .15s ease, background-color .15s ease;
}

body.ps-refresh .ps-shop-band__chips a:hover,
body.ps-refresh .ps-shop-band__chips a:focus-visible {
	border-color: var(--ps-r-accent);
	background: rgba(232, 58, 23, .14);
}

body.ps-refresh .ps-shop-band__count {
	color: #8f98a3;
	font-size: 12px;
	font-weight: 500;
}

body.ps-refresh .ps-shop-band__chips .is-accent a {
	border-color: var(--ps-r-accent);
	background: var(--ps-r-accent);
}

body.ps-refresh .ps-shop-band__chips .is-accent a:hover {
	border-color: var(--ps-r-accent-hover);
	background: var(--ps-r-accent-hover);
}

@media (max-width: 767px) {
	body.ps-refresh .ps-shop-band {
		padding: 22px 18px 18px;
	}

	body.ps-refresh .ps-shop-band::after {
		top: 22px;
		bottom: 18px;
	}

	body.ps-refresh .ps-shop-band__lead {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
		font-size: 14px;
	}

	/* Mobile: viena slenkanti eilutė vietoj kelių eilučių mygtukų */
	body.ps-refresh .ps-shop-band__chips ul {
		flex-wrap: nowrap;
		margin-right: -18px;
		padding-right: 18px;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	body.ps-refresh .ps-shop-band__chips ul::-webkit-scrollbar {
		display: none;
	}
}

/* ================================================================
   8b. HOME — žvejybos patternas vietoj topografinių linijų
   ================================================================ */

body.ps-refresh .ps-home-after-hero::before {
	background-color: #1f2328;
	background-image: none;
	opacity: .055;
	-webkit-mask: url("../images/ps-fishing-pattern.svg") 0 0 / 220px 220px repeat;
	mask: url("../images/ps-fishing-pattern.svg") 0 0 / 220px 220px repeat;
}

/* ================================================================
   9. NAVIGACIJA — „Naujausios prekės“ punktas juostos gale
   ================================================================ */

@media (min-width: 1025px) {
	body.ps-refresh .whb-header-bottom .wd-nav-main > li.ps-nav-latest {
		flex: 0 0 auto;
		margin-left: 8px;
	}

	body.ps-refresh .whb-header-bottom .wd-nav-main > li.ps-nav-latest > a {
		display: inline-flex;
		align-items: center;
		min-height: 34px;
		padding: 0 14px;
		border-radius: 4px;
		background: var(--ps-r-accent);
		color: #fff;
		font-family: var(--ps-r-font);
		font-size: 14px;
		font-weight: 700;
		letter-spacing: .04em;
		line-height: 1;
		text-decoration: none;
		text-transform: uppercase;
		white-space: nowrap;
		transition: background-color .15s ease;
	}

	body.ps-refresh .whb-header-bottom .wd-nav-main > li.ps-nav-latest > a:hover,
	body.ps-refresh .whb-header-bottom .wd-nav-main > li.ps-nav-latest.is-current > a {
		background: var(--ps-r-accent-hover);
		color: #fff;
	}
}

/* ================================================================
   10. MOBILE / TABLET — šoninis „piltuvėlio“ mygtukas (WoodMart
   .wd-sidebar-opener). Išlenda paslinkus žemyn, atveria kategorijas
   ir filtrus. Buvo pilka ikona ant balto — dabar ryškus skirtukas.
   ================================================================ */

@media (max-width: 1024px) {
	body.ps-refresh .wd-sidebar-opener > a {
		width: 48px;
		height: 48px;
		border-radius: 0 var(--ps-r-radius) var(--ps-r-radius) 0;
		background: var(--ps-r-accent);
		box-shadow: 0 4px 12px rgba(17, 22, 28, .18);
		color: #fff;
	}

	body.ps-refresh .wd-sidebar-opener > a::before,
	body.ps-refresh .wd-sidebar-opener > a:hover::before {
		color: #fff;
	}

	body.ps-refresh .wd-sidebar-opener > a:hover,
	body.ps-refresh .wd-sidebar-opener.wd-opened > a {
		background: var(--ps-r-accent-hover);
	}
}
