/**
 * Kedaranchal — unified inner page width & spacing (all non-home pages)
 */

:root {
	--kr-gutter: 16px;
	--kr-hero-band-py: 12px;
	--kr-post-hero-gap: 12px;
	--kr-page-bottom: 28px;
}

/* Legacy alias used in older rules */
:root {
	--kr-inner-y: var(--kr-post-hero-gap);
}

/* ── Shared content width (matches header / home / login: 1280px) ── */
.kedaranchal-theme .kr-inner-wrap,
.kedaranchal-theme .kr-page-container,
.kedaranchal-theme .kr-shop-layout,
.kedaranchal-theme .page-bradcurm-container,
.kedaranchal-theme .kr-cat-banner__inner,
.kedaranchal-theme .main-header .container,
.kedaranchal-theme .container,
.kedaranchal-theme .woostify-container,
.kedaranchal-theme .product-page-container,
.kedaranchal-theme.single-product .content-top,
.kedaranchal-theme .woocommerce-cart .woocommerce,
.kedaranchal-theme .woocommerce-checkout .woocommerce,
.kedaranchal-theme.woocommerce-account .woocommerce,
.kedaranchal-theme .checkout-form,
.kedaranchal-theme .site-content > .woostify-container,
.kedaranchal-theme .site-content > .container,
.kedaranchal-theme .related.products,
.kedaranchal-theme .upsells.products,
.kedaranchal-theme .woostify-product-recently-viewed-section,
.kedaranchal-theme .kr-pdp-tabs,
.kedaranchal-theme .woocommerce-after-single-product-summary {
	width: 100% !important;
	max-width: var(--kr-container, 1280px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

.kedaranchal-theme .kr-inner-wrap,
.kedaranchal-theme .kr-page-container,
.kedaranchal-theme .main-header .container,
.kedaranchal-theme .container,
.kedaranchal-theme .woocommerce-cart .woocommerce,
.kedaranchal-theme .woocommerce-checkout .woocommerce,
.kedaranchal-theme.woocommerce-account .woocommerce,
.kedaranchal-theme .checkout-form {
	padding: 0;
}

.kedaranchal-theme .kr-shop-layout {
	padding:0px;
}

/* ── Remove Woostify default content margins on inner pages ── */
.kedaranchal-theme.kr-inner-page .site-content {
	margin: 0 !important;
}

.kedaranchal-theme.kr-inner-page #primary,
.kedaranchal-theme.kr-inner-page .content-area {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.kedaranchal-theme.kr-inner-page .site-main {
	width: 100%;
	max-width: 100%;
	margin: 0;
}

/* Full-width content — hide theme sidebar on inner pages */
.kedaranchal-theme.kr-inner-page #secondary,
.kedaranchal-theme.kr-inner-page .sidebar {
	display: none !important;
}

/* ── Page hero / breadcrumb band (below header or category banner) ── */
.kedaranchal-theme .page-bradcurm-header {
	margin: 0;
}

.kedaranchal-theme .page-bradcurm-header .page-bradcurm-container {
	padding: var(--kr-hero-band-py) var(--kr-gutter) var(--kr-hero-band-py);
}

.kedaranchal-theme.has-tax-banner .kr-cat-banner:not(.kr-cat-banner--no-image) {
	margin-top: 0;
}

/* ── Vertical rhythm — ONE top/bottom gap only (never nest) ── */
.kedaranchal-theme.kr-inner-page .site-main,
.kedaranchal-theme.kr-inner-page.woocommerce .site-main,
.kedaranchal-theme.kr-inner-page.woocommerce-page .site-main,
.kedaranchal-theme.kr-inner-page.error404 .site-main,
.kedaranchal-theme.kr-checkout-page .site-main,
.kedaranchal-theme.kr-cart-page .site-main,
.kedaranchal-theme.kr-account-dashboard-page .site-main,
.kedaranchal-theme.kr-has-shop-filters .site-main,
.kedaranchal-theme.kr-has-shop-filters.woocommerce-page .site-main {
	padding-top: var(--kr-post-hero-gap) !important;
	padding-bottom: var(--kr-page-bottom) !important;
}

/* PDP — tight under fixed header (no extra top band) */
.kedaranchal-theme.kr-pdp-page.single-product .site-content {
	padding-top: 0 !important;
	padding-bottom: 24px !important;
}

.kedaranchal-theme.kr-pdp-page.single-product .site-main {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.kedaranchal-theme.kr-pdp-page.single-product .content-top,
.kedaranchal-theme.kr-pdp-page.single-product .product-page-container,
.kedaranchal-theme.kr-pdp-page.single-product #primary,
.kedaranchal-theme.kr-pdp-page.single-product .content-area {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* Nested shells / account panels must NOT add another top gap */
.kedaranchal-theme.kr-inner-page .site-main .kr-page-shell,
.kedaranchal-theme.kr-inner-page .kr-acct-page,
.kedaranchal-theme.kr-inner-page .woocommerce-MyAccount-content,
.kedaranchal-theme.kr-inner-page .kr-page-container--shop,
.kedaranchal-theme.kr-checkout-page .kr-page-shell,
.kedaranchal-theme.kr-cart-page .kr-page-shell,
.kedaranchal-theme.kr-account-dashboard-page .kr-page-shell {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.kedaranchal-theme.kr-inner-page .kr-page-container,
.kedaranchal-theme.kr-inner-page .kr-inner-wrap,
.kedaranchal-theme.kr-inner-page .kr-shop-layout {
	padding-left: var(--kr-gutter);
	padding-right: var(--kr-gutter);
}

/* Shop / category — layout handles horizontal padding; no double top gap */
.kedaranchal-theme.kr-has-shop-filters .kr-shop-layout,
.kedaranchal-theme.kr-category-landing .kr-shop-layout--landing {
	padding-top: 0;
}

.kedaranchal-theme.kr-category-landing .kr-page-shell,
.kedaranchal-theme.kr-category-landing .kr-page-container--shop {
	padding-left: 0;
	padding-right: 0;
}

.kedaranchal-theme.kr-category-landing .kr-page-hero--after-banner {
	margin-bottom: 0;
}

.kedaranchal-theme.kr-category-landing .kr-page-hero--after-banner .page-bradcurm-container {
	padding-bottom: var(--kr-hero-band-py);
}

/* Account login — full-bleed auth card (no extra shell padding) */
.kedaranchal-theme.kr-account-login-page .site-main.kr-page-shell--account-login {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}


/* ── Search results hero — align to site width ── */
.kr-search-page-hero .kr-inner-wrap {
	text-align: center;
}

/* ── Hide duplicate page headers / breadcrumbs in content ── */
.kedaranchal-theme .page-header,
.kedaranchal-theme .woostify-page-header {
	display: none !important;
}

.kedaranchal-theme .woocommerce-breadcrumb,
.kedaranchal-theme nav.breadcrumb {
	display: none !important;
}

.page-bradcurm-header .woocommerce-breadcrumb,
.page-bradcurm-header nav.breadcrumb,
.kr-page-hero .woocommerce-breadcrumb,
.kr-page-hero nav.breadcrumb {
	display: block !important;
}

.kedaranchal-theme.has-page-hero .kr-page-shell .woocommerce-products-header {
	display: none !important;
}

/* Elementor: first heading often duplicates kr-page-hero title */
.kedaranchal-theme.has-page-hero .kr-content-card > article.page .elementor > .e-con:first-child > .elementor-element.elementor-widget-heading:first-child,
.kedaranchal-theme.has-page-hero .kr-content-card > article.page .elementor > section:first-child .elementor-widget-heading:first-child {
	display: none !important;
}

/* ── 404 — centered panel inside same container width ── */
.kedaranchal-theme.error404 .site-main {
	max-width: var(--kr-container, 1280px) !important;
	width: 100% !important;
	margin: 0 auto !important;
	padding: var(--kr-post-hero-gap) var(--kr-gutter) var(--kr-page-bottom) !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

.kedaranchal-theme.error404 .site-content {
	min-height: 0;
	padding: 0;
	display: block;
}

.kedaranchal-theme .kr-404-panel {
	max-width: 520px;
	margin: 0 auto;
	padding: 28px 22px;
	background: var(--kr-white, #fff);
	border-radius: var(--kr-radius-lg, 16px);
	box-shadow: var(--kr-shadow-md, 0 8px 32px rgba(0, 0, 0, 0.08));
	border: 1px solid var(--kr-border-light, #f0ece4);
	text-align: center;
}

@media (max-width: 767px) {
	:root {
		--kr-gutter: 14px;
		--kr-hero-band-py: 10px;
		--kr-post-hero-gap: 10px;
		--kr-page-bottom: 24px;
	}

	.kedaranchal-theme .kr-content-card {
		padding: 22px 18px;
	}

	.kedaranchal-theme .kr-404-panel {
		padding: 32px 20px;
	}

	.kedaranchal-theme.kr-has-shop-filters .kr-shop-layout {
		padding-left: 14px;
		padding-right: 14px;
	}
}
