/*
Theme Name: Bakgat Foods
Theme URI: https://bakgatfoods.co.uk
Author: NWIMS Group
Author URI: https://www.nwims.com
Description: Custom block theme for Bakgat Foods, South African food delivered across the UK. WooCommerce-ready, self-hosted fonts, no page builder.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bakgat
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--ochre); color: var(--wp--preset--color--ink); }
:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--ochre);
	outline-offset: 3px;
	border-radius: 4px;
}
img { height: auto; }

/* Small uppercase label above headings */
.bakgat-eyebrow {
	font-size: 0.8rem !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rooibos);
	margin-bottom: 0 !important;
}
.has-ink-background-color .bakgat-eyebrow,
.has-bush-background-color .bakgat-eyebrow,
.has-rooibos-background-color .bakgat-eyebrow { color: var(--wp--preset--color--ochre); }

/* ---------- Ndebele-style band (separator block style) ---------- */
.wp-block-separator.is-style-bakgat-band,
.wp-block-separator.is-style-bakgat-band:not(.is-style-wide):not(.is-style-dots) {
	border: 0 !important;
	height: 40px;
	max-width: none !important;
	width: auto !important;
	opacity: 1;
	background: url("assets/img/band.svg") repeat-x left center / auto 40px;
	margin-block: 0 !important;
}
.editor-styles-wrapper .wp-block-separator.is-style-bakgat-band { background-image: url("assets/img/band.svg"); }

/* ---------- Header ---------- */
.bakgat-announce { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; }
.bakgat-announce a { color: inherit; }
.bakgat-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.2) blur(8px); background: color-mix(in srgb, var(--wp--preset--color--sand) 92%, transparent) !important; border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 12%, transparent); }
body.admin-bar .bakgat-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .bakgat-header { top: 0; } }
.bakgat-brand .wp-block-site-logo img { display: block; }
.bakgat-brand .wp-block-site-title { line-height: 1; }
.bakgat-tagline { font-size: 0.75rem !important; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wp--preset--color--stone); margin: 0.2rem 0 0 !important; }
.bakgat-header .wp-block-navigation a:hover { color: var(--wp--preset--color--rooibos); }
.bakgat-header .wp-block-navigation .current-menu-item > a,
.bakgat-header .wp-block-navigation a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--wp--preset--color--ochre); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ---------- Hero ---------- */
.bakgat-hero h1 { font-size: var(--wp--preset--font-size--display); font-weight: 700; letter-spacing: -0.025em; }
.bakgat-hero h1 em { color: var(--wp--preset--color--rooibos); font-style: italic; font-weight: 500; }
.bakgat-hero .wp-block-image img { border-radius: 28px; box-shadow: 0 30px 60px -30px rgba(36, 28, 23, 0.45); }
.bakgat-sticker {
	display: inline-block;
	background: var(--wp--preset--color--ochre);
	color: var(--wp--preset--color--ink);
	border-radius: 999px;
	padding: 0.35rem 0.9rem;
	font-weight: 700;
	font-size: 0.85rem !important;
	transform: rotate(-2deg);
}

/* ---------- Cards ---------- */
.is-style-bakgat-card {
	background: var(--wp--preset--color--cream);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 22px;
	box-shadow: 6px 6px 0 var(--wp--preset--color--ink);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.is-style-bakgat-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--wp--preset--color--ink); }
.is-style-bakgat-card h3 a { text-decoration: none; color: inherit; }
.is-style-bakgat-card h3 a::after { content: ""; position: absolute; inset: 0; }
.is-style-bakgat-card { position: relative; }
.bakgat-cat-icon img { width: 112px; margin-inline: auto; }

/* Recipe / post cards in query loops */
.bakgat-post-card .wp-block-post-featured-image img { border-radius: 18px; aspect-ratio: 3 / 2; object-fit: cover; }
.bakgat-post-card .wp-block-post-title { margin-top: 0.75rem; }

/* ---------- Steps ---------- */
.bakgat-step-num {
	font-family: var(--wp--preset--font-family--display);
	font-size: 3rem !important;
	font-weight: 800;
	line-height: 1 !important;
	color: var(--wp--preset--color--ochre);
	margin: 0 !important;
}

/* ---------- Quote panel ---------- */
.bakgat-word h2 { font-size: clamp(3rem, 9vw, 6.5rem) !important; font-style: italic; }

/* ---------- FAQ (details block) ---------- */
.wp-block-details { border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--ink) 20%, transparent); padding-block: 1rem; }
.wp-block-details summary { font-family: var(--wp--preset--font-family--display); font-size: 1.2rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-family: var(--wp--preset--font-family--body); font-weight: 400; font-size: 1.6rem; line-height: 1; color: var(--wp--preset--color--rooibos); }
.wp-block-details[open] summary::after { content: "–"; }

/* ---------- Footer ---------- */
.bakgat-footer a { color: var(--wp--preset--color--cream); text-decoration: none; }
.bakgat-footer a:hover { color: var(--wp--preset--color--ochre); text-decoration: underline; }
.bakgat-footer .wp-block-list { list-style: none; padding-left: 0; }
.bakgat-footer .wp-block-list li { margin-block: 0.35rem; }
.bakgat-footer h2, .bakgat-footer h3 { color: var(--wp--preset--color--ochre); }

/* ---------- WooCommerce touches ---------- */
.woocommerce .wc-block-components-product-price,
.wc-block-grid__product-price { color: var(--wp--preset--color--rooibos); font-weight: 700; }
.wc-block-components-product-image img,
.wc-block-grid__product-image img { border-radius: 16px; }
.wc-block-mini-cart__badge { background: var(--wp--preset--color--rooibos) !important; color: var(--wp--preset--color--cream) !important; }
.woocommerce-store-notice, p.demo_store { background: var(--wp--preset--color--bush) !important; }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.is-style-bakgat-card { transition: none; }
}
