:where(.wp-site-blocks) {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks > :where(main, header, footer) { margin-block-start: 0; }
.wp-site-blocks > main { flex: 1; }

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

:where(button, input, select, textarea) { font: inherit; }
:where(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea) { max-width: 100%; }
:where(.chida-main, .chida-home) { padding-block-end: var(--wp--preset--spacing--60); }
.chida-main { padding-block-start: var(--wp--preset--spacing--50); }
.chida-main > .wp-block-post-featured-image img { border-radius: 0.7rem; }

.chida-header {
	background: var(--wp--preset--color--surface);
	border-block-end: 1px solid var(--wp--preset--color--line);
}

.chida-header-inner {
	display: grid;
	grid-template-columns: auto auto minmax(9rem, 25rem) auto;
	align-items: center;
	justify-content: space-between;
	column-gap: clamp(0.6rem, 2vw, 2.25rem);
	min-height: 4.75rem;
	padding-block: 0.65rem;
}

.chida-header-inner > *, .chida-brand > *, .chida-header-actions > * { margin-block: 0; }
.chida-brand, .chida-header-actions { gap: 0.35rem; }
.chida-brand .wp-block-site-title { line-height: 1.2; max-inline-size: min(16rem, 38vw); overflow-wrap: anywhere; }
.chida-brand .wp-block-site-logo img { border-radius: 0.4rem; }
.chida-nav { font-size: 0.91rem; font-weight: 620; }
.chida-nav .wp-block-navigation__container { gap: clamp(0.65rem, 1.8vw, 1.5rem); }
.chida-search { min-inline-size: 0; }
.chida-search.wp-block-search__button-inside .wp-block-search__inside-wrapper {
	background: var(--wp--preset--color--canvas);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.45rem;
	padding: 0.15rem 0.55rem;
}

.chida-search .wp-block-search__input { min-inline-size: 0; padding-block: 0.42rem; }
.chida-search .wp-block-search__button {
	color: var(--wp--preset--color--primary);
	background: transparent;
	border: 0;
	padding: 0.2rem;
	min-inline-size: 2rem;
	min-block-size: 2rem;
}

.chida-header-actions :is(.wc-block-mini-cart__button, .wp-block-woocommerce-customer-account > a) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 2.65rem;
	min-inline-size: 2.65rem;
	padding: 0.3rem;
	color: var(--wp--preset--color--primary);
}

.chida-header-actions .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
}

.chida-checkout-brand { min-height: 4.75rem; padding-block: 0.65rem; }
.chida-checkout-brand p { font-size: 0.875rem; }

.chida-home { padding-block-start: clamp(1rem, 3vw, 2.3rem); }

.chida-hero {
	display: grid;
	grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
	background: var(--wp--preset--color--sand);
	border-radius: 0.8rem;
	overflow: hidden;
}

.chida-hero-copy {
	align-self: center;
	min-width: 0;
	padding: clamp(1.5rem, 4.3vw, 4.5rem);
}

.chida-hero-copy .wp-block-heading { max-inline-size: 13ch; margin-block-start: 0.65rem; }
.chida-eyebrow { color: var(--wp--preset--color--accent); font-weight: 750; }
.chida-hero-description { color: var(--wp--preset--color--muted); max-inline-size: 34ch; }
.chida-hero-copy .wp-block-buttons { margin-block-start: 1.65rem; }
.chida-hero-image { position: relative; min-height: clamp(22rem, 38vw, 33rem); margin: 0; }
.chida-hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chida-home > :is(.chida-category-section, .chida-latest, .chida-app) { margin-block-start: var(--wp--preset--spacing--60); }

.chida-app {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--sand);
	border-radius: 0.8rem;
}
.chida-app-copy > * { margin: 0; }
.chida-app-copy > * + * { margin-block-start: 0.5rem; }
.chida-app-soon { margin: 0; color: var(--wp--preset--color--muted); font-weight: 650; }

.chida-section-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-block-end: 1rem;
}

.chida-section-heading > * { margin: 0; }
.chida-text-link { font-size: var(--wp--preset--font-size--small); font-weight: 700; text-underline-offset: 0.3em; }
.chida-categories {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: clamp(0.65rem, 2vw, 1.3rem);
}

.chida-category {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 5rem;
	height: 100%;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.6rem;
	overflow: hidden;
	text-decoration: none;
}

.chida-category img { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.chida-category-label { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 0.65rem 0.85rem; font-weight: 720; }
.chida-category-label::after { content: '←'; color: var(--wp--preset--color--accent); }
[dir="ltr"] .chida-category-label::after { content: '→'; }

.chida-page-heading { border-block-end: 1px solid var(--wp--preset--color--line); padding-block-end: 1rem; }
.chida-catalog .woocommerce-breadcrumb, .chida-product .woocommerce-breadcrumb { color: var(--wp--preset--color--muted); font-size: 0.85rem; }
.chida-catalog-layout { display: grid; grid-template-columns: minmax(12rem, 0.26fr) minmax(0, 1fr); gap: clamp(0.8rem, 3vw, 2.2rem); align-items: start; }
.chida-catalog-body { min-inline-size: 0; }
.chida-catalog-body > :first-child, .chida-filter-panel > :first-child { margin-block-start: 0; }
.chida-catalog-toolbar { color: var(--wp--preset--color--muted); font-size: 0.85rem; margin-block-end: 1rem; }
.chida-filter-panel { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 0.65rem; padding: 1rem; }
.chida-filter-panel .wc-block-product-filters__overlay-content { gap: 1rem; }
.chida-filter-panel .wc-block-product-filters h3 { margin-block: 0 0.45rem; }

.chida-products .wc-block-product {
	display: flex;
	flex-direction: column;
	min-inline-size: 0;
	padding: 0 0 0.75rem;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.65rem;
	overflow: hidden;
}

.chida-products .wc-block-product :is(.wp-block-post-title, .wp-block-woocommerce-product-price, .wp-block-woocommerce-product-button) { margin-inline: 0.75rem; }
.chida-products .wc-block-product .wp-block-post-title { margin-block: 0.75rem 0.25rem; overflow-wrap: anywhere; }
.chida-products .wc-block-product .wp-block-post-title a { text-decoration: none; }
.chida-products .wc-block-product .wp-block-woocommerce-product-price { margin-block: 0 0.75rem; font-weight: 720; }
.chida-products .wc-block-product .wp-block-woocommerce-product-button { margin-block-start: auto; }
.chida-products .wc-block-product .wp-block-woocommerce-product-button a { white-space: normal; }
.chida-products .wc-block-product .wc-block-components-product-image { margin: 0; }
.chida-products .wc-block-product .wc-block-components-product-image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.chida-products .wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
	border: 0;
	border-radius: 0.3rem;
}

.chida-empty { padding: 1rem; background: var(--wp--preset--color--sand); border-radius: 0.5rem; }
.chida-product-intro { gap: clamp(1rem, 4vw, 4rem); }
.chida-product-info > .wp-block-post-title { margin-block-start: 0; }
.chida-product-info .wp-block-woocommerce-product-price { font-weight: 750; }
.chida-product-intro .woocommerce-product-gallery { margin: 0; }
.chida-product .woocommerce-product-gallery img { border-radius: 0.6rem; }
.chida-product .wp-block-woocommerce-product-details { border-block-start: 1px solid var(--wp--preset--color--line); padding-block-start: var(--wp--preset--spacing--40); }
.chida-posts .wp-block-post { min-inline-size: 0; }
.chida-posts .wp-block-post-featured-image img { border-radius: 0.6rem; }

:where(.woocommerce, .chida-main) :is(select, .woocommerce-Input, .input-text) {
	box-sizing: border-box;
	min-block-size: 2.55rem;
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0.4rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--surface);
}

.chida-main :is(.wp-block-woocommerce-checkout, .wp-block-woocommerce-cart, .woocommerce) { font: inherit; }
.woocommerce-account .chida-main .wp-block-post-content > .woocommerce { max-inline-size: var(--wp--style--global--wide-size); }
.woocommerce-MyAccount-navigation ul { display: grid; gap: 0.1rem; list-style: none; margin: 0; padding: 0; }
.woocommerce-MyAccount-navigation a { display: block; padding: 0.5rem 0.75rem; text-decoration: none; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--wp--preset--color--sand); border-radius: 0.35rem; font-weight: 720; }

.chida-footer { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--surface); padding-block: var(--wp--preset--spacing--50); }
.chida-footer :is(a, a:hover) { color: inherit; }
.chida-footer a:focus-visible { outline-color: var(--wp--preset--color--surface); }
.chida-footer-brand .wp-block-site-tagline { margin-block-start: 0.25rem; font-size: 0.875rem; }
.chida-footer .wp-block-navigation { font-size: 0.875rem; }

@media (max-width: 860px) {
	.chida-header-inner { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 0.75rem; row-gap: 0.5rem; }
	.chida-header-inner .chida-nav { grid-column: 2; grid-row: 1; }
	.chida-header-inner .chida-header-actions { grid-column: 3; grid-row: 1; justify-self: end; }
	.chida-header-inner .chida-search { grid-column: 1 / -1; }
	.chida-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
	.chida-catalog-layout { grid-template-columns: minmax(0, 1fr); }
	.chida-filter-panel { background: transparent; border: 0; padding: 0; }
	.chida-filter-title { display: none; }
	.chida-filter-panel .wc-block-product-filters__overlay-content { padding-inline: 1rem; }
	.chida-posts .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
	.chida-hero { grid-template-columns: minmax(0, 1fr); }
	.chida-hero-image { min-height: 0; aspect-ratio: 4 / 3; }
	.chida-hero-copy .wp-block-heading { max-inline-size: none; }
	.chida-hero-copy { padding: 1.35rem; }
	.chida-products .wc-block-product-template:is(.is-flex-container, .wc-block-product-template__responsive) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
	.chida-products .wc-block-product-template.is-flex-container .wc-block-product { width: auto; }
	.chida-products .wp-block-woocommerce-product-button :is(button, a) { padding-inline: 0.55rem; }
}

@media (max-width: 380px) {
	.chida-products .wc-block-product :is(.wp-block-post-title, .wp-block-woocommerce-product-price, .wp-block-woocommerce-product-button) { margin-inline: 0.45rem; }
	.chida-posts .wp-block-post-template.is-layout-grid { grid-template-columns: minmax(0, 1fr); }
}
