/* ==========================================================================
   Layout — announcement bar, header, nav, mobile dock, cart bar, footer
   ========================================================================== */

.af-page {
	position: relative;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.af-main {
	flex: 1;
}

/* Clear the fixed mobile dock so the last section is never covered. */
@media (max-width: 767px) {
	.af-page { padding-bottom: var(--af-dock-h); }
}

/* --------------------------------------------------------------------------
   Announcement bar
   -------------------------------------------------------------------------- */

.af-announce {
	position: relative;
	z-index: calc(var(--af-z-header) + 1);
	background: var(--af-espresso);
	color: var(--af-ink-inverse-soft);
	font-size: var(--af-text-xs);
	font-weight: 500;
}

.af-announce__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--af-space-5);
	min-height: 34px;
	padding-block: 0.35rem;
	text-align: center;
}

.af-announce b { color: var(--af-caramel); font-weight: 700; }

.af-announce__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

/* Only the delivery promise survives on small screens. */
@media (max-width: 767px) {
	.af-announce__item--hide-sm { display: none; }
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.af-header {
	position: sticky;
	top: 0;
	z-index: var(--af-z-header);
	background: var(--af-cocoa-900);
	color: var(--af-cream);
	transition: box-shadow var(--af-dur) var(--af-ease-out);
}

/* A hairline caramel rule reads as a seam rather than a border. */
.af-header::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(224, 168, 106, 0.4) 22%, rgba(224, 168, 106, 0.4) 78%, transparent);
}

.af-header.is-stuck {
	box-shadow: 0 10px 30px -12px rgba(36, 20, 16, 0.45);
}

.af-header__inner {
	display: flex;
	align-items: center;
	gap: var(--af-space-5);
	min-height: var(--af-header-h);
	padding-block: 0.6rem;
}

/* --- Logo --- */

.af-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	flex-shrink: 0;
	text-decoration: none;
	color: var(--af-cream);
}

.af-logo:hover { color: var(--af-cream); }

.af-logo__mark {
	width: 38px;
	height: 38px;
	color: var(--af-caramel);
	transition: transform var(--af-dur) var(--af-ease-spring);
}

.af-logo:hover .af-logo__mark { transform: rotate(-6deg) scale(1.04); }
.af-logo__mark svg { width: 100%; height: 100%; }

.af-logo__text { display: flex; flex-direction: column; line-height: 1.1; }

.af-logo__name {
	font-family: var(--af-font-display);
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	font-variation-settings: "SOFT" 60, "WONK" 1;
}

.af-logo__tag {
	font-size: 0.5625rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--af-clay-300);
}

@media (max-width: 480px) {
	.af-logo__tag { display: none; }
	.af-logo__name { font-size: 1rem; }
}

/* --- Primary nav --- */

.af-nav { display: none; }

@media (min-width: 1080px) {
	.af-nav { display: block; }
}

.af-nav .af-menu {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.af-nav .af-menu > li { margin: 0; position: relative; }

.af-nav .af-menu a {
	display: block;
	padding: 0.5rem 0.85rem;
	border-radius: var(--af-r-pill);
	font-size: var(--af-text-base);
	font-weight: 600;
	color: var(--af-ink-inverse-soft);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--af-dur-fast) var(--af-ease-out),
		color var(--af-dur-fast) var(--af-ease-out);
}

.af-nav .af-menu a:hover,
.af-nav .af-menu .current-menu-item > a {
	background: rgba(253, 248, 243, 0.1);
	color: var(--af-cream);
}

/* Submenus */
.af-nav .sub-menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	min-width: 12rem;
	margin: 0;
	padding: 0.4rem;
	list-style: none;
	background: var(--af-cream);
	border-radius: var(--af-r-md);
	box-shadow: var(--af-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: all var(--af-dur) var(--af-ease-out);
}

.af-nav .menu-item-has-children:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.af-nav .sub-menu a { color: var(--af-ink-soft); border-radius: var(--af-r-sm); }
.af-nav .sub-menu a:hover { background: var(--af-sand); color: var(--af-cocoa-900); }

/* --- Header search --- */

.af-headsearch {
	flex: 1;
	max-width: 30rem;
	display: none;
}

@media (min-width: 768px) {
	.af-headsearch { display: block; }
}

.af-searchbox {
	position: relative;
	display: flex;
	align-items: center;
}

.af-searchbox input[type="search"] {
	height: 42px;
	padding: 0 2.6rem 0 2.6rem;
	background: rgba(253, 248, 243, 0.1);
	border: 1.5px solid rgba(253, 248, 243, 0.16);
	border-radius: var(--af-r-pill);
	color: var(--af-cream);
	font-size: var(--af-text-base);
}

.af-searchbox input[type="search"]::placeholder { color: rgba(253, 248, 243, 0.55); }

.af-searchbox input[type="search"]:focus {
	background: rgba(253, 248, 243, 0.16);
	border-color: var(--af-caramel);
	box-shadow: 0 0 0 4px rgba(224, 168, 106, 0.16);
}

.af-searchbox__icon {
	position: absolute;
	left: 0.9rem;
	color: var(--af-clay-300);
	pointer-events: none;
}

.af-searchbox__clear {
	position: absolute;
	right: 0.75rem;
	display: none;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(253, 248, 243, 0.18);
	color: var(--af-cream);
}

.af-searchbox.has-value .af-searchbox__clear { display: grid; }

/* Suggestion dropdown */
.af-suggest {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	right: 0;
	z-index: var(--af-z-drawer);
	max-height: 26rem;
	overflow-y: auto;
	padding: 0.4rem;
	background: var(--af-cream);
	border-radius: var(--af-r-md);
	box-shadow: var(--af-shadow-xl);
	display: none;
}

.af-suggest.is-open { display: block; }

.af-suggest__item {
	display: flex;
	align-items: center;
	gap: var(--af-space-3);
	width: 100%;
	padding: 0.55rem 0.6rem;
	border-radius: var(--af-r-sm);
	color: var(--af-ink);
	text-decoration: none;
	text-align: left;
	transition: background-color var(--af-dur-fast) var(--af-ease-out);
}

.af-suggest__item:hover,
.af-suggest__item.is-active { background: var(--af-sand); color: var(--af-ink); }

.af-suggest__thumb {
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	border-radius: var(--af-r-sm);
	background: var(--af-sand);
	object-fit: cover;
}

.af-suggest__name { font-size: var(--af-text-base); font-weight: 600; line-height: 1.3; }
.af-suggest__meta { font-size: var(--af-text-xs); color: var(--af-ink-muted); }
.af-suggest__empty { padding: var(--af-space-5); text-align: center; font-size: var(--af-text-base); color: var(--af-ink-muted); }

/* Loading rows. The text spans are empty, so they need explicit heights for the
   shimmer to have anything to fill. */
.af-suggest__item.is-loading { pointer-events: none; }
.af-suggest__item.is-loading:hover { background: transparent; }
.af-suggest__item.is-loading .af-suggest__name { display: block; width: 9rem; height: 0.85rem; margin-bottom: 0.3rem; }
.af-suggest__item.is-loading .af-suggest__meta { display: block; width: 5rem; height: 0.7rem; }

/* --- Header actions --- */

.af-headacts {
	display: flex;
	align-items: center;
	gap: var(--af-space-2);
	margin-left: auto;
}

.af-iconbtn {
	position: relative;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: var(--af-r-pill);
	color: var(--af-cream);
	background: rgba(253, 248, 243, 0.08);
	transition: background-color var(--af-dur-fast) var(--af-ease-out);
}

.af-iconbtn:hover { background: rgba(253, 248, 243, 0.18); color: var(--af-cream); }

.af-iconbtn__count {
	position: absolute;
	top: -3px;
	right: -3px;
	min-width: 19px;
	height: 19px;
	padding: 0 4px;
	display: grid;
	place-items: center;
	border-radius: var(--af-r-pill);
	background: var(--af-terracotta);
	color: var(--af-white);
	font-size: 0.625rem;
	font-weight: 800;
	line-height: 1;
	border: 2px solid var(--af-cocoa-900);
}

.af-iconbtn__count:empty,
.af-iconbtn__count[data-count="0"] { display: none; }

/* The cart button carries a live total on desktop. */
.af-cartbtn {
	display: none;
	align-items: center;
	gap: 0.55rem;
	height: 42px;
	padding: 0 1rem 0 0.85rem;
	border-radius: var(--af-r-pill);
	background: var(--af-caramel);
	color: var(--af-espresso);
	font-size: var(--af-text-base);
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 2px 0 rgba(36, 20, 16, 0.35);
	transition: background-color var(--af-dur-fast) var(--af-ease-out);
}

@media (min-width: 768px) {
	.af-cartbtn { display: inline-flex; }
}

.af-cartbtn:hover { background: var(--af-caramel-soft); color: var(--af-espresso); }
.af-cartbtn__divider { width: 1px; height: 16px; background: rgba(36, 20, 16, 0.25); }

.af-burger { display: grid; }

@media (min-width: 1080px) {
	.af-burger { display: none; }
}

.af-burger__bars { display: flex; flex-direction: column; gap: 4px; }
.af-burger__bars span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--af-dur) var(--af-ease-out); }
.af-burger[aria-expanded="true"] .af-burger__bars span:first-child { transform: translateY(6px) rotate(45deg); }
.af-burger[aria-expanded="true"] .af-burger__bars span:nth-child(2) { opacity: 0; }
.af-burger[aria-expanded="true"] .af-burger__bars span:last-child { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Mobile drawer nav
   -------------------------------------------------------------------------- */

.af-drawer {
	position: fixed;
	inset: 0;
	z-index: var(--af-z-drawer);
	visibility: hidden;
	pointer-events: none;
}

.af-drawer.is-open { visibility: visible; pointer-events: auto; }

.af-drawer__scrim {
	position: absolute;
	inset: 0;
	background: rgba(36, 20, 16, 0.5);
	opacity: 0;
	transition: opacity var(--af-dur) var(--af-ease-out);
}

.af-drawer.is-open .af-drawer__scrim { opacity: 1; }

.af-drawer__panel {
	position: absolute;
	inset: 0 0 0 auto;
	width: min(20rem, 86vw);
	display: flex;
	flex-direction: column;
	background: var(--af-cream);
	box-shadow: var(--af-shadow-xl);
	transform: translateX(100%);
	transition: transform var(--af-dur-slow) var(--af-ease-out);
	overflow-y: auto;
}

.af-drawer.is-open .af-drawer__panel { transform: none; }

.af-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--af-space-3);
	padding: var(--af-space-5);
	background: var(--af-cocoa-900);
	color: var(--af-cream);
}

.af-drawer__body { padding: var(--af-space-5); }

.af-drawer .af-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.af-drawer .af-menu > li { margin: 0; border-bottom: 1px solid var(--af-line-soft); }

.af-drawer .af-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.95rem 0;
	font-family: var(--af-font-display);
	font-size: var(--af-text-lg);
	font-weight: 600;
	color: var(--af-ink);
	text-decoration: none;
}

.af-drawer .af-menu a:hover { color: var(--af-terracotta-dark); }
.af-drawer .sub-menu { padding: 0 0 0.6rem 0.9rem; list-style: none; }
.af-drawer .sub-menu a { font-family: var(--af-font-ui); font-size: var(--af-text-base); padding: 0.45rem 0; color: var(--af-ink-muted); }

/* Current delivery area, doubling as the button to change it. Shown in place of
   the "Order online" call to action once a pin code is known. */
.af-drawer__loc {
	display: flex;
	align-items: center;
	gap: var(--af-space-3);
	width: 100%;
	margin-bottom: var(--af-space-5);
	padding: var(--af-space-4);
	background: var(--af-sand);
	border: 1px solid var(--af-sand-deep);
	border-radius: var(--af-r-md);
	text-align: left;
	cursor: pointer;
}

.af-drawer__loc:hover { background: var(--af-sand-deep); }

.af-drawer__locicon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	border-radius: var(--af-r-pill);
	background: var(--af-white);
	color: var(--af-terracotta-dark);
}

.af-drawer__loc > span:not([class]) { flex: 1; min-width: 0; }

.af-drawer__loc small {
	display: block;
	font-size: var(--af-text-2xs);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--af-ink-muted);
}

.af-drawer__loc strong {
	display: block;
	font-size: var(--af-text-base);
	font-weight: 700;
	color: var(--af-cocoa-900);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.af-drawer__locchange {
	flex-shrink: 0;
	font-size: var(--af-text-xs);
	font-weight: 800;
	color: var(--af-terracotta-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.af-drawer__acts { margin-top: var(--af-space-5); }

.af-drawer__call {
	display: flex;
	align-items: center;
	gap: var(--af-space-3);
	margin-top: var(--af-space-5);
	padding: var(--af-space-4);
	background: var(--af-cocoa-900);
	border-radius: var(--af-r-md);
	color: var(--af-cream);
	text-decoration: none;
}

.af-drawer__call svg { flex-shrink: 0; color: var(--af-caramel); }

.af-drawer__call small {
	display: block;
	font-size: var(--af-text-2xs);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--af-ink-inverse-soft);
}

.af-drawer__call strong { display: block; font-size: var(--af-text-md); font-weight: 800; }

/* --------------------------------------------------------------------------
   Mobile bottom dock
   -------------------------------------------------------------------------- */

.af-dock {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: var(--af-z-dock);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	height: calc(var(--af-dock-h) + env(safe-area-inset-bottom, 0px));
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: rgba(253, 248, 243, 0.94);
	backdrop-filter: blur(12px) saturate(140%);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	border-top: 1px solid var(--af-line);
}

@media (min-width: 768px) {
	.af-dock { display: none; }
}

.af-dock__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--af-ink-muted);
	text-decoration: none;
}

.af-dock__item.is-active { color: var(--af-cocoa-900); }

/* Active tab gets a small caramel dot, not a filled pill. */
.af-dock__item.is-active::before {
	content: "";
	position: absolute;
	top: 6px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--af-terracotta);
}

.af-dock__count {
	position: absolute;
	top: 6px;
	right: calc(50% - 20px);
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	display: grid;
	place-items: center;
	border-radius: var(--af-r-pill);
	background: var(--af-terracotta);
	color: var(--af-white);
	font-size: 0.5625rem;
	font-weight: 800;
	line-height: 1;
}

.af-dock__count[data-count="0"] { display: none; }

/* --------------------------------------------------------------------------
   Sticky cart bar (mobile, shop pages with items in the basket)
   -------------------------------------------------------------------------- */

.af-cartbar {
	position: fixed;
	left: var(--af-space-3);
	right: var(--af-space-3);
	bottom: calc(var(--af-dock-h) + env(safe-area-inset-bottom, 0px) + 0.6rem);
	z-index: var(--af-z-sticky);
	display: flex;
	align-items: center;
	gap: var(--af-space-3);
	padding: 0.6rem 0.65rem 0.6rem 1rem;
	background: var(--af-cocoa-900);
	color: var(--af-cream);
	border-radius: var(--af-r-lg);
	box-shadow: var(--af-shadow-xl);
	text-decoration: none;
	transform: translateY(calc(100% + 5rem));
	transition: transform var(--af-dur-slow) var(--af-ease-spring);
}

.af-cartbar.is-visible { transform: none; }
.af-cartbar:hover { color: var(--af-cream); }

@media (min-width: 768px) {
	.af-cartbar { display: none; }
}

.af-cartbar__basket { flex-shrink: 0; color: var(--af-caramel); }
.af-cartbar__stack { display: flex; flex-direction: column; line-height: 1.25; }
.af-cartbar__count { font-size: var(--af-text-xs); color: var(--af-clay-300); font-weight: 600; }
.af-cartbar__total { font-size: var(--af-text-md); font-weight: 800; }
.af-cartbar__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin-left: auto;
	padding: 0.6rem 1rem;
	border-radius: var(--af-r-md);
	background: var(--af-caramel);
	color: var(--af-espresso);
	font-size: var(--af-text-base);
	font-weight: 800;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.af-footer {
	position: relative;
	margin-top: var(--af-section-y);
	background: var(--af-cocoa-900);
	color: var(--af-ink-inverse-soft);
	padding-top: clamp(3rem, 6vw, 5rem);
}

/* Reuse the awning motif as the footer's top edge. */
.af-footer__awning {
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	line-height: 0;
	transform: scaleY(-1);
}

.af-footer__awning svg { width: 100%; height: clamp(16px, 2vw, 28px); display: block; }

.af-footer__grid {
	display: grid;
	gap: var(--af-space-8);
	grid-template-columns: 1fr;
	padding-bottom: var(--af-space-8);
}

@media (min-width: 640px) {
	.af-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
	.af-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--af-space-9); }
}

/* The about column spans both tracks on tablet, since the blurb and the area
   list need the width more than the link lists do. */
@media (min-width: 640px) and (max-width: 1079px) {
	.af-footer__about { grid-column: 1 / -1; }
}

.af-footer__about { max-width: 34rem; }

.af-footer h3 {
	margin-bottom: var(--af-space-4);
	font-family: var(--af-font-ui);
	font-size: var(--af-text-xs);
	font-weight: 800;
	letter-spacing: var(--af-track-caps);
	text-transform: uppercase;
	color: var(--af-caramel);
}

.af-footer .af-menu { margin: 0; padding: 0; list-style: none; }
.af-footer .af-menu > li { margin: 0 0 0.6rem; }

.af-footer .af-menu a,
.af-footer__contact a {
	font-size: var(--af-text-base);
	color: var(--af-ink-inverse-soft);
	text-decoration: none;
	transition: color var(--af-dur-fast) var(--af-ease-out);
}

.af-footer .af-menu a:hover,
.af-footer__contact a:hover { color: var(--af-caramel); }

.af-footer__blurb {
	max-width: 24rem;
	margin-top: var(--af-space-4);
	font-size: var(--af-text-base);
	line-height: var(--af-leading-relaxed);
	color: rgba(217, 196, 178, 0.85);
}

.af-footer__contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-bottom: 0.7rem;
	font-size: var(--af-text-base);
}

.af-footer__contact svg { color: var(--af-caramel); margin-top: 2px; }

.af-footer__areas {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: var(--af-space-4);
}

.af-footer__area {
	padding: 0.25rem 0.6rem;
	border: 1px solid rgba(253, 248, 243, 0.2);
	border-radius: var(--af-r-xs);
	font-size: var(--af-text-2xs);
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--af-clay-300);
}

.af-footer__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--af-space-4);
	padding-block: var(--af-space-5);
	border-top: 1px solid rgba(253, 248, 243, 0.12);
	font-size: var(--af-text-xs);
}

.af-footer__bar p { margin: 0; }
.af-footer__bar .af-menu { display: flex; flex-wrap: wrap; gap: var(--af-space-4); }
.af-footer__bar .af-menu > li { margin: 0; }

/* Credit line — small, quiet, earned. */
.af-footer__credit { color: rgba(191, 154, 114, 0.7); }
