/* ============================================
   Header Styles
   ============================================ */
.site-header {
	background-color: var(--color-white);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	position: sticky;
	top: 0;
	z-index: 1000;
}

/* Keep the sticky header below the WordPress admin bar when logged in */
.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.header-container {
	padding: var(--spacing-sm) 0;
}

.header-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-lg);
}

/* Logo/Branding */
.site-branding {
	flex-shrink: 0;
}

.site-branding img {
	max-height: 60px;
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
}

.site-title a {
	color: var(--color-primary);
	text-decoration: none;
}

/* Navigation */
.main-navigation {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.main-navigation ul,
.main-navigation .menu {
	list-style: none;
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	margin: 0;
	padding: 0;
}

.main-navigation li {
	list-style: none;
}

.main-navigation a {
	color: var(--color-text-dark);
	font-weight: 500;
	font-size: 0.95rem;
	padding: 6px 12px;
	border-radius: 6px;
	transition: all 0.25s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--color-primary);
	background-color: var(--color-light-bg);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	background: none;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	padding: 0;
}

.menu-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--color-text-dark);
	border-radius: 2px;
	transition: transform 0.3s, opacity 0.3s;
}

/* Animate to an X when the menu is open */
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile sticky bottom bar (account / wishlist / cart) ── */
.mobile-bottom-bar {
	display: none; /* shown on mobile only */
}

.mobile-bottom-bar .mbb-item {
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 9px 0;
	color: var(--color-text-dark);
	text-decoration: none;
	font-size: 0.7rem;
	font-weight: 600;
	transition: color 0.2s;
}

.mobile-bottom-bar .mbb-item:hover,
.mobile-bottom-bar .mbb-item:active {
	color: var(--color-primary);
}

.mobile-bottom-bar .mbb-icon-wrap {
	position: relative;
	display: inline-flex;
}

.mobile-bottom-bar .mbb-badge {
	position: absolute;
	top: -7px;
	right: -10px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	background: var(--color-secondary);
	color: #fff;
	border-radius: 20px;
	font-size: 0.62rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.mobile-bottom-bar .mbb-label {
	line-height: 1;
}

/* Header Actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
}

.header-search {
	display: flex;
	align-items: center;
	flex: 1;
	max-width: 300px;
}

.header-search form {
	display: flex;
	width: 100%;
	gap: var(--spacing-xs);
}

.header-search input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	font-size: var(--font-size-base);
}

.header-search button {
	background-color: var(--color-primary);
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: var(--border-radius);
	cursor: pointer;
	font-weight: 600;
	transition: background-color 0.3s;
}

.header-search button:hover {
	background-color: #234010;
}

/* Header Account, Wishlist & Cart */
.header-account,
.header-wishlist,
.header-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--color-light-bg);
	color: var(--color-primary);
	transition: all 0.3s;
	position: relative;
}

.header-account:hover,
.header-wishlist:hover,
.header-cart:hover {
	background-color: var(--color-primary);
	color: white;
}

.cart-count,
.wishlist-count {
	position: absolute;
	top: -8px;
	right: -8px;
	background-color: var(--color-secondary);
	color: white;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
}

/* ============================================
   Footer Styles
   ============================================ */
.site-footer {
	background-color: #24420f;
	color: rgba(255, 255, 255, 0.82);
	padding: 56px 0 0;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
	gap: var(--spacing-lg);
	margin-bottom: var(--spacing-xl);
}

.footer-column h3 {
	color: white;
	margin-bottom: var(--spacing-md);
	font-size: 1.4rem;
}

/* Optional footer logo (Customizer) */
.footer-logo {
	display: inline-block;
	margin-bottom: var(--spacing-md);
}

.footer-logo img {
	max-height: 56px;
	width: auto;
}

.footer-column h4 {
	color: white;
	margin-bottom: var(--spacing-md);
	font-size: 1.05rem;
}

.footer-column p {
	margin-bottom: var(--spacing-md);
	opacity: 0.78;
	font-size: 0.9rem;
	line-height: 1.7;
}

.footer-column ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-column li {
	margin-bottom: var(--spacing-sm);
}

.footer-column a {
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	transition: color 0.3s;
}

.footer-column a:hover {
	color: var(--color-secondary);
}

/* Newsletter Form */
.newsletter-form {
	display: flex;
	gap: 0;
	margin-bottom: 18px;
	max-width: 320px;
	background: #fff;
	border-radius: 30px;
	overflow: hidden;
	padding: 4px;
}

.newsletter-form input {
	flex: 1;
	padding: 9px 14px;
	border: none;
	font-size: 0.85rem;
	background: transparent;
	outline: none;
}

.newsletter-form button {
	padding: 9px 20px;
	background-color: var(--color-secondary);
	color: white;
	border: none;
	border-radius: 30px;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	transition: background-color 0.3s;
	white-space: nowrap;
}

.newsletter-form button:hover {
	background-color: #e68000;
}

/* Newsletter feedback message (footer has a dark background) */
.newsletter-message {
	margin: 8px 0 0;
	font-size: 0.85rem;
	min-height: 1em;
	line-height: 1.4;
}

.newsletter-message.is-success {
	color: #b9e6a8;
}

.newsletter-message.is-error {
	color: #ffb3b3;
}

.newsletter-form button:disabled {
	opacity: 0.7;
	cursor: default;
}

.footer-contact {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.85rem;
}

.footer-contact li {
	margin-bottom: 8px;
}

.footer-contact strong {
	color: #fff;
}

/* Footer Bottom */
.footer-bottom {
	text-align: center;
	padding: 20px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
	margin: 0;
	font-size: 0.82rem;
	opacity: 0.7;
}

/* ============================================
   WooCommerce Product Grid
   ============================================ */
.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: var(--spacing-md);
	list-style: none;
	padding: 0;
	margin: 0;
}

.product {
	background-color: white;
	border-radius: var(--border-radius);
	overflow: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.product-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.product-image-wrapper {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1;
	background-color: #f5f5f5;
}

.product-image-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.product:hover .product-image-wrapper img {
	transform: scale(1.05);
}

.product-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	z-index: 10;
}

.badge-sale {
	background-color: var(--color-secondary);
	color: white;
}

.badge-featured {
	background-color: #4CAF50;
	color: white;
}

.product-info {
	padding: var(--spacing-md);
	flex: 1;
	display: flex;
	flex-direction: column;
}

.product-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 var(--spacing-sm);
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.product-title a {
	color: var(--color-text-dark);
	text-decoration: none;
}

.product-title a:hover {
	color: var(--color-primary);
}

.woocommerce-product-rating {
	margin-bottom: var(--spacing-sm);
	font-size: 0.9rem;
}

.star-rating {
	display: flex;
	gap: 2px;
}

.star {
	color: #ddd;
	font-size: 0.9rem;
}

.star.filled {
	color: #ff9500;
}

.price {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--color-primary);
	margin-bottom: auto;
	margin-top: var(--spacing-sm);
}

.price del {
	opacity: 0.6;
	margin-right: var(--spacing-xs);
	color: var(--color-text-light);
	font-size: 0.95rem;
}

/* Add to Cart Button */
.add_to_cart_button,
.button {
	width: 100%;
	padding: 10px;
	background-color: var(--color-primary);
	color: white;
	border: none;
	border-radius: var(--border-radius);
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 0.95rem;
}

.add_to_cart_button:hover,
.button:hover {
	background-color: #234010;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
}

/* ============================================
   WooCommerce Archive Page
   ============================================ */
.archive-products-wrapper {
	padding: var(--spacing-lg) 0;
}

.page-header {
	margin-top: var(--spacing-xl);
	margin-bottom: var(--spacing-xl);
	padding: var(--spacing-lg);
	background-color: var(--color-light-bg);
	border-radius: var(--border-radius);
}

.page-header h1 {
	margin: 0 0 var(--spacing-sm);
}

.products-archive-layout {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: var(--spacing-xl);
}

.products-sidebar {
	background-color: white;
	padding: var(--spacing-md);
	border-radius: var(--border-radius);
	border: 1px solid var(--color-border);
	height: fit-content;
}

.products-main {
	min-height: 300px;
}

/* ============================================
   Single Product Page
   ============================================ */
.single-product-wrapper {
	padding: var(--spacing-lg) 0;
}

.product-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--spacing-xl);
	margin: var(--spacing-lg) 0;
}

.product-gallery {
	background-color: #f9f9f9;
	border-radius: var(--border-radius);
	padding: var(--spacing-lg);
}

.product-gallery img {
	width: 100%;
	margin-bottom: var(--spacing-md);
}

.product-summary {
	padding: var(--spacing-md) 0;
}

.product-summary .product-title {
	font-size: 2rem;
	margin-bottom: var(--spacing-md);
}

.product-summary .price {
	font-size: 1.75rem;
	margin-bottom: var(--spacing-md);
}

.quantity-wrapper {
	display: flex;
	gap: var(--spacing-sm);
	margin-bottom: var(--spacing-md);
}

.quantity-wrapper input {
	width: 80px;
	padding: 8px;
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
}

/* ============================================
   Blog/Posts
   ============================================ */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--spacing-lg);
	margin-bottom: var(--spacing-lg);
}

/* Search results — section headings ("Products" / "Articles") */
.search-section-title {
	font-family: var(--font-heading, inherit);
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--color-text-dark);
	margin: 10px 0 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eef1ea;
}

.search-section-title + .products-row {
	margin-bottom: 40px;
}

/* ── Blog cards (.bcard) — shared between homepage & blog index for consistency ── */
.blog-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.bcard {
	border: 1px solid #eee;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.25s, transform 0.25s;
}

.bcard:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.bcard-media {
	position: relative;
	aspect-ratio: 16 / 10;
	background-color: #eef3e9;
	overflow: hidden;
}

.bcard-media img { width: 100%; height: 100%; object-fit: cover; }

.bcard-media-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-primary);
	opacity: 0.5;
}

.bcard-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--color-primary);
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 4px 10px;
	border-radius: 20px;
	text-transform: uppercase;
}

.bcard-body { padding: 18px; }

.bcard-meta {
	display: flex;
	gap: 16px;
	font-size: 0.74rem;
	color: #a0a0a0;
	margin-bottom: 10px;
}

.bcard-meta span { display: flex; align-items: center; gap: 5px; }

.bcard-title {
	font-size: 1.05rem;
	margin: 0 0 8px;
	line-height: 1.35;
}

.bcard-title a { color: #2b2b2b; }
.bcard-title a:hover { color: var(--color-primary); }

.bcard-excerpt {
	font-size: 0.85rem;
	color: var(--color-text-light);
	line-height: 1.6;
	margin: 0 0 14px;
}

.bcard-more {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--color-primary);
}

.bcard-more:hover { color: var(--color-secondary); }

@media (max-width: 992px) {
	.blog-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.blog-row { grid-template-columns: 1fr; }
}

/* Breathing room below the cards on the blog index */
.blog-wrapper .blog-row {
	margin-bottom: 48px;
}

.blog-wrapper {
	padding-bottom: 60px;
}

.post-card {
	background-color: white;
	border-radius: var(--border-radius);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
}

.post-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background-color: #f5f5f5;
}

.post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
	transform: scale(1.05);
}

.post-content {
	padding: var(--spacing-md);
}

.post-title {
	font-size: 1.25rem;
	margin: 0 0 var(--spacing-sm);
}

.post-title a {
	color: var(--color-text-dark);
	text-decoration: none;
}

.post-title a:hover {
	color: var(--color-primary);
}

.post-meta {
	display: flex;
	gap: var(--spacing-md);
	font-size: 0.9rem;
	color: var(--color-text-light);
	margin-bottom: var(--spacing-sm);
}

.post-excerpt {
	color: var(--color-text-light);
	margin-bottom: var(--spacing-md);
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.read-more {
	color: var(--color-primary);
	font-weight: 600;
	text-decoration: none;
	display: inline-block;
	transition: color 0.3s;
}

.read-more:hover {
	color: var(--color-secondary);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
	.products-archive-layout {
		grid-template-columns: 1fr;
	}

	.products-sidebar {
		display: none;
	}

	.product-container {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.header-content {
		flex-wrap: wrap;
		gap: var(--spacing-sm);
	}

	.site-branding {
		margin-right: auto;
	}

	.menu-toggle {
		display: inline-flex;
		order: 4;
	}

	.main-navigation {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background-color: white;
		padding: var(--spacing-md);
		border-top: 1px solid var(--color-border);
		width: 100%;
		order: 5;
	}

	.main-navigation.active {
		display: block;
	}

	.main-navigation ul {
		flex-direction: column;
		gap: var(--spacing-sm);
	}

	/* Header keeps only logo + hamburger on mobile; the icons move to the bottom bar */
	.header-actions {
		display: none;
	}

	.mobile-bottom-bar {
		display: flex !important;
		align-items: center;
		justify-content: space-around;
		min-height: 58px;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		z-index: 1100;
		background: #fff;
		border-top: 1px solid var(--color-border);
		box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
		padding-bottom: env(safe-area-inset-bottom);
	}

	/* Room so the fixed bar never covers page content */
	body {
		padding-bottom: 74px;
	}

	.products {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}

	.posts-grid {
		grid-template-columns: 1fr;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.footer-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.header-actions {
		gap: var(--spacing-sm);
	}

	.products {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--spacing-sm);
	}

	.product-badge {
		font-size: 0.65rem;
		padding: 2px 8px;
	}
}
