/* Shared shell for custom TemplatePageView pages (proizvodstvo, delivery, contacts, etc.) */

body.template-custom-page {
	--site-container-width: 1520px;
	overflow-x: clip;
}

/* Header — align top bar with main header row and page container */
body.template-custom-page header .tophm,
body.template-custom-page .main-hdr-inner {
	max-width: min(100%, var(--site-container-width, 1520px));
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

body.template-custom-page #container {
	max-width: min(100%, var(--site-container-width, 1520px));
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--site-gutter, 0px);
	padding-right: var(--site-gutter, 0px);
	box-sizing: border-box;
	background: transparent;
}

body.template-custom-page #container > .side-shade2 {
	display: none;
}

/* Same element has both .breadcrumb and .catalog-listing__breadcrumbs.
   Use #container > .breadcrumb (higher specificity) for spacing — a prior
   padding:0 here was overriding the 60/40 rule on .catalog-listing__breadcrumbs. */
body.template-custom-page #container > .breadcrumb,
body.template-custom-page #container > .catalog-listing__breadcrumbs,
body.templatepageview.template-custom-page #container > .breadcrumb,
body.templatepageview.template-custom-page #container > .catalog-listing__breadcrumbs {
	height: auto;
	min-height: 0;
	margin-bottom: 0;
	padding: 60px 0 40px;
	overflow: visible;
	white-space: normal;
	background: transparent;
}

body.template-custom-page .catalog-listing__breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-size: 14px;
	line-height: 1.4;
	color: #6b7280;
}

body.template-custom-page .catalog-listing__breadcrumbs a,
body.template-custom-page .catalog-listing__breadcrumbs span {
	font-size: 18px;
	line-height: inherit;
	color: #102631;
	text-decoration: none;
}

body.template-custom-page .catalog-listing__breadcrumbs > span {
	display: inline-flex;
	align-items: center;
	vertical-align: unset;
}

body.template-custom-page .catalog-listing__breadcrumbs .home link,
body.template-custom-page .catalog-listing__breadcrumbs .home meta {
	display: none;
}

body.template-custom-page .catalog-listing__breadcrumbs a:hover {
	color: #545c98;
}

body.template-custom-page .catalog-listing__breadcrumbs .catalog-listing__breadcrumbs-current,
body.template-custom-page .catalog-listing__breadcrumbs .catalog-listing__breadcrumbs-current [itemprop="name"] {
	color: #707070;
}

body.template-custom-page .catalog-listing__breadcrumbs .home svg {
	display: none;
}

body.template-custom-page .catalog-listing__breadcrumbs-sep {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 16px;
	vertical-align: middle;
	line-height: 0;
}

body.template-custom-page .catalog-listing__breadcrumbs-sep svg {
	display: block;
}

body.template-custom-page #content {
	padding: 0;
	width: 100%;
	max-width: none;
	float: none;
}

/* Inner page blocks fill #container; do NOT strip footer container */
body.template-custom-page [class$="-page"] .draxter-container,
body.template-custom-page [class$="-page"] .delivery-block .draxter-container {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

body.template-custom-page footer.draxter-site-footer,
body.templatepageview.template-custom-page footer.draxter-site-footer {
	/* Footer can sit inside #container — break out to full viewport, then constrain .footer-wrap */
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: auto;
	right: auto;
	margin-left: calc(50% - 50vw);
	margin-right: 0;
	transform: none;
	box-sizing: border-box;
}

body.template-custom-page footer.draxter-site-footer .footer-wrap.draxter-container,
body.templatepageview.template-custom-page footer.draxter-site-footer .footer-wrap.draxter-container {
	max-width: min(100%, var(--site-container-width, 1520px));
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--site-gutter, 0px);
	padding-right: var(--site-gutter, 0px);
	box-sizing: border-box;
}

@media only screen and (max-width: 1500px) {
	body.template-custom-page #container > .breadcrumb,
	body.template-custom-page #container > .catalog-listing__breadcrumbs,
	body.templatepageview.template-custom-page #container > .breadcrumb,
	body.templatepageview.template-custom-page #container > .catalog-listing__breadcrumbs {
		padding: 24px 0 40px;
	}
}

@media (max-width: 640px) {
	body.template-custom-page #container > .breadcrumb,
	body.template-custom-page #container > .catalog-listing__breadcrumbs,
	body.templatepageview.template-custom-page #container > .breadcrumb,
	body.templatepageview.template-custom-page #container > .catalog-listing__breadcrumbs {
		padding: 16px 0 40px;
	}

	body.template-custom-page .catalog-listing__breadcrumbs a,
	body.template-custom-page .catalog-listing__breadcrumbs span {
		font-size: 14px;
	}

	body.template-custom-page .catalog-listing__breadcrumbs-sep {
		margin: 0 8px;
	}
}

/* Mobile theme + narrow viewport — Figma 360px frame */
body.template-custom-page,
body.templatepageview.template-custom-page {
	--mob-page-pad: 16px;
}

@media (max-width: 767px) {
	body.template-custom-page,
	body.templatepageview.template-custom-page {
		--site-container-width: 100%;
	}

	body.template-custom-page #container,
	body.templatepageview.template-custom-page #container {
		padding-left: var(--mob-page-pad);
		padding-right: var(--mob-page-pad);
	}

	body.template-custom-page #container > .breadcrumb,
	body.template-custom-page #container > .catalog-listing__breadcrumbs,
	body.templatepageview.template-custom-page #container > .breadcrumb,
	body.templatepageview.template-custom-page #container > .catalog-listing__breadcrumbs {
		padding: 16px 0 40px;
		font-size: 14px;
	}

	body.template-custom-page .catalog-listing__breadcrumbs a,
	body.template-custom-page .catalog-listing__breadcrumbs span,
	body.templatepageview.template-custom-page .catalog-listing__breadcrumbs a,
	body.templatepageview.template-custom-page .catalog-listing__breadcrumbs span {
		font-size: 14px;
	}

	body.template-custom-page [class$="-page"] .draxter-container,
	body.templatepageview.template-custom-page [class$="-page"] .draxter-container {
		padding-left: 0;
		padding-right: 0;
	}

	/* Footer breaks out of #container (100vw) — restore same side gutters as homepage */
	body.template-custom-page footer.draxter-site-footer .footer-wrap.draxter-container,
	body.templatepageview.template-custom-page footer.draxter-site-footer .footer-wrap.draxter-container {
		padding-left: var(--mob-page-pad);
		padding-right: var(--mob-page-pad);
	}
}
