/*
Theme Name: KyiKyiHouse
Theme URI: https://kyikyihouse.com
Author: MyanSEO.com
Author URI: https://myanseo.com
Description: A lightweight, mobile-first block theme for the KyiKyiHouse personal brand and entrepreneur platform.
Version: 0.1.49
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kyikyihouse
Tags: block-theme, full-site-editing, blog, one-column, custom-logo, custom-colors
*/

/* Visible keyboard focus everywhere. */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Sticky header: the template part wrapper itself carries the sticky
   positioning — a sticky element inside it has no travel room. */
header.wp-block-template-part {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 20;
}

/* Keep the footer on the viewport floor even on short pages. */
body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks > footer.wp-block-template-part {
	margin-top: auto;
}

.kkh-header {
	background: var(--wp--preset--color--background);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Header bar: brand left; navigation and the injected WooCommerce
   account / cart icons cluster on the right. */
.kkh-header > .wp-block-group > .wp-block-navigation {
	margin-left: auto;
	font-weight: 500;
}

.kkh-header .wp-block-navigation-item__content {
	padding: 0.375rem 0.125rem;
	border-bottom: 2px solid transparent;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.kkh-header .wp-block-navigation-item__content:hover,
.kkh-header .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--primary);
}

.kkh-header [data-block-name^="woocommerce/"] {
	font-size: 1.125rem;
}

/* Site logo sits in line with the site title. The checkout header
   (stripped-down navbar) reuses the same logo sizing. */
.kkh-header .kkh-site-logo,
.kkh-checkout-header .kkh-site-logo {
	display: inline-flex;
	align-items: center;
}

.kkh-header .kkh-site-logo img,
.kkh-checkout-header .kkh-site-logo img {
	display: block;
	height: auto;
	max-height: 2.75rem;
	width: auto;
}

/* Currency switcher: a quiet dropdown beside the navigation —
   informative, not a call to action. Global (not in woocommerce.css)
   because product cards render outside WooCommerce pages too. */
.kkh-currency-select {
	padding: 0.375rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--sm, 6px);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
}

.kkh-currency-select:hover,
.kkh-currency-select:focus-visible {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* On phones the header row is full (logo, menu, account, cart), so the
   switcher moves into the content beside the prices instead: the header
   dropdown hides and the inline instances show. Same breakpoint as the
   navigation's burger. */
/* Doubled class beats the layout stylesheet's flex display rule,
   which would otherwise keep the inline switcher visible on desktop. */
.kkh-currency-inline.kkh-currency-inline {
	display: none;
}

@media (max-width: 600px) {
	.kkh-currency-inline.kkh-currency-inline {
		display: flex;
	}

	.kkh-header .kkh-currency-select {
		display: none;
	}
}

/* Price display: every enabled currency is in the markup, one visible.
   AUD shows by default (and with no JS); the estimates keep the
   lighter weight to mark them as such. */
.kkh-aud,
.kkh-usd,
.kkh-mmk {
	display: none;
}

body:not(.kkh-currency-usd):not(.kkh-currency-mmk) .kkh-aud,
body.kkh-currency-usd .kkh-usd,
body.kkh-currency-mmk .kkh-mmk {
	display: inline;
}

.kkh-usd,
.kkh-mmk {
	color: var(--wp--preset--color--muted);
}

/* Root-level alignwide blocks cap at the wide size. WordPress omits this
   rule when the template root is not a constrained container, and the
   flex column plus auto margins can shrink short blocks below the cap. */
.wp-site-blocks > .alignwide {
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
	margin-left: auto;
	margin-right: auto;
}

/* Same bar look as the main header: solid ground and a bottom rule, so
   the checkout page's stripped-down navbar doesn't float without a line. */
.kkh-checkout-header {
	background: var(--wp--preset--color--background);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Public contact details (Site Identity settings): the footer renders
   them on every page, outside the page-scoped Contact stylesheet, so
   their layout lives in the global sheet. */
.kkh-contact-details,
.kkh-contact-details ul,
ul.kkh-contact-details {
	list-style: none;
	list-style-type: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.kkh-contact-details li,
ul.kkh-contact-details li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kkh-contact-details__line {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	white-space: pre-line;
}

.kkh-contact-details__icon {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.15em;
	color: var(--wp--preset--color--primary);
}

.kkh-contact-details a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.kkh-contact-details a:hover,
.kkh-contact-details a:focus-visible {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

/* Cream on the green footer background; a breather under the
   "Contact" heading, which otherwise sits on the first line. */
.kkh-footer .kkh-contact-details {
	color: var(--wp--preset--color--background);
	margin-top: var(--wp--preset--spacing--30);
}

.kkh-footer .kkh-contact-details a {
	color: var(--wp--preset--color--background);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.kkh-footer .kkh-contact-details__icon {
	color: var(--wp--preset--color--background);
}

/* Social links. */
.kkh-social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.is-content-justification-center .kkh-social-links {
	justify-content: center;
}

.kkh-social-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--round);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink);
}

.kkh-social-links .kkh-social-icon {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
}

.kkh-social-links a:hover,
.kkh-social-links a:focus-visible {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

/* Inside the green footer everything is cream: the global link color is
   the same green as this background, so every element sets it explicitly. */
.kkh-footer,
.kkh-footer h2,
.kkh-footer p,
.kkh-footer a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--background);
}

/* Footer band padding lives here because WordPress drops top/bottom-only
   padding on root-level groups. The footer's outer group is a plain flow
   group with no layout, so it gets no has-global-padding either — the
   root side padding is applied by hand. */
.kkh-footer {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--40);
	padding-left: var(--wp--style--root--padding-left);
	padding-right: var(--wp--style--root--padding-right);
}

/* The same drop hits the main content region on archive and single
   templates, so their declared padding is replaced here. Side padding
   comes from has-global-padding (the root padding), which insets every
   section on narrow screens where the wide size overflows. */
main.wp-block-group {
	padding-bottom: var(--wp--preset--spacing--50);
}

.kkh-footer h2 {
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.kkh-footer .wp-block-navigation {
	font-size: var(--wp--preset--font-size--small);
}

/* Store-policy links sit one quiet step below the main footer links. */
.kkh-footer .kkh-footer-legal {
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	opacity: 0.85;
}

/* The developer credit: plain cream text, no underline even on hover. */
.kkh-credit a {
	text-decoration: none;
}

.kkh-credit a:hover,
.kkh-credit a:focus-visible {
	text-decoration: none;
	color: var(--wp--preset--color--background);
}

.kkh-footer .kkh-social-links a {
	border-color: var(--wp--preset--color--border);
}

.kkh-footer a:not(.wp-block-button__link):hover,
.kkh-footer a:not(.wp-block-button__link):focus-visible {
	text-decoration: underline;
}

/* Outline button variant. */
.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border: 1px solid currentColor;
}

.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
}

/* Search forms. */
.wp-block-search__button {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	border-radius: var(--wp--preset--border-radius--sm);
}

/* Media: never overflow the viewport. */
img,
video {
	max-width: 100%;
	height: auto;
}

/* Mini cart line-item photos: the drawer opens on every page, outside
   both the .woocommerce wrapper and the page-scoped WooCommerce
   stylesheet, so its rounding lives in the global sheet. */
.wc-block-mini-cart__drawer table.wc-block-cart-items .wc-block-cart-item__image img {
	border-radius: 6px;
}

/* Motion preferences. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}