/* ==========================================================================
   404 (WP page "Страница не е намерена", shown by WoodMart option custom_404_page).
   Built by server/build-404.php. Scoped under .sx-404, builds on common.css.
   Sections: message + search + "4 [mark] 4" · categories · help cards.
   ========================================================================== */

/* ---------------------------------------------------------------- 01 hero */
.sx-404 .sx-404__hero {
	padding-top: clamp(56px, 7vw, 112px);
	padding-bottom: clamp(64px, 7vw, 112px);
	background:
		radial-gradient(120% 90% at 100% 0%, #f4f4f2 0%, rgba(244, 244, 242, 0) 60%),
		#fff;
}
/* Faint chevron field behind the graphic (brand-guidelines pattern), fading out to the left. */
.sx-404 .sx-404__hero::before {
	content: '';
	position: absolute;
	inset: 0 0 0 38%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='72' viewBox='0 0 88 72'%3E%3Cpath d='M8 8h16l14 14-14 14H8l14-14z' fill='%23121212' fill-opacity='.05'/%3E%3Cpath d='M52 44h16l14 14-14 14H52l14-14z' fill='%23121212' fill-opacity='.035'/%3E%3C/svg%3E");
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
	pointer-events: none;
}
.sx-404 .sx-404__hero > .sx-wrap { position: relative; z-index: 1; }

.sx-404 .sx-404__grid {
	display: grid !important;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 88px);
	align-items: center;
}
.sx-404 .sx-404__text { display: flex; flex-direction: column; }
.sx-404 .sx-404__title .elementor-heading-title {
	font-size: clamp(40px, 4.8vw, 74px);
	max-width: 13ch;
	margin-bottom: 26px;
}
.sx-404 .sx-404__title .elementor-heading-title::after { content: none; }
.sx-404 .sx-404__text > .sx-404__lead { margin-bottom: 34px; }
.sx-404 .sx-404__lead p { max-width: 560px; }

/* Search: WoodMart wd_search (AJAX product suggestions), restyled to a big header-style field. */
.sx-404 .sx-404__text > .sx-404__search { position: relative; z-index: 30; width: 100%; max-width: 600px; margin-bottom: 16px; }
/* Suggestions must sit above the chips/buttons (their load animation creates stacking contexts). */
.sx-404 .sx-404__search .wd-dropdown-results { z-index: 40; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .35); }
.sx-404 .sx-404__search .searchform {
	--wd-form-height: 64px;
	--wd-form-brd-width: 2px;
	--wd-form-brd-color: var(--sx-ink);
	--wd-form-brd-color-focus: var(--sx-red);
	--wd-form-brd-radius: var(--sx-radius);
	--wd-form-bg: #fff;
	--wd-form-color: var(--sx-ink);
	--wd-form-placeholder-color: #8a8a8a;
}
.sx-404 .sx-404__search .searchform input[type="text"],
.sx-404 .sx-404__search .searchform input.s {
	height: 64px;
	padding-left: 22px;
	border: 2px solid var(--sx-ink);
	border-radius: var(--sx-radius);
	font: 500 16px 'Montserrat', sans-serif;
	box-shadow: 0 18px 40px -30px rgba(0, 0, 0, .45);
	transition: border-color .25s var(--sx-ease), box-shadow .25s var(--sx-ease);
}
.sx-404 .sx-404__search .searchform input.s:focus { border-color: var(--sx-red); box-shadow: 0 18px 40px -26px rgba(255, 0, 0, .45); }
.sx-404 .sx-404__search .searchform .searchsubmit {
	width: 64px;
	height: 64px;
	color: #fff;
	background: var(--sx-red);
	border-radius: 0 var(--sx-radius) var(--sx-radius) 0;
	transition: background .25s var(--sx-ease);
}
.sx-404 .sx-404__search .searchform .searchsubmit:hover { background: var(--sx-red-dark); }
.sx-404 .sx-404__search .searchform .searchsubmit::before { color: #fff; font-size: 20px; }
.sx-404 .sx-404__search .wd-dropdown-results { text-align: left; }

/* "Често търсено" quick links */
.sx-404 .sx-404__popular {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 34px;
	font-size: 13px;
	color: var(--sx-ink-3);
}
.sx-404 .sx-404__popular span { margin-right: 4px; font-weight: 600; }
.sx-404 .sx-404__popular a {
	padding: 6px 12px;
	border: 1px solid var(--sx-line);
	border-radius: 999px;
	background: #fff;
	font-weight: 700;
	color: var(--sx-ink);
	transition: border-color .2s, color .2s;
}
.sx-404 .sx-404__popular a:hover { border-color: var(--sx-red); color: var(--sx-red); }

/* The big "4 [mark] 4" */
.sx-404 .sx-404__art { display: flex; flex-direction: column; align-items: center; }
.sx-404 .sx-404__code {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .04em;
	font-size: clamp(120px, 17vw, 270px);
	line-height: .8;
	user-select: none;
}
.sx-404 .sx-404__digit {
	display: block;
	font-weight: 900;
	letter-spacing: -.06em;
	color: var(--sx-ink);
}
.sx-404 .sx-404__mark {
	display: block;
	width: .86em;
	height: .67em;
	margin: 0 .06em 0 .02em;
	overflow: visible;
}
.sx-404 .sx-404__mark path { fill: var(--sx-red); transition: transform .5s var(--sx-ease); }
.sx-404 .sx-404__art:hover .sx-404__mark .c1,
.sx-404 .sx-404__art:hover .sx-404__mark .c3 { transform: translateX(4px); }
.sx-404 .sx-404__art:hover .sx-404__mark .c2,
.sx-404 .sx-404__art:hover .sx-404__mark .c4 { transform: translateX(8px); }
.sx-404 .sx-404__caption {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	width: min(100%, 520px);
	margin: clamp(22px, 2.6vw, 36px) 0 0;
	padding-top: 14px;
	border-top: 2px solid var(--sx-ink);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sx-ink-3);
}
.sx-404 .sx-404__caption span:last-child { color: var(--sx-red); }

/* Page load: text rises, digits drop in, the chevrons slide in one after another. */
@media (prefers-reduced-motion: no-preference) {
	.sx-404 .sx-404__text > * { animation: sx-rise .9s var(--sx-ease) both; }
	.sx-404 .sx-404__text > :nth-child(2) { animation-delay: .06s; }
	.sx-404 .sx-404__text > :nth-child(3) { animation-delay: .14s; }
	.sx-404 .sx-404__text > :nth-child(4) { animation-delay: .22s; }
	.sx-404 .sx-404__text > :nth-child(5) { animation-delay: .28s; }
	.sx-404 .sx-404__text > :nth-child(6) { animation-delay: .34s; }
	.sx-404 .sx-404__digit { animation: sx-404-drop .8s var(--sx-ease) both; }
	.sx-404 .sx-404__digit:last-child { animation-delay: .1s; }
	.sx-404 .sx-404__mark path { animation: sx-404-chev .7s var(--sx-ease) both; }
	.sx-404 .sx-404__mark .c1 { animation-delay: .35s; }
	.sx-404 .sx-404__mark .c2 { animation-delay: .45s; }
	.sx-404 .sx-404__mark .c3 { animation-delay: .55s; }
	.sx-404 .sx-404__mark .c4 { animation-delay: .65s; }
	.sx-404 .sx-404__caption { animation: sx-rise .9s var(--sx-ease) .5s both; }
}
@keyframes sx-404-drop { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }
@keyframes sx-404-chev { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 02 categories (same tiles as the homepage) */
.sx-404 .sx-404-cat { display: flex !important; flex-direction: column; color: var(--sx-ink); }
.sx-404 .sx-404-cat__media { aspect-ratio: 1 / 1; margin-bottom: 16px; background-size: cover; background-position: center; overflow: hidden; position: relative; }
.sx-404 .sx-404-cat__media::after { content: ''; position: absolute; inset: 0; background: rgba(255, 0, 0, 0); transition: background .35s var(--sx-ease); mix-blend-mode: multiply; }
.sx-404 .sx-404-cat:hover .sx-404-cat__media::after { background: rgba(255, 0, 0, .35); }
.sx-404 .sx-404-cat__label .elementor-heading-title {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px;
	margin: 0;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--sx-ink);
	line-height: 1.25;
	font-size: clamp(16px, 1.25vw, 19px);
	font-weight: 800;
	color: var(--sx-ink);
	transition: color .25s, border-color .25s;
}
.sx-404 .sx-404-cat__label .elementor-heading-title::after { content: '→'; transition: transform .3s var(--sx-ease); }
.sx-404 .sx-404-cat:hover .sx-404-cat__label .elementor-heading-title { color: var(--sx-red); border-color: var(--sx-red); }
.sx-404 .sx-404-cat:hover .sx-404-cat__label .elementor-heading-title::after { transform: translateX(6px); }
.sx-404 .sx-404-cat__sub p { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--sx-ink-3); }

/* ---------------------------------------------------------------- 03 help cards */
.sx-404 .sx-404-help { position: relative; gap: 14px; min-height: 260px; color: var(--sx-ink); overflow: hidden; }
.sx-404 .sx-404-help::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 4px;
	background: var(--sx-red);
	transition: width .45s var(--sx-ease);
}
.sx-404 .sx-404-help:hover::after { width: 100%; }
.sx-404 .sx-404-help__num p {
	margin: 0 0 18px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sx-red);
}
.sx-404 .sx-404-help .sx-h3 .elementor-heading-title { font-size: clamp(21px, 1.8vw, 28px); font-weight: 900; letter-spacing: -.02em; }
.sx-404 .sx-404-help > .sx-body { flex: 1; }
.sx-404 .sx-404-help__cta p {
	display: inline-block;
	margin: 8px 0 0;
	padding-bottom: 3px;
	font-size: 14px;
	font-weight: 800;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}
.sx-404 .sx-404-help:hover .sx-404-help__cta p { color: var(--sx-red); }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1024px) {
	.sx-404 .sx-404__grid { grid-template-columns: 1fr; }
	.sx-404 .sx-404__art { order: -1; align-items: flex-start; }
	.sx-404 .sx-404__code { font-size: clamp(110px, 22vw, 210px); justify-content: flex-start; }
	.sx-404 .sx-404__caption { width: 100%; max-width: 600px; }
	.sx-404 .sx-404__hero::before { inset: 0 0 50% 30%; }
	.sx-404 .sx-404__title .elementor-heading-title { max-width: 14ch; }
	.sx-404 .sx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sx-404 .sx-404-help { min-height: 0; }
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 767px) {
	.sx-404 .sx-404__hero { padding-top: 36px; }
	.sx-404 .sx-404__hero::before { inset: 0 0 60% 0; }
	.sx-404 .sx-404__code { font-size: clamp(96px, 34vw, 150px); }
	.sx-404 .sx-404__caption { font-size: 10px; letter-spacing: .12em; }
	.sx-404 .sx-404__title .elementor-heading-title { font-size: clamp(36px, 10.5vw, 46px); margin-bottom: 18px; }
	.sx-404 .sx-404__text > .sx-404__lead { margin-bottom: 26px; }
	.sx-404 .sx-404__search .searchform input.s,
	.sx-404 .sx-404__search .searchform input[type="text"] { height: 58px; padding-left: 14px; font-size: 13.5px; }
	.sx-404 .sx-404__search .searchform .searchsubmit { width: 58px; height: 58px; }
	.sx-404 .sx-404__popular { margin-bottom: 26px; }
	.sx-404 .sx-grid--3 { grid-template-columns: 1fr; gap: 12px; }
	.sx-404 .sx-404-help { gap: 10px; }
	.sx-404 .sx-404-help__num p { margin-bottom: 8px; }
}
