@import url("https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css");


/* ==========================================================================
   WooCommerce Scoped Styles for #primary & #sidebar
   ========================================================================== */

/* Theme Variables (Derived from Header Branding) */
:root {
	--brand-green: #5d7255;
	--brand-green-hover: #4a5c43;
	--brand-dark: #2b2b2b;
	--brand-muted: #666666;
	--brand-bg: #f8f9fa;
	--brand-border: #e2e8f0;
	--brand-radius: 6px;
	--brand-transition: all 0.2s ease-in-out;
}

/* --------------------------------------------------------------------------
   1. MAIN CONTENT AREA (#primary & Immediate Wrapper)
   -------------------------------------------------------------------------- */
#primary,
#primary > div,
#primary > main {
	box-sizing: border-box;
	color: var(--brand-dark);
	font-family: inherit;
}

/* Headings & Page Titles */
#primary h1, 
#primary h2, 
#primary h3,
#primary .woocommerce-products-header__title {
	font-weight: 600;
	color: var(--brand-dark);
	margin-top: 0;
	margin-bottom: 1rem;
	line-height: 1.2;
}

#primary h1 { font-size: 1.85rem; }
#primary h2 { font-size: 1.35rem; }

/* Breadcrumbs */
#primary .woocommerce-breadcrumb {
	font-size: 0.85rem;
	color: var(--brand-muted);
	margin-bottom: 1.25rem;
}

#primary .woocommerce-breadcrumb a {
	color: var(--brand-muted);
	text-decoration: none;
}

#primary .woocommerce-breadcrumb a:hover {
	color: var(--brand-green);
}

/* Notices & Info Boxes */
#primary .woocommerce-info,
#primary .woocommerce-message,
#primary .woocommerce-error {
	background-color: var(--brand-bg);
	border-left: 4px solid var(--brand-green);
	padding: 1rem 1.25rem;
	border-radius: 0 var(--brand-radius) var(--brand-radius) 0;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

#primary .woocommerce-error {
	border-left-color: #d9534f;
}

/* Shop Utility Bar (Result count & Sorting dropdown) */
#primary .woocommerce-result-count {
	font-size: 0.9rem;
	color: var(--brand-muted);
	margin-bottom: 1.5rem;
	line-height: 2.2rem;
}

#primary .woocommerce-ordering select {
	padding: 0.4rem 0.8rem;
	border: 1px solid var(--brand-border);
	border-radius: var(--brand-radius);
	background-color: #ffffff;
	color: var(--brand-dark);
	outline: none;
	font-size: 0.9rem;
}

/* Product Catalog Grid */
#primary ul.products {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 0 2rem 0 !important;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.5rem;
}

#primary ul.products li.product {
	background: #ffffff;
	border: 1px solid var(--brand-border);
	border-radius: var(--brand-radius);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: var(--brand-transition);
	margin: 0 !important;
	width: auto !important;
}

#primary ul.products li.product:hover {
	box-shadow: 0 6px 16px rgba(0,0,0,0.06);
	border-color: #cbd5e1;
}

#primary ul.products li.product img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: calc(var(--brand-radius) - 2px);
	margin-bottom: 0.75rem;
}

#primary ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	margin-bottom: 0.5rem;
	color: var(--brand-dark);
}

#primary ul.products li.product .price {
	font-size: 1rem;
	font-weight: 600;
	color: var(--brand-green);
	margin-bottom: 1rem;
	display: block;
}

/* Global Buttons inside #primary */
#primary .button,
#primary button.button,
#primary input.button,
#primary a.button {
	display: inline-block;
	background-color: var(--brand-dark);
	color: #ffffff !important;
	padding: 0.65rem 1.25rem;
	border-radius: 20px; /* Matching the pill header button shape */
	border: none;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: var(--brand-transition);
	line-height: 1.2;
}

#primary .button:hover,
#primary button.button:hover,
#primary input.button:hover,
#primary a.button:hover {
	background-color: var(--brand-green);
}

#primary a.button.alt,
#primary button.button.alt,
#primary input.button.alt {
	background-color: var(--brand-green);
}

#primary a.button.alt:hover,
#primary button.button.alt:hover,
#primary input.button.alt:hover {
	background-color: var(--brand-green-hover);
}

/* Forms & Inputs */
#primary input[type="text"],
#primary input[type="email"],
#primary input[type="tel"],
#primary input[type="password"],
#primary textarea,
#primary select {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--brand-border);
	border-radius: var(--brand-radius);
	box-sizing: border-box;
	font-size: 0.9rem;
	outline: none;
	transition: var(--brand-transition);
}

#primary input:focus,
#primary textarea:focus,
#primary select:focus {
	border-color: var(--brand-green);
	box-shadow: 0 0 0 2px rgba(93, 114, 85, 0.15);
}

/* WooCommerce Tables (Cart & Checkout) */
#primary table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--brand-border);
	border-radius: var(--brand-radius);
	overflow: hidden;
	margin-bottom: 1.5rem;
}

#primary table.shop_table th {
	background-color: var(--brand-bg);
	color: var(--brand-dark);
	font-weight: 600;
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--brand-border);
}

#primary table.shop_table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--brand-border);
	vertical-align: middle;
}

#primary table.shop_table tr:last-child td {
	border-bottom: none;
}


/* --------------------------------------------------------------------------
   2. SIDEBAR (#sidebar & Immediate Wrapper)
   -------------------------------------------------------------------------- */
#sidebar,
#sidebar > div {
	box-sizing: border-box;
	font-size: 0.9rem;
}

/* Search Form Widget */
#sidebar .widget_search form,
#sidebar form.search-form {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

#sidebar input[type="search"],
#sidebar .search-field {
	flex: 1;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--brand-border);
	border-radius: var(--brand-radius);
	font-size: 0.85rem;
	outline: none;
}

#sidebar input[type="submit"],
#sidebar .search-submit {
	background-color: var(--brand-green);
	color: #ffffff;
	border: none;
	padding: 0.45rem 0.9rem;
	border-radius: var(--brand-radius);
	cursor: pointer;
	font-size: 0.85rem;
	transition: var(--brand-transition);
}

#sidebar input[type="submit"]:hover,
#sidebar .search-submit:hover {
	background-color: var(--brand-green-hover);
}

/* Widget Headings */
#sidebar h2.widget-title,
#sidebar h3.widget-title,
#sidebar .widgettitle {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--brand-dark);
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	padding-bottom: 0.35rem;
	border-bottom: 2px solid var(--brand-bg);
}

#sidebar .widget:first-child h2.widget-title,
#sidebar .widget:first-child h3.widget-title {
	margin-top: 0;
}

/* Widget Lists (Pages, Categories, Archives, Meta) */
#sidebar ul {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 0 1.5rem 0 !important;
}

#sidebar ul li {
	padding: 0.35rem 0;
	border-bottom: 1px solid #f1f5f9;
	color: var(--brand-muted);
}

#sidebar ul li:last-child {
	border-bottom: none;
}

#sidebar ul li a {
	color: var(--brand-dark);
	text-decoration: none;
	transition: var(--brand-transition);
}

#sidebar ul li a:hover {
	color: var(--brand-green);
	padding-left: 2px;
}

/* Nested lists (Subcategories / Subpages) */
#sidebar ul ul {
	margin: 0.35rem 0 0 0.85rem !important;
	border-left: 1px solid var(--brand-border);
	padding-left: 0.65rem !important;
}