/*
Theme Name: SinasAgro
Template: wp-base
Author: Kostas
Description: SinasAgro child theme for Tasos Sinas — agricultural tools sales + repair/service. Brand + design-token overrides only; everything else (templates, patterns, REST, islands, desk) is inherited from the wp-base parent.
Version: 0.1.0
Requires at least: 6.7
Requires PHP: 8.0
Text Domain: wp-base
*/

/* Brand + tokens live in theme.json + brand.json. Add only progressive-enhancement
   CSS here that theme.json cannot express. */

body.page-template-page-no-title .wp-site-blocks,
body.post-type-archive-service .wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body.page-template-page-no-title .wp-site-blocks > main.wp-block-group,
body.post-type-archive-service .wp-site-blocks > main.wp-block-group {
	flex: 1 0 auto;
}

body.post-type-archive-product .wp-site-blocks > main.wp-block-group {
	padding-left: clamp(1rem, 2.4vw, 2rem) !important;
	padding-right: clamp(1rem, 2.4vw, 2rem) !important;
}

body.post-type-archive-product main.wp-block-group.is-layout-constrained > [data-island="catalog"] {
	width: 100%;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	min-width: 0;
}

body.post-type-archive-product [data-island="catalog"] > section {
	width: 90vw;
	max-width: 90vw;
	margin-left: 5vw;
	margin-right: auto;
	box-sizing: border-box;
	min-width: 0;
}

body.post-type-archive-product [data-island="catalog"] > section > div:last-child {
	display: grid !important;
	grid-template-columns: minmax(248px, 280px) minmax(0, 1fr) !important;
	gap: clamp(1.1rem, 2vw, 1.9rem) !important;
	align-items: start !important;
}

body.post-type-archive-product [data-island="catalog"] > section > div:last-child > div:first-child {
	max-width: none !important;
	width: 100%;
}

body.post-type-archive-product [data-island="catalog"] > section > div:last-child > div:last-child {
	min-width: 0;
}

body.home .wp-site-blocks,
body.home .wp-site-blocks > main.wp-block-group {
	overflow-x: clip;
}

body.home .wpbase-hero,
body.home .wpbase-features,
body.home .wpbase-reasons-grid,
body.home .wpbase-testimonials,
body.home .wpbase-moving-banner {
	width: 100dvw !important;
	max-width: 100dvw !important;
	margin-left: calc(50% - 50dvw) !important;
}

body.post-type-archive-product,
body.post-type-archive-product .wp-site-blocks,
body.post-type-archive-product .wp-site-blocks > main.wp-block-group {
	overflow-x: clip;
}

body.post-type-archive-product .wpbase-product-grid {
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: clamp(0.9rem, 1.6vw, 1.2rem);
}

body.post-type-archive-product .wpbase-product-grid__card {
	height: 100%;
}

@supports not (overflow: clip) {
	body.home .wp-site-blocks,
	body.home .wp-site-blocks > main.wp-block-group {
		overflow-x: hidden;
	}
}

@media (max-width: 980px) {
	body.post-type-archive-product [data-island="catalog"] > section > div:last-child {
		grid-template-columns: 1fr !important;
	}
}
