/*
Theme Name:   Savi Guerrino
Description:  Otroška tema Astre za Savi Guerrino (serramenti / stavbno pohištvo).
Template:     astra
Version:      1.0.0
Requires PHP: 8.1
Text Domain:  savi-child
*/

:root {
	--savi-indigo: #3f2e8b;
	--savi-indigo-dark: #241a57;
	--savi-red: #e3262b;
	--savi-red-dark: #b81d21;
	--savi-ink: #1c1b29;
	--savi-text: #4a4958;
	--savi-muted: #7b7a8c;
	--savi-line: #e6e4ef;
	--savi-soft: #f5f4fa;
	--savi-white: #ffffff;
	--savi-radius: 14px;
	--savi-shadow: 0 10px 30px rgba(36, 26, 87, .08);
	--savi-shadow-lg: 0 24px 60px rgba(36, 26, 87, .16);
	--savi-font-head: "Manrope", system-ui, sans-serif;
	--savi-font-body: "Inter", system-ui, sans-serif;
	--savi-max: 1200px;
}

html { scroll-behavior: smooth; }
body {
	font-family: var(--savi-font-body);
	color: var(--savi-text);
	background: var(--savi-white);
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--savi-font-head); color: var(--savi-ink); letter-spacing: -.01em; }
a { color: var(--savi-indigo); }
a:hover { color: var(--savi-red); }

/* Elementor pages run edge to edge. */
.elementor-page .site-content > .ast-container { max-width: 100%; padding: 0; display: block; }
.elementor-page #primary { margin: 0; padding: 0; }

/* ---------- Header ---------- */
.savi-topbar {
	background: var(--savi-indigo-dark);
	color: rgba(255,255,255,.8);
	font-size: 13px;
}
.savi-topbar__inner, .savi-header__inner, .savi-footer__inner, .savi-footer__bottom-inner {
	max-width: var(--savi-max);
	margin: 0 auto;
	padding: 0 24px;
}
.savi-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.savi-topbar a { color: #fff; text-decoration: none; }
.savi-topbar a:hover { color: #ffd0d1; }
.savi-topbar__contacts { display: flex; gap: 22px; flex-wrap: wrap; }
.savi-topbar__contacts span { display: inline-flex; align-items: center; gap: 7px; }
.savi-topbar svg { width: 14px; height: 14px; fill: currentColor; opacity: .75; }

.savi-lang { display: inline-flex; gap: 4px; }
.savi-lang a {
	padding: 4px 9px;
	border-radius: 6px;
	font-weight: 600;
	letter-spacing: .04em;
	color: rgba(255,255,255,.75);
}
.savi-lang a.is-active { background: rgba(255,255,255,.14); color: #fff; }

.savi-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(255,255,255,.96);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--savi-line);
	transition: box-shadow .25s;
}
.admin-bar .savi-header { top: 32px; }
.savi-header.is-scrolled { box-shadow: 0 6px 24px rgba(36,26,87,.08); }
.savi-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.savi-logo { display: inline-flex; align-items: center; }
.savi-logo img { height: 54px; width: auto; display: block; }

.savi-nav ul { list-style: none; margin: 0; padding: 0; }
.savi-nav > ul { display: flex; align-items: center; gap: 4px; }
.savi-nav li { position: relative; }
.savi-nav a {
	display: block;
	padding: 10px 14px;
	color: var(--savi-ink);
	font-family: var(--savi-font-head);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	border-radius: 8px;
}
.savi-nav a:hover, .savi-nav .current-menu-item > a, .savi-nav .current-menu-ancestor > a { color: var(--savi-red); }
.savi-nav .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px; height: 6px;
	margin-left: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
	opacity: .6;
}
.savi-nav .sub-menu {
	position: absolute;
	left: 0; top: 100%;
	min-width: 250px;
	background: #fff;
	border: 1px solid var(--savi-line);
	border-radius: 12px;
	box-shadow: var(--savi-shadow-lg);
	padding: 8px;
	opacity: 0; visibility: hidden;
	transform: translateY(8px);
	transition: all .2s ease;
}
.savi-nav li:hover > .sub-menu, .savi-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.savi-nav .sub-menu a { font-weight: 500; font-size: 14.5px; padding: 9px 12px; }
.savi-nav .sub-menu a:hover { background: var(--savi-soft); color: var(--savi-indigo); }

.savi-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 22px;
	border-radius: 999px;
	background: var(--savi-red);
	color: #fff !important;
	font-family: var(--savi-font-head);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	transition: background .2s, transform .2s, box-shadow .2s;
	box-shadow: 0 8px 20px rgba(227,38,43,.25);
	white-space: nowrap;
}
.savi-btn:hover { background: var(--savi-red-dark); transform: translateY(-1px); }
.savi-header__cta { display: flex; align-items: center; gap: 12px; }

.savi-burger {
	display: none;
	width: 46px; height: 46px;
	border: 1px solid var(--savi-line);
	border-radius: 10px;
	background: #fff;
	align-items: center; justify-content: center;
	cursor: pointer;
	padding: 0;
}
.savi-burger span, .savi-burger span::before, .savi-burger span::after {
	display: block; width: 20px; height: 2px; background: var(--savi-ink); position: relative; transition: .2s;
}
.savi-burger span::before, .savi-burger span::after { content: ""; position: absolute; left: 0; }
.savi-burger span::before { top: -6px; }
.savi-burger span::after { top: 6px; }
.nav-open .savi-burger span { background: transparent; }
.nav-open .savi-burger span::before { top: 0; transform: rotate(45deg); }
.nav-open .savi-burger span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1080px) {
	.savi-burger { display: inline-flex; }
	.savi-header__cta .savi-btn { display: none; }
	.savi-nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(360px, 88vw);
		background: #fff;
		padding: 96px 20px 32px;
		transform: translateX(100%);
		transition: transform .3s ease;
		overflow-y: auto;
		box-shadow: var(--savi-shadow-lg);
		z-index: 1000;
	}
	.nav-open .savi-nav { transform: none; }
	.savi-nav > ul { flex-direction: column; align-items: stretch; }
	.savi-nav .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; padding: 0 0 0 14px; min-width: 0;
	}
	.savi-nav .menu-item-has-children > a::after { display: none; }
	.savi-nav .savi-nav__cta { margin-top: 20px; }
	.savi-header__cta { position: relative; z-index: 1001; }
	.savi-topbar__contacts span.hide-sm { display: none; }
}
@media (min-width: 1081px) { .savi-nav .savi-nav__cta { display: none; } }
.savi-nav-backdrop { display: none; }
@media (max-width: 1080px) {
	.nav-open .savi-nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(28,27,41,.45); z-index: 998; }
}

/* ---------- Footer ---------- */
.savi-footer { background: #17152a; color: rgba(255,255,255,.72); font-size: 15px; }
.savi-footer a { color: #fff; text-decoration: none; }
.savi-footer a:hover { color: #ff8a8d; }
.savi-footer__inner {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr 1fr;
	gap: 40px;
	padding-top: 72px; padding-bottom: 56px;
}
.savi-footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 18px; }
.savi-footer p { margin: 0 0 10px; line-height: 1.65; }
.savi-footer ul { list-style: none; margin: 0; padding: 0; }
.savi-footer li { margin: 0 0 9px; }
.savi-footer__logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 12px; margin-bottom: 18px; }
.savi-footer__logo img { height: 46px; width: auto; display: block; }
.savi-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.savi-footer__bottom-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; flex-wrap: wrap; }
@media (max-width: 900px) { .savi-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .savi-footer__inner { grid-template-columns: 1fr; gap: 28px; padding-top: 52px; } }

/* ---------- Content helpers used by Elementor pages ---------- */
.savi-eyebrow .elementor-heading-title {
	display: inline-flex; align-items: center; gap: 10px;
}
.savi-eyebrow .elementor-heading-title::before {
	content: ""; width: 28px; height: 2px; background: var(--savi-red); display: inline-block;
}
.savi-card { transition: transform .25s ease, box-shadow .25s ease; }
.savi-card:hover { transform: translateY(-4px); box-shadow: var(--savi-shadow-lg) !important; }
.savi-card img { transition: transform .5s ease; }
.savi-card:hover img { transform: scale(1.04); }
.savi-card .elementor-widget-image { overflow: hidden; }

.savi-chips ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.savi-chips li {
	background: #fff; border: 1px solid var(--savi-line); border-radius: 999px;
	padding: 8px 16px; font-weight: 500; color: var(--savi-ink); font-size: 15px;
}

.savi-hero .elementor-background-slideshow__slide__image { filter: saturate(1.05); }

/* Product cards (category links) */
.savi-product-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px;
}
.savi-product {
	position: relative; display: block; border-radius: var(--savi-radius); overflow: hidden;
	aspect-ratio: 4 / 3.2; background: var(--savi-soft); text-decoration: none;
	box-shadow: var(--savi-shadow);
}
.savi-product img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; display: block; }
.savi-product::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(23,21,42,0) 40%, rgba(23,21,42,.82) 100%);
}
.savi-product__label {
	position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1;
	color: #fff; font-family: var(--savi-font-head); font-weight: 700; font-size: 19px;
	display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.savi-product__label i {
	width: 34px; height: 34px; border-radius: 50%; background: var(--savi-red);
	display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 16px;
	transition: transform .25s;
	flex: 0 0 auto;
}
.savi-product:hover img { transform: scale(1.06); }
.savi-product:hover .savi-product__label i { transform: translateX(4px); }

/* Gallery (portfolio items) */
.savi-gallery__filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; justify-content: center; }
.savi-gallery__filters button {
	border: 1px solid var(--savi-line); background: #fff; color: var(--savi-ink);
	padding: 9px 18px; border-radius: 999px; font: 600 14px var(--savi-font-head); cursor: pointer; transition: .2s;
}
.savi-gallery__filters button:hover { border-color: var(--savi-indigo); color: var(--savi-indigo); }
.savi-gallery__filters button.is-active { background: var(--savi-indigo); border-color: var(--savi-indigo); color: #fff; }
.savi-gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.savi-gallery__item {
	position: relative; display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 1;
	background: var(--savi-soft);
}
.savi-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.savi-gallery__item span {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 12px;
	background: linear-gradient(180deg, transparent, rgba(23,21,42,.85));
	color: #fff; font-size: 14px; font-weight: 600; line-height: 1.35;
	opacity: 0; transform: translateY(6px); transition: .25s;
}
.savi-gallery__item:hover img { transform: scale(1.06); }
.savi-gallery__item:hover span, .savi-gallery__item:focus span { opacity: 1; transform: none; }
.savi-gallery__item.is-hidden { display: none; }
@media (hover: none) { .savi-gallery__item span { opacity: 1; transform: none; } }

/* Contact cards */
.savi-office a { text-decoration: none; }

/* Accessibility */
.skip-link:focus { z-index: 100000; }
:focus-visible { outline: 3px solid rgba(63,46,139,.45); outline-offset: 2px; }

/* Hero overlay above the background slideshow. */
.savi-hero > .elementor-background-slideshow { z-index: 0; }
.savi-hero::before { z-index: 1 !important; }
.savi-hero > .e-con-inner { position: relative; z-index: 2; }

/* Header/footer links win over Elementor's global link colour. */
body .savi-topbar a { color: #fff; }
body .savi-topbar a:hover { color: #ffd0d1; }
body .savi-lang a { color: rgba(255,255,255,.75); }
body .savi-lang a.is-active { color: #fff; }
body .savi-nav a { color: var(--savi-ink); }
body .savi-nav a:hover, body .savi-nav .current-menu-item > a, body .savi-nav .current-menu-ancestor > a { color: var(--savi-red); }
body .savi-nav .sub-menu a:hover { color: var(--savi-indigo); }
body .savi-footer a { color: rgba(255,255,255,.92); }
body .savi-footer a:hover { color: #ff8a8d; }
body .savi-product, body .savi-gallery__item { color: #fff; }

/* Profile cards: equal image boxes. */
.savi-card .elementor-widget-image img { height: 190px; width: 100%; object-fit: contain; }
body .savi-gallery__item img, body .savi-product img { width: 100%; height: 100% !important; max-width: none; object-fit: cover; }

/* Elementor lightbox is a fixed full-screen dialog; keep its content pinned to the viewport
   (jQuery UI positioning in WP 7.1 offsets it by the scroll position). */
.elementor-lightbox .dialog-widget-content { top: 0 !important; left: 0 !important; }

/* backdrop-filter would trap the fixed mobile drawer inside the header. */
@media (max-width: 1080px) {
	.savi-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
	.savi-header__inner { min-height: 72px; }
	.savi-logo img { height: 48px; }
}

/* Technical data table */
.savi-table-wrap { overflow-x: auto; border: 1px solid var(--savi-line); border-radius: 14px; }
.savi-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; }
.savi-table th, .savi-table td { padding: 13px 16px; text-align: left; border: 0; border-bottom: 1px solid var(--savi-line); }
.savi-table thead th { background: var(--savi-soft); font-family: var(--savi-font-head); font-weight: 700; color: var(--savi-ink); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.savi-table tbody tr:last-child td { border-bottom: 0; }
.savi-table td:last-child { color: var(--savi-muted); font-size: 13.5px; white-space: nowrap; }
.savi-table strong { color: var(--savi-indigo); }

/* Image placeholders (replace in Elementor) */
.savi-placeholder img { aspect-ratio: 4 / 3; object-fit: cover; background: var(--savi-soft); width: 100%; }

/* Product photo slots on system pages */
.savi-slot img { width: 100%; border-radius: 16px; display: block; }
.savi-slot--cover img { aspect-ratio: 4 / 3; object-fit: cover; }
.savi-slot--tall img { aspect-ratio: 3 / 4; object-fit: cover; }
.savi-slot--contain img { aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border: 1px solid var(--savi-line); padding: 12px; }

/* FAQ */
.savi-faq .elementor-toggle-item { background: #fff; border: 1px solid var(--savi-line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.savi-faq .elementor-tab-title { border: 0 !important; }
.savi-faq .elementor-tab-content { border: 0 !important; }
