/* ==========================================================================
   EXAPC Gaming – maketas: viršutinė juosta, antraštė, paieška, navigacija,
   mobilusis meniu, apatinė dalis. Kompiuterio riba – 64rem (1024px).
   ========================================================================== */

/* Viršutinė juosta ------------------------------------------------------- */
.topbar { background: var(--c-surface); border-bottom: 1px solid var(--c-line); font-size: var(--fs-xs); color: var(--c-muted); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 2.25rem; }
.topbar__items { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-6); margin: 0; padding: 0; list-style: none; }
.topbar__items li { display: inline-flex; align-items: center; gap: var(--s-2); }
.topbar__items li::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--c-line-strong); }
.topbar__link,
.topbar__menu a { color: var(--c-text); text-decoration: none; }
.topbar__link:hover,
.topbar__menu a:hover { color: var(--c-accent); }
.topbar__menu { display: flex; gap: var(--s-5); margin: 0; padding: 0; list-style: none; }
@media (max-width: 47.99rem) {
	.topbar__items li:not(:first-child),
	.topbar__nav,
	.topbar__link { display: none; }
	.topbar__inner { justify-content: center; text-align: center; }
}

/* Antraštė --------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--c-base) 94%, transparent);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--c-line);
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.masthead {
	display: grid;
	grid-template-columns: auto auto 1fr auto;
	grid-template-areas: "toggle brand . actions" "search search search search";
	align-items: center;
	column-gap: var(--s-2);
	row-gap: var(--s-2);
	padding-block: var(--s-2) var(--s-3);
}
.menu-toggle { grid-area: toggle; }
.masthead__brand { grid-area: brand; display: flex; align-items: center; min-width: 0; }
.masthead .search { grid-area: search; }
.masthead__actions { grid-area: actions; display: flex; align-items: center; gap: var(--s-1); }

.wordmark {
	font-family: var(--f-display);
	font-size: var(--fs-lg);
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--c-text);
	text-decoration: none;
	white-space: nowrap;
}
.wordmark:hover { color: var(--c-text); }
.custom-logo-link { display: block; line-height: 0; }
.custom-logo { display: block; max-height: 2.5rem; width: auto; height: auto; }
/* Logotipas su baltu fonu: fonas permatomas, tamsios raidės šviesios (filtras – header.php). */
.logo--adapt .custom-logo { filter: url(#exapc-logo-adapt); }
.logo-filter { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (max-width: 47.99rem) {
	.custom-logo { max-height: 2rem; }
}

.header-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--s-2);
	min-height: 2.75rem;
	min-width: 2.75rem;
	justify-content: center;
	padding: 0 var(--s-2);
	border: 0;
	border-radius: var(--r-control);
	background: none;
	color: var(--c-text);
	font-size: var(--fs-sm);
	text-decoration: none;
	cursor: pointer;
}
.header-action:hover { background: var(--c-surface); color: var(--c-text); }
.header-action svg { width: 1.375rem; height: 1.375rem; }
/* Telefone tekstas paslepiamas vizualiai, bet lieka ekrano skaitytuvui (pavadinimas mygtukui). */
.header-action__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.header-cart__count {
	position: absolute;
	top: 0.25rem;
	left: 1.6rem;
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 0.3rem;
	display: inline-grid;
	place-items: center;
	border-radius: var(--r-chip);
	background: var(--c-accent);
	color: var(--c-on-accent);
	font-family: var(--f-display);
	font-size: 0.6875rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.header-cart__count.is-empty { display: none; }

@media (min-width: 64rem) {
	.masthead {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: "brand search actions";
		column-gap: var(--s-6);
		padding-block: var(--s-3);
		min-height: var(--wp--custom--header-height);
	}
	.menu-toggle { display: none; }
	.masthead .search { max-width: 40rem; width: 100%; justify-self: center; }
	.header-action { padding: 0 var(--s-3); }
	.header-action__label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
	.header-cart__count { position: static; margin-left: calc(-1 * var(--s-1)); }
}

/* Paieška ---------------------------------------------------------------- */
.search { position: relative; }
.search__field {
	display: flex;
	align-items: center;
	gap: var(--s-2);
	height: 2.75rem;
	padding-left: var(--s-3);
	background: var(--c-surface-2);
	border: 1px solid var(--c-line-strong);
	border-radius: var(--r-control);
	transition: border-color var(--t-fast) ease;
}
.search__field:hover { border-color: var(--c-muted); }
.search__field:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.search__field > svg { width: 1.125rem; height: 1.125rem; color: var(--c-muted); flex: none; }
.search__input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-text);
	font-size: var(--fs-base); /* ≥16px – iOS nepriartina */
}
.search__input::placeholder { color: var(--c-muted); opacity: 1; }
.search__input:focus-visible { box-shadow: none; }
.search__input::-webkit-search-cancel-button { filter: invert(0.7); }
.search__submit {
	align-self: stretch;
	margin: 3px;
	padding: 0 var(--s-4);
	border: 0;
	border-radius: calc(var(--r-control) - 3px);
	background: var(--c-surface);
	color: var(--c-text);
	font-family: var(--f-display);
	font-size: var(--fs-sm);
	font-weight: 600;
	cursor: pointer;
}
.search__submit:hover { background: var(--c-line); }
.search.is-loading .search__field > svg { animation: exapc-pulse 0.9s ease-in-out infinite alternate; }
@keyframes exapc-pulse { to { color: var(--c-accent); } }

.search__panel {
	position: absolute;
	top: calc(100% + var(--s-2));
	left: 0;
	right: 0;
	z-index: 60;
	max-height: min(70vh, 34rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--s-2);
	background: var(--c-surface);
	border: 1px solid var(--c-line-strong);
	border-radius: var(--r-card);
	box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
}
.search__group + .search__group { margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--c-line); }
.search__group-title { margin: var(--s-1) var(--s-2) var(--s-1); font-size: var(--fs-xs); color: var(--c-muted); }
.search__opt {
	display: flex;
	align-items: center;
	gap: var(--s-3);
	padding: var(--s-2);
	border-radius: var(--r-control);
	color: var(--c-text);
	text-decoration: none;
}
.search__opt.is-active,
.search__opt:hover { background: var(--c-surface-2); color: var(--c-text); }
.search__opt.is-active { box-shadow: inset 2px 0 0 var(--c-accent); }
.search__thumb {
	flex: none;
	width: 3rem;
	height: 3rem;
	display: grid;
	place-items: center;
	background: var(--c-well);
	border-radius: 6px;
	overflow: hidden;
}
.search__thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.search__info { display: grid; gap: 0.125rem; min-width: 0; flex: 1; }
.search__name { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search__meta .stock { font-size: var(--fs-xs); }
.search__price { flex: none; font-family: var(--f-display); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.search__opt.is-sold .search__price { color: var(--c-muted); }
.search__opt--cat .search__name { font-weight: 400; }
.search__count { margin-left: auto; font-size: var(--fs-xs); color: var(--c-muted); font-variant-numeric: tabular-nums; }
.search__all { justify-content: center; margin-top: var(--s-2); border-top: 1px solid var(--c-line); border-radius: 0 0 var(--r-control) var(--r-control); padding-block: var(--s-3); font-size: var(--fs-sm); font-weight: 600; color: var(--c-accent); }
.search__all:hover,
.search__all.is-active { color: var(--c-accent-strong); }
.search__empty { margin: 0; padding: var(--s-4); font-size: var(--fs-sm); color: var(--c-muted); }

/* Pagrindinė navigacija -------------------------------------------------- */
.primary-nav { border-top: 1px solid var(--c-line); }
.menu { margin: 0; padding: 0; list-style: none; }
.menu--primary { display: flex; flex-wrap: wrap; gap: 0 var(--s-1); }
.menu--primary > li { position: relative; }
.menu--primary > li > a {
	display: flex;
	align-items: center;
	gap: var(--s-1);
	min-height: 2.75rem;
	padding: 0 var(--s-3);
	font-size: var(--fs-sm);
	font-weight: 500;
	color: var(--c-text);
	text-decoration: none;
	white-space: nowrap;
	border-radius: var(--r-control);
}
.menu--primary > li > a:hover,
.menu--primary > li:focus-within > a { background: var(--c-surface); color: var(--c-text); }
.menu--primary > .current-menu-item > a,
.menu--primary > .current-menu-ancestor > a,
.menu--primary > .current-product_cat-ancestor > a { box-shadow: inset 0 -2px 0 var(--c-accent); border-radius: 0; }
.menu--primary > .menu-item-has-children > a::after {
	content: "";
	width: 0.4rem;
	height: 0.4rem;
	margin-left: 0.15rem;
	border-right: 1.5px solid var(--c-muted);
	border-bottom: 1.5px solid var(--c-muted);
	transform: translateY(-2px) rotate(45deg);
}
.menu--primary .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 55;
	min-width: 15rem;
	margin: 0;
	padding: var(--s-2);
	list-style: none;
	background: var(--c-surface);
	border: 1px solid var(--c-line-strong);
	border-radius: var(--r-card);
	box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity var(--t-fast) ease, transform var(--t-fast) ease, visibility 0s linear var(--t-fast);
}
.menu--primary > li:hover > .sub-menu,
.menu--primary > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}
.menu--primary .sub-menu a {
	display: block;
	padding: var(--s-2) var(--s-3);
	border-radius: var(--r-control);
	font-size: var(--fs-sm);
	color: var(--c-text);
	text-decoration: none;
}
.menu--primary .sub-menu a:hover { background: var(--c-surface-2); color: var(--c-text); }

/* Mobilusis: su JS – skydelis; be JS – horizontaliai slenkamas meniu. */
@media (max-width: 63.99rem) {
	.js .primary-nav { display: none; }
	.no-js .menu-toggle { display: none; }
	.no-js .menu--primary { overflow-x: auto; }
	.no-js .menu--primary .sub-menu { display: none; }
}

/* Mobilusis meniu (dialog) ----------------------------------------------- */
.drawer {
	position: fixed;
	inset: 0 auto 0 0;
	width: min(22rem, 88vw);
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0 0 var(--s-6);
	overflow-y: auto;
	background: var(--c-surface);
	color: var(--c-text);
	border: 0;
	border-right: 1px solid var(--c-line);
}
.drawer::backdrop { background: rgb(0 0 0 / 0.6); }
.drawer[open] { animation: exapc-drawer var(--t-base) ease-out; }
@keyframes exapc-drawer { from { transform: translateX(-12px); opacity: 0.6; } }
.drawer__head {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
	background: var(--c-surface);
	border-bottom: 1px solid var(--c-line);
}
.drawer__title { font-family: var(--f-display); font-weight: 600; }
.menu--drawer { padding: var(--s-2); }
.menu--drawer li { position: relative; }
.menu--drawer > li { border-bottom: 1px solid var(--c-line); }
.menu--drawer a {
	display: flex;
	align-items: center;
	min-height: 3rem;
	padding: 0 3.25rem 0 var(--s-2);
	color: var(--c-text);
	text-decoration: none;
}
.menu--drawer .sub-menu { margin: 0 0 var(--s-2); padding: 0 0 0 var(--s-3); list-style: none; }
.menu--drawer .sub-menu a { min-height: 2.5rem; font-size: var(--fs-sm); color: var(--c-muted); }
.menu--drawer .sub-menu a:hover { color: var(--c-text); }
.menu-expand {
	position: absolute;
	top: 0.25rem;
	right: 0;
	width: 2.75rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: var(--r-control);
	background: none;
	color: var(--c-muted);
	cursor: pointer;
}
.menu-expand:hover { background: var(--c-surface-2); color: var(--c-text); }
.menu-expand svg { transition: transform var(--t-fast) ease; }
.menu-expand[aria-expanded="true"] svg { transform: rotate(180deg); }
.menu--drawer-secondary { padding: var(--s-4); display: grid; gap: var(--s-2); font-size: var(--fs-sm); }
.menu--drawer-secondary a { color: var(--c-muted); text-decoration: none; }
.has-drawer { overflow: hidden; }

/* Apatinė dalis ---------------------------------------------------------- */
.site-footer {
	position: relative;
	margin-top: var(--s-8);
	padding-top: var(--s-7);
	background:
		radial-gradient(60rem 20rem at 15% 0%, rgb(57 216 117 / 0.06), transparent 70%),
		var(--c-base);
	border-top: 1px solid var(--c-line);
	color: var(--c-muted);
	font-size: var(--fs-sm);
	overflow: hidden;
}

/* Pagalbos juosta */
.footer-cta {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: var(--s-3) var(--s-4);
	margin-bottom: var(--s-7);
	padding: var(--s-5);
	background: linear-gradient(135deg, var(--c-surface-2), var(--c-surface) 60%);
	border: 1px solid var(--c-line);
	border-radius: var(--r-panel);
}
.footer-cta__icon {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: var(--r-control);
	background: rgb(57 216 117 / 0.12);
	color: var(--c-accent);
}
.footer-cta__icon svg { width: 1.5rem; height: 1.5rem; }
.site-footer .footer-cta h2 { margin: 0 0 var(--s-1); font-size: var(--fs-lg); font-weight: 600; text-transform: none; color: var(--c-text); letter-spacing: -0.01em; }
.footer-cta p { margin: 0; color: var(--c-muted); }
.footer-cta__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); grid-column: 1 / -1; }
.footer-cta__actions .btn { flex: 1 1 auto; }
@media (min-width: 48rem) {
	.footer-cta { grid-template-columns: auto 1fr auto; padding: var(--s-5) var(--s-6); }
	.footer-cta__actions { grid-column: auto; }
	.footer-cta__actions .btn { flex: none; }
}

/* Stulpeliai */
.site-footer__grid {
	display: grid;
	gap: var(--s-6) var(--s-5);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.site-footer__brand { grid-column: 1 / -1; max-width: 26rem; }
@media (min-width: 64rem) {
	.site-footer__grid { grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s-6); }
	.site-footer__brand { grid-column: auto; padding-right: var(--s-6); }
}
.site-footer__logo { margin-bottom: var(--s-4); }
.site-footer__logo .custom-logo { max-height: 2.25rem; }
.site-footer__about { margin: 0 0 var(--s-4); line-height: 1.6; }
.site-footer h2 {
	margin-bottom: var(--s-3);
	font-size: var(--fs-xs);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--c-text);
}
.site-footer .wordmark { display: inline-block; color: var(--c-text); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.site-footer a:not(.btn) { color: var(--c-muted); text-decoration: none; transition: color var(--t-base) ease; }
.site-footer a:not(.btn):hover { color: var(--c-text); }
.footer-col a { display: inline-block; padding-block: 0.125rem; }
.contact-list { margin-bottom: var(--s-4) !important; }
.contact-list li { display: flex; gap: var(--s-2); align-items: flex-start; }
.contact-list svg { width: 1.125rem; height: 1.125rem; margin-top: 0.15rem; flex: none; color: var(--c-muted); }
.site-footer .contact-list a,
.site-footer .contact-list span { color: var(--c-text); }
.site-footer .social-links { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.site-footer .social-links a {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	color: var(--c-text);
	transition: border-color var(--t-base) ease, color var(--t-base) ease;
}
.site-footer .social-links a:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* Apatinė eilutė */
.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: var(--s-4) var(--s-6);
	margin-top: var(--s-7);
	padding-block: var(--s-4);
	border-top: 1px solid var(--c-line);
	font-size: var(--fs-xs);
}
.site-footer__legal p { margin: 0; }
.site-footer__company { white-space: pre-line; margin-top: var(--s-1) !important; }
.site-footer__payments { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.site-footer__payments-label { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--c-text); }
.site-footer__payments-label svg { width: 1rem; height: 1rem; color: var(--c-accent); }
.site-footer .site-footer__payments ul { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.site-footer__payments li {
	padding: 0.25rem 0.625rem;
	border: 1px solid var(--c-line);
	border-radius: 999px;
	background: var(--c-surface);
	color: var(--c-text);
	white-space: nowrap;
}

/* Didelis dekoratyvinis užrašas */
.site-footer__bigword {
	margin-top: var(--s-2);
	height: clamp(3rem, 11vw, 9.5rem);
	overflow: hidden;
	text-align: center;
	pointer-events: none;
	user-select: none;
}
.site-footer__bigword span {
	display: block;
	font-family: var(--f-display);
	font-size: clamp(5rem, 19vw, 16rem);
	font-weight: 700;
	line-height: 0.85;
	letter-spacing: -0.04em;
	color: transparent;
	background: linear-gradient(180deg, rgb(244 247 245 / 0.08), rgb(244 247 245 / 0));
	-webkit-background-clip: text;
	background-clip: text;
}
