/*
Theme Name: Broadacre Goods
Description: Original storefront theme for Broadacre Goods. Child theme of Twenty Twenty-Five.
Template: twentytwentyfive
Version: 1.3.5
Text Domain: broadacre-goods
*/

/* Header: the only translucent surface on the site. */
.bg-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 2px solid var(--wp--preset--color--contrast);
}
.admin-bar .bg-header { top: 32px; }
/* From tablet width up, the department menu sits on its own row under the title and tools. */
@media (min-width: 600px) {
	.bg-header .wp-block-navigation { order: 3; flex-basis: 100%; }
}
/* At mid widths the menu wraps to two lines, so the header scrolls away instead of sticking. */
@media (min-width: 600px) and (max-width: 1099px) {
	.bg-header { position: static; }
}
.bg-header .wp-block-site-title a { text-decoration: none; }
.bg-logo { display: block; line-height: 0; flex-shrink: 0; }
.bg-logo img { display: block; width: 40px; height: 40px; }
.bg-header .wp-block-search__input { min-width: 0; }

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

/* Hero */
.bg-hero { border-bottom: 2px solid var(--wp--preset--color--contrast); }
.bg-hero .bg-kicker,
.bg-kicker {
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
}

/* Category grid: tiles of different sizes, stacked on phones. */
.bg-bento {
	display: grid;
	gap: 0;
	grid-template-columns: 1fr;
	border: 2px solid var(--wp--preset--color--contrast);
}
.bg-bento > .bg-tile {
	position: relative;
	margin: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	min-height: 11rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	border-bottom: 2px solid var(--wp--preset--color--contrast);
	transition: background-color 160ms ease-out;
}
.bg-bento > .bg-tile:last-child { border-bottom: 0; }
.bg-tile h3 { margin: 0 0 0.35rem; }
.bg-tile h3 a { text-decoration: none; color: inherit; }
.bg-tile h3 a::after { content: ""; position: absolute; inset: 0; }
.bg-tile p { margin: 0; }
.bg-tile:hover h3 a,
.bg-tile:focus-within h3 a { text-decoration: underline; text-underline-offset: 0.2em; }

@media (min-width: 782px) {
	.bg-bento {
		grid-template-columns: repeat(4, 1fr);
		grid-template-areas:
			"a a b c"
			"a a d d"
			"e f g g"
			"e h g g";
	}
	.bg-bento > .bg-tile { border-right: 2px solid var(--wp--preset--color--contrast); min-height: 13rem; }
	.bg-tile--a { grid-area: a; } .bg-tile--b { grid-area: b; }
	.bg-tile--c { grid-area: c; border-right: 0 !important; }
	.bg-tile--d { grid-area: d; border-right: 0 !important; }
	.bg-tile--e { grid-area: e; border-bottom: 0 !important; }
	.bg-tile--f { grid-area: f; }
	.bg-tile--g { grid-area: g; border-right: 0 !important; border-bottom: 0 !important; }
	.bg-tile--h { grid-area: h; border-bottom: 0 !important; }
}

/* Help links row */
.bg-help { display: grid; gap: 0; grid-template-columns: repeat(2, 1fr); border-top: 2px solid var(--wp--preset--color--contrast); border-bottom: 2px solid var(--wp--preset--color--contrast); }
.bg-help > * { margin: 0; padding: 1.25rem; }
.bg-help a { font-weight: 700; }
@media (min-width: 782px) { .bg-help { grid-template-columns: repeat(4, 1fr); } }

/* Footer: three plain link columns, then a centred bar with the copyright and policy links. */
.bg-footer { border-top: 2px solid var(--wp--preset--color--contrast); }
.bg-footer a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.bg-footer a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.bg-footer ul { list-style: none; padding-left: 0; margin: 0; }
.bg-footer li { margin: 0 0 0.75rem; }
.bg-footer .wp-block-column p { margin: 0 0 1.25rem; }
.bg-footer .bg-footer-title {
	font-family: var(--wp--preset--font-family--manrope);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0 0 1.25rem;
}
.bg-footer .bg-footer-brand { display: flex; align-items: center; gap: 0.65rem; }
.bg-footer .bg-footer-brand img { display: block; width: 40px; height: 40px; flex-shrink: 0; }
.bg-footer .bg-footer-brand span { font-family: var(--wp--preset--font-family--platypi); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
/* Payment icons: a centred row above the copyright bar. */
.bg-footer .bg-pay {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 25%, transparent);
}
.bg-footer .bg-pay li { margin: 0; line-height: 0; }
.bg-footer .bg-pay img { display: block; width: 38px; height: 24px; object-fit: contain; background: #fff; border-radius: 3px; }
.bg-footer-bar {
	margin-top: var(--wp--preset--spacing--30);
	gap: 0.25rem 0 !important;
}
.bg-footer-bar p { margin: 0; }
.bg-footer-bar p + p::before { content: "\00b7"; margin: 0 0.75rem; }

/* Shop sorting dropdown: a pill that matches the buttons, with its own arrow. */
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select.orderby {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--accent-6);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2316261C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 1rem;
	border: 1.5px solid color-mix(in srgb, var(--wp--preset--color--contrast) 30%, transparent);
	border-radius: 999px;
	padding: 0.6rem 2.6rem 0.6rem 1.1rem;
	min-height: 44px;
	cursor: pointer;
	transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.woocommerce-ordering select.orderby:hover { border-color: var(--wp--preset--color--contrast); }
.woocommerce-ordering select.orderby:focus,
.woocommerce-ordering select.orderby:focus-visible {
	outline: none;
	border-color: var(--wp--preset--color--accent-1);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent-1) 28%, transparent);
}

/* Cart drawer */
.wc-block-mini-cart__drawer .wc-block-components-drawer__close-wrapper { top: 0.85rem; right: 0.85rem; }
.wc-block-mini-cart__drawer .wc-block-components-drawer__close {
	position: static;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	opacity: 1;
	outline: none;
	box-shadow: none;
	transition: background-color 160ms ease-out;
}
.wc-block-mini-cart__drawer .wc-block-components-drawer__close:hover { background: var(--wp--preset--color--accent-3); }
.wc-block-mini-cart__drawer .wc-block-components-drawer__close:focus { outline: none; box-shadow: none; }
.wc-block-mini-cart__drawer .wc-block-components-drawer__close:focus-visible {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent-1) 35%, transparent);
}
.wc-block-mini-cart__drawer .wc-block-mini-cart__title {
	margin: 0 1rem;
	padding: 1.1rem 3rem 1rem 0;
	font-size: 1.375rem;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent);
	mask-image: none;
	-webkit-mask-image: none;
}
.wc-block-mini-cart__drawer .wc-block-mini-cart__items { padding-top: 0.5rem; }
.wc-block-mini-cart__drawer .wc-block-cart-item__image img { border-radius: 10px; }
.wc-block-mini-cart__drawer a.wc-block-components-product-name {
	font-weight: 700 !important;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}
.wc-block-mini-cart__drawer a.wc-block-components-product-name:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.wc-block-mini-cart__drawer .wc-block-components-product-metadata__description { display: none; }
.wc-block-mini-cart__drawer .wc-block-cart-item__prices { color: var(--wp--preset--color--accent-4); }
.wc-block-mini-cart__drawer .wc-block-cart-item__total { font-weight: 700; }
.wc-block-mini-cart__drawer .wc-block-components-sale-badge {
	background: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--contrast);
	border: 0;
	border-radius: 999px;
	padding: 0.2rem 0.6rem;
	font-weight: 700;
}
.wc-block-mini-cart__drawer .wc-block-components-quantity-selector {
	border-radius: 999px;
	background: var(--wp--preset--color--accent-6);
	overflow: hidden;
}
.wc-block-mini-cart__drawer .wc-block-cart-item__remove-link { border-radius: 50%; }
.wc-block-mini-cart__drawer .wc-block-mini-cart__footer {
	background: var(--wp--preset--color--accent-6);
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent);
}
/* Delivery is free, so the drawer says so in place of "Shipping ... calculated at checkout". */
.wc-block-mini-cart__footer .wc-block-components-totals-item__description { display: block !important; font-size: 0 !important; line-height: 1.4; }
.wc-block-mini-cart__footer .wc-block-components-totals-item__description::after {
	content: "Free delivery on every order. Discounts are applied at checkout.";
	font-size: 0.875rem;
	color: var(--wp--preset--color--accent-4);
}
.wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-components-button { min-height: 48px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
