/* ==========================================================================
   layout.css: containers, announcement bar, header, footer
   ========================================================================== */

:root {
	--header-offset: 88px; /* 12px gap + 76px header. The header floats over the first section. */
}

/* ---------- Containers ---------- */

/* Main container: 1180px content + 20px padding on each side, on every screen size. */
.container {
	width: 100%;
	max-width: calc(var(--container) + (var(--gutter) * 2));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Width variants. Each section picks the width Figma gives it. */
.container--narrow { max-width: calc(var(--container-narrow) + (var(--gutter) * 2)); }
.container--split  { max-width: calc(var(--container-split) + (var(--gutter) * 2)); }

/* Content pages without a hero (default pages, 404) start below the floating header. */
.page-shell {
	padding-top: calc(var(--header-offset) + var(--space-48));
	padding-bottom: var(--space-72);
}

/* The header floats over the first section of every page (as in Figma). */
.site-main {
	margin-top: calc(var(--header-offset) * -1);
}

/* ---------- Announcement bar ----------
   Figma: 1440 × 37, navy, padding 10/24, gap 24, centered. */
.announcement {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-24);
	padding: 10px 24px;
	background: var(--color-navy);
	color: var(--color-white);
	text-align: center;
}

/* All messages sit in the same grid cell, so the bar never jumps when they rotate. */
.announcement__messages {
	display: grid;
}

.announcement__message {
	grid-area: 1 / 1;
	font-size: 14px;
	line-height: 17px;
}

.announcement__message strong {
	color: var(--color-yellow);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.announcement__messages.is-rotating .announcement__message {
	opacity: 0;
	visibility: hidden;
	transition: opacity 400ms ease, visibility 400ms;
}

.announcement__messages.is-rotating .announcement__message.is-active {
	opacity: 1;
	visibility: visible;
}

.announcement__phone {
	font-size: 13px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.announcement__phone:hover {
	text-decoration: underline;
}

/* ---------- Header ----------
   Figma: wrapper padding 12/24/0/24; nav 1392 × 76, white, 2px navy border,
   radius 14, padding 10/16/10/20, gap 20. Sticks to the top on scroll (prototype). */
.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	padding: 12px 24px 0;
	pointer-events: none; /* The transparent strip around the nav must not block clicks. */
}

/* Below 600px the WordPress admin bar scrolls away with the page (logged-in users only),
   so the header must stick to the very top instead of leaving a 46px gap. */
@media (max-width: 600px) {
	.site-header {
		top: 0;
	}
}

.site-nav {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-20);
	max-width: var(--container-header);
	height: 76px;
	margin-inline: auto;
	padding: 10px 16px 10px 20px;
	background: var(--color-white);
	border: var(--border);
	border-radius: var(--radius-14);
	pointer-events: auto;
}

.site-nav__logo {
	flex-shrink: 0;
}

.site-nav__logo-img {
	width: 104px;
	height: 46px;
	object-fit: contain;
}

.site-nav__logo-text {
	font-family: var(--font-display);
	font-size: 24px;
	line-height: 28px;
	color: var(--color-navy);
}

/* Links fill the space between logo and buttons, centered. */
.site-nav__panel {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.site-nav__menu {
	display: flex;
	gap: var(--space-20);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__menu a {
	position: relative;
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--color-navy);
}

/* Active page indicator. Figma: 3px blue line, 4px below the text.
   It also slides in on hover (prototype behavior). */
.site-nav__menu a::after {
	content: "";
	position: absolute;
	left: 1px;
	right: 1px;
	top: calc(100% + 2.5px);
	height: 3px;
	background: var(--color-blue);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 200ms var(--ease-out);
}

.site-nav__menu a:hover::after,
.site-nav__menu a:focus-visible::after,
.site-nav__menu .current-menu-item > a::after {
	transform: scaleX(1);
}

/* Figma shows no indicator under "Home" on the home page itself. */
.home .site-nav__menu .menu-item-home:not(:hover) > a::after {
	transform: scaleX(0);
}

.site-nav__panel-cta {
	display: none;
}

.site-nav__actions {
	display: flex;
	align-items: center;
	gap: var(--space-8);
	flex-shrink: 0;
}

/* Cart button. Figma: 60 × 50, navy, radius 10, padding 12/14, gap 6. */
.site-nav__cart {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 50px;
	padding: 12px 14px;
	background: var(--color-navy);
	color: var(--color-white);
	border-radius: var(--radius-10);
	font-size: 13px;
	font-weight: 700;
	line-height: 16px;
	transition: transform 150ms var(--ease-out);
}

.site-nav__cart:hover {
	transform: translateY(-2px);
}

.site-nav__cart svg {
	width: 16px;
	height: 16px;
}

/* Mobile menu button (hidden on desktop). */
.site-nav__toggle {
	display: none;
	position: relative;
	width: 40px;
	height: 40px;
	padding: 0;
	background: var(--color-navy);
	color: var(--color-white);
	border: 0;
	border-radius: var(--radius-10);
}

/* Three-line icon that turns into an X when open. */
.site-nav__toggle-bar,
.site-nav__toggle-bar::before,
.site-nav__toggle-bar::after {
	position: absolute;
	left: 50%;
	width: 18px;
	height: 2px;
	margin-left: -9px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 200ms var(--ease-out), background-color 200ms;
}

.site-nav__toggle-bar {
	top: 50%;
	margin-top: -1px;
}

.site-nav__toggle-bar::before,
.site-nav__toggle-bar::after {
	content: "";
	left: 0;
	margin-left: 0;
}

.site-nav__toggle-bar::before { transform: translateY(-6px); }
.site-nav__toggle-bar::after  { transform: translateY(6px); }

.site-nav.is-open .site-nav__toggle-bar { background-color: transparent; }
.site-nav.is-open .site-nav__toggle-bar::before { transform: rotate(45deg); }
.site-nav.is-open .site-nav__toggle-bar::after  { transform: rotate(-45deg); }

/* ---------- Footer ----------
   Figma: navy, padding 56/130/90/130 (→ 1180 container), gap 36,
   columns gap 28, headings Lilita 24/28 white, text DM Sans 14/17 cream. */
.site-footer {
	padding: 56px 0 90px;
	background: var(--color-navy);
	color: var(--color-cream);
}

.site-footer__content {
	display: flex;
	align-items: flex-start;
	gap: 28px;
}

.site-footer__brand {
	flex: 1;
	min-width: 0;
}

.site-footer__logo img {
	width: 193px;
	height: 90px;
	object-fit: contain;
	object-position: left center;
}

.site-footer__logo-text {
	font-family: var(--font-display);
	font-size: 48px;
	line-height: 52px;
	color: var(--color-yellow);
}

.site-footer__tagline {
	margin-top: 14px;
	font-size: 14px;
	line-height: 17px;
}

.site-footer__col {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.site-footer__heading {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 0.01em;
	color: var(--color-white);
}

.site-footer__address,
.site-footer__links {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-style: normal;
	font-size: 14px;
	line-height: 17px;
}

.site-footer__address a:hover,
.site-footer__links a:hover {
	color: var(--color-white);
	text-decoration: underline;
}

.site-footer__copyright {
	margin-top: 36px;
	font-size: 14px;
	line-height: 17px;
	text-align: center;
}

/* ==========================================================================
   Tablet: 1024px and below
   ========================================================================== */
@media (max-width: 1024px) {
	/* Navigation collapses into a dropdown panel under the header. */
	.site-nav__toggle {
		display: inline-block;
	}

	.site-nav__actions {
		margin-left: auto;
	}

	.site-nav__panel {
		display: none;
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		padding: 12px;
		background: var(--color-white);
		border: var(--border);
		border-radius: var(--radius-14);
	}

	.site-nav.is-open .site-nav__panel {
		display: flex;
	}

	.site-nav__menu {
		flex-direction: column;
		gap: 4px;
	}

	.site-nav__menu a {
		padding: 10px 8px;
		border-radius: 8px;
		font-size: 14px;
	}

	.site-nav__menu a::after {
		display: none;
	}

	.site-nav__menu a:hover,
	.site-nav__menu .current-menu-item > a {
		background: var(--color-tint);
	}

	.home .site-nav__menu .menu-item-home:not(:hover) > a {
		background: none;
	}

	/* Footer: brand on its own row, columns below. */
	.site-footer__content {
		flex-wrap: wrap;
		gap: 32px 48px;
	}

	.site-footer__brand {
		flex-basis: 100%;
	}
}

/* ==========================================================================
   Mobile: 767px and below
   ========================================================================== */
@media (max-width: 767px) {
	/* Announcement: rotating message only; phone is in the footer.
	   Prototype uses 12px text on small screens. */
	.announcement {
		padding: 10px var(--gutter);
	}

	.announcement__phone {
		display: none;
	}

	.announcement__message {
		font-size: 12px;
		line-height: 16px;
	}

	.announcement__message strong {
		font-size: 12px;
	}

	.site-header {
		padding-inline: var(--gutter);
	}

	.site-nav {
		padding: 10px 12px 10px 14px;
	}

	/* "Order Pickup" moves from the bar into the menu panel. */
	.site-nav__cta {
		display: none;
	}

	.site-nav__panel-cta {
		display: flex;
		margin-top: 8px;
	}

	.site-footer__content {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 32px 20px;
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}

	.site-footer__col--visit {
		grid-column: 1 / -1;
	}
}
