/* =========================================================================
   Bistro — Header & Footer Layout System
   Colors come from CSS variables injected by inc/layout-functions.php:
   --bistro-accent, --bistro-header-bg, --bistro-footer-bg
   ========================================================================= */

:root {
	--bistro-accent: #e05a3a;
	--bistro-header-bg: #ffffff;
	--bistro-footer-bg: #191714;
	--bistro-ink: #1e1b17;
	--bistro-muted: #8b857c;
	--bistro-footer-ink: #cfc9c0;
	--bistro-container: 1240px;
}

.bistro-container {
	max-width: var(--bistro-container);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Shared header ------------------------------------------------ */

.site-header {
	background: var(--bistro-header-bg);
	position: relative;
	z-index: 100;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bistro-sticky-header .site-header {
	position: sticky;
	top: 0;
}

.bistro-transparent-header .site-header {
	position: absolute;
	inset: 0 0 auto 0;
	background: transparent;
	border-bottom-color: rgba(255, 255, 255, 0.15);
}

.header-row {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: 76px;
}

.site-branding img.custom-logo {
	max-height: 52px;
	width: auto;
	display: block;
}

.site-title {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--bistro-ink);
	text-decoration: none;
}

.bistro-transparent-header .site-title,
.bistro-transparent-header .bistro-menu > li > a,
.bistro-transparent-header .header-icon,
.bistro-transparent-header .menu-toggle span {
	color: #fff;
	border-color: #fff;
}

/* Menus */
.bistro-menu {
	display: flex;
	align-items: center;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bistro-menu > li {
	position: relative;
}

.bistro-menu > li > a {
	position: relative;
	display: inline-block;
	color: var(--bistro-menu-color, var(--bistro-ink));
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	padding: 8px 0;
	transition: color 0.2s ease, letter-spacing 0.2s ease, transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.bistro-menu > li > a:hover,
.bistro-menu > li.current-menu-item > a {
	color: var(--bistro-menu-hover, var(--bistro-accent));
}

/* Dropdowns */
.bistro-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: var(--bistro-dd-bg, #fff);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
	list-style: none;
	margin: 0;
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all 0.2s ease;
}

.bistro-menu li:hover > .sub-menu,
.bistro-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.bistro-menu .sub-menu a {
	display: block;
	padding: 8px 18px;
	color: var(--bistro-dd-text, var(--bistro-ink));
	text-decoration: none;
	font-size: 14px;
}

.bistro-menu .sub-menu a:hover {
	color: var(--bistro-dd-hover-text, var(--bistro-accent));
	background: var(--bistro-dd-hover-bg, rgba(0, 0, 0, 0.03));
}

/* Header actions (icons / button / toggle) */
.header-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}

.header-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	color: var(--bistro-ink);
	transition: color 0.2s ease, background 0.2s ease;
}

.header-icon:hover {
	color: var(--bistro-accent);
	background: rgba(0, 0, 0, 0.04);
}

.cart-count {
	position: absolute;
	top: 0;
	right: 0;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--bistro-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}

.bistro-btn {
	display: inline-block;
	background: var(--bistro-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 11px 26px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.15s ease;
}

.bistro-btn:hover {
	filter: brightness(0.92);
	transform: translateY(-1px);
	color: #fff;
}

.bistro-btn--large {
	padding: 15px 36px;
	font-size: 16px;
}

/* Social icons */
.bistro-social {
	display: flex;
	align-items: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bistro-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: currentColor;
	transition: color 0.2s ease, background 0.2s ease;
}

.bistro-social a:hover {
	color: var(--bistro-accent);
	background: rgba(0, 0, 0, 0.05);
}

/* Mobile toggle (hidden on desktop) */
.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 8px;
	background: transparent;
	border: none;
	cursor: pointer;
}

.menu-toggle span {
	display: block;
	height: 2px;
	background: var(--bistro-ink);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.bistro-nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bistro-nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
.bistro-nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.bistro-mobile-nav {
	display: none;
	background: var(--bistro-header-bg);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	padding: 12px 24px 20px;
}

.bistro-nav-open .bistro-mobile-nav {
	display: block;
}

.bistro-menu--mobile {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.bistro-menu--mobile > li > a {
	display: block;
	padding: 12px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bistro-menu--mobile .sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	border: none;
	box-shadow: none;
	padding-left: 16px;
}

/* ---------- Header layout 1: logo left / menu center / icons right ------ */

.site-header--1 .bistro-nav--center {
	margin: 0 auto;
}

/* ---------- Header layouts 2 & 5: split with logo center ---------------- */

.header-row--split {
	justify-content: space-between;
}

.header-row--split .site-branding {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.header-row--split {
	position: relative;
}

.header-split {
	display: flex;
	align-items: center;
	gap: 24px;
	flex: 1;
}

.header-split--right {
	justify-content: flex-end;
}

.header-split--right .header-actions {
	margin-left: 0;
}

/* ---------- Header layout 3: top bar ------------------------------------ */

.header-topbar {
	background: var(--bistro-ink);
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
}

.header-topbar__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 38px;
}

.bistro-social--topbar a {
	width: 28px;
	height: 28px;
	color: rgba(255, 255, 255, 0.85);
}

.bistro-social--topbar a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.site-header--3 .bistro-nav--right {
	margin-left: auto;
}

.site-header--3 .header-actions {
	margin-left: 0;
}

/* ---------- Header layout 4: stacked ------------------------------------ */

.header-stack {
	display: flex;
	flex-direction: column;
}

.header-stack__top {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: 18px 0 10px;
}

.header-stack__top .header-actions {
	position: absolute;
	right: 0;
	margin-left: 0;
}

.header-stack__bottom {
	display: flex;
	justify-content: center;
	padding-bottom: 14px;
}

/* ---------- Shared footer ------------------------------------------------ */

.site-footer {
	background: var(--bistro-footer-bg);
	color: var(--bistro-footer-ink);
	margin-top: 80px;
}

.site-footer a {
	color: var(--bistro-footer-ink);
	text-decoration: none;
	transition: color 0.2s ease;
}

.site-footer a:hover {
	color: #fff;
}

.footer-main {
	padding: 64px 24px 40px;
}

.footer-columns {
	display: grid;
	gap: 40px;
}

.footer-columns--4 { grid-template-columns: repeat(4, 1fr); }
.footer-columns--3 { grid-template-columns: repeat(3, 1fr); }
.footer-columns--2 { grid-template-columns: repeat(2, 1fr); }

.footer-widget__title {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0 0 18px;
}

.footer-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-widget ul li {
	margin-bottom: 10px;
	font-size: 14.5px;
}

.footer-col__empty {
	font-size: 13px;
	opacity: 0.55;
	border: 1px dashed rgba(255, 255, 255, 0.25);
	border-radius: 6px;
	padding: 14px;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 13.5px;
}

.footer-bottom__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 56px;
	flex-wrap: wrap;
}

.footer-copy {
	margin: 0;
	opacity: 0.8;
}

.bistro-social--footer a {
	color: var(--bistro-footer-ink);
}

.bistro-social--footer a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.bistro-nav--footer .bistro-menu {
	gap: 20px;
}

.bistro-nav--footer .bistro-menu > li > a {
	color: var(--bistro-footer-ink);
	font-size: 14px;
}

.bistro-nav--footer .bistro-menu > li > a:hover {
	color: #fff;
}

/* ---------- Footer layout 2: newsletter row ----------------------------- */

.footer-newsletter {
	background: var(--bistro-accent);
	color: #fff;
}

.footer-newsletter__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding-top: 30px;
	padding-bottom: 30px;
	flex-wrap: wrap;
}

.footer-newsletter__title {
	margin: 0;
	font-size: 22px;
	color: #fff;
}

.footer-newsletter__basic {
	display: flex;
	gap: 10px;
}

.footer-newsletter__basic input[type="email"] {
	min-width: 260px;
	padding: 11px 18px;
	border: none;
	border-radius: 999px;
	font-size: 14px;
}

.footer-newsletter__basic .bistro-btn {
	background: var(--bistro-ink);
}

/* ---------- Footer layout 4: centered ------------------------------------ */

.footer-centered {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	padding: 56px 24px;
	text-align: center;
}

.footer-centered .site-title {
	color: #fff;
}

.footer-centered .bistro-menu {
	justify-content: center;
	flex-wrap: wrap;
}

/* ---------- Footer layout 5: mega ---------------------------------------- */

.footer-cta {
	background: rgba(255, 255, 255, 0.05);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-cta__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	padding-top: 34px;
	padding-bottom: 34px;
	flex-wrap: wrap;
}

.footer-cta__title {
	margin: 0;
	color: #fff;
	font-size: 26px;
}

.footer-bottom__right {
	display: flex;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
}

/* ---------- Accessibility ------------------------------------------------ */

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--bistro-accent);
	color: #fff;
	padding: 10px 18px;
	border-radius: 0 0 6px 0;
}

.skip-link:focus {
	left: 0;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--bistro-accent);
	outline-offset: 2px;
}

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

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 1024px) {
	.footer-columns--4 { grid-template-columns: repeat(2, 1fr); }
	.footer-columns--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
	/* Collapse all desktop navs into the mobile drawer */
	.site-header .bistro-nav {
		display: none;
	}

	.menu-toggle {
		display: flex;
	}

	.header-row--split .site-branding {
		position: static;
		transform: none;
	}

	.header-split--left {
		display: none;
	}

	.header-row--split {
		justify-content: space-between;
	}

	.bistro-btn--header {
		display: none;
	}

	.header-stack__top {
		justify-content: flex-start;
	}

	.header-topbar__text {
		font-size: 12px;
	}
}

@media (max-width: 600px) {
	.footer-columns--4,
	.footer-columns--3,
	.footer-columns--2 {
		grid-template-columns: 1fr;
	}

	.footer-bottom__row,
	.footer-newsletter__row,
	.footer-cta__row {
		justify-content: center;
		text-align: center;
	}

	.footer-newsletter__basic {
		flex-direction: column;
		width: 100%;
	}

	.footer-newsletter__basic input[type="email"] {
		min-width: 0;
		width: 100%;
	}
}

/* =========================================================================
   Menu hover animations (body.bistro-menuanim-*)
   ========================================================================= */

/* Underline: slide from left */
.bistro-menuanim-underline .site-header .bistro-menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 2px;
	width: 100%;
	height: 2px;
	background: var(--bistro-menu-hover);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.25s ease;
}

.bistro-menuanim-underline .site-header .bistro-menu > li > a:hover::after,
.bistro-menuanim-underline .site-header .bistro-menu > li.current-menu-item > a::after {
	transform: scaleX(1);
}

/* Underline: grow from center */
.bistro-menuanim-underline-center .site-header .bistro-menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 2px;
	width: 100%;
	height: 2px;
	background: var(--bistro-menu-hover);
	transform: scaleX(0);
	transform-origin: center center;
	transition: transform 0.25s ease;
}

.bistro-menuanim-underline-center .site-header .bistro-menu > li > a:hover::after,
.bistro-menuanim-underline-center .site-header .bistro-menu > li.current-menu-item > a::after {
	transform: scaleX(1);
}

/* Overline: slide from left */
.bistro-menuanim-overline .site-header .bistro-menu > li > a::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 2px;
	background: var(--bistro-menu-hover);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.25s ease;
}

.bistro-menuanim-overline .site-header .bistro-menu > li > a:hover::before,
.bistro-menuanim-overline .site-header .bistro-menu > li.current-menu-item > a::before {
	transform: scaleX(1);
}

/* Soft fade */
.bistro-menuanim-fade .site-header .bistro-menu > li > a:hover {
	opacity: 0.6;
}

/* Background pill */
.bistro-menuanim-pill .site-header .bistro-menu > li > a {
	padding: 8px 14px;
	border-radius: 999px;
}

.bistro-menuanim-pill .site-header .bistro-menu > li > a:hover,
.bistro-menuanim-pill .site-header .bistro-menu > li.current-menu-item > a {
	background: color-mix(in srgb, var(--bistro-menu-hover) 12%, transparent);
}

/* Letter spacing expand */
.bistro-menuanim-letterspace .site-header .bistro-menu > li > a:hover {
	letter-spacing: 0.08em;
}

/* Lift up */
.bistro-menuanim-lift .site-header .bistro-menu > li > a:hover {
	transform: translateY(-2px);
}

/* =========================================================================
   Dropdown animations (body.bistro-ddanim-*)
   Default in base CSS is fade+8px rise; variants adjust the hidden state.
   ========================================================================= */

.bistro-ddanim-none .bistro-menu .sub-menu {
	transition: none;
	transform: none;
}

.bistro-ddanim-fade .bistro-menu .sub-menu {
	transform: none;
}

.bistro-ddanim-slide .bistro-menu .sub-menu {
	transform: translateY(16px);
}

.bistro-ddanim-scale .bistro-menu .sub-menu {
	transform: scale(0.92);
	transform-origin: top center;
}

.bistro-ddanim-flip .bistro-menu .sub-menu {
	transform: perspective(600px) rotateX(-14deg);
	transform-origin: top center;
}

.bistro-ddanim-slide .bistro-menu li:hover > .sub-menu,
.bistro-ddanim-slide .bistro-menu li:focus-within > .sub-menu,
.bistro-ddanim-scale .bistro-menu li:hover > .sub-menu,
.bistro-ddanim-scale .bistro-menu li:focus-within > .sub-menu,
.bistro-ddanim-flip .bistro-menu li:hover > .sub-menu,
.bistro-ddanim-flip .bistro-menu li:focus-within > .sub-menu {
	transform: none;
}

/* =========================================================================
   Click-to-open dropdowns (body.bistro-dd-click)
   ========================================================================= */

.bistro-dd-click .site-header .bistro-menu li:hover > .sub-menu,
.bistro-dd-click .site-header .bistro-menu li:focus-within > .sub-menu {
	opacity: 0;
	visibility: hidden;
}

.bistro-dd-click .site-header .bistro-menu li.is-open > .sub-menu {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
}

.bistro-dd-click .site-header .bistro-menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	margin-left: 7px;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s ease;
	position: static;
	background: none;
}

.bistro-dd-click .site-header .bistro-menu > li.menu-item-has-children.is-open > a::after {
	transform: rotate(-135deg) translateY(-2px);
}

/* =========================================================================
   Page loader
   ========================================================================= */

.bistro-loader {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: var(--bistro-loader-bg, #fff);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

.bistro-loader.is-done {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.bistro-loader__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

/* Spinner ring / double ring */
.bistro-loader__ring {
	width: 54px;
	height: 54px;
	border: 4px solid color-mix(in srgb, var(--bistro-loader-color) 20%, transparent);
	border-top-color: var(--bistro-loader-color);
	border-radius: 50%;
	animation: bistro-spin 0.9s linear infinite;
}

.bistro-loader__ring--inner {
	position: absolute;
	width: 34px;
	height: 34px;
	border-width: 3px;
	border-top-color: transparent;
	border-bottom-color: var(--bistro-loader-color);
	animation: bistro-spin 0.9s linear infinite reverse;
}

/* Bouncing dots */
.bistro-loader__dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--bistro-loader-color);
	animation: bistro-bounce 0.6s ease-in-out infinite alternate;
}

.bistro-loader__dot:nth-child(2) { animation-delay: 0.15s; }
.bistro-loader__dot:nth-child(3) { animation-delay: 0.3s; }

/* Equalizer bars */
.bistro-loader__bar {
	width: 8px;
	height: 40px;
	border-radius: 4px;
	background: var(--bistro-loader-color);
	animation: bistro-stretch 0.9s ease-in-out infinite;
}

.bistro-loader__bar:nth-child(2) { animation-delay: 0.12s; }
.bistro-loader__bar:nth-child(3) { animation-delay: 0.24s; }
.bistro-loader__bar:nth-child(4) { animation-delay: 0.36s; }

/* Pulse circle */
.bistro-loader__pulse {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--bistro-loader-color);
	animation: bistro-pulse 1.1s ease-out infinite;
}

/* Top progress bar */
.bistro-loader--progress {
	align-items: flex-start;
	background: transparent;
	pointer-events: none;
}

.bistro-loader--progress .bistro-loader__inner {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
}

.bistro-loader__progress {
	display: block;
	width: 100%;
	height: 3px;
	background: color-mix(in srgb, var(--bistro-loader-color) 20%, transparent);
	position: relative;
	overflow: hidden;
}

.bistro-loader__progress::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 40%;
	background: var(--bistro-loader-color);
	animation: bistro-progress 1.1s ease-in-out infinite;
}

@keyframes bistro-spin {
	to { transform: rotate(360deg); }
}

@keyframes bistro-bounce {
	from { transform: translateY(6px); opacity: 0.5; }
	to   { transform: translateY(-8px); opacity: 1; }
}

@keyframes bistro-stretch {
	0%, 100% { transform: scaleY(0.5); }
	50%      { transform: scaleY(1.2); }
}

@keyframes bistro-pulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bistro-loader-color) 45%, transparent); }
	100% { box-shadow: 0 0 0 34px transparent; transform: scale(1.05); }
}

@keyframes bistro-progress {
	0%   { left: -40%; }
	100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.bistro-loader {
		display: none;
	}
}

/* Transparent + sticky combination: fix to top, solid state on scroll */
.bistro-transparent-header.bistro-sticky-header .site-header {
	position: fixed;
	inset: 0 0 auto 0;
}

.bistro-transparent-header.bistro-scrolled .site-header {
	transition: background 0.3s ease;
}
