/*
Theme Name: Bachata Viva Lean
Theme URI: https://bachatahk.com/
Author: Bachata Viva HK
Description: A dependency-free, performance-first block theme for Bachata Viva HK.
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 8.1
Version: 0.2.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bachata-viva-lean
Tags: block-patterns, full-site-editing, accessibility-ready, e-commerce
*/

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

html {
	scroll-behavior: smooth;
}

body {
	text-wrap: pretty;
}

main {
	min-height: 60vh;
}

/* Flush header → hero: root blockGap adds 1.25rem above main */
:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

.bvh-site-header {
	border-bottom: 1px solid rgba(255, 254, 251, 0.12);
}

.bvh-site-header + main,
.bvh-front-page,
.bvh-front-page > .entry-content,
.bvh-page-shell > .entry-content {
	margin-block-start: 0;
}

.bvh-site-header .wp-block-site-logo img,
.bvh-site-header .bvh-header-logo img {
	height: auto;
	max-height: 48px;
	width: auto;
}

.bvh-site-header .bvh-header-logo {
	margin: 0;
}

.bvh-brand:has(.wp-block-site-logo img) .wp-block-site-title,
.bvh-brand:has(.bvh-header-logo img) .wp-block-site-title {
	display: none;
}

.bvh-site-header .wp-block-navigation-item__content {
	text-underline-offset: 0.2em;
}

.bvh-site-header .wp-block-navigation-item__content:hover {
	text-decoration: underline;
}

.bvh-site-footer {
	border-top: 1px solid var(--wp--preset--color--border);
}

.bvh-site-footer .is-style-none {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}

.bvh-eyebrow {
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bvh-prose {
	max-width: 46rem;
}

.bvh-prose :where(p, li) {
	max-width: 70ch;
}

.bvh-post-card {
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: var(--wp--preset--spacing--40);
}

.bvh-post-card .wp-block-post-featured-image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.bvh-post-card .wp-block-post-featured-image img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.wp-block-button__link {
	transition: background-color 160ms ease, color 160ms ease;
}

.wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent-dark);
}

.wp-block-post-featured-image img,
.wp-block-image img {
	height: auto;
}

.woocommerce :where(input, select, textarea) {
	font: inherit;
}

.woocommerce :where(.button, button.button, input.button) {
	border-radius: 999px;
}

.woocommerce ul.products {
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product {
	margin: 0;
	width: auto;
}

.woocommerce ul.products li.product img {
	aspect-ratio: 1;
	object-fit: cover;
}

@media (max-width: 47.99rem) {
	.bvh-site-header {
		position: relative;
	}

	.bvh-site-header .wp-block-site-logo img,
	.bvh-site-header .bvh-header-logo img {
		max-height: 36px;
		max-width: min(220px, 55vw);
	}

	.bvh-header-cta {
		display: none;
	}

	.bvh-page-shell {
		padding-left: var(--wp--preset--spacing--30) !important;
		padding-right: var(--wp--preset--spacing--30) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
