/*
 * Ayancheri Theme: site styles beyond theme.json.
 * Design: Apple-like restraint (space, big imagery, few colours) with a farm palette (DECISIONS.md D6).
 * All colours come from theme.json tokens: --wp--preset--color--*.
 */

:root {
	--ayf-paper: var(--wp--preset--color--paper);
	--ayf-cream: var(--wp--preset--color--cream);
	--ayf-ink: var(--wp--preset--color--ink);
	--ayf-ink-soft: var(--wp--preset--color--ink-soft);
	--ayf-leaf: var(--wp--preset--color--leaf);
	--ayf-leaf-light: var(--wp--preset--color--leaf-light);
	--ayf-soil: var(--wp--preset--color--soil);
	--ayf-line: var(--wp--preset--color--line);
	--ayf-r-s: var(--wp--custom--radius--small);
	--ayf-r-m: var(--wp--custom--radius--medium);
	--ayf-r-l: var(--wp--custom--radius--large);
	--ayf-ease: cubic-bezier(.2, .7, .2, 1);
	--ayf-focus: 0 0 0 3px var(--ayf-paper), 0 0 0 6px var(--ayf-soil);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3, h4 { font-variation-settings: "opsz" 96, "SOFT" 50; text-wrap: balance; }
p { text-wrap: pretty; }
em { font-style: italic; }
/* Highlighted words in headlines: leaf green, upright (saves downloading a separate italic font on phones). */
h1 em, h2 em { color: var(--ayf-leaf); font-style: normal; font-weight: 400; }
::selection { background: var(--ayf-leaf-light); }

/* Visible focus everywhere (keyboard users). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--ayf-soil);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; position: fixed; top: 8px; left: 8px; z-index: 100000; background: var(--ayf-paper); padding: .75rem 1rem; }

/* ------------------------------------------------------------- Header */
.ayf-header {
	position: sticky; top: 0; z-index: 50;
	border-bottom: 1px solid color-mix(in srgb, var(--ayf-line) 70%, transparent);
}
/* The frosted glass sits on a layer behind the header. On the header itself, "backdrop-filter" would trap
   the full-screen phone menu inside the header bar (it becomes the menu's frame). */
.ayf-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: color-mix(in srgb, var(--ayf-paper) 82%, transparent);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	backdrop-filter: saturate(180%) blur(18px);
}
.admin-bar .ayf-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ayf-header { top: 0; } }
.ayf-header__bar { min-height: var(--wp--custom--header-height); align-items: center; gap: 1rem; }
.ayf-header .wp-block-site-title { margin: 0; white-space: nowrap; }
.ayf-header__nav { gap: 1.25rem; align-items: center; }
.ayf-header__nav > * { margin: 0 !important; display: flex; align-items: center; }
.ayf-header .wp-block-navigation__responsive-container-open { margin: 0; padding: 10px; align-self: center; }
.woocommerce-form-login__submit, .woocommerce-ResetPassword .button { background: var(--ayf-leaf) !important; color: var(--ayf-paper) !important; border-color: var(--ayf-leaf) !important; padding-inline: 2rem !important; }
@media (max-width: 599px) {
	.ayf-header__nav { gap: .25rem; }
	.ayf-header__nav .wp-block-navigation { order: 3; } /* menu button last, like most phone apps */
	.ayf-header .wp-block-site-title { font-size: 1.125rem; }
}
.ayf-header .wp-block-navigation a { color: var(--ayf-ink); opacity: .82; transition: opacity .2s; }
.ayf-header .wp-block-navigation a:hover { opacity: 1; }
.ayf-header .wc-block-mini-cart__button,
.ayf-header .wc-block-customer-account a { color: var(--ayf-ink); padding: .5rem; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.ayf-account { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--ayf-ink); }
.ayf-bag { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--ayf-ink); text-decoration: none; }
.ayf-bag__count {
	position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
	background: var(--ayf-leaf); color: var(--ayf-paper); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-sizing: border-box;
}
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; justify-content: center; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1rem 1.5rem 2rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding: 4.5rem 1.5rem 2rem !important; align-items: stretch; box-sizing: border-box; width: 100%; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: stretch; gap: 0; width: 100%; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid var(--ayf-line); }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding: .6rem 0 !important; text-align: left; line-height: 1.25; }
body:has(.wp-block-navigation__responsive-container.is-menu-open) .ayf-whatsapp { display: none; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: var(--wp--preset--font-family--serif); font-size: 1.5rem; }

/* -------------------------------------------------------------- Shared */
.ayf-main { min-height: 50vh; }
.ayf-section { padding-block: var(--wp--preset--spacing--50); }
.ayf-band { margin-block: 0; }
.ayf-section__head { margin-bottom: var(--wp--preset--spacing--30); gap: .5rem 2rem; }
.ayf-section__head h2 { margin: 0; }
.ayf-eyebrow {
	font-size: var(--wp--preset--font-size--small); font-weight: 600; letter-spacing: .08em;
	text-transform: uppercase; color: var(--ayf-soil); margin-bottom: .75rem;
}
.ayf-lede { color: var(--ayf-ink-soft); }
.has-leaf-background-color .ayf-lede { color: color-mix(in srgb, var(--ayf-paper) 82%, transparent); }
.ayf-more a, .is-style-ayf-link .wp-block-button__link {
	color: var(--ayf-leaf); text-decoration: none; font-weight: 500;
}
.ayf-more a::after, .is-style-ayf-link .wp-block-button__link::after { content: "\203A"; display: inline-block; margin-left: .3em; transition: transform .2s var(--ayf-ease); }
.ayf-more a:hover::after, .is-style-ayf-link .wp-block-button__link:hover::after { transform: translateX(3px); }
.is-style-ayf-link .wp-block-button__link { background: transparent !important; padding-inline: .25rem; }
.is-style-ayf-link .wp-block-button__link:hover { text-decoration: underline; }
.wp-element-button, .wp-block-button__link { transition: background-color .2s, transform .2s var(--ayf-ease); min-height: 44px; }
.wp-block-button__link:active { transform: scale(.98); }

/* ---------------------------------------------------------------- Hero */
.ayf-hero .ayf-hero__title { margin-block: .25rem .75rem; }
.ayf-hero .ayf-lede { max-width: 34ch; margin-inline: auto; }
.ayf-hero-media { padding-bottom: var(--wp--preset--spacing--40); }
.ayf-hero__image img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--ayf-r-l); }
@media (max-width: 600px) { .ayf-hero__image img { aspect-ratio: 4 / 5; } }

/* ------------------------------------------------------- Category tiles */
.ayf-tiles {
	display: grid; gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ayf-tiles > * { margin: 0 !important; }
.ayf-tile.is-large { grid-column: span 2; }
.ayf-tile.is-large .ayf-tile__image img { aspect-ratio: 16 / 10; }
@media (min-width: 900px) {
	.ayf-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
	.ayf-tile.is-large { grid-row: span 2; }
	.ayf-tile.is-large .ayf-tile__image img { aspect-ratio: 1; }
	.ayf-tile.is-large .ayf-tile__text h3 { font-size: var(--wp--preset--font-size--x-large); }
}
@media (max-width: 599px) {
	.ayf-tile__text { padding: .75rem .9rem .9rem; }
	.ayf-tile__text h3 { font-size: 1.25rem; }
	.ayf-tile__text p { display: none; }
	.ayf-tile.is-large .ayf-tile__text p { display: block; }
}
.ayf-tile {
	position: relative; overflow: hidden; border-radius: var(--ayf-r-l);
	background: var(--ayf-cream); display: flex; flex-direction: column;
	transition: transform .35s var(--ayf-ease), box-shadow .35s var(--ayf-ease);
}
.ayf-tile:hover { transform: translateY(-3px); box-shadow: var(--wp--preset--shadow--soft); }
.ayf-tile:focus-within { box-shadow: var(--ayf-focus); }
.ayf-tile__image { margin: 0; flex: 1; }
.ayf-tile__image img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ayf-tile__text { position: absolute; inset: auto 0 0 0; padding: 1rem 1.25rem 1.25rem; background: linear-gradient(to top, color-mix(in srgb, var(--ayf-paper) 94%, transparent) 55%, transparent); }
.ayf-tile__text h3 { margin: 0; font-size: var(--wp--preset--font-size--large); }
.ayf-tile__text p { margin: .25rem 0 0; color: var(--ayf-ink-soft); font-size: var(--wp--preset--font-size--small); }
/* Whole tile is clickable via the heading link. */
.ayf-tile__text h3 a { color: var(--ayf-ink); text-decoration: none; }
.ayf-tile__text h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ayf-tile__text h3 a:focus-visible { outline: none; }

/* -------------------------------------------------------- Product cards */
.ayf-products .wc-block-product-template { gap: 1.25rem 1rem !important; }
.ayf-card { display: flex; flex-direction: column; height: 100%; position: relative; }
.ayf-card__image { position: relative; margin: 0 0 .75rem !important; border-radius: var(--ayf-r-m); overflow: hidden; background: var(--ayf-cream); }
.ayf-card__image img { border-radius: 0 !important; transition: transform .5s var(--ayf-ease); }
.ayf-card:hover .ayf-card__image img { transform: scale(1.03); }
.ayf-card .ayf-card__title { margin: 0 0 .25rem; font-weight: 500; line-height: 1.2; text-align: left; }
.ayf-card .ayf-card__price { margin: 0 0 .75rem; text-align: left; color: var(--ayf-ink-soft); font-size: var(--wp--preset--font-size--small); }
.ayf-card .ayf-card__price .amount { color: var(--ayf-ink); font-weight: 600; }
.ayf-card .ayf-card__button { margin-top: auto; text-align: left; align-items: flex-start; justify-content: flex-start; }
.ayf-card .ayf-card__button.has-text-align-center { text-align: left; }
.ayf-card .ayf-card__button .wp-block-button__link,
.ayf-card .ayf-card__button .wc-block-components-product-button__button {
	background: var(--ayf-leaf-light); color: var(--ayf-leaf); border-radius: 999px; font-size: var(--wp--preset--font-size--small);
	padding: .55rem 1.1rem; font-weight: 600; min-height: 44px; border: 0;
}
.ayf-card .ayf-card__button .wp-block-button__link:hover { background: var(--ayf-leaf); color: var(--ayf-paper); }
.ayf-card .wc-block-components-product-button__button[disabled],
.ayf-card .outofstock .wp-block-button__link { opacity: .7; }

/* Season badge (rendered by ayancheri-core on the product image). */
.ayf-badge {
	position: absolute; top: .75rem; left: .75rem; z-index: 2;
	font-size: .8125rem; font-weight: 600; letter-spacing: .01em; line-height: 1;
	padding: .45rem .7rem; border-radius: 999px;
	background: var(--ayf-paper); color: var(--ayf-leaf); box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.ayf-badge.is-off-season { background: var(--ayf-soil); color: var(--ayf-paper); }
.ayf-unit { color: var(--ayf-ink-soft); font-weight: 400; }

/* ----------------------------------------------------------- Shop pages */
.ayf-shop__head { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30); }
.ayf-shop__head h1 { margin: .5rem 0; }
.ayf-breadcrumbs, .woocommerce-breadcrumb { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
.ayf-breadcrumbs a, .woocommerce-breadcrumb a { color: var(--ayf-ink-soft); text-decoration: none; }
.ayf-breadcrumbs a:hover { color: var(--ayf-leaf); text-decoration: underline; }
.ayf-chips { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .5rem; margin-top: 1.25rem; scrollbar-width: none; }
.ayf-chips::-webkit-scrollbar { display: none; }
.ayf-chip {
	flex: none; padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--ayf-line);
	color: var(--ayf-ink); text-decoration: none; font-size: var(--wp--preset--font-size--small); background: var(--ayf-paper);
	min-height: 44px; display: inline-flex; align-items: center;
}
.ayf-chip:hover { border-color: var(--ayf-leaf); }
.ayf-chip.is-current { background: var(--ayf-ink); color: var(--ayf-paper); border-color: var(--ayf-ink); }
.ayf-shop .wp-block-query-pagination { margin-top: var(--wp--preset--spacing--40); }

/* -------------------------------------------------------- Product page */
.ayf-product { padding-top: var(--wp--preset--spacing--30); }
.ayf-product__media .woocommerce-product-gallery { border-radius: var(--ayf-r-l); overflow: hidden; background: var(--ayf-cream); }
.ayf-product__media .woocommerce-product-gallery { position: relative; }
.ayf-product__media .woocommerce-product-gallery img { border-radius: 0; }
.woocommerce-product-gallery__trigger {
	position: absolute; top: 1rem; right: 1rem; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
	background: var(--ayf-paper); box-shadow: var(--wp--preset--shadow--soft); font-size: 0 !important; text-decoration: none;
	display: inline-flex; align-items: center; justify-content: center;
}
.woocommerce-product-gallery__trigger::before {
	content: ""; width: 18px; height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.woocommerce-product-gallery__trigger img.emoji { display: none !important; }
.ayf-product__media .flex-control-thumbs { display: flex; gap: .5rem; padding: .5rem; list-style: none; margin: 0; }
.ayf-product__media .flex-control-thumbs img { border-radius: var(--ayf-r-s); cursor: pointer; opacity: .7; }
.ayf-product__media .flex-control-thumbs .flex-active { opacity: 1; }
.ayf-product__summary h1 { margin: .5rem 0 .25rem; }
.ayf-product__price { margin: 0 0 1rem; }
.ayf-product__summary .ayf-lede p { margin-top: 0; }
.ayf-product__summary .stock { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
.ayf-product__summary .stock.out-of-stock { color: var(--ayf-soil); font-weight: 600; }

/* Variation picker + add to bag */
form.cart { margin-top: 1.25rem; }
form.cart table.variations { border: 0; margin: 0 0 1rem; width: 100%; border-collapse: collapse; }
form.cart table.variations th, form.cart table.variations td { display: block; padding: 0; border: 0; text-align: left; }
form.cart table.variations th label { font-size: var(--wp--preset--font-size--small); font-weight: 600; display: block; margin-bottom: .4rem; }
/* Size tiles (functions.php + assets/js/size-tiles.js). The menu hides only once the tiles are working. */
form.ayf-has-tiles table.variations td { position: relative; }
form.ayf-has-tiles select[data-ayf-tiles] { position: absolute; left: 0; top: 0; width: 1px !important; min-width: 0 !important; max-width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
form.cart table.variations tbody, form.cart table.variations tr { display: block; width: 100%; }
.ayf-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .5rem; margin-bottom: .25rem; }
.ayf-sizes[hidden] { display: none; }
.ayf-size { position: relative; display: flex; flex-direction: column; justify-content: center; gap: .15rem; min-height: 4rem; padding: .6rem .75rem; border: 1.5px solid var(--ayf-line); border-radius: var(--ayf-r-s); background: var(--wp--preset--color--paper); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ayf-size input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ayf-size__name { font-weight: 600; line-height: 1.2; }
.ayf-size__price { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
.ayf-size:hover { border-color: var(--ayf-ink-soft); }
.ayf-size:has(input:checked) { border-color: var(--ayf-leaf); background: var(--ayf-leaf-light); box-shadow: inset 0 0 0 1px var(--ayf-leaf); }
.ayf-size:has(input:checked) .ayf-size__price { color: var(--ayf-leaf); font-weight: 600; }
.ayf-size:has(input:focus-visible) { outline: 2px solid var(--ayf-leaf); outline-offset: 2px; }
.ayf-size.is-sold-out { cursor: not-allowed; opacity: .55; background: var(--ayf-cream); }
.ayf-size.is-sold-out .ayf-size__name { text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .ayf-size { transition: none; } }
form.cart .reset_variations { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); margin-left: .5rem; }
form.cart .woocommerce-variation-price { margin-bottom: .75rem; font-size: var(--wp--preset--font-size--large); font-family: var(--wp--preset--font-family--serif); }
form.cart .quantity { display: inline-flex; margin-right: .75rem; vertical-align: middle; }
form.cart .quantity input.qty { width: 4.5rem; text-align: center; }
form.cart .single_add_to_cart_button,
.woocommerce .button.alt, .woocommerce button.button.alt, .woocommerce a.button.alt {
	background: var(--ayf-leaf); color: var(--ayf-paper); border: 0; border-radius: 999px;
	padding: .9rem 2rem; font: 500 var(--wp--preset--font-size--base)/1.2 var(--wp--preset--font-family--sans);
	min-height: 48px; cursor: pointer; transition: background-color .2s;
}
form.cart .single_add_to_cart_button:hover, .woocommerce .button.alt:hover { background: #2B5039; }
form.cart .single_add_to_cart_button.disabled { opacity: .45; cursor: not-allowed; }

/* Harvest & storage notes + PIN checker (markup from ayancheri-core). */
.ayf-notes { margin-top: 1.5rem; border-top: 1px solid var(--ayf-line); }
.ayf-notes__row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--ayf-line); font-size: var(--wp--preset--font-size--small); }
.ayf-notes__row dt { font-weight: 600; }
.ayf-notes__row dd { margin: 0; color: var(--ayf-ink-soft); }
.ayf-pin { margin-top: 1.5rem; padding: 1rem 1.1rem; border-radius: var(--ayf-r-m); background: var(--ayf-cream); }
.ayf-pin__label { display: block; font-weight: 600; font-size: var(--wp--preset--font-size--small); margin-bottom: .5rem; }
.ayf-pin__row { display: flex; gap: .5rem; }
.ayf-pin__row input { flex: 1; min-width: 0; }
.ayf-pin__row button {
	border: 1px solid var(--ayf-leaf); background: transparent; color: var(--ayf-leaf); border-radius: 999px;
	padding: 0 1.25rem; font: 600 var(--wp--preset--font-size--small)/1 var(--wp--preset--font-family--sans); min-height: 44px; cursor: pointer;
}
.ayf-pin__row button:hover { background: var(--ayf-leaf); color: var(--ayf-paper); }
.ayf-pin__result { margin: .6rem 0 0; font-size: var(--wp--preset--font-size--small); min-height: 1.4em; }
.ayf-pin__result.is-ok { color: var(--ayf-leaf); }
.ayf-pin__result.is-no { color: var(--ayf-soil); }

.ayf-product__details { margin-top: var(--wp--preset--spacing--50); }
.ayf-product__details .wc-tabs { display: flex; gap: 1.5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; border-bottom: 1px solid var(--ayf-line); overflow-x: auto; }
.ayf-product__details .wc-tabs li a { display: inline-block; padding: .75rem 0; text-decoration: none; color: var(--ayf-ink-soft); font-weight: 500; border-bottom: 2px solid transparent; }
.ayf-product__details .wc-tabs li.active a { color: var(--ayf-ink); border-color: var(--ayf-ink); }
.ayf-product__details .woocommerce-Tabs-panel > h2:first-child { display: none; }
.ayf-related { border-top: 1px solid var(--ayf-line); margin-top: var(--wp--preset--spacing--50); }

/* --------------------------------------------------------------- Forms */
.woocommerce form .form-row { margin: 0 0 1rem; padding: 0; }
.woocommerce form .form-row label, .ayf-shop-flow label { font-size: var(--wp--preset--font-size--small); font-weight: 600; margin-bottom: .35rem; display: block; color: var(--ayf-ink); }
.woocommerce form .form-row .required { color: var(--ayf-soil); text-decoration: none; }
.woocommerce form .form-row .optional { color: var(--ayf-ink-soft); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"],
textarea, select, .select2-container .select2-selection--single {
	width: 100%; box-sizing: border-box; font: 400 1rem/1.4 var(--wp--preset--font-family--sans); /* 16px stops iOS zoom */
	color: var(--ayf-ink); background: var(--wp--preset--color--white); border: 1px solid #CFC7B8; border-radius: var(--ayf-r-s);
	padding: .8rem .9rem; min-height: 48px; transition: border-color .2s, box-shadow .2s; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%231D1D1B' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ayf-leaf); box-shadow: 0 0 0 3px var(--ayf-leaf-light); }
.woocommerce form .form-row.woocommerce-invalid input.input-text, .woocommerce form .form-row.woocommerce-invalid select { border-color: var(--ayf-soil); }
.select2-container .select2-selection--single { height: auto; display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 50%; transform: translateY(-50%); right: .5rem; }
.select2-dropdown { border-color: #CFC7B8; border-radius: var(--ayf-r-s); }

/* --------------------------------------------------------------- Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
	list-style: none; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-radius: var(--ayf-r-m); border: 0;
	background: var(--ayf-leaf-light); color: var(--ayf-ink); font-size: var(--wp--preset--font-size--small);
	display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
}
.woocommerce-error { background: #F6E3DA; }
.woocommerce-error li { margin: 0; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; background: transparent; color: var(--ayf-leaf); font-weight: 600; border: 0; padding: 0; text-decoration: underline; }
.woocommerce-NoticeGroup { width: 100%; }

/* ------------------------------------------------------- Cart & checkout */
.ayf-shop-flow { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); }
.ayf-shop-flow .ayf-page__title { margin-bottom: 1.5rem; }
.ayf-checkout-note { color: var(--ayf-ink-soft); margin-top: -.75rem; margin-bottom: 2rem; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button {
	background: var(--ayf-paper); color: var(--ayf-leaf); border: 1.5px solid var(--ayf-leaf); border-radius: 999px;
	padding: .7rem 1.4rem; font: 600 var(--wp--preset--font-size--small)/1.2 var(--wp--preset--font-family--sans);
	min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.woocommerce .button:hover { background: var(--ayf-leaf); color: var(--ayf-paper); }
.woocommerce .button:disabled, .woocommerce .button.disabled { opacity: .5; }

/* Cart table becomes cards on phones */
table.shop_table { width: 100%; border-collapse: collapse; border: 0; font-size: var(--wp--preset--font-size--small); }
table.shop_table th { text-align: left; font-weight: 600; color: var(--ayf-ink-soft); padding: .75rem .5rem; border-bottom: 1px solid var(--ayf-line); }
table.shop_table td { padding: 1rem .5rem; border-bottom: 1px solid var(--ayf-line); vertical-align: middle; }
table.cart .product-thumbnail img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--ayf-r-s); background: var(--ayf-cream); }
table.cart .product-name a { color: var(--ayf-ink); font-weight: 600; text-decoration: none; font-size: var(--wp--preset--font-size--base); }
table.cart .product-name .variation { color: var(--ayf-ink-soft); margin: .25rem 0 0; }
table.cart .product-name .variation dt, table.cart .product-name .variation dd { display: inline; margin: 0; }
table.cart .product-name .variation p { display: inline; margin: 0; }
table.cart a.remove { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; color: var(--ayf-ink-soft) !important; text-decoration: none; font-size: 1.4rem; }
table.cart a.remove:hover { background: #F6E3DA; color: var(--ayf-soil) !important; }
table.cart td.actions { padding-top: 1.25rem; }
table.cart td.actions .coupon { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; float: left; }
table.cart td.actions .coupon input { width: auto; flex: 1; min-width: 10rem; }
table.cart td.actions > .button { float: right; }
.cart-collaterals { margin-top: 2rem; display: flex; justify-content: flex-end; }
.cart-collaterals .cart_totals { width: 100%; max-width: 440px; background: var(--ayf-cream); border-radius: var(--ayf-r-l); padding: 1.5rem; }
.cart_totals h2, #order_review_heading { font-size: var(--wp--preset--font-size--large); margin: 0 0 .75rem; }
.cart_totals table.shop_table th, .cart_totals table.shop_table td { border-color: color-mix(in srgb, var(--ayf-line) 80%, var(--ayf-ink) 6%); background: transparent; }
.cart_totals .order-total td, .cart_totals .order-total th, #order_review .order-total th, #order_review .order-total td { font-size: var(--wp--preset--font-size--medium); color: var(--ayf-ink); font-weight: 600; border-bottom: 0; }
#shipping_method { list-style: none; padding: 0; margin: 0; }
#shipping_method li { margin: 0 0 .35rem; }
.woocommerce-shipping-destination, .woocommerce-shipping-calculator { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
.wc-proceed-to-checkout { margin-top: 1rem; padding: 0; }
.wc-proceed-to-checkout .checkout-button { width: 100%; box-sizing: border-box; margin: 0; }
.woocommerce .button, .woocommerce a.button, .woocommerce button.button, #place_order { box-sizing: border-box; }
.woocommerce-cart .ayf-pin { max-width: 440px; margin-left: auto; margin-bottom: 1rem; box-sizing: border-box; }
.woocommerce-cart .cart-collaterals { margin-top: 0; }

@media (max-width: 768px) {
	table.cart thead { display: none; }
	table.cart tr.cart_item { display: grid; grid-template-columns: 72px 1fr auto; gap: .25rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--ayf-line); position: relative; }
	table.cart tr.cart_item td { border: 0; padding: 0; display: block; text-align: left !important; }
	table.cart tr.cart_item td::before { display: none; }
	table.cart td.product-thumbnail { grid-row: span 3; display: block !important; }
	table.cart td.product-remove { grid-column: 3; grid-row: 1; }
	table.cart td.product-name { grid-column: 2; grid-row: 1; }
	table.cart td.product-price { display: none !important; }
	table.cart td.product-quantity { grid-column: 2; }
	table.cart td.product-subtotal { grid-column: 3; grid-row: 2 / span 2; align-self: end; font-weight: 600; }
	table.cart td.actions { display: block; border: 0; }
	table.cart td.actions .coupon, table.cart td.actions > .button { float: none; width: 100%; margin-bottom: .75rem; }
	.cart-collaterals .cart_totals { max-width: none; }
}

/* Checkout: two columns on desktop, details left, order summary right */
form.checkout { display: grid; gap: 2rem; }
@media (min-width: 960px) {
	form.checkout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 3rem; }
	form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
	form.checkout #customer_details { grid-column: 1; grid-row: 2 / span 3; }
	form.checkout #order_review_heading { grid-column: 2; grid-row: 2; }
	form.checkout #order_review { grid-column: 2; grid-row: 3; position: sticky; top: calc(var(--wp--custom--header-height) + 1.5rem); }
}
#customer_details .col-1, #customer_details .col-2 { width: 100%; float: none; }
#customer_details h3 { font-size: var(--wp--preset--font-size--large); margin: 0 0 1rem; }
.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.woocommerce-billing-fields__field-wrapper > *, .woocommerce-shipping-fields__field-wrapper > * { grid-column: 1 / -1; }
.woocommerce-billing-fields__field-wrapper > .form-row-first, .woocommerce-shipping-fields__field-wrapper > .form-row-first { grid-column: 1; }
.woocommerce-billing-fields__field-wrapper > .form-row-last, .woocommerce-shipping-fields__field-wrapper > .form-row-last { grid-column: 2; }
@media (max-width: 480px) {
	.woocommerce-billing-fields__field-wrapper > .form-row-first, .woocommerce-billing-fields__field-wrapper > .form-row-last,
	.woocommerce-shipping-fields__field-wrapper > .form-row-first, .woocommerce-shipping-fields__field-wrapper > .form-row-last { grid-column: 1 / -1; }
}
.woocommerce form .form-row-first, .woocommerce form .form-row-last, .woocommerce form .form-row-wide { width: auto; float: none; }
.select2-container--default .select2-selection--single .select2-selection__rendered { padding-left: 0; color: var(--ayf-ink); line-height: 1.4; }
.select2-container { width: 100% !important; }
.woocommerce form .form-row .description { font-size: .875rem; color: var(--ayf-ink-soft); margin: .35rem 0 0; display: block !important; }
#order_review tfoot td, .cart_totals td { text-align: right; }
table.shop_table, #order_review table.shop_table, .cart_totals table.shop_table { width: 100% !important; }
#order_review table.shop_table th.product-total, #order_review table.shop_table td.product-total,
.cart_totals table.shop_table td { text-align: right; }
/* Block-based notices (e.g. "Returning customer?") in brand colours. */
.wc-block-components-notice-banner { border: 0 !important; background: var(--ayf-cream) !important; color: var(--ayf-ink) !important; border-radius: var(--ayf-r-m) !important; }
.wc-block-components-notice-banner.is-success { background: var(--ayf-leaf-light) !important; }
.wc-block-components-notice-banner.is-error { background: #F6E3DA !important; }
.wc-block-components-notice-banner > svg { background: var(--ayf-leaf) !important; fill: var(--ayf-paper) !important; }
.wc-block-components-notice-banner.is-error > svg { background: var(--ayf-soil) !important; }
.wc-block-components-notice-banner a { color: var(--ayf-leaf) !important; font-weight: 600; }
#ship-to-different-address { font-size: var(--wp--preset--font-size--base); font-family: var(--wp--preset--font-family--sans); font-weight: 500; }
#order_review { background: var(--ayf-cream); border-radius: var(--ayf-r-l); padding: 1.5rem; }
#order_review table.shop_table td, #order_review table.shop_table th { border-color: color-mix(in srgb, var(--ayf-line) 80%, var(--ayf-ink) 6%); }
#payment { margin-top: 1rem; }
#payment ul.payment_methods { list-style: none; padding: 0; margin: 0 0 1rem; }
#payment ul.payment_methods li { background: var(--ayf-paper); border-radius: var(--ayf-r-m); padding: 1rem; }
#payment ul.payment_methods li label { display: inline; font-size: var(--wp--preset--font-size--base); }
#payment .payment_box { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); margin-top: .5rem; }
#payment .payment_box p { margin: 0; }
#payment .woocommerce-privacy-policy-text { font-size: .875rem; color: var(--ayf-ink-soft); }
#payment #place_order { width: 100%; font-size: var(--wp--preset--font-size--medium); min-height: 56px; }
.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info { background: var(--ayf-cream); }
.woocommerce-checkout .woocommerce-form-coupon-toggle { display: none; } /* coupon field lives in the bag */

/* Order received */
.woocommerce-order { max-width: 760px; }
.woocommerce-thankyou-order-received { font-family: var(--wp--preset--font-family--serif); font-size: var(--wp--preset--font-size--x-large); line-height: 1.1; margin: 0 0 1.5rem; }
ul.woocommerce-order-overview { list-style: none; padding: 1.25rem; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; background: var(--ayf-cream); border-radius: var(--ayf-r-l); font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
ul.woocommerce-order-overview strong { display: block; color: var(--ayf-ink); font-size: var(--wp--preset--font-size--base); margin-top: .25rem; }
.woocommerce-customer-details address { font-style: normal; padding: 1.25rem; border: 1px solid var(--ayf-line); border-radius: var(--ayf-r-m); }

/* ----------------------------------------------------------- My account */
.woocommerce-account .woocommerce { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
.woocommerce-account .woocommerce > * { min-width: 0; } /* the scrolling tab row must not widen the page on phones */
@media (min-width: 860px) { .woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) { grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; } }
.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li { margin: 0 !important; padding: 0 !important; border: 0 !important; }
@media (max-width: 859px) { .woocommerce-MyAccount-navigation ul { flex-direction: row; overflow-x: auto; gap: .5rem; } }
.woocommerce-MyAccount-navigation a { display: flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; text-decoration: none; color: var(--ayf-ink); white-space: nowrap; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--ayf-ink); color: var(--ayf-paper); }
.woocommerce-MyAccount-navigation a:hover { background: var(--ayf-cream); }
.woocommerce-MyAccount-navigation .is-active a:hover { background: var(--ayf-ink); }
.woocommerce-MyAccount-content > p:first-child { font-size: var(--wp--preset--font-size--medium); }
.woocommerce-orders-table .button { margin: .15rem; }
.woocommerce-Addresses { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .woocommerce-Addresses { grid-template-columns: 1fr 1fr; } }
.woocommerce-Address { padding: 1.25rem; border: 1px solid var(--ayf-line); border-radius: var(--ayf-r-m); }
.woocommerce-Address address { font-style: normal; color: var(--ayf-ink-soft); }
.woocommerce-form-login, .woocommerce-form-register, .woocommerce-ResetPassword { max-width: 460px; background: var(--ayf-cream); border-radius: var(--ayf-r-l); padding: 1.75rem; }
.woocommerce-account .u-columns { display: grid; gap: 2rem; }
.woocommerce-form-login__rememberme { display: flex !important; align-items: center; gap: .5rem; font-weight: 400 !important; }
mark.order-status, mark.order-number, mark.order-date { background: transparent; font-weight: 600; color: var(--ayf-ink); }

/* --------------------------------------------- Phone login / register */
.ayf-auth { max-width: 440px; margin: 0 auto; }
.ayf-auth__title { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 .5rem; }
.ayf-auth__lede, .ayf-auth__hint { color: var(--ayf-ink-soft); margin: 0 0 1.25rem; }
.ayf-auth__hint { font-size: var(--wp--preset--font-size--small); }
.ayf-auth__tabs { display: flex; gap: .25rem; padding: .25rem; margin: 1rem 0 1.5rem; background: var(--ayf-cream); border-radius: 999px; }
.ayf-auth__tabs a { flex: 1; text-align: center; padding: .6rem .75rem; border-radius: 999px; text-decoration: none; color: var(--ayf-ink-soft); font-weight: 600; font-size: var(--wp--preset--font-size--small); min-height: 44px; display: flex; align-items: center; justify-content: center; }
.ayf-auth__tabs a.is-current { background: var(--ayf-paper); color: var(--ayf-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ayf-auth__form { background: var(--ayf-cream); border-radius: var(--ayf-r-l); padding: 1.5rem; }
.ayf-auth__submit { width: 100%; margin-top: .5rem; }
.ayf-auth__links, .ayf-auth__switch { text-align: center; font-size: var(--wp--preset--font-size--small); margin-top: 1rem; }
.ayf-phone-input { display: flex; align-items: stretch; }
.ayf-phone-input__cc { display: flex; align-items: center; padding: 0 .9rem; border: 1px solid #CFC7B8; border-right: 0; border-radius: var(--ayf-r-s) 0 0 var(--ayf-r-s); background: var(--ayf-paper); color: var(--ayf-ink-soft); }
.ayf-phone-input input { border-radius: 0 var(--ayf-r-s) var(--ayf-r-s) 0 !important; }
.ayf-code { font-size: 1.5rem !important; letter-spacing: .4em; text-align: center; }
.ayf-consent label { font-weight: 400 !important; display: flex !important; gap: .6rem; align-items: flex-start; }
.ayf-consent input { width: 20px; height: 20px; min-height: 0; margin-top: .15rem; flex: none; }
.ayf-create-account { margin: 2rem 0; padding: 1.5rem; border-radius: var(--ayf-r-l); background: var(--ayf-leaf-light); }
.ayf-create-account h2 { font-size: var(--wp--preset--font-size--large); margin: 0 0 .5rem; }
.ayf-account-phone { padding: 1rem; border-radius: var(--ayf-r-m); background: var(--ayf-cream); }

/* Catalogue-only mode (ayancheri-core) */
.ayf-notice-bar { background: var(--ayf-leaf); color: var(--ayf-paper); text-align: center; padding: .6rem 1rem; font-size: var(--wp--preset--font-size--small); }
.ayf-notice-bar a { color: var(--ayf-paper); font-weight: 600; margin-left: .35rem; }
.ayf-order-contact__lead { color: var(--ayf-ink-soft); margin: 1.25rem 0 .75rem; }
.ayf-order-contact { display: flex; flex-wrap: wrap; gap: .6rem; }
.ayf-order-contact a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.ayf-order-contact__wa { background: var(--ayf-leaf); color: var(--ayf-paper) !important; }
.ayf-order-contact__call { border: 1.5px solid var(--ayf-leaf); color: var(--ayf-leaf); }
.ayf-order-contact.is-compact { margin-top: auto; }
.ayf-order-contact.is-compact a { min-height: 44px; padding: 0 1rem; font-size: var(--wp--preset--font-size--small); }
.ayf-order-contact.is-compact .ayf-order-contact__call { display: none; } /* cards: one clear action */

.ayf-draft-banner { padding: 1rem 1.25rem; border-radius: var(--ayf-r-m); background: #F6E3DA; border-left: 4px solid var(--ayf-soil); font-size: var(--wp--preset--font-size--small); }

/* --------------------------------------------------------- Testimonials */
.ayf-testimonials { border-top: 1px solid var(--ayf-line); }
.ayf-testimonials h2 { margin: 0 0 var(--wp--preset--spacing--30); }
.ayf-testimonials__grid { display: grid; gap: 1rem; }
@media (min-width: 800px) { .ayf-testimonials__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ayf-quote { margin: 0; padding: 1.5rem; border-radius: var(--ayf-r-l); background: var(--ayf-cream); display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }
.ayf-quote blockquote { margin: 0; font-family: var(--wp--preset--font-family--serif); font-size: var(--wp--preset--font-size--medium); line-height: 1.4; }
.ayf-quote blockquote p { margin: 0; }
.ayf-quote figcaption { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
.ayf-quote figcaption strong { color: var(--ayf-ink); }
.ayf-quote.is-sample { outline: 2px dashed var(--ayf-soil); outline-offset: -2px; } /* samples look unfinished on purpose */

/* ----------------------------------------------------- Story & promises */
.ayf-story img { width: 100%; height: auto; border-radius: var(--ayf-r-l); }
.ayf-promise { border-top: 1px solid var(--ayf-line); padding-top: 1.25rem; }
.ayf-promise__num { font-family: var(--wp--preset--font-family--serif); color: var(--ayf-soil); font-size: var(--wp--preset--font-size--medium); margin: 0 0 .5rem; }
.ayf-promise h3 { margin: 0 0 .35rem; }
.ayf-promise p:last-child { color: var(--ayf-ink-soft); margin: 0; }
.ayf-promo h2 { margin-top: 0; }

/* -------------------------------------------------------------- Footer */
.ayf-footer { margin-top: 0; font-size: var(--wp--preset--font-size--small); }
.ayf-footer .wp-block-site-title { margin-top: 0; }
.ayf-footer__heading { font-family: var(--wp--preset--font-family--sans); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--ayf-paper) 70%, transparent); margin: 0 0 .75rem; }
.ayf-footer__links { list-style: none; padding: 0; margin: 0; }
.ayf-footer__links li { margin: 0; }
.ayf-footer__links a { display: inline-block; padding: .35rem 0; text-decoration: none; }
.ayf-footer__links a:hover { text-decoration: underline; }
.ayf-footer__rule { border: 0; height: 1px; margin-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--20); }
.ayf-footer__address { line-height: 1.55; margin-top: .75rem; }
.ayf-footer__legal { color: color-mix(in srgb, var(--ayf-paper) 70%, transparent); margin: 0; }
.ayf-footer :focus-visible { outline-color: var(--ayf-paper); }

/* WhatsApp floating button */
.ayf-whatsapp {
	position: fixed; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 60;
	display: inline-flex; align-items: center; gap: .5rem; min-height: 52px; padding: 0 1.1rem 0 .9rem;
	background: var(--ayf-leaf); color: var(--ayf-paper); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: var(--wp--preset--font-size--small);
	box-shadow: 0 6px 24px rgba(31, 59, 42, .28); transition: transform .25s var(--ayf-ease);
}
.ayf-whatsapp:hover { transform: translateY(-2px); color: var(--ayf-paper); }
@media (max-width: 600px) { .ayf-whatsapp__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .ayf-whatsapp { padding: 0; width: 52px; justify-content: center; } }
.woocommerce-checkout .ayf-whatsapp, .woocommerce-cart .ayf-whatsapp { display: none; } /* don't cover the order button */

/* ------------------------------------------------------- Generic pages */
.ayf-page { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); }
.ayf-page__title { margin-top: 0; }

/* ------------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.ayf-tile:hover, .ayf-card:hover .ayf-card__image img, .ayf-whatsapp:hover { transform: none; }
}

/* ---------------------------------------------- Search, filters, sale (D33) */
.ayf-badge.is-sale { left: auto; right: .75rem; background: var(--ayf-soil); color: var(--ayf-paper); }
.ayf-card__price del, .ayf-product__price del, form.cart .woocommerce-variation-price del { color: var(--ayf-ink-soft); font-weight: 400; margin-right: .25rem; }
.ayf-card__price ins, .ayf-product__price ins, form.cart .woocommerce-variation-price ins { text-decoration: none; }
.ayf-off { display: inline-block; vertical-align: middle; margin-left: .4rem; padding: .2rem .55rem; border-radius: 999px; background: var(--ayf-soil); color: var(--ayf-paper); font-family: var(--wp--preset--font-family--sans); font-size: .8125rem; font-weight: 600; }
.ayf-shopbar { margin-top: 1rem; display: grid; gap: .75rem; }
.ayf-search { display: flex; align-items: center; max-width: 34rem; border: 1px solid var(--ayf-line); border-radius: 999px; background: var(--ayf-paper); padding-left: 1.1rem; }
.ayf-search:focus-within { border-color: var(--ayf-leaf); box-shadow: 0 0 0 3px var(--ayf-leaf-light); }
.ayf-search input[type="search"] { flex: 1; min-width: 0; border: 0 !important; background: transparent; box-shadow: none !important; padding: .7rem 0; font-size: 1rem; }
.ayf-search button { border: 0; background: transparent; color: var(--ayf-ink); min-width: 44px; min-height: 44px; cursor: pointer; border-radius: 999px; }
.ayf-filters summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 1.1rem; border: 1px solid var(--ayf-line); border-radius: 999px; cursor: pointer; font-size: var(--wp--preset--font-size--small); font-weight: 600; list-style: none; background: var(--ayf-paper); }
.ayf-filters summary::-webkit-details-marker { display: none; }
.ayf-filters summary::before { content: ""; width: 14px; height: 10px; background: linear-gradient(currentColor 0 0) top/100% 1.5px no-repeat, linear-gradient(currentColor 0 0) center/70% 1.5px no-repeat, linear-gradient(currentColor 0 0) bottom/40% 1.5px no-repeat; }
.ayf-filters[open] summary { background: var(--ayf-ink); color: var(--ayf-paper); border-color: var(--ayf-ink); }
.ayf-filters__body { margin-top: .75rem; padding: 1rem 1.25rem; border-radius: var(--ayf-r-m, 16px); background: var(--ayf-cream); display: grid; gap: .5rem; }
.ayf-filters__group { display: grid; grid-template-columns: 4.5rem 1fr; align-items: center; gap: .5rem; }
.ayf-filters__label { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--ayf-ink-soft); }
.ayf-filters .ayf-chips { margin-top: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
.ayf-filters .ayf-chip { min-height: 40px; padding: .45rem .9rem; }
.ayf-filters__clear { margin: .25rem 0 0; font-size: var(--wp--preset--font-size--small); }
@media (max-width: 600px) { .ayf-filters__group { grid-template-columns: 1fr; gap: .25rem; } }
/* Header search: an icon on wide screens; on phones it lives inside the ☰ menu instead. */
.ayf-header-search { margin: 0; }
.ayf-header-search .wp-block-search__button { background: transparent; color: var(--ayf-ink); border: 0; min-width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ayf-header-search .wp-block-search__input { border-radius: 999px; min-width: 14rem; }
.ayf-header .wp-block-navigation .ayf-menu-search { display: none; }
.wp-block-navigation__responsive-container.is-menu-open .ayf-menu-search { display: block; width: 100%; margin-bottom: 1rem; order: -1; }
.is-menu-open .ayf-menu-search .wp-block-search__inside-wrapper { border: 1px solid var(--ayf-line); border-radius: 999px; padding: .2rem .2rem .2rem 1rem; background: var(--ayf-paper); }
.is-menu-open .ayf-menu-search .wp-block-search__input { border: 0; font-family: var(--wp--preset--font-family--sans); font-size: 1rem; background: transparent; }
.is-menu-open .ayf-menu-search .wp-block-search__button { background: var(--ayf-leaf); color: var(--ayf-paper); border-radius: 999px; border: 0; min-width: 44px; min-height: 44px; }
@media (max-width: 599px) { .ayf-header-search { display: none; } }

/* ---------------------------------------------- Back-in-stock alert (D35) */
.ayf-alert { margin: 1.25rem 0; border: 1px solid var(--ayf-line); border-radius: var(--ayf-r-m, 16px); background: var(--ayf-paper); }
.ayf-alert summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.ayf-alert summary::-webkit-details-marker { display: none; }
.ayf-alert summary::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0-6 6v4l-2 3h16l-2-3V9a6 6 0 0 0-6-6zm-2 15a2 2 0 0 0 4 0' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0-6 6v4l-2 3h16l-2-3V9a6 6 0 0 0-6-6zm-2 15a2 2 0 0 0 4 0' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; color: var(--ayf-soil); }
.ayf-alert__form, .ayf-alert__ok, .ayf-alert__err { padding: 0 1.1rem 1.1rem; margin: 0; }
.ayf-alert__form p { margin: 0 0 .75rem; }
.ayf-alert__form label { display: block; font-size: var(--wp--preset--font-size--small); font-weight: 600; margin-bottom: .3rem; }
.ayf-alert__form input[type="tel"], .ayf-alert__form input[type="email"] { width: 100%; }
.ayf-alert__sizes { border: 0; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.ayf-alert__sizes legend { font-size: var(--wp--preset--font-size--small); font-weight: 600; margin-bottom: .3rem; }
.ayf-alert__sizes .ayf-chip { cursor: pointer; display: inline-flex; gap: .4rem; font-weight: 400; margin: 0; }
.ayf-alert__sizes .ayf-chip:has(input:checked) { border-color: var(--ayf-leaf); background: var(--ayf-leaf-light); }
.ayf-alert__ok { color: var(--ayf-leaf); font-weight: 600; }
.ayf-alert__err { color: var(--ayf-soil); }
.ayf-alert__small { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); margin: .5rem 0 0 !important; }

/* ---------------------------------------------- Saved plants / wishlist (D36) */
.ayf-heart { position: absolute; right: .6rem; bottom: .6rem; z-index: 3; width: 44px; height: 44px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--ayf-paper) 92%, transparent); color: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ayf-heart svg path, .ayf-save svg path { stroke: var(--ayf-ink); }
.ayf-heart[aria-pressed="true"], .ayf-save[aria-pressed="true"] { color: var(--ayf-soil); }
.ayf-heart[aria-pressed="true"] svg path, .ayf-save[aria-pressed="true"] svg path { stroke: var(--ayf-soil); }
.ayf-heart:hover svg path { stroke: var(--ayf-soil); }
.ayf-save { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin-left: .5rem; padding: 0 1rem; border: 1px solid var(--ayf-line); border-radius: 999px; background: var(--ayf-paper); color: transparent; cursor: pointer; vertical-align: middle; }
.ayf-save .ayf-save__text { color: var(--ayf-ink); font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.ayf-header .wp-block-navigation .ayf-menu-only { display: none; }
.wp-block-navigation__responsive-container.is-menu-open .ayf-menu-only { display: block; }
@media (max-width: 599px) { .ayf-header-saved { display: none !important; } form.cart .ayf-save { margin: .75rem 0 0; } }
.ayf-saved { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.ayf-saved__item { position: relative; display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: center; padding: .75rem; border: 1px solid var(--ayf-line); border-radius: var(--ayf-r-m); background: var(--ayf-paper); }
.ayf-saved__img img { width: 6.5rem; height: 6.5rem; object-fit: cover; border-radius: var(--ayf-r-s); display: block; }
.ayf-saved__body { display: grid; gap: .2rem; padding-right: 3rem; }
.ayf-saved__name { font-family: var(--wp--preset--font-family--serif); font-size: 1.15rem; color: var(--ayf-ink); text-decoration: none; }
.ayf-saved__price { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
.ayf-saved__out { font-size: var(--wp--preset--font-size--small); color: var(--ayf-soil); font-weight: 600; }
.ayf-saved__view { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--ayf-leaf); }
.ayf-saved__item .ayf-heart { top: 50%; bottom: auto; transform: translateY(-50%); }
.ayf-saved-note { color: var(--ayf-ink-soft); }
.ayf-saved-empty { padding: 2rem 0; }

/* ---------------------------------------------- Care guides (D37) */
.ayf-guides__head { padding-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30); }
.ayf-guides__head h1 { margin: .25rem 0 .5rem; }
.ayf-guide-grid { gap: 1.25rem !important; }
.ayf-guide-card { height: 100%; padding: 1.5rem; border-radius: var(--ayf-r-m); background: var(--ayf-cream); display: flex; flex-direction: column; gap: .5rem; }
.ayf-guide-card__date { font-size: var(--wp--preset--font-size--small); color: var(--ayf-ink-soft); }
.ayf-guide-card__title { margin: 0; line-height: 1.2; }
.ayf-guide-card__title a { color: var(--ayf-ink); text-decoration: none; }
.ayf-guide-card__title a:hover { color: var(--ayf-leaf); }
.ayf-guide-card__excerpt { color: var(--ayf-ink-soft); margin: 0; }
.ayf-guide-card__excerpt .wp-block-post-excerpt__more-link { font-weight: 600; color: var(--ayf-leaf); }
.ayf-article { padding-block: var(--wp--preset--spacing--40); }
.ayf-article__back { font-size: var(--wp--preset--font-size--small); margin: 0 0 1rem; }
.ayf-article__back a { color: var(--ayf-ink-soft); }
.ayf-article__title { margin: 0 0 .5rem; line-height: 1.1; }
.ayf-article__date { color: var(--ayf-ink-soft); font-size: var(--wp--preset--font-size--small); margin-bottom: 1.5rem; }
.ayf-article__body h2 { margin-top: 2rem; font-size: var(--wp--preset--font-size--large); }
.ayf-article__body li { margin-bottom: .4rem; }
.ayf-article__body a { color: var(--ayf-leaf); }
.ayf-article__cta { margin-top: 2.5rem; padding: 1.5rem; border-radius: var(--ayf-r-m); background: var(--ayf-leaf-light); }
.ayf-article__cta p { margin-top: 0; }

/* Header on tablets and small laptops: one line. */
.ayf-header .wp-block-navigation__container { flex-wrap: nowrap; }
@media (min-width: 600px) and (max-width: 1023px) {
	.ayf-header .wp-block-navigation__container { gap: 1rem !important; }
	.ayf-header .wp-block-navigation-item__content { font-size: .9rem; white-space: nowrap; }
	.ayf-header__nav { gap: .25rem; }
}
/* Small tablets (600–899px): use the ☰ menu, like phones. */
@media (min-width: 600px) and (max-width: 899px) {
	.ayf-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.ayf-header .wp-block-navigation__responsive-container:not(.is-menu-open):not(.hidden-by-default) { display: none; }
	.ayf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex; }
	.ayf-header__nav .wp-block-navigation { order: 3; }
}
.ayf-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.5rem; }

/* ---------------------------------------------- Product FAQs (D38) */
.ayf-faq { margin-top: 2rem; }
.ayf-faq__title { font-size: var(--wp--preset--font-size--large); margin: 0 0 .5rem; }
.ayf-faq__item { border-bottom: 1px solid var(--ayf-line); }
.ayf-faq__item summary { cursor: pointer; list-style: none; padding: .9rem 2rem .9rem 0; position: relative; font-weight: 600; min-height: 44px; }
.ayf-faq__item summary::-webkit-details-marker { display: none; }
.ayf-faq__item summary::after { content: "+"; position: absolute; right: .25rem; top: .7rem; font-size: 1.4rem; font-weight: 400; color: var(--ayf-leaf); }
.ayf-faq__item[open] summary::after { content: "\2212"; }
.ayf-faq__item p { margin: 0 0 1rem; color: var(--ayf-ink-soft); }

/* ---------------------------------------------- Malayalam (D39) */
:lang(ml) body, html[lang^="ml"] body { font-family: var(--wp--preset--font-family--sans), "Noto Sans Malayalam", "Manjari", "Kartika", sans-serif; }
html[lang^="ml"] :where(h1, h2, h3, .ayf-card__title, .wp-block-site-title) { font-family: var(--wp--preset--font-family--serif), "Noto Serif Malayalam", "Manjari", serif; line-height: 1.3; }
.ayf-lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; font-weight: 600; }

.ayf-footer__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; font-size: var(--wp--preset--font-size--small); opacity: .9; }
.ayf-lang--footer { color: inherit; border-color: color-mix(in srgb, currentColor 45%, transparent); min-height: 40px; }

/* ---------------------------------------------- Home: scrolling highlights bar (D40) */
.ayf-ticker { background: var(--ayf-leaf); color: var(--ayf-paper); overflow: hidden; font-size: .875rem; font-weight: 600; letter-spacing: .01em; }
.ayf-ticker__track { display: flex; width: max-content; animation: ayf-ticker 38s linear infinite; }
.ayf-ticker:hover .ayf-ticker__track, .ayf-ticker:focus-within .ayf-ticker__track { animation-play-state: paused; }
.ayf-ticker__list { display: flex; list-style: none; margin: 0; padding: 0; }
.ayf-ticker__list li { white-space: nowrap; padding: .6rem 2.25rem; position: relative; }
.ayf-ticker__list li::after { content: "•"; position: absolute; right: -.2rem; opacity: .5; }
@keyframes ayf-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.ayf-ticker__track { animation: none; width: auto; justify-content: center; }
	.ayf-ticker__list[aria-hidden="true"] { display: none; }
	.ayf-ticker__list { flex-wrap: wrap; justify-content: center; }
	.ayf-ticker__list li { padding: .5rem 1rem; }
}
/* About us / Contact us pages */
.ayf-about-points, .ayf-contact-cards { gap: 1rem !important; margin-block: 1.5rem 2rem; }
.ayf-about-points > .wp-block-column, .ayf-contact-card { padding: 1.25rem 1.5rem; border-radius: var(--ayf-r-m); background: var(--ayf-cream); }
.ayf-contact-card h2 { margin-top: 0; }
html[lang^="ml"] .ayf-eyebrow, html[lang^="ml"] .ayf-footer h2, html[lang^="ml"] .ayf-filters__label { letter-spacing: 0; text-transform: none; }

/* Language switch at the top (header). */
.ayf-lang-top { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; min-width: 36px; padding: 0 .75rem; border: 1px solid var(--ayf-line); border-radius: 999px; color: var(--ayf-ink); text-decoration: none; font-size: .875rem; font-weight: 600; white-space: nowrap; margin: 0 .25rem; }
.ayf-lang-top:hover { border-color: var(--ayf-leaf); color: var(--ayf-leaf); }
.ayf-lang-top__short { display: none; }
.ayf-header__nav > p:has(.ayf-lang-top) { margin: 0; display: flex; align-items: center; }
@media (max-width: 599px) {
	.ayf-lang-top { padding: 0; width: 36px; font-size: 1rem; }
	.ayf-lang-top__long { display: none; }
	.ayf-lang-top__short { display: inline; }
	.ayf-header .wp-block-site-title { font-size: 1.05rem; }
}
@media (max-width: 599px) {
	.ayf-header__bar { gap: .5rem; }
	.ayf-header__nav { gap: 0 !important; }
	.ayf-header .ayf-account, .ayf-header .ayf-bag, .ayf-header .wp-block-navigation__responsive-container-open { min-width: 40px; padding-left: 0; padding-right: 0; }
	.ayf-lang-top { width: 32px; min-width: 32px; min-height: 32px; margin: 0 .2rem 0 0; }
}
@media (max-width: 380px) { .ayf-header .wp-block-site-title { font-size: .95rem; } }
@media (max-width: 340px) { .ayf-header .wp-block-site-title { font-size: .85rem; } .ayf-header .ayf-account, .ayf-header .ayf-bag, .ayf-header .wp-block-navigation__responsive-container-open { min-width: 36px; } }

/* WooCommerce's "Sale!" badge on product pages: brand colours with readable contrast. */
.woocommerce span.onsale, span.onsale, .wc-block-components-product-sale-badge { background: var(--ayf-soil) !important; color: #fff !important; border: 0; border-radius: 999px; min-height: auto; min-width: auto; line-height: 1; padding: .45rem .75rem; font-size: .8125rem; font-weight: 600; }
