/* ==========================================================================
   ISVETA — header & footer
   2026-05-08 redesign. Bootstrap 4 base + custom component layer.
   Solid colors only (no gradients). Palette matches isveta.lt brand identity.
   ========================================================================== */

/* Reset legacy body margins so the dark footer reaches the viewport bottom
 * (browser default body margin-bottom: 8px would otherwise show as a thin
 * white stripe below the footer). */
html, body {
	margin: 0;
}

/* Sticky footer: on short pages the dark footer should sit at the viewport
 * bottom instead of leaving white space below it. Uses flexbox with the
 * main wrapper expanding to fill leftover height. */
html, body {
	height: 100%;
}
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
body > .wrapper {
	flex: 1 0 auto;
}
body > .site-footer {
	flex-shrink: 0;
}

/* Bootstrap 4 doesn't ship .container-xl (added in BS5). Define it ourselves
 * so the existing markup behaves like a centered, padded responsive wrapper. */
.container-xl {
	width: 100%;
	margin-right: auto;
	margin-left: auto;
	padding-right: 15px;
	padding-left: 15px;
}
@media (min-width: 576px)  { .container-xl { max-width: 540px; } }
@media (min-width: 768px)  { .container-xl { max-width: 720px; } }
@media (min-width: 992px)  { .container-xl { max-width: 960px; } }
@media (min-width: 1200px) { .container-xl { max-width: 1140px; } }
@media (min-width: 1400px) { .container-xl { max-width: 1320px; } }

:root {
	/* Brand palette — matches isveta.lt + existing custom.css blues. Solid. */
	--brand-blue: #0b55a0;           /* Primary deep blue (top bar, headings) */
	--brand-blue-hover: #094a8c;     /* Hover deepening */
	--brand-blue-dark: #08577e;      /* Deeper accent (links) */
	--brand-blue-bright: #188ef4;    /* Bright CTA blue */
	--brand-blue-light: #5ca3d3;     /* Highlight on dark backgrounds */

	--header-bg: #ffffff;
	--header-fg: #1a1a1a;
	--header-top-bg: var(--brand-blue);
	--header-top-fg: #ffffff;
	--header-top-fg-dim: #c8dcef;
	--header-border: #e3eaf1;
	--header-shadow: 0 2px 10px rgba(0, 93, 135, .08);
	--header-categories-bg: #ffffff;
	--header-categories-border: #e3eaf1;

	--footer-bg: #0a1a2a;
	--footer-bg-2: #0d2236;
	--footer-fg: #b8c5d3;
	--footer-fg-dim: #7d8b9c;
	--footer-heading: #ffffff;
	--footer-border: #173049;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
	background: var(--header-bg);
	position: relative;
	z-index: 1020;
}

/* Top bar (solid blue) — scrolls naturally with the page */
.header-top {
	background: var(--header-top-bg);
	color: var(--header-top-fg);
	font-size: 13px;
}

.header-top .container-xl {
	padding-top: 8px;
	padding-bottom: 8px;
}

.header-top-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.header-top-contacts,
.header-top-nav,
.header-top-right {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.header-top-nav {
	flex: 1 1 auto;
	justify-content: center;
}

.header-top-right {
	margin-left: auto;
}

.header-top-link {
	color: var(--header-top-fg);
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	white-space: nowrap;
	text-decoration: none;
	font-weight: 500;
	transition: color .15s ease, background .15s ease;
}

.header-top-link:hover,
.header-top-link:focus {
	color: var(--header-top-fg);
	background: rgba(255, 255, 255, .08);
	text-decoration: none;
}

.header-top-link i {
	margin-right: 8px;
	font-size: 13px;
	color: var(--header-top-fg-dim);
}

.header-top-link:hover i {
	color: var(--header-top-fg);
}

/* Language switcher */
.header-lang .dropdown-menu {
	min-width: 8rem;
	margin-top: 0;
	border: 1px solid var(--header-border);
	border-radius: 4px;
}
.header-lang .dropdown-item {
	display: flex;
	align-items: center;
	font-size: 13px;
	padding: 8px 14px;
}
.header-lang .dropdown-item.active,
.header-lang .dropdown-item:active {
	background: var(--brand-blue);
	color: #fff;
}

/* Main bar (logo + cart + CTA) — sticks to top on scroll */
.header-main {
	background: var(--header-bg);
	border-bottom: 1px solid var(--header-border);
	box-shadow: var(--header-shadow);
	position: sticky;
	top: 0;
	z-index: 1020;
}

.header-main .container-xl {
	padding-top: 12px;
	padding-bottom: 12px;
}

.header-main-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 88px;
}

.header-brand {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 0;
	height: 100%;
	padding: 4px 0;
}
.header-brand:hover {
	text-decoration: none;
}

.header-logo {
	display: block;
	height: 64px;
	width: auto;
	max-width: 280px;
	max-height: 72px;
	object-fit: contain;
}

.header-search {
	flex: 1 1 auto;
	max-width: 480px;
	margin: 0 32px;
	display: flex;
	align-items: stretch;
	height: 44px;
}
.header-search-input {
	flex: 1 1 auto;
	border: 1px solid var(--header-border);
	border-right: 0;
	border-radius: 4px 0 0 4px;
	padding: 0 14px;
	font-size: 14px;
	background: #f4f8fa;
	color: var(--header-fg);
	outline: none;
	transition: background .15s ease, border-color .15s ease;
}
.header-search-input::placeholder {
	color: #8d97ad;
}
.header-search-input:focus {
	background: #ffffff;
	border-color: var(--brand-blue);
}
.header-search-btn {
	background: var(--brand-blue);
	color: #ffffff;
	border: 0;
	border-radius: 0 4px 4px 0;
	padding: 0 18px;
	cursor: pointer;
	font-size: 15px;
	transition: background .15s ease;
}
.header-search-btn:hover,
.header-search-btn:focus {
	background: var(--brand-blue-hover);
	outline: none;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.header-cart {
	position: relative;
	color: var(--header-fg);
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: color .15s ease;
}
.header-cart:hover,
.header-cart:focus {
	color: var(--brand-blue);
	text-decoration: none;
}
.header-cart-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-right: 8px;
	font-size: 18px;
	color: var(--brand-blue);
}
.header-cart-icon .cart-badge {
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--brand-blue-bright);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.header-cart-text {
	font-weight: 600;
}

.header-cta {
	background: var(--brand-blue);
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 10px 22px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: background .15s ease;
}
.header-cta:hover,
.header-cta:focus {
	background: var(--brand-blue-hover);
	color: #fff;
	text-decoration: none;
}

/* Mobile hamburger (custom — no Bootstrap toggler-icon) */
.header-toggler {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--header-border);
	border-radius: 4px;
	cursor: pointer;
}
.header-toggler-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--header-fg);
	margin: 2px 0;
	transition: background .15s ease;
}
.header-toggler:hover .header-toggler-bar {
	background: var(--brand-blue);
}

/* Categories nav (white, under logo bar) */
.header-categories {
	background: var(--header-categories-bg);
	border-bottom: 1px solid var(--header-categories-border);
}
.header-categories .container-xl {
	padding-top: 0;
	padding-bottom: 0;
}
.header-categories-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0;
}
.category-item {
	position: relative;
	display: inline-block;
}

.category-link {
	color: var(--header-fg);
	display: inline-flex;
	align-items: center;
	padding: 16px 22px;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .3px;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.category-link:hover,
.category-link:focus {
	color: var(--brand-blue);
	border-bottom-color: var(--brand-blue);
	text-decoration: none;
}
.category-link.active {
	color: var(--brand-blue);
	border-bottom-color: var(--brand-blue);
}

.category-caret {
	font-size: 10px;
	margin-left: 8px;
	color: #999;
	transition: transform .15s ease, color .15s ease;
}
.category-item:hover .category-caret {
	color: var(--brand-blue);
	transform: rotate(180deg);
}

.category-dropdown {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(8px);
	min-width: 240px;
	max-width: 320px;
	padding: 8px 0;
	background: #ffffff;
	border: 1px solid var(--header-border);
	border-radius: 4px;
	box-shadow: 0 8px 24px rgba(0, 93, 135, .12);
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
	z-index: 1015;
}
.category-item:hover .category-dropdown,
.category-item:focus-within .category-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.category-dropdown-item {
	display: block;
	padding: 10px 18px;
	color: var(--header-fg);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.category-dropdown-item:hover,
.category-dropdown-item:focus {
	background: #f4f8fa;
	color: var(--brand-blue);
	text-decoration: none;
}

/* Mobile-only: $menuTop links repeated inside the collapse */
.category-mobile-extra {
	width: 100%;
	border-top: 1px solid var(--header-categories-border);
	margin-top: 8px;
	padding-top: 8px;
}
.category-link-secondary {
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0;
	text-transform: none;
	padding: 12px 22px;
}

/* Sticky main bar — natural sticky behavior, no JS toggling.
 * .header-top and .header-categories scroll naturally with the page;
 * .header-main pins to top via position: sticky. */

/* Mobile responsive */
@media (max-width: 1199.98px) {
	.header-top-nav { display: none !important; }
}

@media (max-width: 991.98px) {
	.header-top-row {
		justify-content: space-between;
		font-size: 12px;
	}
	.header-top-link {
		padding: 4px 8px;
	}
	.header-top-link span:not(.dropdown-toggle span) {
		display: none;
	}
	.header-lang .header-top-link span,
	.header-top-right > .header-top-link span {
		display: inline;
	}

	.header-main .container-xl {
		padding-top: 12px;
		padding-bottom: 12px;
	}
	.header-logo {
		height: 44px;
	}
	.header-cta {
		display: none;
	}

	.header-categories {
		border-top: 1px solid var(--header-categories-border);
	}
	.header-categories-nav {
		flex-direction: column;
	}
	.category-item {
		display: block;
		width: 100%;
	}
	.category-link {
		padding: 14px 22px;
		border-bottom: 1px solid var(--header-categories-border);
		justify-content: space-between;
		width: 100%;
	}
	.category-link:hover,
	.category-link.active {
		border-bottom-color: var(--header-categories-border);
		background: rgba(11, 85, 160, .04);
	}
	.category-dropdown {
		position: static;
		transform: none;
		opacity: 1;
		visibility: visible;
		max-width: none;
		min-width: 0;
		padding: 4px 0;
		background: #f4f8fa;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}
	.category-dropdown-item {
		padding: 12px 22px 12px 40px;
		font-size: 13px;
	}
	.category-caret {
		transform: rotate(0deg) !important;
	}
}

@media (max-width: 575.98px) {
	.header-top-contacts {
		display: none !important;
	}
	.header-cart-text {
		display: none;
	}
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
	background: var(--footer-bg);
	color: var(--footer-fg);
	padding: 60px 0 0;
	margin-top: 0;
	font-size: 14px;
	line-height: 1.7;
	display: block;
}

.footer-main {
	padding-bottom: 40px;
}

.footer-brand .footer-logo {
	display: inline-block;
	margin-bottom: 16px;
}
.footer-brand .footer-logo img {
	max-height: 50px;
	width: auto;
	filter: brightness(0) invert(1);
}

.footer-tagline {
	color: var(--footer-fg-dim);
	margin-bottom: 18px;
	font-size: 13px;
}

.footer-contact {
	list-style: none;
	padding: 0;
	margin: 0;
}
.footer-contact li {
	display: flex;
	align-items: flex-start;
	margin-bottom: 10px;
	font-size: 14px;
}
.footer-contact li i {
	color: var(--brand-blue-light);
	width: 16px;
	margin-right: 10px;
	margin-top: 4px;
	flex-shrink: 0;
}
.footer-contact a {
	color: var(--footer-fg);
	text-decoration: none;
}
.footer-contact a:hover {
	color: #fff;
	text-decoration: underline;
}

.footer-heading {
	color: var(--footer-heading);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .3px;
	margin-bottom: 18px;
	text-transform: uppercase;
}
.footer-heading a {
	color: var(--footer-heading);
	text-decoration: none;
}
.footer-heading a:hover {
	color: var(--brand-blue-light);
}

.site-footer .footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}
.site-footer .footer-links li {
	margin-bottom: 8px;
}
.site-footer .footer-links a {
	color: var(--footer-fg);
	text-decoration: none;
	transition: color .15s ease;
}
.site-footer .footer-links a:hover {
	color: #fff;
	text-decoration: underline;
}

.footer-form .input-group {
	margin-bottom: 6px;
}
.footer-form .form-control {
	background: var(--footer-bg-2);
	border: 1px solid var(--footer-border);
	color: #fff;
	border-right: 0;
}
.footer-form .form-control::placeholder {
	color: var(--footer-fg-dim);
}
.footer-form .form-control:focus {
	background: var(--footer-bg-2);
	color: #fff;
	border-color: var(--brand-blue-light);
	box-shadow: none;
}
.footer-form .btn-primary {
	background: var(--brand-blue);
	border-color: var(--brand-blue);
	font-weight: 600;
	color: #fff;
}
.footer-form .btn-primary:hover,
.footer-form .btn-primary:focus,
.footer-form .btn-primary:not(:disabled):not(.disabled):active {
	background: var(--brand-blue-hover);
	border-color: var(--brand-blue-hover);
}
.footer-form .btn-primary:disabled {
	opacity: .55;
}

.footer-social {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.footer-social li {
	margin: 0;
}
.footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--footer-bg-2);
	color: var(--footer-fg);
	transition: background .15s ease, color .15s ease, transform .15s ease;
	text-decoration: none;
	font-size: 15px;
}
.footer-social a:hover {
	background: var(--brand-blue);
	color: #fff;
	transform: translateY(-2px);
}

.site-footer .footer-bottom {
	border-top: 1px solid var(--footer-border);
	padding: 18px 0;
	font-size: 13px;
	color: var(--footer-fg-dim);
	/* Override legacy styles.css `.footer-bottom { height: 30px; background: var(--melyna) }`
	 * which was leaking through and rendering as a blue bar at the very bottom. */
	background: transparent;
	height: auto;
}
.footer-copy {
	color: var(--footer-fg-dim);
}
.footer-privacy {
	color: var(--footer-fg);
	text-decoration: none;
}
.footer-privacy:hover {
	color: #fff;
	text-decoration: underline;
}

@media (max-width: 767.98px) {
	.site-footer {
		padding-top: 40px;
	}
	.footer-main {
		padding-bottom: 24px;
	}
	.footer-brand,
	.footer-col,
	.footer-newsletter {
		margin-bottom: 28px;
	}
	.site-footer .footer-bottom .d-flex {
		flex-direction: column;
		gap: 8px;
	}
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */

/* When the cookie banner is visible, push body content up so the footer's
 * bottom strip isn't hidden behind the banner. */
body.has-cookie-banner {
	padding-bottom: 120px;
}

.cookie-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	max-width: 720px;
	margin: 0 auto;
	background: #ffffff;
	color: var(--header-fg);
	border: 1px solid var(--header-border);
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
	padding: 18px 22px;
	z-index: 1080;
	font-size: 14px;
	line-height: 1.5;
}

.cookie-banner-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.cookie-banner-text {
	flex: 1 1 280px;
	min-width: 0;
}

.cookie-banner-text p {
	margin: 0;
}
.cookie-banner-text p + p {
	margin-top: 4px;
}

.cookie-banner-text a {
	color: var(--brand-blue);
	text-decoration: underline;
}
.cookie-banner-text a:hover {
	color: var(--brand-blue-hover);
}

.cookie-banner-btn {
	background: var(--brand-blue);
	color: #ffffff;
	border: 0;
	border-radius: 4px;
	padding: 10px 28px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s ease;
	flex-shrink: 0;
}
.cookie-banner-btn:hover,
.cookie-banner-btn:focus {
	background: var(--brand-blue-hover);
	color: #ffffff;
	outline: none;
}

@media (max-width: 575.98px) {
	.cookie-banner {
		left: 10px;
		right: 10px;
		bottom: 10px;
		padding: 14px 16px;
	}
	.cookie-banner-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.cookie-banner-btn {
		width: 100%;
	}
}
