/*
Theme Name: Ethio Souvenirs
Theme URI: https://ethiosouvenir.test/
Author: Ethio Souvenirs Ltd
Description: Block theme for Ethio Souvenirs Ltd: authentic handmade Ethiopian goods. No page builder; WooCommerce blocks throughout.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ethio-souvenir
Tags: block-patterns, full-site-editing, e-commerce, wide-blocks
*/

/* What theme.json can't express. Keep this file small. */

:root {
	--es-ease-out: var(--wp--custom--ease--out);
	--es-radius: var(--wp--custom--radius--control);
}

/* Browser surfaces */
::selection { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
html { accent-color: var(--wp--preset--color--contrast); scroll-padding-top: 6rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--brass);
	outline-offset: 3px;
	border-radius: 2px;
}
:where(a) { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p, li) { text-wrap: pretty; }
.wc-block-components-product-price,
.woocommerce-Price-amount,
.wp-block-woocommerce-product-price,
table { font-variant-numeric: tabular-nums; }

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	padding: 0.75rem 1rem;
	z-index: 100000;
}

/* Press feedback (better-ui: 0.96, transition only what changes) */
.wp-element-button,
.wp-block-button__link,
.wc-block-components-button {
	transition-property: scale, background-color, border-color, color;
	transition-duration: 160ms, 150ms, 150ms, 150ms;
	transition-timing-function: var(--es-ease-out), ease, ease, ease;
}
.wp-element-button:active,
.wp-block-button__link:active,
.wc-block-components-button:not(:disabled):active { scale: 0.96; }

/* Outline button: ink or Addis green */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 1px solid currentColor;
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.wp-block-button.is-style-outline.is-gift > .wp-block-button__link { color: var(--wp--preset--color--gift); }
.wp-block-button.is-style-outline.is-gift > .wp-block-button__link:hover {
	background: var(--wp--preset--color--gift);
	border-color: var(--wp--preset--color--gift);
	color: var(--wp--preset--color--base);
}

/* Product imagery: every photo sits in a stone well with a hairline outline */
.wc-block-components-product-image,
.wp-block-woocommerce-product-image,
.es-well {
	background: var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius--surface);
	overflow: hidden;
}
.wc-block-components-product-image img,
.wp-block-woocommerce-product-image img,
.es-well img {
	mix-blend-mode: multiply;
	outline: 1px solid oklch(0 0 0 / 0.1);
	outline-offset: -1px;
	border-radius: inherit;
}
.wc-block-components-product-image img,
.wp-block-woocommerce-product-image img {
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: contain; /* the 4:5 frame already carries the margin */
	outline: none;
}
.wp-block-woocommerce-product-image { outline: 1px solid oklch(0 0 0 / 0.06); outline-offset: -1px; }

/* Product grid cards: quiet, left-aligned */
.wc-block-product-template .wc-block-product { text-align: left; gap: 0; }
.wc-block-product .wp-block-post-title { margin-top: var(--wp--preset--spacing--30); margin-bottom: 0.25rem; }
.wc-block-product .wp-block-post-title a:hover { color: var(--wp--preset--color--brass); }
.wc-block-product .wp-block-woocommerce-product-price { color: var(--wp--preset--color--muted); }

/* Add-to-cart icon: sits to the right of the name and price on every product card.
   The link keeps WooCommerce's "Add to cart: <product>" aria-label; the visible text is hidden. */
:is(.wc-block-product, .wp-block-post-template > li):has(.es-cart-icon) {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 0.75rem;
	align-content: start;
}
:is(.wc-block-product, .wp-block-post-template > li):has(.es-cart-icon) > * { grid-column: 1; }
:is(.wc-block-product, .wp-block-post-template > li):has(.es-cart-icon) > .wp-block-woocommerce-product-image { grid-column: 1 / -1; }
.es-cart-icon.wp-block-button {
	grid-column: 2 !important;
	grid-row: 2 / span 3;
	align-self: start;
	margin: var(--wp--preset--spacing--30) 0 0 !important;
	width: auto !important;
}
.es-cart-icon .wp-block-button__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 44px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid #BDB6AC;
	border-radius: var(--es-radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-size: 0 !important;
	transition-property: scale, background-color, border-color, color;
	transition-duration: 160ms, 150ms, 150ms, 150ms;
	transition-timing-function: var(--es-ease-out), ease, ease, ease;
}
.es-cart-icon .wp-block-button__link > span {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
/* Bag-plus icon, recoloured through currentColor */
.es-cart-icon .wp-block-button__link::before {
	content: "";
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 6.5h11l-.8 10H5.3z'/%3E%3Cpath d='M7.5 6.5V5.5a2.5 2.5 0 0 1 5 0v1'/%3E%3Cpath d='M10 9.5v4M8 11.5h4'/%3E%3C/svg%3E") center / 20px no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 6.5h11l-.8 10H5.3z'/%3E%3Cpath d='M7.5 6.5V5.5a2.5 2.5 0 0 1 5 0v1'/%3E%3Cpath d='M10 9.5v4M8 11.5h4'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.es-cart-icon .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.es-cart-icon .wp-block-button__link:active { scale: 0.96; }
/* Added: filled ink with a check (static cue as well as the colour change) */
.es-cart-icon .wp-block-button__link.added,
.es-cart-icon .wp-block-button__link[aria-pressed="true"] {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.es-cart-icon .wp-block-button__link.added::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 10.5 3.5 3.5L15 7'/%3E%3C/svg%3E");
	        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 10.5 3.5 3.5L15 7'/%3E%3C/svg%3E");
}
.es-cart-icon .wp-block-button__link.loading { opacity: 0.6; }
.es-cart-icon .wp-block-button__link.loading::after,
.es-cart-icon .added_to_cart { display: none !important; }

/* Hero slider: native scroll-snap row; hero-slider.js adds the controls */
.es-hero-slider .wc-block-product-template {
	position: relative; /* contains absolutely positioned slide parts so they don't widen the page */
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
.es-hero-slider .wc-block-product-template::-webkit-scrollbar { display: none; }
.es-hero-slider .wc-block-product-template:focus-visible { outline-offset: 4px; }
.es-hero-slider .wc-block-product {
	flex: 0 0 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	scroll-snap-align: start;
}
.es-slider-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: var(--wp--preset--spacing--30);
}
.es-slider-dots { display: flex; }
.es-slider-dot {
	position: relative;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.es-slider-dot::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 6px;
	border-radius: 3px;
	background: #BDB6AC;
	translate: -50% -50%;
	/* Grow from a 6px dot to an 18px bar without animating layout */
	clip-path: inset(0 6px round 3px);
	transition: clip-path 200ms var(--es-ease-out), background-color 150ms ease;
}
.es-slider-dot[aria-current="true"]::after { clip-path: inset(0 0 round 3px); background: var(--wp--preset--color--contrast); }
.es-slider-arrows { display: flex; gap: 0.5rem; }
.es-slider-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--es-radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition-property: scale, border-color;
	transition-duration: 160ms, 150ms;
	transition-timing-function: var(--es-ease-out), ease;
}
.es-slider-arrow:hover { border-color: var(--wp--preset--color--contrast); }
/* Pause/play: both icons stay in the DOM and cross-fade (better-ui contextual icon values) */
.es-slider-toggle { position: relative; }
.es-slider-toggle .es-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition-property: opacity, scale, filter;
	transition-duration: 200ms;
	transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
.es-slider-toggle .es-icon-play svg { translate: 1px 0; } /* optical centring of the triangle */
.es-slider-toggle[data-state="playing"] .es-icon-play,
.es-slider-toggle[data-state="paused"] .es-icon-pause {
	opacity: 0;
	scale: 0.25;
	filter: blur(4px);
}
.es-slider-arrow:active { scale: 0.96; }

/* Category index (home) */
.es-category-index .wc-block-product-categories-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}
.es-category-index .wc-block-product-categories-list-item {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
	margin: 0;
}
.es-category-index .wc-block-product-categories-list-item a {
	flex: 1;
	padding: 1rem 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	text-decoration: none;
	transition: color 150ms ease;
}
.es-category-index .wc-block-product-categories-list-item a:hover { color: var(--wp--preset--color--brass); }
.es-category-index .wc-block-product-categories-list-item-count {
	margin-left: auto;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.es-category-index .wc-block-product-categories-list-item-count::before,
.es-category-index .wc-block-product-categories-list-item-count::after { content: ""; }
.es-category-index .wc-block-product-categories-list--depth-1 { display: none; }

/* Footer */
footer .wp-block-list { list-style: none; }
footer .wp-block-list a,
footer p a { text-decoration-color: var(--wp--preset--color--line); }
.es-legal a + a { margin-left: 1.25rem; }

/* Product page */
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery .flex-viewport {
	background: var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius--surface);
}
.woocommerce-product-gallery__image img { mix-blend-mode: multiply; }
.woocommerce-product-gallery .flex-control-thumbs img { background: var(--wp--preset--color--stone); border-radius: 2px; }
.wp-block-woocommerce-add-to-cart-form form.cart { display: flex; gap: 0.5rem; align-items: stretch; }
.wp-block-woocommerce-add-to-cart-form .quantity .qty {
	height: 100%;
	min-height: 46px;
	width: 4rem;
	border: 1px solid #BDB6AC;
	border-radius: var(--es-radius);
	font: inherit;
	text-align: center;
}
.wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button { flex: 1; max-width: 20rem; }

/* Related products: two up on phones */
@media (max-width: 781px) {
	.wp-block-woocommerce-related-products .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Gallery: the object leads the page */
.woocommerce .wp-block-woocommerce-product-image-gallery { max-width: none; }
.wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}
.woocommerce div.product div.images .woocommerce-product-gallery__trigger,
.woocommerce-product-gallery__trigger {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 9;
	width: 44px;
	height: 44px;
	border-radius: var(--es-radius);
	background: var(--wp--preset--color--base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23161412' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='m12.5 12.5 4.5 4.5M8.5 6.5v4M6.5 8.5h4'/%3E%3C/svg%3E") no-repeat center;
	font-size: 0 !important;
	text-indent: -9999px;
	overflow: hidden;
}
.woocommerce div.product div.images .woocommerce-product-gallery__trigger::before,
.woocommerce div.product div.images .woocommerce-product-gallery__trigger::after,
.woocommerce-product-gallery__trigger::before,
.woocommerce-product-gallery__trigger::after,
.woocommerce-product-gallery__trigger img { display: none !important; }
.woocommerce-product-gallery { position: relative; }

/* Sale: carried by the struck-through price */
.wc-block-product .wp-block-woocommerce-product-price ins,
.es-product-summary .wp-block-woocommerce-product-price ins { color: var(--wp--preset--color--brass); text-decoration: none; }
.wc-block-product .wp-block-woocommerce-product-price:has(+ .es-gift-tag) { margin-bottom: 0 !important; }
.es-gift-tag,
.wc-block-product .es-gift-tag { margin: 0.25rem 0 0 !important; }

/* Selects (catalog sorting) */
.woocommerce-ordering select,
.wc-block-catalog-sorting select {
	appearance: none;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--es-radius);
	padding: 0.5rem 2.25rem 0.5rem 0.75rem;
	font: inherit;
	color: inherit;
	background: var(--wp--preset--color--base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23161412' stroke-width='1.5'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
	cursor: pointer;
}

/* Header */
.es-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.es-header .wp-block-site-logo img { width: auto; max-height: 52px; }
.es-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40);
}
.es-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.25rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
}
.es-header .wc-block-mini-cart__badge {
	font-size: 0.6875rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.es-header :where(.wc-block-mini-cart__button, .wp-block-woocommerce-customer-account a) {
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.es-announcement a { color: inherit; }
@media (max-width: 599px) {
	/* Hamburger sits at the far left, before the logo */
	.es-header .wp-block-navigation { order: -1; }
	.es-header .alignwide > .wp-block-group:first-child { gap: 0.75rem; }
}

/* Sticky header (Appearance › Theme options) */
.es-sticky-header .es-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}

/* Centered header variant */
.es-header--centered .wp-block-site-logo { display: flex; justify-content: center; }
.es-header--centered .wp-block-site-logo img { max-height: 64px; }
@media (max-width: 781px) {
	.es-header--centered .wp-block-navigation { justify-content: flex-start; }
}

/* Plain link lists (mega menu panels) */
.es-plain-list { list-style: none; padding: 0; margin: 0; }
.es-plain-list a { text-decoration: none; }
.es-plain-list a:hover { text-decoration: underline; }

/* Mega menu: a navigation item whose panel spans the header width */
.es-header { position: relative; }
.es-header .wp-block-navigation,
.es-header .wp-block-navigation__container,
.es-header .wp-block-navigation__responsive-container:not(.is-menu-open),
.es-header .wp-block-navigation__responsive-close,
.es-header .wp-block-navigation__responsive-dialog,
.es-header .wp-block-navigation__responsive-container-content,
.es-header .wp-block-group:has(> .wp-block-navigation),
.es-header .alignwide:has(.wp-block-navigation),
.es-mega-menu { position: static !important; }
.es-mega-menu__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.es-mega-menu__chevron { transition: rotate 200ms var(--es-ease-out); }
.es-mega-menu.is-open .es-mega-menu__chevron { rotate: 180deg; }
.es-mega-menu__toggle:hover > span { color: var(--wp--preset--color--brass); }
.es-mega-menu__panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 40;
	background: var(--wp--preset--color--base);
	border-top: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 16px 32px -16px rgb(22 20 18 / 0.18);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	text-align: left;
	/* Closed: soft exit */
	opacity: 0;
	translate: 0 -4px;
	visibility: hidden;
	transition: opacity 150ms ease-out, translate 150ms ease-out, visibility 0s linear 150ms;
}
.es-mega-menu.is-open .es-mega-menu__panel {
	opacity: 1;
	translate: 0 0;
	visibility: visible;
	transition: opacity 200ms var(--es-ease-out), translate 200ms var(--es-ease-out), visibility 0s;
}
.es-mega-menu__inner { padding-inline: clamp(1rem, 4vw, 2.5rem); }
.es-mega-menu__inner h2 {
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--muted);
	font-weight: 550;
}
.es-mega-menu__inner .es-category-index .wc-block-product-categories-list-item a { font-size: var(--wp--preset--font-size--medium); padding: 0.5rem 0; }
.es-mega-feature .wc-block-product-template { gap: var(--wp--preset--spacing--30); }
/* In the mobile overlay the panel opens inline, as an accordion */
.wp-block-navigation__responsive-container.is-menu-open .es-mega-menu { flex-direction: column; align-items: flex-start; width: 100%; }
.wp-block-navigation__responsive-container.is-menu-open .es-mega-menu__panel {
	position: static;
	display: none;
	box-shadow: none;
	border: 0;
	translate: none;
	width: 100%;
	font-family: var(--wp--preset--font-family--body);
}
.wp-block-navigation__responsive-container.is-menu-open .es-mega-menu.is-open .es-mega-menu__panel { display: block; }
.wp-block-navigation__responsive-container.is-menu-open .es-mega-menu__inner { padding-inline: 0; }
.wp-block-navigation__responsive-container.is-menu-open .es-mega-menu__inner .wp-block-group { padding-block: var(--wp--preset--spacing--30) !important; }
.wp-block-navigation__responsive-container.is-menu-open .es-mega-feature { display: none; }
.wp-block-navigation__responsive-container.is-menu-open .es-mega-menu__inner .wp-block-columns { gap: var(--wp--preset--spacing--40); }

/* Header search: an icon button that expands into one bordered field with the icon inside */
.es-header .wp-block-search__inside-wrapper {
	align-items: center;
	padding: 0 !important;
	border: 1px solid transparent !important;
	border-radius: var(--es-radius);
	background: var(--wp--preset--color--base);
	transition: border-color 150ms ease, box-shadow 150ms ease;
}
.es-header .wp-block-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper { border-color: #BDB6AC !important; }
.es-header .wp-block-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--contrast) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--contrast);
}
.es-header .wp-block-search__input {
	height: 42px;
	min-width: 0;
	margin: 0;
	padding: 0 0 0 0.75rem !important;
	border: 0 !important;
	background: transparent;
	font-size: var(--wp--preset--font-size--small);
}
.es-header .wp-block-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-right: 0.25rem;
	background: var(--wp--preset--color--muted);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='m4 4 8 8M12 4l-8 8'/%3E%3C/svg%3E") center / 16px no-repeat;
	cursor: pointer;
}
.es-header .wp-block-search__input:focus,
.es-header .wp-block-search__input:focus-visible { outline: none; } /* the field border shows focus */
.es-header .wp-block-search__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 42px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--wp--preset--color--contrast) !important;
}
.es-header .wp-block-search__button:hover { color: var(--wp--preset--color--brass) !important; }
.es-header .wp-block-search__button svg { width: 20px; height: 20px; min-width: 20px; fill: currentColor; }
/* Live search results */
.es-header .wp-block-search { position: relative; }
.es-live-search {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	z-index: 45;
	width: min(420px, calc(100vw - 2rem));
	max-height: min(70vh, 560px);
	overflow-y: auto;
	padding: 0.375rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 8px; /* concentric: 4px items + 4px padding */
	background: var(--wp--preset--color--base);
	box-shadow: 0 16px 32px -16px rgb(22 20 18 / 0.18);
	text-align: left;
	transition: opacity 150ms var(--es-ease-out), translate 150ms var(--es-ease-out);
	@starting-style { opacity: 0; translate: 0 -4px; }
}
.es-live-search[hidden] { display: none; }
.es-live-search__list { margin: 0; padding: 0; list-style: none; }
.es-live-search__list > li { display: flex; align-items: center; gap: 0.5rem; border-radius: var(--es-radius); }
.es-live-search__list > li[aria-selected="true"] { background: var(--wp--preset--color--stone); }
.es-live-search__item {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
	padding: 0.375rem;
	color: inherit;
	text-decoration: none;
}
.es-live-search__cart { flex: none; margin-right: 0.375rem; }
.es-live-search__thumb {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 2px;
	background: var(--wp--preset--color--stone);
	overflow: hidden;
}
.es-live-search__thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.es-live-search__text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.35; }
.es-live-search__name {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}
.es-live-search__price {
	flex: none;
	margin-left: auto;
	padding-left: 0.5rem;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}
.es-live-search__gift { color: var(--wp--preset--color--gift); font-size: var(--wp--preset--font-size--x-small); font-weight: 600; }
.es-live-search__message { margin: 0; padding: 0.75rem 0.5rem; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.es-live-search__message[hidden], .es-live-search__foot [hidden] { display: none; }
.es-live-search__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-top: 0.375rem;
	padding: 0.625rem 0.5rem 0.375rem;
	border-top: 1px solid var(--wp--preset--color--line);
}
.es-live-search__foot:not(:has(> a:not([hidden]))) { display: none; }
.es-live-search__foot a {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 550;
}
.es-live-search__foot a:hover { color: var(--wp--preset--color--brass); }
.es-live-search__view-cart { margin-left: auto; }

@media (max-width: 599px) {
	.es-live-search { left: 0; right: 0; width: auto; }
	/* Open search covers the header row instead of squeezing it */
	.es-header .wp-block-search:not(.wp-block-search__searchfield-hidden) {
		position: absolute;
		top: 50%;
		left: clamp(1rem, 4vw, 2.5rem);
		right: clamp(1rem, 4vw, 2.5rem);
		z-index: 30;
		translate: 0 -50%;
	}
	.es-header .wp-block-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper { width: 100% !important; }
}

/* Search field */
.wp-block-search__input,
.wc-block-product-search .wc-block-product-search__field {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--es-radius);
	padding: 0.625rem 0.875rem;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
}

/* Forms (checkout, account, contact) */
:where(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea) {
	border-radius: var(--es-radius);
}
.wc-block-components-text-input input,
.wc-block-components-select select,
.wc-blocks-components-select__select,
.wc-block-components-textarea {
	border-color: #BDB6AC !important;
}
.wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus {
	border-color: var(--wp--preset--color--contrast) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--contrast) !important;
}
.wc-block-components-button:not(.is-link) { border-radius: var(--es-radius); }

/* Mini-cart drawer: the one authored motion. Enters with a strong ease-out, exits softer. */
.wc-block-mini-cart__drawer .components-modal__frame {
	box-shadow: var(--wp--preset--shadow--drawer);
	transition: translate 280ms var(--es-ease-out), opacity 200ms ease-out;
	@starting-style { translate: 24px 0; opacity: 0; }
}
.wc-block-components-drawer__screen-overlay { transition: background-color 200ms ease-out; }

/* Order summary savings: plain brass text, not a chip */
.wc-block-components-order-summary-item .wc-block-components-sale-badge {
	background: none;
	border: 0;
	padding: 0;
	color: var(--wp--preset--color--brass);
	font-weight: 550;
}

/* Store notices */
.wc-block-components-notice-banner { border-radius: var(--es-radius); font-size: var(--wp--preset--font-size--small); }

/* Details (product tabs replacement, FAQ) */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding-block: 1rem; }
.wp-block-details summary { cursor: pointer; font-weight: 550; list-style-position: outside; }

/* Page content: pull quote and promise list (About) */
.wp-block-pullquote {
	border: 0;
	border-block: 1px solid var(--wp--preset--color--line);
	padding: var(--wp--preset--spacing--50) 0;
	margin-block: var(--wp--preset--spacing--50);
	text-align: left;
}
.wp-block-pullquote blockquote p {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.25;
}
.es-promise-list { list-style: none; padding: 0; }
.es-promise-list li { padding-block: 0.875rem; border-top: 1px solid var(--wp--preset--color--line); }
.es-promise-list li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-post-content :where(h2) { margin-top: var(--wp--preset--spacing--50); }

/* Forms (Ethio Forms block; its own stylesheet reads the theme presets) */
a[href^="tel:"] { white-space: nowrap; }

/* Contact page: FAQ disclosures */
.es-faq .wp-block-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	list-style: none;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 450;
	padding-block: 0.25rem;
}
.es-faq .wp-block-details summary::-webkit-details-marker { display: none; }
/* Plus that turns into a minus when open */
.es-faq .wp-block-details summary::after {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M4 10h12M10 4v12'/%3E%3C/svg%3E") center / 20px no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M4 10h12M10 4v12'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.es-faq .wp-block-details[open] summary::after {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M4 10h12'/%3E%3C/svg%3E");
	        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M4 10h12'/%3E%3C/svg%3E");
}
.es-faq .wp-block-details { border-top: 0; }
.es-faq .wp-block-details:first-of-type { border-top: 1px solid var(--wp--preset--color--line); }
.es-faq .wp-block-details > p { color: var(--wp--preset--color--muted); margin-top: 0.5rem; }
.es-contact-card { border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--30); }

/* Share buttons (product page) */
.es-share {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--small);
}
.es-share__label { font-weight: 550; }
.es-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.25rem;
	margin: 0 0 0 -0.5rem; /* every row lines up with the label, not just the first */
	padding: 0;
	list-style: none;
}
.es-share__item {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.5rem;
	border: 0;
	background: none;
	color: var(--wp--preset--color--muted);
	font: inherit;
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--line);
	text-underline-offset: 0.25em;
	cursor: pointer;
	transition: color 150ms ease, text-decoration-color 150ms ease;
}
.es-share__item:hover { color: var(--wp--preset--color--contrast); text-decoration-color: currentColor; }
.es-share__copy.is-copied { color: var(--wp--preset--color--gift); text-decoration: none; }

/* Addis gift path marker */
.es-gift-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	color: var(--wp--preset--color--gift);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	.wp-element-button:active,
	.wp-block-button__link:active,
	.wc-block-components-button:active { scale: none; }
}

/* Checkout summary: name, price and quantity are enough */
.wc-block-checkout .wc-block-components-order-summary-item .wc-block-components-product-metadata__description { display: none; }

/* Pasted content (policy pages): long links wrap, wide tables scroll inside the column */
.wp-block-post-content { overflow-wrap: break-word; }
.wp-block-post-content a { overflow-wrap: anywhere; }
.wp-block-post-content > table { display: block; max-width: 100%; overflow-x: auto; }
