/**
 * WooLab structural layout: grid helpers, blog list/grid, sidebars,
 * comments, 404.
 */

.ron-site-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.ron-site-content {
	flex: 1 0 auto;
}

/* WooLab Options > General > "Content Max Width" (--ron-container-width)
   already caps every WooLab template (.ron-container, in header.php,
   footer.php, page/single/archive templates, the WooCommerce wrapper).
   Elementor-built page content routes through the same `.ron-container`
   too (page.php wraps the_content() in it) EXCEPT that Elementor's own
   "Boxed" section width (its default, independent of the theme) is its
   own fixed ~1140px, unrelated to this setting — so a store owner
   raising/lowering Content Max Width would see the rest of the page
   move but Elementor's boxed sections stay put. Syncing it here so
   "Content Max Width" reads as one real site-wide setting. Deliberately
   scoped to `.elementor-section-boxed` only — a section the owner has
   explicitly set to "Full Width" in Elementor is left untouched, since
   that's a deliberate per-section choice, not a layout bug. */
.elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--ron-container-width) !important;
}

/* `1fr` is shorthand for `minmax(auto, 1fr)` — the implicit `auto`
   minimum means this column will never shrink below the MIN-CONTENT
   width of whatever's inside it. A carousel slide track (`.ron-carousel-
   track`, `display: flex` with each `.ron-carousel-slide` at `flex: 0 0
   auto`, several slides wide) has a min-content width equal to every
   slide side by side — several thousand px — and critically, the
   carousel's own `overflow: hidden` does NOT reduce that: overflow
   clips what's painted, it doesn't shrink what the browser counts
   toward an ancestor's intrinsic/min-content size. So a page with a
   hero slider or product carousel anywhere inside `<main>` forced this
   whole grid column — and `<main>` along with it — to grow to the
   carousel's full unclipped width, well past the visual 1280px
   container, which is exactly what produced a page-wide horizontal
   scrollbar on any page with a slider. `minmax(0, 1fr)` overrides that
   default `auto` minimum to `0`, so the column (and the carousel inside
   it) is free to actually shrink to the container's real width — same
   fix already correctly in place below for the sidebar variants, just
   missing here on the plain single-column layout every non-shop page
   (home, blog, generic pages) uses. */
.ron-content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	padding: 40px 0;
}

.ron-content-layout.has-sidebar-right {
	grid-template-columns: minmax(0, 1fr) 300px;
}

.ron-content-layout.has-sidebar-left {
	grid-template-columns: 300px minmax(0, 1fr);
}

.ron-content-layout.has-sidebar-left .ron-primary {
	order: 2;
}

@media (max-width: 960px) {
	.ron-content-layout.has-sidebar-right,
	.ron-content-layout.has-sidebar-left {
		grid-template-columns: minmax(0, 1fr);
	}
	.ron-content-layout .ron-primary {
		order: 1;
	}
}

/* Sidebar widgets — shared base look for the blog sidebar and any other
   dynamic_sidebar() context (the shop sidebar's WooCommerce-specific
   widgets get additional rules in ron-woocommerce.css on top of this). */
.ron-sidebar {
	min-width: 0;
}

.ron-sidebar .widget {
	margin-bottom: 24px;
}

.ron-sidebar .widget-title,
.ron-sidebar .widgettitle {
	margin: 0 0 16px;
	font-size: 1.05em;
}

/* Blog grid / list */

.ron-post-list {
	display: grid;
	gap: 32px;
}

.ron-post-list--grid {
	grid-template-columns: repeat(2, 1fr);
}

.ron-post-list--list {
	grid-template-columns: 1fr;
}

@media (max-width: 700px) {
	.ron-post-list--grid { grid-template-columns: 1fr; }
}

.ron-post-card {
	display: flex;
	flex-direction: column;
}

.ron-post-list--list .ron-post-card {
	flex-direction: row;
	gap: 24px;
}

.ron-post-list--list .ron-post-card .ron-post-thumb {
	flex: 0 0 280px;
}

.ron-post-thumb img {
	width: 100%;
	border-radius: var(--ron-border-radius);
	display: block;
}

.ron-post-meta {
	font-size: 0.85em;
	color: #777;
	margin-bottom: 6px;
}

.ron-read-more {
	white-space: nowrap;
}

/* Widgets */

.ron-widget {
	margin-bottom: 32px;
}

.ron-widget-title {
	font-size: 1.05em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 2px solid var(--ron-color-primary);
	padding-bottom: 8px;
	margin-bottom: 16px;
}

/* Comments */

.ron-comments {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid #eee;
}

.ron-comment-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.ron-comment-list .children {
	list-style: none;
	margin-left: 40px;
	padding: 0;
}

.ron-comment-body {
	display: flex;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid #f0f0f0;
}

.ron-comment-avatar img {
	border-radius: 50%;
}

/* 404 */

.ron-404 {
	text-align: center;
	padding: 80px 0;
}

.ron-404 h1 {
	font-size: 4em;
	color: var(--ron-color-primary);
}

/* Pagination */

.ron-pagination {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 32px;
}

.ron-pagination a,
.ron-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	border-radius: var(--ron-border-radius);
	border: 1px solid #e2e2e2;
	color: var(--ron-color-secondary);
}

.ron-pagination .current {
	background: var(--ron-color-primary);
	border-color: var(--ron-color-primary);
	color: #fff;
}
