/**
 * Bakery Site Header & Footer Stylesheet
 *
 * All brand colors reference bakery-core's custom properties: var(--bakery-*).
 * No independent brand colors defined in :root.
 *
 * @package Bakery_Site_Header
 */

:root {
	--bsh-header-height: 74px;
	--bsh-utility-height: 38px;
	--bsh-container-max: 1240px;
	--bsh-radius: 8px;
	--bsh-radius-sm: 4px;
	--bsh-radius-full: 9999px;
	--bsh-drawer-width: 330px;
	--bsh-transition-speed: 200ms;
	--bsh-transition-timing: cubic-bezier(0.16, 1, 0.3, 1);
	--bsh-shadow-dropdown: 0 10px 25px -5px rgba(28, 25, 23, 0.1), 0 8px 10px -6px rgba(28, 25, 23, 0.05);
	--bsh-shadow-drawer: -10px 0 35px -5px rgba(28, 25, 23, 0.15);
}

body.bakery-site-header-active .site-header,
body.bakery-site-header-active #masthead,
body.bakery-site-header-active .ast-main-header-wrap,
body.bakery-site-header-active .ast-mobile-header-wrap,
body.bakery-site-header-active .ast-primary-header-bar,
body.bakery-site-header-active .ast-header-break-point .main-header-bar-wrap {
	display: none !important;
}

body.bakery-site-footer-active .site-footer,
body.bakery-site-footer-active #colophon,
body.bakery-site-footer-active .ast-footer-wrap,
body.bakery-site-footer-active .ast-primary-footer {
	display: none !important;
}

.bakery-utility-bar {
	background-color: var(--bakery-surface, #fffbeb);
	border-bottom: 1px solid var(--bakery-border, #e7e5e4);
	font-size: 13px;
	color: var(--bakery-muted, #78716c);
	line-height: var(--bsh-utility-height);
	min-height: var(--bsh-utility-height);
}

.bakery-utility-container {
	max-width: var(--bsh-container-max);
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.bakery-utility-contact {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.bakery-utility-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--bakery-muted, #78716c);
	text-decoration: none;
	transition: color var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-utility-link:hover,
.bakery-utility-link:focus-visible {
	color: var(--bakery-primary, #b45309);
}

.bakery-utility-socials {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.bakery-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--bakery-muted, #78716c);
	text-decoration: none;
	padding: 4px;
	border-radius: var(--bsh-radius-sm);
	transition: color var(--bsh-transition-speed) var(--bsh-transition-timing),
	            transform var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-social-link:hover,
.bakery-social-link:focus-visible {
	color: var(--bakery-primary, #b45309);
	transform: translateY(-1px);
}

.bakery-site-header-wrapper {
	width: 100%;
	position: relative;
	background-color: var(--bakery-surface-alt, #ffffff);
	border-bottom: 1px solid var(--bakery-border, #e7e5e4);
	font-family: inherit;
	z-index: 100;
}

.bakery-header-main-row {
	min-height: var(--bsh-header-height);
	display: flex;
	align-items: center;
}

.bakery-header-container {
	width: 100%;
	max-width: var(--bsh-container-max);
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
}

.bakery-brand-zone {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.bakery-brand-link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--bakery-text, #1c1917);
}

.bakery-brand-logo-img {
	height: 44px;
	width: auto;
	object-fit: contain;
}

.bakery-text-crest {
	width: 40px;
	height: 40px;
	border-radius: var(--bsh-radius-full);
	background-color: var(--bakery-surface, #fffbeb);
	border: 1.5px solid var(--bakery-primary, #b45309);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--bakery-primary, #b45309);
	font-weight: 700;
	font-size: 19px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bakery-brand-name {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--bakery-text, #1c1917);
	white-space: nowrap;
}

.bakery-main-nav {
	display: none;
}

@media (min-width: 900px) {
	.bakery-main-nav {
		display: block;
		margin: 0 auto;
	}
}

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

.bakery-nav-item {
	position: relative;
	list-style: none;
}

.bakery-nav-link {
	font-size: 15px;
	font-weight: 500;
	color: var(--bakery-muted, #78716c);
	text-decoration: none;
	padding: 0.5rem 0;
	position: relative;
	transition: color var(--bsh-transition-speed) var(--bsh-transition-timing);
	white-space: nowrap;
}

.bakery-nav-link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0%;
	height: 2px;
	background-color: var(--bakery-primary, #b45309);
	transition: width var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-nav-link:hover,
.bakery-nav-link:focus-visible {
	color: var(--bakery-text, #1c1917);
}

.bakery-nav-link:hover::after,
.bakery-nav-item.is-active .bakery-nav-link::after {
	width: 100%;
}

.bakery-nav-item.is-active .bakery-nav-link {
	color: var(--bakery-primary, #b45309);
	font-weight: 600;
}

.bakery-site-header-wrapper .bakery-header-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

@media (min-width: 900px) {
	.bakery-site-header-wrapper .bakery-header-actions {
		margin-left: 0;
	}
}

/* FIX (v1.0.1): cart link added — replaces the cart badge that used to
   live in the storefront's own removed inline navbar. storefront.js's
   updateCartBadge() targets #bakery-nav-cart-count directly by id. */
.bakery-cart-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--bsh-radius-full);
	text-decoration: none;
	flex-shrink: 0;
}

.bakery-cart-icon {
	font-size: 18px;
	line-height: 1;
}

.bakery-cart-count {
	position: absolute;
	top: 0;
	right: 0;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: var(--bsh-radius-full);
	background: var(--bakery-primary, #b45309);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.bakery-guest-actions {
	display: none;
	align-items: center;
	gap: 1.25rem;
}

@media (min-width: 900px) {
	.bakery-guest-actions {
		display: flex;
	}
}

.bakery-action-link {
	font-size: 14px;
	font-weight: 500;
	color: var(--bakery-muted, #78716c);
	text-decoration: none;
	transition: color var(--bsh-transition-speed) var(--bsh-transition-timing);
	white-space: nowrap;
}

.bakery-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1rem;
	border-radius: var(--bsh-radius);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	background-color: var(--bakery-primary, #b45309);
	color: #ffffff !important;
	border: 1px solid transparent;
	transition: background-color var(--bsh-transition-speed) var(--bsh-transition-timing);
	white-space: nowrap;
}

.bakery-action-btn:hover {
	background-color: var(--bakery-primary-hover, #92400e);
}

/* ==========================================================================
   FIX (v1.0.1): footer.php shipped in v1.0.0 with a full column-based
   markup structure but NO matching CSS at all was ever written for it —
   it was rendering as a bare, unstyled bulleted list (confirmed via a live
   screenshot). Everything below is new.
   ========================================================================== */

.bakery-site-footer-wrapper {
	background: var(--bakery-surface, #ffffff);
	border-top: 1px solid var(--bakery-border, #e7e5e4);
	color: var(--bakery-muted, #78716c);
	font-family: var(--bakery-font-body, inherit);
	margin-top: 3rem;
}

.bakery-footer-container {
	max-width: var(--bsh-container-max);
	margin: 0 auto;
	padding: 3rem 24px 0;
}

.bakery-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 2.5rem;
	padding-bottom: 2.5rem;
}

@media (max-width: 900px) {
	.bakery-footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}
}

@media (max-width: 560px) {
	.bakery-footer-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

.bakery-footer-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.85rem;
}

.bakery-crest-mini {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--bsh-radius-full);
	background: var(--bakery-primary, #78350f);
	color: #ffffff;
	font-weight: 700;
	font-size: 15px;
	flex-shrink: 0;
}

.bakery-footer-title {
	margin: 0;
	font-family: var(--bakery-font-heading, inherit);
	font-size: 19px;
	font-weight: 700;
	color: var(--bakery-text, #292524);
}

.bakery-footer-about-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	max-width: 34ch;
}

.bakery-footer-heading {
	margin: 0 0 1rem;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bakery-text, #292524);
}

.bakery-footer-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.bakery-footer-link {
	font-size: 14px;
	color: var(--bakery-muted, #78716c);
	text-decoration: none;
	transition: color var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-footer-link:hover {
	color: var(--bakery-primary, #78350f);
}

.bakery-footer-contact-list {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.bakery-footer-contact-item {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 14px;
}

.bakery-footer-icon {
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--bakery-primary, #78350f);
}

.bakery-footer-address {
	font-style: normal;
	line-height: 1.5;
}

.bakery-footer-social-hint {
	margin: 0 0 1rem;
	font-size: 13px;
	line-height: 1.5;
}

.bakery-footer-social-row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.bakery-footer-social-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--bsh-radius-full);
	background: var(--bakery-subtle, #f5f5f4);
	color: var(--bakery-primary, #78350f);
	transition: background-color var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-footer-social-btn:hover {
	background: var(--bakery-primary, #78350f);
	color: #ffffff;
}

.bakery-footer-bottom-bar {
	border-top: 1px solid var(--bakery-border, #e7e5e4);
	padding: 1.25rem 0;
	display: flex;
	justify-content: center;
}

.bakery-footer-copyright {
	margin: 0;
	font-size: 13px;
	text-align: center;
	color: var(--bakery-muted, #78716c);
}

.bakery-footer-hours {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.bakery-footer-hours-line {
	font-size: 14px;
	line-height: 1.5;
}

/* ==========================================================================
   FIX (round 2): diffing every class used in header.php / account-panel.php
   / mobile-drawer.php against this stylesheet showed the hamburger toggle,
   the entire account dropdown panel, and the entire mobile drawer had NO
   CSS at all — confirmed live via a screenshot showing a bare unstyled
   button. Same root cause as the footer fix: markup + JS were built, the
   matching CSS pass was never done. Everything below is new.
   ========================================================================== */

/* --- Hamburger toggle (mobile only) -------------------------------------- */
.bakery-hamburger-toggle {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	border-radius: var(--bsh-radius-sm);
	cursor: pointer;
	flex-shrink: 0;
}

.bakery-hamburger-toggle:hover,
.bakery-hamburger-toggle:focus,
.bakery-hamburger-toggle:active {
	background: var(--bakery-subtle, #f5f5f4) !important;
	background-color: var(--bakery-subtle, #f5f5f4) !important;
}

@media (min-width: 900px) {
	.bakery-hamburger-toggle {
		display: none;
	}
}

.bakery-hamburger-bar {
	display: block;
	width: 20px;
	height: 2px;
	border-radius: var(--bsh-radius-full);
	background: var(--bakery-text, #292524);
	transition: transform var(--bsh-transition-speed) var(--bsh-transition-timing),
		opacity var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-hamburger-toggle[aria-expanded="true"] .bakery-hamburger-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.bakery-hamburger-toggle[aria-expanded="true"] .bakery-hamburger-bar:nth-child(2) {
	opacity: 0;
}

.bakery-hamburger-toggle[aria-expanded="true"] .bakery-hamburger-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* --- Account panel (trigger + dropdown) ----------------------------------- */
.bakery-account-panel-wrapper {
	position: relative;
	flex-shrink: 0;
}

.bakery-account-trigger {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px 4px 4px !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 1px solid var(--bakery-border, #e7e5e4) !important;
	border-radius: var(--bsh-radius-full);
	cursor: pointer;
}

.bakery-account-trigger:hover,
.bakery-account-trigger:focus,
.bakery-account-trigger:active {
	border-color: var(--bakery-primary, #78350f) !important;
	background: transparent !important;
	background-color: transparent !important;
}

.bakery-avatar-initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: var(--bsh-radius-full);
	background: var(--bakery-primary, #78350f);
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

.bakery-dropdown-chevron {
	color: var(--bakery-muted, #78716c);
	transition: transform var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-account-trigger[aria-expanded="true"] .bakery-dropdown-chevron {
	transform: rotate(180deg);
}

.bakery-account-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 240px;
	background: var(--bakery-surface, #ffffff);
	border: 1px solid var(--bakery-border, #e7e5e4);
	border-radius: var(--bsh-radius);
	box-shadow: var(--bsh-shadow-dropdown);
	padding: 0.5rem;
	z-index: 60;
}

.bakery-account-dropdown[hidden] {
	display: none;
}

.bakery-account-user-meta {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.6rem 0.7rem 0.75rem;
}

.bakery-account-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--bakery-text, #292524);
}

.bakery-account-role-badge {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--bakery-muted, #78716c);
}

.bakery-account-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bakery-account-divider {
	height: 1px;
	margin: 0.4rem 0;
	background: var(--bakery-border, #e7e5e4);
}

.bakery-account-menu-link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.7rem;
	border-radius: var(--bsh-radius-sm);
	font-size: 14px;
	color: var(--bakery-text, #292524);
	text-decoration: none;
}

.bakery-account-menu-link:hover {
	background: var(--bakery-subtle, #f5f5f4);
}

.bakery-account-menu-link.bakery-staff-highlight {
	color: var(--bakery-primary, #78350f);
	font-weight: 600;
}

.bakery-account-menu-link.bakery-logout-link {
	color: var(--bakery-danger, #b91c1c);
}

/* --- Mobile drawer --------------------------------------------------------- */
.bakery-mobile-drawer {
	position: fixed;
	inset: 0;
	z-index: 100;
}

.bakery-mobile-drawer[hidden] {
	display: none;
}

.bakery-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(28, 25, 23, 0.45);
	opacity: 0;
	transition: opacity var(--bsh-transition-speed) var(--bsh-transition-timing);
}

.bakery-mobile-drawer.is-open .bakery-drawer-backdrop {
	opacity: 1;
}

.bakery-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(var(--bsh-drawer-width), 86vw);
	background: var(--bakery-surface, #ffffff);
	box-shadow: var(--bsh-shadow-drawer);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform var(--bsh-transition-speed) var(--bsh-transition-timing);
	overflow-y: auto;
}

.bakery-mobile-drawer.is-open .bakery-drawer-panel {
	transform: translateX(0);
}

.bakery-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.1rem;
	border-bottom: 1px solid var(--bakery-border, #e7e5e4);
	flex-shrink: 0;
}

.bakery-drawer-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.bakery-drawer-title {
	font-family: var(--bakery-font-heading, inherit);
	font-size: 16px;
	font-weight: 700;
	color: var(--bakery-text, #292524);
}

.bakery-drawer-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	border-radius: var(--bsh-radius-full);
	color: var(--bakery-muted, #78716c) !important;
	cursor: pointer;
}

.bakery-drawer-close svg {
	stroke: currentColor;
}

.bakery-drawer-close:hover,
.bakery-drawer-close:focus,
.bakery-drawer-close:active {
	background: var(--bakery-subtle, #f5f5f4) !important;
	background-color: var(--bakery-subtle, #f5f5f4) !important;
	color: var(--bakery-text, #292524) !important;
}

.bakery-drawer-nav {
	flex: 1;
	padding: 0.6rem 0.6rem;
}

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

.bakery-drawer-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.85rem 0.6rem;
	border-radius: var(--bsh-radius-sm);
	font-size: 15px;
	font-weight: 500;
	color: var(--bakery-text, #292524);
	text-decoration: none;
}

.bakery-drawer-link:hover {
	background: var(--bakery-subtle, #f5f5f4);
}

.bakery-drawer-item.is-active .bakery-drawer-link {
	color: var(--bakery-primary, #78350f);
	font-weight: 700;
}

.bakery-arrow-icon {
	color: var(--bakery-muted, #78716c);
	flex-shrink: 0;
}

.bakery-drawer-footer {
	padding: 1rem 1.1rem 1.3rem;
	border-top: 1px solid var(--bakery-border, #e7e5e4);
	flex-shrink: 0;
}

.bakery-drawer-auth-guest,
.bakery-drawer-auth-user {
	margin-bottom: 0.85rem;
}

.bakery-drawer-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.7rem;
	border-radius: var(--bsh-radius);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.bakery-drawer-btn-login {
	background: var(--bakery-primary, #78350f);
	color: #ffffff !important;
}

.bakery-drawer-user-info {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-bottom: 0.85rem;
}

.bakery-drawer-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: var(--bsh-radius-full);
	background: var(--bakery-primary, #78350f);
	color: #ffffff;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
}

.bakery-drawer-user-text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.bakery-drawer-user-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--bakery-text, #292524);
}

.bakery-drawer-user-role {
	font-size: 12px;
	color: var(--bakery-muted, #78716c);
}

.bakery-drawer-user-links {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.bakery-drawer-account-link {
	padding: 0.6rem 0.3rem;
	font-size: 14px;
	color: var(--bakery-text, #292524);
	text-decoration: none;
	border-radius: var(--bsh-radius-sm);
}

.bakery-drawer-account-link:hover {
	background: var(--bakery-subtle, #f5f5f4);
}

.bakery-drawer-account-link.bakery-logout-danger {
	color: var(--bakery-danger, #b91c1c);
}

.bakery-drawer-contact-line {
	margin-top: 0.5rem;
}

.bakery-drawer-phone {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 13px;
	color: var(--bakery-muted, #78716c);
	text-decoration: none;
}

/* FIX: .visually-hidden is used on the account trigger's display-name span
   but was never defined anywhere — it isn't a WordPress core class (core
   uses .screen-reader-text) and can't be assumed to exist in Astra's
   frontend CSS. Defined here so the name doesn't show as visible text next
   to the avatar. */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
