/* =========================================================
   Mobile menu — hamburger + slide-in panel with Kategorije/Meni tabs.
   Breakpoint: <=1024px shows mobile menu, >=1025px shows desktop nav.
   ========================================================= */

/* Breakpoint switch */
@media (max-width: 1024px) {
	.main-nav {
		display: none !important;
	}
	.mobile-menu-toggle {
		display: flex !important;
	}
}

@media (min-width: 1025px) {
	.mobile-menu {
		display: none !important;
	}
	.mobile-menu-toggle {
		display: none !important;
	}
}

/* Lock body scroll when menu open */
body.mobile-menu-open {
	overflow: hidden;
}

/* ========== Overlay container ========== */
.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 9999;
	visibility: hidden;
	pointer-events: none;
}

.mobile-menu.is-open {
	visibility: visible;
	pointer-events: auto;
}

/* ========== Backdrop ========== */
.mobile-menu-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu-backdrop {
	opacity: 1;
}

/* ========== Sliding panel ========== */
.mobile-menu-panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(90vw, 400px);
	background: #fff;
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
	box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

.mobile-menu.is-open .mobile-menu-panel {
	transform: translateX(0);
}

/* ========== Header (close + tabs) ========== */
.mobile-menu-header {
	padding: 12px 14px;
	border-bottom: 1px solid #eee;
	background: #18202e;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.mobile-menu-close {
	align-self: flex-end;
	background: none;
	border: none;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.mobile-menu-tabs {
	display: flex;
	gap: 0;
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
}

.mobile-tab {
	flex: 1;
	padding: 10px 14px;
	border: none;
	background: #fff;
	color: #18202e;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.2s, color 0.2s;
}

.mobile-tab.is-active {
	background: #f36f21;
	color: #fff;
}

/* ========== Body wraps tab content ========== */
.mobile-menu-body {
	flex: 1;
	position: relative;
	overflow: hidden;
	background: #fff;
}

.mobile-tab-content {
	position: absolute;
	inset: 0;
	overflow: hidden;
	display: none;
}

.mobile-tab-content.is-active {
	display: block;
}

/* ========== Drilldown (Kategorije tab) ========== */
.mobile-drilldown {
	position: relative;
	height: 100%;
	overflow: hidden;
}

.drilldown-panel {
	position: absolute;
	inset: 0;
	overflow-y: auto;
	background: #fff;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	-webkit-overflow-scrolling: touch;
}

.drilldown-panel.is-active {
	transform: translateX(0);
}

.drilldown-panel.is-past {
	transform: translateX(-100%);
}

.drilldown-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid #eee;
	background: #f7f7f7;
	position: sticky;
	top: 0;
	z-index: 2;
}

.drilldown-back {
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	color: #18202e;
	padding: 4px 8px;
	line-height: 1;
}

.drilldown-title {
	font-weight: 600;
	color: #18202e;
	font-size: 15px;
}

.drilldown-see-all {
	display: block;
	padding: 12px 14px;
	background: #f36f21;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	font-size: 14px;
	border-bottom: 1px solid #d95f17;
}

.drilldown-see-all:hover,
.drilldown-see-all:focus {
	background: #d95f17;
	color: #fff;
}

.drilldown-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.drilldown-item {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid #eee;
}

.drilldown-link {
	flex: 1;
	padding: 14px;
	color: #18202e;
	text-decoration: none;
	font-size: 15px;
	line-height: 1.3;
}

.drilldown-link:hover,
.drilldown-link:focus {
	background: #f7f7f7;
	color: #18202e;
}

.drilldown-next {
	width: 48px;
	background: none;
	border: none;
	border-left: 1px solid #eee;
	font-size: 26px;
	line-height: 1;
	color: #18202e;
	cursor: pointer;
	transition: background 0.2s;
}

.drilldown-next:hover,
.drilldown-next:focus {
	background: #f36f21;
	color: #fff;
}

/* Featured drilldown item (e.g. STIHL delovi entry in Meni tab) */
.drilldown-item.is-featured {
	background: #f36f21;
}

.drilldown-item.is-featured .drilldown-link {
	color: #fff;
	font-weight: 700;
}

.drilldown-item.is-featured .drilldown-next {
	color: #fff;
	border-left-color: rgba(255, 255, 255, 0.25);
}

.drilldown-item.is-featured .drilldown-link:hover,
.drilldown-item.is-featured .drilldown-link:focus,
.drilldown-item.is-featured .drilldown-next:hover,
.drilldown-item.is-featured .drilldown-next:focus {
	background: #d95f17;
	color: #fff;
}

/* ========== WP nav menu (Meni tab) ========== */
.mobile-tab-content[data-tab="meni"] {
	overflow-y: auto;
}

.mobile-wp-menu,
.mobile-wp-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-wp-menu li {
	border-bottom: 1px solid #eee;
}

.mobile-wp-menu a {
	display: block;
	padding: 14px;
	color: #18202e;
	text-decoration: none;
	font-size: 15px;
}

.mobile-wp-menu a:hover,
.mobile-wp-menu a:focus {
	background: #f7f7f7;
}

.mobile-wp-menu ul a {
	padding-left: 28px;
	font-size: 14px;
	color: #555;
}

.mobile-menu-empty {
	padding: 16px;
	color: #666;
	font-size: 14px;
	line-height: 1.4;
}

/* ========== Footer (phone numbers) ========== */
.mobile-menu-footer {
	border-top: 1px solid #eee;
	padding: 12px 14px;
	background: #f7f7f7;
	display: flex;
	flex-direction: row;
	gap: 4px;
	flex-shrink: 0;
	justify-content: space-between;
	flex-wrap: wrap;
}

.mobile-menu-phone {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #18202e;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	padding: 6px 0;
}

.mobile-menu-phone:hover,
.mobile-menu-phone:focus {
	color: #f36f21;
}

.mobile-menu-phone-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	fill: #f36f21;
}

/* ========== Filteri tab (FacetWP) ========== */
.mobile-tab-content[data-tab="filteri"] {
	overflow-y: auto;
}

.mobile-filters {
	padding: 14px;
}

.mobile-filters .facet-wrap {
	margin-bottom: 18px;
}

.mobile-filters .facet-label {
	font-size: 14px;
	font-weight: 600;
	color: #18202e;
	margin: 0 0 8px;
}

/* ========== Header & footer tweaks for <=768px ========== */
@media (max-width: 768px) {
	/* Header */
	.header-contact {
		display: none;
	}

	.header-main {
		padding-bottom: 0;
	}

	.mobile-menu-toggle,
	.ajax-mini-cart-toggle {
		padding-inline: 0;
	}

	/* Footer */
	.site-footer {
		background: #18202E;
	}

	.footer-content {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.footer-column.footer-company {
		grid-column: 1 / 3;
	}

	.footer-bottom {
		flex-direction: column-reverse;
		gap: 20px;
	}

	.store-details p {
		font-size: 12px;
	}

	.store-icon {
		width: 36px;
		height: 36px;
	}

	.payment-icons img {
		height: 42px;
	}

	.contact-info p,
	.footer-contact-details p {
		font-size: 13px;
	}

	p.company-description {
		font-size: 14px;
		color: #fff;
	}

	.footer-company .company-logo {
		display: flex;
		justify-content: center;
	}
}
