/*
Theme Name: JY Flowers
Theme URI: https://wordpress.org/themes/jyflowers/
Author: the WordPress team
Author URI: https://wordpress.org
Description: JY Flowers emphasizes simplicity and adaptability. It offers flexible design options, supported by a variety of patterns for different page types, such as services and landing pages, making it ideal for building personal blogs, professional portfolios, online magazines, or business websites. Its templates cater to various blog styles, from text-focused to image-heavy layouts. Additionally, it supports international typography and diverse color palettes, ensuring accessibility and customization for users worldwide.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jyflowers
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * Site Background Color - Very Light Beige/Off-White
 * Using direct color value to ensure it applies
 */
:root {
	--jyflowers-bg-color: #F5F5F0;
}

/* Force background on all possible containers - EXCEPT footer */
html,
html body,
body,
body.wp-site-blocks,
body > .wp-site-blocks,
.wp-site-blocks,
.wp-site-blocks > main,
.wp-site-blocks > header,
#wpbody, #wpbody-content {
	background-color: #F5E9DD !important;
}

/* Ensure all main content areas use the base color - EXCEPT footer, product pages, and WooCommerce pages */
main:not(body.single-product main),
main.wp-block-group:not(body.single-product main.wp-block-group),
.jyflowers-main-content,
.wp-block-group:not(.has-background):not(.has-contrast-background-color),
.wp-block-group.has-base-background-color {
	background-color: #F5E9DD !important;
}

/* Remove default white backgrounds from groups and containers */
.wp-block-group:not(.has-contrast-background-color):not(.has-accent-1-background-color):not(.has-accent-2-background-color):not(.has-accent-3-background-color):not(.has-accent-4-background-color):not(.has-accent-5-background-color),
.wp-block-columns:not(.has-background),
.wp-block-column:not(.has-background),
.wp-block-group.alignfull:not(.has-contrast-background-color):not(.has-background) {
	background-color: transparent !important;
	background: transparent !important;
}

/* Footer must keep its dark brown background - more specific selectors */
.wp-site-blocks > footer,
footer,
footer .wp-block-group,
.wp-block-group.has-contrast-background-color,
.wp-block-group.alignfull.has-contrast-background-color,
.wp-block-group.alignfull.has-contrast-background-color.has-background,
div.wp-block-group.alignfull.has-contrast-background-color.has-background,
.jyflowers-footer-wrapper {
	background-color: #3D2817 !important;
}

/* Ensure nested groups in footer also have dark background */
footer .wp-block-group:not(.has-base-background-color):not(.has-accent-1-background-color):not(.has-accent-2-background-color) {
	background-color: transparent !important;
}

/* Footer padding */
.jyflowers-footer-wrapper {
	padding-left: 120px !important;
	padding-right: 120px !important;
}

@media (max-width: 768px) {
	.jyflowers-footer-wrapper {
		padding-left: 15px !important;
		padding-right: 15px !important;
	}
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Flora Drops Flowers Custom Styles
 */

/* Fixed Shopping Cart Icon - Desktop: large container and icon, stuck to right edge */
.jyflowers-cart-icon {
	position: fixed !important;
	right: 0 !important;
	top: calc(3rem + 100px) !important;
	z-index: 99999 !important;
	background: #5A3925 !important;
	width: 120px;
	height: 70px;
	padding: 0 1rem;
	border-radius: 25px 0 0 25px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s ease;
	display: flex !important;
	align-items: center;
	justify-content: center;
	pointer-events: auto !important;
}

.jyflowers-cart-icon .cart-contents {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 100%;
	height: 100%;
	color: var(--wp--preset--color--base);
}

.jyflowers-cart-icon .cart-contents svg {
	color: var(--wp--preset--color--base);
}

/* Desktop: large cart icon image */
.jyflowers-cart-icon img {
	width: 70px;
	height: 70px;
	object-fit: contain;
}

.jyflowers-cart-icon:hover {
	transform: scale(1.05);
}

.jyflowers-cart-icon .cart-count {
	position: absolute;
	top: calc(-0.5rem + 20px);
	right: calc(0.5rem + 20px);
	background: #F6EADE !important;
	color: #F48285 !important;
	border: 4px solid #5A3925 !important;
	border-radius: 50%;
	width: 1.5rem;
	height: 1.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: 700;
}

/* Header Navigation */
.jyflowers-header-nav {
	gap: 2rem;
}

.jyflowers-nav-link {
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.jyflowers-nav-link:hover {
	opacity: 0.7;
}

/* Product Grids - Responsive */
.jyflowers-products-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

.jyflowers-category-products-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	/* Prevent horizontal scroll on mobile */
	html, body {
		overflow-x: hidden !important;
		max-width: 100vw !important;
	}

	/* Product grids: 2 columns on mobile - override inline styles */
	.jyflowers-products-grid,
	.jyflowers-category-products-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 1.5rem !important;
	}
	
	/* Reduce spacing in product cards on mobile */
	.jyflowers-product-card,
	.jyflowers-category-product-card {
		gap: 0.5rem !important; /* Reduce from 1rem to 0.5rem */
	}
	
	/* Reduce spacing between product name and price */
	.jyflowers-product-card h3,
	.jyflowers-category-product-card h3 {
		margin-bottom: 0.25rem !important; /* Reduce from 0.5rem */
	}
	
	/* Reduce spacing between price and Buy Now button */
	.jyflowers-product-card > div:has(.price),
	.jyflowers-category-product-card > div:has(.price),
	.jyflowers-product-card > div[style*="font-size:1.1rem"],
	.jyflowers-category-product-card > div[style*="font-size:1.1rem"] {
		margin-bottom: 0.5rem !important; /* Reduce from 1rem */
	}
	
	/* Target price divs more specifically */
	.jyflowers-product-card > div[style*="margin-bottom:1rem"],
	.jyflowers-category-product-card > div[style*="margin-bottom:1rem"] {
		margin-bottom: 0.5rem !important;
	}
	
	/* Make Buy Now buttons smaller on mobile */
	.jyflowers-product-card .button,
	.jyflowers-category-product-card .button,
	.jyflowers-product-card a.button,
	.jyflowers-category-product-card a.button {
		font-size: 0.875rem !important; /* Reduce from 1.1rem */
		padding: 0.375rem 1rem !important; /* Reduce from 0.5rem 1.5rem */
		width: 40% !important; /* Reduce from 50% */
	}

	/* Product card inner: half padding on mobile */
	.jyflowers-product-card-inner {
		padding: 0.5rem !important;
	}

	/* Header navigation: stack on mobile */
	.jyflowers-header-nav {
		flex-wrap: wrap;
		justify-content: center;
		gap: 1rem;
	}

	.jyflowers-nav-left,
	.jyflowers-nav-right {
		flex-wrap: wrap;
		justify-content: center;
		gap: 1rem;
	}

	.jyflowers-logo {
		order: -1;
		width: 100%;
		text-align: center;
	}

	/* Cart icon: mobile only – smaller, slight pull left so fully visible */
	html body .jyflowers-cart-icon,
	.jyflowers-cart-icon {
		width: 80px !important;
		height: 50px !important;
		padding: 0 0.5rem !important;
		border-radius: 20px 0 0 20px !important;
		top: calc(3rem + 60px) !important;
		right: 0 !important;
		transform: translateX(-10px) !important;
	}
	html body .jyflowers-cart-icon:hover,
	.jyflowers-cart-icon:hover {
		transform: translateX(-10px) scale(1.05) !important;
	}
	
	.jyflowers-cart-icon img {
		width: 40px !important;
		height: 40px !important;
	}
	
	.jyflowers-cart-icon .cart-count {
		width: 1.2rem !important;
		height: 1.2rem !important;
		font-size: 0.7rem !important;
		border-width: 3px !important;
		top: calc(-0.5rem + 15px) !important;
		right: calc(0.5rem + 7px) !important;
	}

	/* Footer: stack columns on mobile */
	.wp-block-columns {
		flex-direction: column;
	}

	/* Hero section: adjust text size */
	.jyflowers-hero h1 {
		font-size: 2.5rem !important;
	}

	.jyflowers-hero p {
		font-size: 1rem !important;
	}

	/* Services section: stack on mobile */
	.jyflowers-services .wp-block-columns {
		flex-direction: column;
	}
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
	.jyflowers-category-products-grid,
	.jyflowers-products-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Product Card: equal height in grid, price + button aligned at bottom */
.jyflowers-product-card,
.jyflowers-category-product-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding-bottom: 10px;
}

.jyflowers-product-card h3,
.jyflowers-category-product-card h3 {
	flex: 1 1 auto;
	min-height: 0;
}

/* Push price and button block to bottom when title height varies */
.jyflowers-product-card h3 + div,
.jyflowers-category-product-card h3 + div {
	margin-top: auto;
}

.jyflowers-product-card:hover,
.jyflowers-category-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Product card inner wrapper (image container with accent background) */
.jyflowers-product-card-inner {
	background: var(--wp--preset--color--accent-5);
	border-radius: 0.5rem;
	padding: 1rem;
}

/* Button Styles */
.jyflowers-product-card .button {
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.jyflowers-product-card .button:hover {
	background-color: var(--wp--preset--color--accent-3) !important;
	transform: scale(1.05);
}

/* Footer Form Styles */
.jyflowers-contact-form input::placeholder,
.jyflowers-contact-form textarea::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.jyflowers-contact-form button:hover {
	background-color: var(--wp--preset--color--accent-3) !important;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Pagination Styles */
.jyflowers-pagination {
	font-size: 0.875rem;
	font-weight: 700;
}

.jyflowers-pagination a {
	transition: opacity 0.2s ease;
	color: #99A577;
	text-decoration: none;
	padding: 0.5rem 1rem;
}

.jyflowers-pagination a:hover {
	opacity: 0.7;
}

.jyflowers-pagination-prev,
.jyflowers-pagination-next {
	color: #99A577;
	font-size: 1.75rem;
	line-height: 1;
}

.jyflowers-pagination-prev:hover,
.jyflowers-pagination-next:hover {
	color: #99A577;
}

.jyflowers-pagination-info {
	color: var(--wp--preset--color--contrast, inherit);
	padding: 0.5rem 1rem;
}

.jyflowers-pagination-current {
	background-color: #FACACB;
	padding: 0.35rem 0.65rem;
	border-radius: 0.25rem;
}

/* Ensure proper spacing for header */
.jyflowers-header-nav {
	min-height: 60px;
}

/* Logo styling */
.jyflowers-logo .site-title {
	font-family: serif;
	letter-spacing: -0.02em;
}

/* Navigation link spacing */
.jyflowers-nav-left,
.jyflowers-nav-right {
	gap: 2rem;
}

/* Header wrapper */
.jyflowers-header-wrapper {
	padding: 20px 100px !important;
}

/* Logo styling - Desktop (default) */
.jyflowers-logo {
	position: absolute !important;
	left: calc(50% + 20px) !important;
	transform: translateX(-50%) !important;
	z-index: 10 !important;
}

.jyflowers-logo img {
	max-height: 60px;
	width: auto;
	height: auto;
}

/* Hide mobile menu elements on desktop */
@media (min-width: 769px) {
	.jyflowers-mobile-menu-toggle {
		display: none !important;
	}
	
	.jyflowers-mobile-menu {
		display: none !important;
	}
	
	/* Ensure desktop navigation is visible */
	.jyflowers-nav-left,
	.jyflowers-nav-right,
	.jyflowers-nav-right-cart {
		display: flex !important;
	}
	
	/* Hide mobile category name overlay on desktop */
	.jyflowers-category-name-overlay {
		display: none !important;
	}
	
	/* Show desktop category name on desktop */
	.jyflowers-category-name-desktop {
		display: block !important;
	}
}

/* Ensure header nav is relative for absolute positioning */
.jyflowers-header-nav {
	position: relative !important;
}

/* Navigation links */
.jyflowers-nav-link {
	font-size: 1.5rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.05em !important;
	text-transform: uppercase !important;
	font-family: sans-serif !important;
	transition: color 0.3s ease;
}

/* Responsive navigation font sizes */
@media (max-width: 1024px) {
	.jyflowers-nav-link {
		font-size: 1.25rem !important;
	}
}

@media (max-width: 768px) {
	.jyflowers-nav-link {
		font-size: 1rem !important;
	}
}

@media (max-width: 480px) {
	.jyflowers-nav-link {
		font-size: 0.875rem !important;
	}
}

.jyflowers-nav-link:hover {
	opacity: 0.8;
}

/* Ensure cart icon is always visible */
.jyflowers-cart-icon {
	position: fixed !important;
}

/* Responsive header */
@media (max-width: 768px) {
	/* Mobile header padding - reduced top, equal left/right spacing (15px) */
	.jyflowers-header-wrapper {
		padding: 2px 15px !important;
		position: relative !important;
	}
	
	/* Ensure header nav has proper alignment */
	.jyflowers-header-nav {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center !important;
		flex-wrap: nowrap !important;
		min-height: auto !important;
		padding: 0 !important;
		margin: 0 !important;
	}
	
	/* Hide desktop navigation on mobile */
	.jyflowers-nav-left,
	.jyflowers-nav-right {
		display: none !important;
	}
	
	.jyflowers-nav-right-cart {
		display: none !important;
	}
	
	/* Logo positioning on mobile - left side, first */
	.jyflowers-logo {
		position: relative !important;
		left: auto !important;
		transform: none !important;
		order: 0 !important;
		width: auto !important;
		margin: 0 !important;
		text-align: left !important;
		display: flex !important;
		align-items: center !important;
		flex-shrink: 0 !important;
	}
	
	.jyflowers-logo img {
		height: 50px !important;
	}
	
	/* Show hamburger menu button on mobile - right side, last */
	.jyflowers-mobile-menu-toggle {
		display: flex !important;
		position: relative !important;
		right: auto !important;
		top: auto !important;
		z-index: 100 !important;
		background: #FACACB !important;
		border: none !important;
		cursor: pointer !important;
		padding: 0.75rem !important;
		border-radius: 0.5rem !important;
		width: 45px !important;
		height: 45px !important;
		flex-direction: column !important;
		justify-content: space-between !important;
		align-items: center !important;
		margin: 0 !important;
		order: 999 !important; /* Push to right */
		flex-shrink: 0 !important;
	}
	
	.jyflowers-mobile-menu-toggle .hamburger-line {
		width: 25px !important;
		height: 3px !important;
		background: #5B3825 !important;
		border-radius: 2px !important;
		display: block !important;
	}
	
	/* Mobile menu drawer: 100% width, above cart icon */
	.jyflowers-mobile-menu-drawer {
		position: fixed !important;
		left: 0 !important;
		top: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 100vh !important;
		background: #FACACB !important;
		z-index: 100000 !important;
		overflow-y: auto !important;
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15) !important;
	}
	
	.jyflowers-mobile-menu-drawer-header {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		padding: 1rem 1rem 0 1.5rem !important;
		flex-shrink: 0 !important;
	}
	
	.jyflowers-mobile-menu-drawer-logo {
		display: block !important;
		line-height: 0 !important;
	}
	
	.jyflowers-mobile-menu-drawer-logo img {
		height: 50px !important;
		width: auto !important;
		display: block !important;
		border-radius: 0.5rem !important;
	}
	
	.jyflowers-mobile-menu-close {
		flex-shrink: 0 !important;
		width: 2.5rem !important;
		height: 2.5rem !important;
		background: #5B3825 !important;
		color: #FACACB !important;
		border: none !important;
		border-radius: 0.5rem !important;
		font-size: 1.5rem !important;
		line-height: 1 !important;
		cursor: pointer !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 0 !important;
	}
	
	.jyflowers-mobile-menu-close:hover {
		opacity: 0.9 !important;
	}
	
	.jyflowers-mobile-menu-list {
		list-style: none !important;
		margin: 0 !important;
		padding: 1rem 1.5rem 2rem !important;
	}
	
	.jyflowers-mobile-menu-category-block {
		margin: 0 !important;
		padding: 0 !important;
		border-bottom: 1px solid rgba(91, 56, 37, 0.15) !important;
	}
	
	.jyflowers-mobile-menu-category-row {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 0.75rem !important;
		padding: 0.75rem 0 !important;
		min-height: 2.5rem !important;
	}
	
	.jyflowers-mobile-menu-category-link {
		flex: 1 !important;
		color: #5B3825 !important;
		text-decoration: none !important;
		font-weight: 700 !important;
		font-size: 1rem !important;
		text-transform: uppercase !important;
		letter-spacing: 0.05em !important;
	}
	
	.jyflowers-mobile-menu-category-link:hover {
		color: #3D2817 !important;
	}
	
	.jyflowers-mobile-menu-toggle-sub {
		flex-shrink: 0 !important;
		width: 2rem !important;
		height: 2rem !important;
		background: #5B3825 !important;
		color: #FACACB !important;
		border: none !important;
		border-radius: 0.35rem !important;
		font-size: 1.25rem !important;
		line-height: 1 !important;
		cursor: pointer !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 0 !important;
	}
	
	.jyflowers-mobile-menu-toggle-sub:hover {
		opacity: 0.9 !important;
	}
	
	.jyflowers-mobile-menu-sublist {
		list-style: none !important;
		margin: 0 0 0.5rem 0 !important;
		padding: 0 0 0.75rem 0 !important;
		border-left: none !important;
		margin-left: 0 !important;
	}
	
	.jyflowers-mobile-menu-sublist li {
		margin: 0 !important;
		padding: 0.35rem 0 !important;
	}
	
	.jyflowers-mobile-menu-sublist a {
		color: #5B3825 !important;
		text-decoration: none !important;
		font-size: 0.9rem !important;
	}
	
	.jyflowers-mobile-menu-sublist a:hover,
	.jyflowers-mobile-menu-sublist a.active {
		color: #F48285 !important;
	}
	
	/* Cart icon: mobile only – smaller, slight pull left */
	html body .jyflowers-cart-icon,
	.jyflowers-cart-icon {
		width: 80px !important;
		height: 50px !important;
		padding: 0 0.5rem !important;
		border-radius: 20px 0 0 20px !important;
		top: 160px !important;
		right: 0 !important;
		transform: translateX(-10px) !important;
	}
	html body .jyflowers-cart-icon:hover,
	.jyflowers-cart-icon:hover {
		transform: translateX(-10px) scale(1.05) !important;
	}
	
	.jyflowers-cart-icon img {
		width: 40px !important;
		height: 40px !important;
	}
	
	.jyflowers-cart-icon .cart-count {
		width: 1.2rem !important;
		height: 1.2rem !important;
		font-size: 0.7rem !important;
		border-width: 3px !important;
		top: calc(-0.5rem + 15px) !important;
		right: calc(0.5rem + 7px) !important;
	}
	
}

/* Desktop: hide mobile menu drawer */
@media (min-width: 769px) {
	.jyflowers-mobile-menu-drawer {
		display: none !important;
	}
}

/* Filter Styles */
.jyflowers-filter-bar {
	position: relative;
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 1rem !important;
	width: 100% !important;
	justify-content: space-between !important;
}

/* Filter group: left side on desktop – separate green button */
.jyflowers-filter-group {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 1rem !important;
	background: #99A577 !important;
	border-radius: 1rem !important;
	padding: 0.5rem 1rem !important;
}

/* Mobile filter overlay: on desktop behave as wrapper (no overlay) */
.jyflowers-filter-mobile-overlay {
	display: contents;
}

.jyflowers-filter-mobile-overlay-header {
	display: none !important;
}

.jyflowers-filter-mobile-overlay-body {
	display: contents;
}

/* Order: right side on desktop – separate green button */
.jyflowers-order-wrap {
	position: relative;
	background: #99A577 !important;
	border-radius: 1rem !important;
	padding: 0.5rem 1rem !important;
}

.jyflowers-order-toggle {
	white-space: nowrap;
	padding: 0.75rem 1.5rem;
}

.jyflowers-order-dropdown {
	max-height: 300px;
	overflow-y: auto;
}

.jyflowers-order-dropdown label {
	transition: background-color 0.2s;
	background-color: #47300F !important;
	color: #F8E46F !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	padding: 0.5rem !important;
	display: block !important;
	border-radius: 0.5rem !important;
	margin-bottom: 0.25rem !important;
	cursor: pointer;
}

.jyflowers-order-dropdown label:hover {
	background-color: rgba(71, 48, 15, 0.8) !important;
	opacity: 0.9;
}

.jyflowers-order-dropdown label,
.jyflowers-order-dropdown label * {
	color: #F8E46F !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
}

.jyflowers-order-dropdown input[type="radio"] {
	cursor: pointer;
}

/* Filter buttons - hide by default, shown via JavaScript toggle */
.jyflowers-filter-buttons {
	display: none !important; /* Hidden by default for all views */
}

.jyflowers-filter-buttons.show {
	display: flex !important; /* Show when .show class is added */
}

/* On desktop, use inline-flex to match parent container */
@media (min-width: 769px) {
	.jyflowers-filter-buttons.show {
		display: inline-flex !important; /* Show as inline-flex on desktop when .show is present */
	}
	
	/* Override any inline styles when .show class is present */
	.jyflowers-filter-buttons.show[style*="display"] {
		display: inline-flex !important;
	}
}

.jyflowers-filter-reset {
	display: none;
}

.jyflowers-filter-reset.show {
	display: block !important;
}

.jyflowers-filter-item {
	position: relative;
}

.jyflowers-filter-dropdown {
	max-height: 300px;
	overflow-y: auto;
}

.jyflowers-filter-dropdown label {
	transition: background-color 0.2s;
	background-color: #47300F !important;
	color: #F8E46F !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	padding: 0.5rem !important;
	display: block !important;
	border-radius: 0.5rem !important;
	margin-bottom: 0.25rem !important;
}

.jyflowers-filter-dropdown label:hover {
	background-color: rgba(71, 48, 15, 0.8) !important;
	opacity: 0.9;
}

/* Ensure text inside labels also has the correct color and weight */
.jyflowers-filter-dropdown label,
.jyflowers-filter-dropdown label * {
	color: #F8E46F !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
}

.jyflowers-filter-dropdown input[type="radio"] {
	cursor: pointer;
}

.jyflowers-filter-dropdown input[type="number"] {
	width: 100%;
}

/* Price input styling - match dropdown options */
.jyflowers-price-input,
.jyflowers-filter-dropdown input[type="number"].jyflowers-price-input,
.jyflowers-filter-dropdown input[name="price_min"],
.jyflowers-filter-dropdown input[name="price_max"] {
	background-color: #47300F !important;
	color: #F8E46F !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	border: none !important;
	border-radius: 0.5rem !important;
	padding: 0.5rem !important;
}

.jyflowers-price-input::placeholder {
	color: #F8E46F !important;
	opacity: 0.7 !important;
}

/* Responsive filter bar */
@media (max-width: 768px) {
	.jyflowers-filter-bar {
		flex-direction: row !important;
		justify-content: flex-end !important; /* Both buttons on the right */
		align-items: flex-start !important;
		width: 100% !important;
		max-width: 100% !important;
		display: flex !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		margin-top: 20px !important;
		margin-bottom: 0 !important;
		padding: 0 15px 0 15px !important;
		box-sizing: border-box !important;
		position: relative !important;
		left: auto !important;
		right: auto !important;
		gap: 0.5rem !important;
	}
	
	/* Filter: one of two buttons on same line – fixed height to match Order */
	.jyflowers-filter-group {
		order: 0 !important;
		width: auto !important;
		max-width: 100% !important;
		flex-direction: column !important;
		align-items: flex-end !important;
		justify-content: center !important; /* center Filter button vertically in the div */
		flex-shrink: 0 !important;
		padding: 0 1rem !important;
		height: 2.75rem !important;
		display: flex !important;
		align-items: center !important;
		box-sizing: border-box !important;
	}
	
	/* Order: second button, next to Filter – same fixed height as Filter */
	.jyflowers-order-wrap {
		order: 1 !important;
		width: auto !important;
		flex-shrink: 0 !important;
		padding: 0 1rem !important;
		height: 2.75rem !important;
		display: flex !important;
		align-items: center !important;
		box-sizing: border-box !important;
	}
	
	/* Both buttons: same fixed height on mobile */
	.jyflowers-filter-toggle,
	.jyflowers-order-toggle {
		height: 2.25rem !important;
		min-height: 2.25rem !important;
		max-height: 2.25rem !important;
		padding: 0 0.75rem !important;
		font-size: 1rem !important;
		line-height: 1 !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		box-sizing: border-box !important;
		align-self: center !important; /* override stretch so height stays 2.25rem */
	}
	
	/* Mobile filter overlay: absolute panel with "Filter by" + X, hidden by default */
	.jyflowers-filter-mobile-overlay {
		display: none !important;
		position: fixed !important;
		left: 0 !important;
		top: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: 100vh !important;
		background: #FACACB !important;
		z-index: 100000 !important;
		overflow-y: auto !important;
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15) !important;
		flex-direction: column !important;
	}
	
	.jyflowers-filter-mobile-overlay.open {
		display: flex !important;
	}
	
	.jyflowers-filter-mobile-overlay-header {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		padding: 1rem 1rem 1rem 1.5rem !important;
		flex-shrink: 0 !important;
		border-bottom: 1px solid rgba(91, 56, 37, 0.15) !important;
		background: #FACACB !important;
	}
	
	.jyflowers-filter-mobile-overlay-title {
		font-weight: 700 !important;
		font-size: 1.25rem !important;
		color: #5B3825 !important;
		text-transform: uppercase !important;
		letter-spacing: 0.05em !important;
	}
	
	.jyflowers-filter-mobile-overlay-close {
		width: 2.5rem !important;
		height: 2.5rem !important;
		background: #5B3825 !important;
		color: #FACACB !important;
		border: none !important;
		border-radius: 0.5rem !important;
		font-size: 1.5rem !important;
		line-height: 1 !important;
		cursor: pointer !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 0 !important;
	}
	
	.jyflowers-filter-mobile-overlay-close:hover {
		opacity: 0.9 !important;
	}
	
	.jyflowers-filter-mobile-overlay-body {
		display: flex !important;
		flex-direction: column !important;
		padding: 1rem 1.5rem 2rem !important;
		flex: 1 !important;
		overflow-y: auto !important;
	}
	
	/* When overlay is open, show filter content inside it */
	.jyflowers-filter-mobile-overlay.open .jyflowers-filter-buttons {
		display: flex !important;
		flex-direction: column !important;
		gap: 1rem !important;
	}
	
	.jyflowers-filter-mobile-overlay.open .jyflowers-filter-reset {
		display: block !important;
		margin-top: 1rem !important;
	}
	
	/* Move Filter toggle button above other buttons */
	.jyflowers-filter-toggle {
		order: 1 !important;
		width: 100% !important;
		align-self: center !important; /* same height as Order button */
		position: relative !important;
		color: transparent !important; /* Hide original text with > */
		font-size: 0 !important;
		line-height: 1 !important;
		display: table !important; /* table + table-cell for reliable vertical center */
	}
	
	/* Change Filter icon to down arrow on mobile - replace > with ▼ */
	.jyflowers-filter-toggle::before {
		content: '▼ Filter' !important;
		color: #5B3825 !important; /* Restore text color */
		font-size: 1rem !important;
		line-height: 1 !important;
		display: table-cell !important;
		vertical-align: middle !important;
		position: relative !important;
		z-index: 1 !important;
	}
	
	/* Up arrow when filters are open */
	.jyflowers-filter-toggle.filters-open::before {
		content: '▲ Filter' !important;
	}
	
	/* Order: same icon style on mobile – ▼ Order / ▲ Order when open */
	.jyflowers-order-toggle {
		color: transparent !important;
		font-size: 0 !important;
	}
	
	.jyflowers-order-toggle::before {
		content: '▼ Order' !important;
		color: #5B3825 !important;
		font-size: 1rem !important;
		line-height: 1 !important;
		display: block !important;
		position: relative !important;
		z-index: 1 !important;
	}
	
	.jyflowers-order-toggle.order-open::before {
		content: '▲ Order' !important;
	}
	
	.jyflowers-filter-buttons {
		order: 2 !important;
		flex-direction: row !important;
		flex-wrap: wrap !important;
		/* display is controlled by .show class, don't override here */
	}
	
	/* Ensure .show class works on mobile too */
	.jyflowers-filter-buttons.show {
		display: flex !important;
	}
	
	/* Reset button below other buttons on mobile */
	.jyflowers-filter-reset {
		order: 3 !important;
		width: 100% !important;
		display: none !important; /* Hidden by default, shown via JavaScript */
	}
	
	.jyflowers-filter-item {
		width: 100%;
	}
	
	.jyflowers-filter-btn {
		width: 100%;
		text-align: left;
		padding: 0.75rem !important; /* Remove horizontal padding on mobile, keep vertical */
	}
	
	.jyflowers-filter-toggle {
		padding: 0 0.75rem !important; /* Remove vertical padding on mobile, keep horizontal */
	}
	
	.jyflowers-filter-reset {
		padding: 0.75rem !important; /* Remove horizontal padding on mobile, keep vertical */
	}
	
	.jyflowers-filter-dropdown {
		width: 100%;
		left: 0 !important;
	}
}

/* Static Design Elements */
.jyflowers-hero-banner {
	width: 100%;
	display: block;
	line-height: 0;
	padding-bottom: 30px !important;
}

.jyflowers-hero-banner img {
	width: 100%;
	height: auto;
	display: block;
}

/* Desktop hero images - show on desktop, hide on mobile */
.jyflowers-hero-desktop {
	display: block !important;
}

.jyflowers-hero-mobile {
	display: none !important;
}

/* Hide mobile service images on desktop, show desktop images */
.jyflowers-service-img-mobile {
	display: none !important;
}

.jyflowers-service-img-desktop {
	display: block !important;
}

.jyflowers-service-card {
	
	
	overflow: hidden;
	background: var(--wp--preset--color--accent-5);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jyflowers-service-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.jyflowers-service-card img {
	width: 100%;
	height: auto;
	display: block;
}

/* Main content padding - 120px left and right */
.jyflowers-main-content {
	padding: 0 120px 0 120px !important;
}

/* Hero banners - reduce space from header */
.jyflowers-hero-banners {
	margin-top: -40px !important;
}

/* Header padding */
.jyflowers-header-wrapper {
	padding: 20px 100px 0 100px !important;
}

/* Category header styling */
.jyflowers-category-header {
	overflow: hidden;
	gap: 0 !important;
	font-size: 0;
	line-height: 0;
}

.jyflowers-category-header-left {
	border-radius: 3rem 0 0 3rem !important;
}

.jyflowers-category-header-left {
	padding-right: 0 !important;
	margin-right: 0 !important;
	font-size: initial;
	line-height: initial;
}

/* Limit text width inside category header left div */
.jyflowers-category-header-left h1,
.jyflowers-category-header-left p {
	max-width: 90% !important;
}

.jyflowers-category-header-right {
	padding-left: 0 !important;
	margin-left: -10px !important;
	font-size: initial;
	line-height: initial;
	position: relative;
	z-index: 1;
}

.jyflowers-category-header-right img {
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
}

.jyflowers-category-header > * {
	margin: 0;
}

/* Responsive design elements */
@media (max-width: 768px) {
	.jyflowers-main-content {
		padding: 15px !important;
	}
	
	.jyflowers-hero-banner {
		margin: 0;
	}
	
	/* Mobile hero images - show on mobile, hide desktop */
	.jyflowers-hero-desktop {
		display: none !important;
	}
	
	.jyflowers-hero-mobile {
		display: block !important;
	}
	
	/* Hide decorative cards on mobile */
	.jyflowers-popular-products > div > div:first-child,
	.jyflowers-popular-products > div > div:nth-child(2) {
		display: none;
	}
	
	/* Responsive grid for services - change to rows on mobile */
	.jyflowers-services-columns {
		grid-template-columns: 1fr !important; /* Single column */
		grid-template-rows: repeat(4, auto) !important; /* 4 rows */
		gap: 1rem !important;
	}
	
	/* Show mobile images, hide desktop images on mobile */
	.jyflowers-service-img-desktop {
		display: none !important;
	}
	
	.jyflowers-service-img-mobile {
		display: block !important;
	}
	
	/* Remove white background and bottom spacing from service cards on mobile */
	.jyflowers-service-card {
		background: transparent !important;
		margin-bottom: 0 !important;
		padding: 0 !important;
		border: none !important;
		border-radius: 0 !important;
	}
	
	/* Make services button full window width on mobile - break out of container */
	.jyflowers-services-button {
		width: 100vw !important;
		margin-left: calc(-50vw + 50%) !important;
		margin-right: calc(-50vw + 50%) !important;
		padding: 0 !important;
		justify-content: flex-start !important;
	}
	
	.jyflowers-services-button .wp-block-button {
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	
	.jyflowers-services-button .jyflowers-services-text {
		width: 100% !important;
		display: block !important;
		text-align: center !important;
		padding-top: 0.5rem !important;
		padding-bottom: 0.5rem !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		border-radius: 0 !important;
	}
}

/* Main content padding */
main.wp-block-group {
	padding: 30px 60px 0 60px !important;
}

/* Header padding adjustment */
.jyflowers-header-nav {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Responsive: adjust padding on mobile - Clean approach */
@media (max-width: 768px) {
	/* Main content spacing - consistent 15px */
	.jyflowers-main-content {
		padding: 15px !important;
	}
	
	/* Header spacing - already set above, but ensure consistency */
	.jyflowers-header-wrapper {
		padding: 5px 15px !important;
	}
	
	/* Main wrapper spacing */
	main.wp-block-group {
		padding: 15px 15px 0 15px !important;
	}
	
	/* Hero banners - allow to break out naturally, no negative margins */
	.jyflowers-hero-banners {
		margin-top: -10px !important;
	}
	
	/* Header nav - no negative margins needed, inherits from wrapper */
	.jyflowers-header-nav {
		margin: 0 !important;
		padding: 0 !important;
	}
	
	/* Alignfull elements should break out naturally - no compensation needed */
	/* Popular products and service cards inherit spacing from parent container */
	
	/* Category header responsive - 2 rows on mobile */
	.jyflowers-category-header {
		flex-direction: column !important;
		gap: 0 !important;
		padding: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
	}
	
	/* Show mobile banner, hide desktop banner - rounded top corners */
	.jyflowers-category-header-mobile-banner {
		display: block !important;
		width: 100% !important;
		order: 1 !important;
		overflow: hidden !important;
		border-radius: 1rem 1rem 0 0 !important;
		position: relative !important;
	}
	
	.jyflowers-category-desktop-img {
		display: none !important;
	}
	
	.jyflowers-category-mobile-img {
		display: block !important;
		width: 100% !important;
		height: auto !important;
		border-radius: 1rem 1rem 0 0 !important;
	}
	
	/* Hide desktop category name on mobile */
	.jyflowers-category-name-desktop {
		display: none !important;
	}
	
	/* Category name overlay on mobile banner – smaller font on mobile */
	.jyflowers-category-header-mobile-banner .jyflowers-category-name-overlay,
	.jyflowers-category-name-overlay {
		display: block !important;
		position: absolute !important;
		top: 50% !important;
		left: 50% !important;
		transform: translate(-50%, -50%) !important;
		font-size: 2rem !important;
		font-weight: 400 !important;
		font-family: serif !important;
		color: #FACACB !important;
		margin: 0 !important;
		line-height: 1.2 !important;
		text-align: center !important;
		width: 90% !important;
		word-wrap: break-word !important;
		hyphens: auto !important;
		z-index: 10 !important;
	}
	
	/* Hide desktop right column on mobile */
	.jyflowers-category-header-right {
		display: none !important;
	}
	
	/* Left content becomes second row with background - rounded bottom corners, narrower width, centered */
	.jyflowers-category-header-left {
		order: 2 !important;
		width: 90% !important; /* Slightly narrower than first div */
		max-width: calc(100% - 30px) !important;
		flex: none !important;
		background: #FACACB !important;
		padding: 1.5rem 15px !important;
		margin: 0 auto !important; /* Center horizontally */
		border-radius: 0 0 1rem 1rem !important; /* Rounded bottom corners */
		text-align: center !important;
		display: flex !important;
		flex-direction: column !important;
		justify-content: center !important;
	}
	
	.jyflowers-category-header-left h1 {
		font-size: 2.5rem !important;
	}
	
	/* Sub-category header responsive */
	.jyflowers-subcategory-header {
		grid-template-columns: 1fr 1fr !important; /* 2 columns for images */
		grid-template-rows: auto auto !important; /* 2 rows: name, then images */
		gap: 1rem !important;
		padding: 1rem 0 !important;
	}
	
	/* Sub-category name: first row, full width, centered */
	.jyflowers-subcategory-header-center {
		grid-column: 1 / -1 !important; /* Span all columns */
		grid-row: 1 !important;
		text-align: center !important;
	}
	
	.jyflowers-subcategory-header-center h1 {
		font-size: 2rem !important;
	}
	
	/* Left image: second row, first column */
	.jyflowers-subcategory-header-left {
		grid-column: 1 !important;
		grid-row: 2 !important;
		justify-content: center !important;
	}
	
	/* Right image: second row, second column */
	.jyflowers-subcategory-header-right {
		grid-column: 2 !important;
		grid-row: 2 !important;
		justify-content: center !important;
	}
	
	/* Reduce card decor images width on mobile - 20% smaller */
	.jyflowers-card-decor {
		max-width: 80px !important; /* 150px * 0.8 = 120px */
	}
	
	/* For subcategory header images, make them bigger for mobile */
	.jyflowers-subcategory-header .jyflowers-card-decor {
		max-width: 150px !important;
		width: 100% !important;
		height: auto !important;
	}
}

/* Services section button styling - desktop only */
@media (min-width: 769px) {
	.jyflowers-services-button .jyflowers-services-text {
		background: #99A577 !important;
		color: #F6EADE !important;
		border-radius: 1rem !important;
		display: inline-block !important;
	}
}

/* Buy Now button text color */
.jyflowers-product-card .button,
.jyflowers-category-product-card .button,
a.button[href*="add-to-cart"] {
	color: #F6EADE !important;
}

/* Subcategory dropdown styles */
.jyflowers-nav-item-wrapper {
	position: relative;
}

.jyflowers-nav-item-wrapper:hover .jyflowers-subcategories-dropdown {
	display: block !important;
}

.jyflowers-subcategories-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 0.5rem;
	background: #F48285 !important;
	border-radius: 1rem !important;
	padding: 0 1.5rem 1.5rem 1.5rem !important;
	z-index: 1000;
	min-width: 600px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.jyflowers-nav-right .jyflowers-subcategories-dropdown {
	left: auto;
	right: 0;
}

.jyflowers-subcategory-column a {
	color: #5B3825 !important;
	text-decoration: none;
	font-size: 1rem !important;
	padding: 0.25rem 0;
	display: block;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.jyflowers-subcategory-column a[style*="#F6EADE"] {
	color: #F6EADE !important;
}

.jyflowers-subcategory-column a:hover {
	opacity: 0.7;
}

/* Decorative image in first column - flush with top border */
.jyflowers-subcategory-column:first-child > div:first-child {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.jyflowers-subcategory-decor-img {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.jyflowers-default-content-container {
	background-color: rgb(250, 202, 203) !important; 
	border-radius: 1rem !important; 
	padding: 2rem !important; 
	margin: 2rem 120px !important; 
	max-width: calc(100% - 240px) !important; 
	box-sizing: border-box !important;
}

@media (max-width: 768px) {
	.jyflowers-default-content-container {
		margin: 1rem 15px !important;
		width: calc(100% - 30px) !important;
		max-width: calc(100% - 30px) !important;
		padding: 1.5rem !important;
	}
}
/* Single Product Page Styles */
/* Main product page container - rounded borders and background color */
/* Wrap all content between header and footer */
body.single-product main,
body.single-product main.wp-block-group,
body.single-product .wp-site-blocks > main,
body.single-product .wp-site-blocks main,
body.single-product main.wp-block-group[class*="wp-block-group"],
body.single-product .wp-block-group[tagName="main"],
body.single-product .wp-site-blocks main.wp-block-group,
body.single-product article main,
body.single-product article main.wp-block-group {
	background-color: #FACACB !important;
	border-radius: 1rem !important;
	padding: 2rem !important;
	margin: 2rem 120px !important;
	max-width: calc(100% - 240px) !important;
	box-sizing: border-box !important;
	display: block !important;
	position: relative !important;
	z-index: 1 !important;
}

/* Ensure nested groups don't override the background */
body.single-product main > .wp-block-group,
body.single-product main > .wp-block-group.alignfull,
body.single-product main.wp-block-group > .wp-block-group,
body.single-product main.wp-block-group > .wp-block-group.alignfull {
	background-color: transparent !important;
}

@media (max-width: 768px) {
	body.single-product main,
	body.single-product main.wp-block-group,
	body.single-product .wp-site-blocks > main,
	body.single-product .wp-site-blocks main,
	body.single-product main.wp-block-group[class*="wp-block-group"],
	body.single-product .wp-block-group[tagName="main"],
	body.single-product .wp-site-blocks main.wp-block-group,
	body.single-product article main,
	body.single-product article main.wp-block-group {
		background-color: #FACACB !important;
		border-radius: 1rem !important;
		margin: 1rem 15px !important;
		width: calc(100% - 30px) !important;
		max-width: calc(100% - 30px) !important;
		padding: 1.5rem !important;
		box-sizing: border-box !important;
		display: block !important;
		position: relative !important;
		z-index: 1 !important;
	}
}

/* Product image in white container - only target the outer image gallery container */
body.single-product .wp-block-woocommerce-product-image-gallery {
	background-color: #FFFFFF !important;
	border-radius: 1rem !important;
	padding: 1rem !important;
	display: block !important;
}

/* Remove white background from nested woocommerce-product-gallery if it exists */
body.single-product .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery {
	background-color: transparent !important;
	padding: 0 !important;
}

/* Center the gallery wrapper content */
body.single-product .wp-block-woocommerce-product-image-gallery > *,
body.single-product .woocommerce-product-gallery__wrapper {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
}

/* Center images inside white container */
body.single-product .wp-block-woocommerce-product-image-gallery img,
body.single-product .woocommerce-product-gallery__image img,
body.single-product .woocommerce-product-gallery__wrapper img,
body.single-product .woocommerce-product-gallery__image,
body.single-product .wp-block-image img,
body.single-product img.wp-post-image {
	border-radius: 0.5rem !important;
	display: block !important;
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	margin: 0 auto !important;
}

/* Reorder product page elements - make column a flex container */
body.single-product .wp-block-columns .wp-block-column:last-child {
	display: flex !important;
	flex-direction: column !important;
}

/* Hide product rating */
body.single-product .wp-block-woocommerce-product-rating {
	display: none !important;
	order: 999 !important;
}

/* Product name - order 1 */
body.single-product .wp-block-post-title {
	order: 1 !important;
	margin-bottom: 1rem !important;
}

/* Product description/excerpt - order 2 */
body.single-product .wp-block-post-excerpt {
	order: 2 !important;
	margin-bottom: 1rem !important;
}

/* Product price - order 3, bigger font */
body.single-product .wp-block-woocommerce-product-price,
body.single-product .price {
	order: 3 !important;
	margin-bottom: 1rem !important;
	font-size: 1.5rem !important;
	font-weight: 700 !important;
}

body.single-product .wp-block-woocommerce-product-price *,
body.single-product .price * {
	font-size: 1.5rem !important;
	font-weight: 700 !important;
}

/* Add to cart form - order 4 */
body.single-product .wp-block-woocommerce-add-to-cart-form {
	order: 4 !important;
	margin-bottom: 1rem !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 1rem !important;
}

/* Break any flex containers inside add to cart form */
body.single-product .wp-block-woocommerce-add-to-cart-form > *,
body.single-product .wp-block-woocommerce-add-to-cart-form form,
body.single-product .wp-block-woocommerce-add-to-cart-form .cart {
	display: flex !important;
	flex-direction: column !important;
	gap: 1rem !important;
}

/* Quantity input on its own line */
body.single-product .wp-block-woocommerce-add-to-cart-form .quantity,
body.single-product .wp-block-woocommerce-add-to-cart-form form .quantity,
body.single-product .wp-block-woocommerce-add-to-cart-form .cart .quantity,
body.single-product .quantity {
	order: 1 !important;
	width: auto !important;
	margin-bottom: 0 !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

body.single-product .wp-block-woocommerce-add-to-cart-form .quantity input,
body.single-product .wp-block-woocommerce-add-to-cart-form form .quantity input {
	width: 70px !important;
	height: 2rem !important;
	text-align: center !important;
	display: block !important;
	line-height: 2rem !important;
	padding: 0 !important;
}

/* Add to cart button on its own line */
body.single-product .wp-block-woocommerce-add-to-cart-form button,
body.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button,
body.single-product .wp-block-woocommerce-add-to-cart-form form button,
body.single-product .wp-block-woocommerce-add-to-cart-form .cart button,
body.single-product button.single_add_to_cart_button,
body.single-product button[type="submit"].single_add_to_cart_button {
	order: 2 !important;
	width: auto !important;
	align-self: flex-start !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	margin-top: 0 !important;
}

/* Product meta - order 5 */
body.single-product .wp-block-woocommerce-product-meta {
	order: 5 !important;
}

/* Product name, description, and text info - color #5B3825 */
body.single-product h1.wp-block-post-title,
body.single-product .wp-block-post-title,
body.single-product .wp-block-post-title a,
body.single-product .wp-block-post-excerpt,
body.single-product .wp-block-post-excerpt p,
body.single-product .woocommerce-product-details__short-description,
body.single-product .wp-block-woocommerce-product-price,
body.single-product .price,
body.single-product .price *,
body.single-product .wp-block-woocommerce-product-meta,
body.single-product .product_meta,
body.single-product .wp-block-post-terms,
body.single-product .product_meta *,
body.single-product .wp-block-woocommerce-product-rating,
body.single-product .woocommerce-product-rating,
body.single-product .star-rating,
body.single-product .wp-block-woocommerce-product-rating * {
	color: #5B3825 !important;
}

/* Add to cart button - rounded corners, background #99A577, text #5B3825 */
body.single-product .wp-block-woocommerce-add-to-cart-form button,
body.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button,
body.single-product .single_add_to_cart_button,
body.single-product button[type="submit"].single_add_to_cart_button,
body.single-product .cart button.button,
body.single-product form.cart button.button,
body.single-product .woocommerce form.cart button.button,
body.single-product .wp-block-button__link,
body.single-product .wp-block-woocommerce-add-to-cart-form .wp-block-button__link {
	background-color: #99A577 !important;
	color: #5B3825 !important;
	border-radius: 1rem !important;
	border: none !important;
	padding: 0.75rem 1.5rem !important;
	font-weight: 600 !important;
	transition: opacity 0.2s ease !important;
	text-decoration: none !important;
}

body.single-product .wp-block-woocommerce-add-to-cart-form button:hover,
body.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button:hover,
body.single-product .single_add_to_cart_button:hover,
body.single-product button[type="submit"].single_add_to_cart_button:hover,
body.single-product .cart button.button:hover,
body.single-product form.cart button.button:hover,
body.single-product .woocommerce form.cart button.button:hover,
body.single-product .wp-block-button__link:hover,
body.single-product .wp-block-woocommerce-add-to-cart-form .wp-block-button__link:hover {
	opacity: 0.9 !important;
	background-color: #99A577 !important;
	color: #5B3825 !important;
}

/* Quantity input styling - specific to product page */
body.single-product .quantity input[type="number"],
body.single-product .woocommerce .quantity input[type="number"],
body.single-product .wp-block-woocommerce-add-to-cart-form .quantity input[type="number"],
body.single-product .wp-block-woocommerce-add-to-cart-form form .quantity input[type="number"] {
	border-radius: 1rem !important;
	border: 1px solid #5B3825 !important;
	color: #5B3825 !important;
	width: 70px !important;
	height: 2rem !important;
	text-align: center !important;
	line-height: 2rem !important;
	padding: 0 !important;
}

/* Product details tabs and related products */
body.single-product .wp-block-woocommerce-product-details,
body.single-product .woocommerce-tabs,
body.single-product .woocommerce-tabs .panel {
	color: #5B3825 !important;
}

/* Single product: hide reviews section (tab + content + block) */
body.single-product .woocommerce-tabs ul.tabs li.reviews_tab,
body.single-product #tab-reviews,
body.single-product .woocommerce-Reviews,
body.single-product .wp-block-woocommerce-product-reviews {
	display: none !important;
}

/* Single product: hide Description tab (description already under title) */
body.single-product .woocommerce-tabs ul.tabs li.description_tab,
body.single-product #tab-description {
	display: none !important;
}

/* Extra safety: hide any Woo reviews wrapper on single product */
body.single-product #reviews,
body.single-product .wc-tabs-wrapper #reviews,
body.single-product .wc-tabs-wrapper .woocommerce-Reviews {
	display: none !important;
}

body.single-product .woocommerce-tabs ul.tabs li a {
	color: #5B3825 !important;
}

/* Ensure product content wrapper has proper styling */
body.single-product .wp-block-columns {
	margin: 0 !important;
}

body.single-product .wp-block-column {
	padding: 1rem !important;
}

/* Remove white background from columns - only image gallery should have it */
body.single-product .wp-block-columns .wp-block-column:first-child {
	background-color: transparent !important;
}

/* Single product: mobile & tablet – one column, pink like cart, reorder: name, image, description, price+button, category, related */
@media (max-width: 1024px) {
	body.single-product main,
	body.single-product main.wp-block-group,
	body.single-product .wp-site-blocks > main,
	body.single-product .wp-site-blocks main,
	body.single-product main.wp-block-group,
	body.single-product article main,
	body.single-product article main.wp-block-group {
		background-color: #FACACB !important;
		border-radius: 1rem !important;
		margin: 1rem 15px !important;
		max-width: calc(100% - 30px) !important;
		width: calc(100% - 30px) !important;
		padding: 1.5rem !important;
		box-sizing: border-box !important;
	}

	/* One-column layout: make the wrapper that contains product columns a flex column, then flatten columns */
	body.single-product main .wp-block-group:has(.wp-block-columns),
	body.single-product main > .wp-block-group,
	body.single-product main > .wp-block-post-content {
		display: flex !important;
		flex-direction: column !important;
		gap: 1.5rem !important;
	}

	body.single-product main .wp-block-columns {
		display: contents !important;
	}

	body.single-product main .wp-block-columns .wp-block-column {
		display: contents !important;
	}

	/* Reorder: 1 name, 2 image, 3 short description, 4 price+add to cart, 5 category, 6 tabs/description, 7 related */
	body.single-product main .wp-block-post-title { order: 1 !important; margin-bottom: 0 !important; }
	body.single-product main .wp-block-woocommerce-product-image-gallery { order: 2 !important; }
	body.single-product main .wp-block-post-excerpt { order: 3 !important; }
	body.single-product main .wp-block-woocommerce-product-price,
	body.single-product main .price { order: 4 !important; }
	body.single-product main .wp-block-woocommerce-add-to-cart-form { order: 5 !important; }
	body.single-product main .wp-block-woocommerce-product-meta { order: 6 !important; }
	body.single-product main .wp-block-woocommerce-product-details,
	body.single-product main .woocommerce-tabs { order: 7 !important; }
	body.single-product main .wp-block-woocommerce-related-products { order: 8 !important; }

	body.single-product h1.wp-block-post-title,
	body.single-product .wp-block-post-title {
		font-size: 2rem !important;
		line-height: 1.2 !important;
	}

	/* Related products: one column */
	body.single-product .wp-block-woocommerce-related-products .wc-block-grid,
	body.single-product .wp-block-woocommerce-related-products ul.products {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
	}
	body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product,
	body.single-product .wp-block-woocommerce-related-products ul.products li {
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* Related products heading: "You may also like" – big, bold, centered, bottom padding */
body.single-product .wp-block-woocommerce-related-products h2,
body.single-product .wp-block-woocommerce-related-products .wp-block-heading,
body.single-product .wp-block-woocommerce-product-collection h2,
body.single-product .related.products h2 {
	font-weight: 700 !important;
	color: #F48285 !important;
	text-align: center !important;
	width: 100% !important;
	padding-bottom: 1.5rem !important;
}
/* Replace block heading text with "You may also like" when block outputs "Related products" */
body.single-product .wp-block-woocommerce-related-products h2.wp-block-heading,
body.single-product .wp-block-woocommerce-product-collection h2.wp-block-heading {
	font-size: 0 !important;
}
body.single-product .wp-block-woocommerce-related-products h2.wp-block-heading::after,
body.single-product .wp-block-woocommerce-product-collection h2.wp-block-heading::after {
	content: 'You may also like';
	font-size: 2.5rem !important;
	font-weight: 700 !important;
	color: #F48285 !important;
	display: block !important;
	text-align: center !important;
	padding-bottom: 1.5rem !important;
}
/* Classic related products heading (when filter changes the text) */
body.single-product .related.products h2 {
	font-size: 2.5rem !important;
	text-align: center !important;
	padding-bottom: 1.5rem !important;
}

/* Related products (ul[data-block-name="woocommerce/product-template"]): image wrapper = white frame */
body.single-product ul[data-block-name="woocommerce/product-template"] li > div:first-child,
body.single-product ul[data-block-name="woocommerce/product-template"] li > a:first-child {
	display: block !important;
	background-color: #FFFFFF !important;
	border-radius: 0.5rem !important;
	padding: 1rem !important;
	text-align: center !important;
	box-sizing: border-box !important;
	border: 3px solid #FFFFFF !important;
}
/* Related products: images with rounded borders and 3px white border */
body.single-product ul[data-block-name="woocommerce/product-template"] li img {
	border-radius: 0.5rem !important;
	border: 3px solid #FFFFFF !important;
	display: block !important;
	margin: 0 auto !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: cover !important;
	box-sizing: border-box !important;
}

/* Related products: legacy selectors (white frame + rounded image) */
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product .wc-block-grid__product-image,
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product .wc-block-grid__product-image__wrapper,
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product > a:first-of-type,
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product > div:first-child,
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product a.wc-block-components-product-image,
body.single-product .wp-block-woocommerce-product-collection .wc-block-grid__product .wc-block-grid__product-image,
body.single-product .wp-block-woocommerce-product-collection .wc-block-grid__product .wc-block-grid__product-image__wrapper,
body.single-product .wp-block-woocommerce-product-collection .wc-block-grid__product > a:first-of-type,
body.single-product .wp-block-woocommerce-product-collection .wc-block-grid__product > div:first-child,
body.single-product .related.products li a:first-of-type,
body.single-product .related.products .woocommerce-loop-product__link {
	display: block !important;
	background-color: #FFFFFF !important;
	border-radius: 0.5rem !important;
	padding: 1rem !important;
	text-align: center !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
}
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product img,
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product .wc-block-grid__product-image img,
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product .wc-block-grid__product-image__wrapper img,
body.single-product .wp-block-woocommerce-related-products .wc-block-grid__product a img,
body.single-product .wp-block-woocommerce-product-collection .wc-block-grid__product img,
body.single-product .wp-block-woocommerce-product-collection .wc-block-grid__product a img,
body.single-product .related.products li a:first-of-type img,
body.single-product .related.products .woocommerce-loop-product__link img {
	border-radius: 0.5rem !important;
	border: 3px solid #FFFFFF !important;
	display: block !important;
	margin: 0 auto !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: cover !important;
	box-sizing: border-box !important;
}

/* Ensure footer doesn't get white background */
body.single-product footer,
body.single-product footer * {
	background-color: #3D2817 !important;
}

/* Remove width: 100% from sale badge */
body.single-product .onsale,
body.single-product span.onsale,
body.single-product .woocommerce span.onsale {
	width: auto !important;
}

/* Cart, Checkout, and other WooCommerce pages - rounded container with background color */
/* Exclude home and category pages */
body.woocommerce-cart main,
body.woocommerce-cart main.wp-block-group,
body.woocommerce-cart .wp-site-blocks > main,
body.woocommerce-checkout main,
body.woocommerce-checkout main.wp-block-group,
body.woocommerce-checkout .wp-site-blocks > main,
body.woocommerce-account main,
body.woocommerce-account main.wp-block-group,
body.woocommerce-account .wp-site-blocks > main,
body.woocommerce-order-received main,
body.woocommerce-order-received main.wp-block-group,
body.woocommerce-order-received .wp-site-blocks > main,
body.woocommerce-page:not(.home):not(.front-page):not(.tax-product_cat):not(.single-product):not(.archive) main,
body.woocommerce-page:not(.home):not(.front-page):not(.tax-product_cat):not(.single-product):not(.archive) main.wp-block-group,
body.woocommerce-page:not(.home):not(.front-page):not(.tax-product_cat):not(.single-product):not(.archive) .wp-site-blocks > main {
	background-color: #FACACB !important;
	border-radius: 1rem !important;
	padding: 2rem !important;
	margin: 2rem 120px !important;
	max-width: calc(100% - 240px) !important;
	box-sizing: border-box !important;
	display: block !important;
	position: relative !important;
	z-index: 1 !important;
}

/* Ensure nested groups don't override the background for WooCommerce pages */
body.woocommerce-cart main > .wp-block-group,
body.woocommerce-cart main > .wp-block-group.alignfull,
body.woocommerce-checkout main > .wp-block-group,
body.woocommerce-checkout main > .wp-block-group.alignfull,
body.woocommerce-account main > .wp-block-group,
body.woocommerce-account main > .wp-block-group.alignfull,
body.woocommerce-order-received main > .wp-block-group,
body.woocommerce-order-received main > .wp-block-group.alignfull,
body.woocommerce-page:not(.home):not(.front-page):not(.tax-product_cat):not(.single-product):not(.archive) main > .wp-block-group,
body.woocommerce-page:not(.home):not(.front-page):not(.tax-product_cat):not(.single-product):not(.archive) main > .wp-block-group.alignfull {
	background-color: transparent !important;
}

@media (max-width: 768px) {
	body.woocommerce-cart main,
	body.woocommerce-cart main.wp-block-group,
	body.woocommerce-checkout main,
	body.woocommerce-checkout main.wp-block-group,
	body.woocommerce-account main,
	body.woocommerce-account main.wp-block-group,
	body.woocommerce-order-received main,
	body.woocommerce-order-received main.wp-block-group,
	body.woocommerce-page:not(.home):not(.front-page):not(.tax-product_cat):not(.single-product):not(.archive) main,
	body.woocommerce-page:not(.home):not(.front-page):not(.tax-product_cat):not(.single-product):not(.archive) main.wp-block-group {
		margin: 1rem 15px !important;
		max-width: calc(100% - 30px) !important;
		padding: 1.5rem !important;
	}
}

/* Cart page: hide Shipping and Total rows in cart totals */
body.woocommerce-cart .cart_totals .shipping,
body.woocommerce-cart .cart_totals .order-total {
	display: none !important;
}

/* Cart page: hide coupon form */
body.woocommerce-cart .cart .coupon,
body.woocommerce-cart .woocommerce-cart-form .coupon {
	display: none !important;
}


/* Quick Contact success popup */
.jyflowers-contact-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(61, 40, 23, 0.5);
	z-index: 100001;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
}

.jyflowers-contact-popup-overlay.is-open {
	display: flex;
}

.jyflowers-contact-popup {
	background: #F6EADE;
	border-radius: 1rem;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
	max-width: 420px;
	width: 100%;
	padding: 2rem;
	position: relative;
	border: 1px solid rgba(153, 165, 119, 0.3);
}

.jyflowers-contact-popup-title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #3D2817;
	font-family: serif;
}

.jyflowers-contact-popup-message {
	margin: 0 0 1.5rem;
	color: #3D2817;
	font-size: 1rem;
	line-height: 1.5;
}

.jyflowers-contact-popup-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 1.25rem;
	background: #99A577;
	color: #F6EADE;
	border: none;
	border-radius: 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.jyflowers-contact-popup-close:hover {
	opacity: 0.9;
	background: #8a9669;
}

