/**
 * The shared shell: container, header, navigation, mobile menu, footer.
 *
 * Mobile-first. Every value is a token.
 *
 * @package CreativeCanvas
 */

/* ---------------------------------------------------------------------------
 * Container
 * ------------------------------------------------------------------------ */

.cc-container {
	width: 100%;
	max-width: var(--cc-container-max);
	margin-inline: auto;
	padding-inline: var(--cc-container-pad);
}

/* Grows to fill the viewport so the footer is pushed to the bottom. */
/* The frame: header, main and footer are Soft White blocks of the container
 * width, centred on the darker page, so the edge shows on both sides. */
.cc-main {
	display: block;
	flex: 1 0 auto;
	width: 100%;
	max-width: var(--cc-container-max);
	margin-inline: auto;
	padding-block-end: var(--cc-space-16);
	background-color: var(--cc-color-ground);
}

/* Page titles (page.php, incl. the cart and checkout pages) keep a step of
 * air below them on every page, not only where static.css loads. */
.cc-page__head {
	margin-block-end: var(--cc-space-8);
}

/* The home page's last block meets the footer directly. */
body.home .cc-main {
	padding-block-end: 0;
}

/* Vertical section rhythm: 64px below 768px, 96px above. */
.cc-section {
	padding-block: var(--cc-section-y);
}

/* ---------------------------------------------------------------------------
 * Skip link — visually hidden until focused, then pinned top-left.
 * ------------------------------------------------------------------------ */

.cc-skip-link {
	position: absolute;
	inset-inline-start: var(--cc-space-2);
	inset-block-start: var(--cc-space-2);
	z-index: 100;
	transform: translateY(-200%);
	background-color: var(--cc-color-ink);
	color: var(--cc-color-ground);
	padding: var(--cc-space-2) var(--cc-space-4);
	font-size: var(--cc-text-ui);
	text-decoration: none;
	transition: transform var(--cc-duration-fast) var(--cc-ease);
}

.cc-skip-link:focus {
	transform: translateY(0);
	color: var(--cc-color-ground);
}

/* ---------------------------------------------------------------------------
 * Header — the redesign's bar (owner decision 2026-09-14, bead 8dt.13)
 *
 * One 72px bar and a 1px rule; the mockup's announcement strip is gone (the
 * free-delivery strip above the bar is cc-shop-extras', 2026-09-25). Three
 * columns from lg: wordmark left, uppercase navigation centred, language and
 * cart right. Below lg the navigation folds into the disclosure menu on the
 * right. Sticky and lightly blurred, with an opaque fallback declared first.
 * ------------------------------------------------------------------------ */

.cc-header {
	position: sticky;
	inset-block-start: 0;
	z-index: 40;
	width: 100%;
	max-width: var(--cc-container-max);
	margin-inline: auto;
	background-color: var(--cc-color-ground);
	border-block-end: var(--cc-border);
}

@supports (backdrop-filter: blur(1px)) and (background-color: color-mix(in srgb, red 50%, transparent)) {
	.cc-header {
		background-color: color-mix(in srgb, var(--cc-color-ground) 95%, transparent);
		backdrop-filter: blur(8px);
	}
}

.cc-header__bar {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: var(--cc-space-4);
	min-height: var(--cc-header-bar-height);
}

/* Wordmark: Archivo, uppercase, opened up. 15px on a phone, 17px from md. */
.cc-header__brand {
	font-family: var(--cc-font-display);
	font-size: 1.3125rem;
	font-weight: var(--cc-weight-medium);
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	color: var(--cc-color-ink);
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	justify-self: center;
}

.cc-header__brand:hover,
.cc-header__brand:focus-visible {
	color: var(--cc-color-ink);
}

.cc-header__actions {
	display: flex;
	align-items: center;
	justify-self: end;
	gap: 14px;
}

/*
 * Cart: an outline bag with the count in a square badge on its shoulder. The
 * glyph inherits currentColor; the accessible name is the sr-only text in
 * the template.
 */
.cc-header__cart,
.cc-header__account {
	position: relative;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--cc-color-ink);
	padding: var(--cc-space-1);
}

.cc-header__cart:hover,
.cc-header__cart:focus-visible,
.cc-header__account:hover,
.cc-header__account:focus-visible {
	color: var(--cc-color-action);
}

.cc-header__cart-icon,
.cc-header__account-icon {
	width: 18px;
	height: 18px;
}

.cc-header__cart-count {
	/* The handoff's cart: a 26px disc in the action colour (Espresso) carrying the count, Inter 12/500. */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	font-family: var(--cc-font-body);
	font-size: var(--cc-text-caption);
	font-weight: var(--cc-weight-medium);
	line-height: 1;
	border-radius: var(--cc-radius-pill);
	background-color: var(--cc-color-action);
	color: var(--cc-color-ground);
	transition: background-color var(--cc-duration-fast) var(--cc-ease);
}

.cc-header__cart:hover .cc-header__cart-count,
.cc-header__cart:focus-visible .cc-header__cart-count {
	background-color: var(--cc-color-action-hover);
}

.cc-header__cart-count[hidden] {
	display: none;
}

/* Search: an 18px glyph that discloses a one-field product search. */
.cc-search {
	position: relative;
	display: none; /* the phone keeps only the cart and the menu, like the language switch */
}

.cc-search__toggle {
	list-style: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: calc(-1 * (2.75rem - 18px) / 2);
	cursor: pointer;
	color: var(--cc-color-ink);
	user-select: none;
}

.cc-search__toggle::-webkit-details-marker {
	display: none;
}

.cc-search__toggle:focus-visible {
	outline: var(--cc-focus-width) solid var(--cc-focus-color);
	outline-offset: var(--cc-focus-offset);
}

.cc-search__icon {
	width: 18px;
	height: 18px;
}

.cc-search__panel {
	position: absolute;
	inset-inline-end: 0;
	inset-block-start: calc(100% + var(--cc-space-3));
	z-index: 50;
	width: 20rem;
	padding: var(--cc-space-3);
	background-color: var(--cc-color-ground);
	border: var(--cc-border);
	border-radius: var(--cc-radius);
}

.cc-search__form {
	display: flex;
	gap: var(--cc-space-2);
}

.cc-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 2.75rem;
	padding: 0 var(--cc-space-4);
	border: var(--cc-border);
	border-radius: var(--cc-radius-pill);
	background-color: var(--cc-color-ground);
	color: var(--cc-color-ink);
	font: inherit;
	font-size: var(--cc-text-footnote);
}

.cc-search__input:focus-visible {
	outline: var(--cc-focus-width) solid var(--cc-focus-color);
	outline-offset: var(--cc-focus-offset);
}

/* ---------------------------------------------------------------------------
 * Navigation — uppercase Archivo, 13px, 0.1em tracking, underline wipe kept.
 * ------------------------------------------------------------------------ */

.cc-nav {
	display: none; /* desktop-only; mobile uses the disclosure below */
}

.cc-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--cc-space-8);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cc-nav__list a {
	font-family: var(--cc-font-body);
	font-size: var(--cc-text-small);
	font-weight: var(--cc-weight-regular);
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	color: var(--cc-color-ink);
	padding-block: var(--cc-space-1);
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-size: 0 1.5px;
	background-position: 0 100%;
	transition: background-size var(--cc-duration-mid) var(--cc-ease);
}

.cc-nav__list a:hover,
.cc-nav__list a:focus-visible {
	color: var(--cc-color-ink);
	background-size: 100% 1.5px;
}

.cc-nav__list .current-menu-item > a,
.cc-nav__list .current_page_item > a {
	background-size: 100% 1.5px;
}

/* ---------------------------------------------------------------------------
 * Language switcher — inline "ET | EN": the current language bold, the others
 * plain links, a hairline between. Real per-page alternates from cc-i18n.
 * ------------------------------------------------------------------------ */

.cc-lang {
	display: none; /* the phone header keeps only the cart and the menu */
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--cc-text-small);
	line-height: var(--cc-leading-ui);
}

.cc-lang li + li {
	border-inline-start: var(--cc-border);
	margin-inline-start: var(--cc-space-2);
	padding-inline-start: var(--cc-space-2);
}

.cc-lang a {
	text-decoration: none;
	color: var(--cc-color-muted);
}

.cc-lang a:hover,
.cc-lang a:focus-visible {
	color: var(--cc-color-ink);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cc-lang__current {
	font-weight: var(--cc-weight-bold);
	color: var(--cc-color-ink);
}

/* ---------------------------------------------------------------------------
 * Mobile menu — a native <details>: a three-line glyph opens a panel listing
 * the navigation and, on a phone, the languages. nav.js adds Escape,
 * click-outside and scroll lock on top; nothing essential depends on it.
 * ------------------------------------------------------------------------ */

.cc-menu {
	position: relative;
}

.cc-menu__toggle {
	list-style: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;  /* 44px touch target */
	height: 2.75rem;
	cursor: pointer;
	color: var(--cc-color-ink);
	user-select: none;
}

.cc-menu__toggle::-webkit-details-marker {
	display: none;
}

.cc-menu__toggle:focus-visible {
	outline: var(--cc-focus-width) solid var(--cc-focus-color);
	outline-offset: var(--cc-focus-offset);
}

.cc-menu__icon {
	width: 1.375rem;
	height: 1.375rem;
}

.cc-menu__panel {
	position: absolute;
	inset-block-start: calc(100% + var(--cc-space-2));
	z-index: 50;
	min-width: 15rem;
	background-color: var(--cc-color-ground);
	border: var(--cc-border);
	padding: var(--cc-space-5);
	inset-inline-start: 0;
}

.cc-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--cc-space-3);
}

.cc-menu__list a {
	font-family: var(--cc-font-body);
	font-size: var(--cc-text-base);
	font-weight: var(--cc-weight-medium);
	text-decoration: none;
	color: var(--cc-color-ink);
	letter-spacing: 0;
	text-transform: none;
}

.cc-menu__list a:hover,
.cc-menu__list a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Languages inside the panel on a phone. */
.cc-menu__panel .cc-lang {
	display: flex;
	margin-block-start: var(--cc-space-5);
	padding-block-start: var(--cc-space-4);
	border-block-start: var(--cc-border);
}

/* ---------------------------------------------------------------------------
 * Footer — the band. Three columns from md: the brand and company identity,
 * then two link columns. No legal bar: the identity IS the legal line.
 * ------------------------------------------------------------------------ */

.cc-footer {
	/* The handoff's footer: the action colour (Espresso since 2026-10-15), edge to edge, 32px 34px 22px inside. */
	--cc-footer-muted: var(--cc-color-on-action-muted);
	--cc-footer-rule: var(--cc-color-footer-rule);
	max-width: var(--cc-container-max);
	margin-inline: auto;
	/* Flush under main on every page: the frame is one continuous card
	 * (owner, 2026-09-23). Main carries the space above instead. */
	margin-block-start: 0;
	background-color: var(--cc-color-action);
	color: var(--cc-color-on-action);
}

.cc-footer__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--cc-space-8);
	padding-block: var(--cc-space-8) var(--cc-space-6-5);
}

.cc-footer__brand-row {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cc-footer__wordmark {
	font-family: var(--cc-font-display);
	font-size: 1.5rem;
	font-weight: var(--cc-weight-medium);
	line-height: 1.2;
	color: var(--cc-color-on-action);
}

.cc-footer__identity {
	margin-block-start: var(--cc-space-4);
	font-size: var(--cc-text-caption);
	line-height: var(--cc-leading-caption);
	color: var(--cc-footer-muted);
}

.cc-footer__heading {
	margin-block-end: var(--cc-space-2);
	padding-block-end: var(--cc-space-1);
	font-size: var(--cc-text-footnote);
	font-weight: var(--cc-weight-semibold);
	color: var(--cc-color-on-action);
}

.cc-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cc-footer__list a {
	font-size: var(--cc-text-footnote);
	line-height: var(--cc-leading-ui);
	text-decoration: none;
	color: var(--cc-footer-muted);
}

.cc-footer__list a:hover,
.cc-footer__list a:focus-visible {
	color: var(--cc-color-on-action);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cc-footer__news-text {
	font-size: var(--cc-text-footnote);
	line-height: var(--cc-leading-ui);
	color: var(--cc-footer-muted);
}

/* The newsletter field: one pill with the round submit sitting inside it. */
.cc-footer__news-form {
	margin-block-start: var(--cc-space-3);
}

.cc-footer__news-field {
	position: relative;
	display: flex;
	align-items: center;
}

.cc-footer__news-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 2.75rem;
	padding: 0 3rem 0 var(--cc-space-4);
	border: var(--cc-hairline) solid transparent;
	border-radius: var(--cc-radius-pill);
	background-color: var(--cc-color-ground);
	color: var(--cc-color-ink);
	font: inherit;
	font-size: var(--cc-text-footnote);
}

.cc-footer__news-input::placeholder {
	color: var(--cc-color-muted);
}

.cc-footer__news-input:focus-visible {
	outline: var(--cc-focus-width) solid var(--cc-color-on-action);
	outline-offset: var(--cc-focus-offset);
}

.cc-footer__news-btn {
	position: absolute;
	inset-inline-end: 6px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: var(--cc-radius-pill);
	background-color: var(--cc-color-action);
	color: var(--cc-color-ground);
	font: inherit;
	cursor: pointer;
}

.cc-footer__news-btn:focus-visible {
	outline: var(--cc-focus-width) solid var(--cc-color-on-action);
	outline-offset: var(--cc-focus-offset);
}

/* The sign-up's answer (after the redirect back) and its consent line. */
.cc-footer__news-status {
	margin-block-start: var(--cc-space-3);
	font-size: var(--cc-text-footnote);
	line-height: var(--cc-leading-ui);
	color: var(--cc-color-on-action);
}

.cc-footer__news-note {
	margin-block-start: var(--cc-space-2);
	font-size: var(--cc-text-caption);
	line-height: var(--cc-leading-caption);
	color: var(--cc-footer-muted);
}

.cc-footer__news-note a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cc-footer__news-note a:hover,
.cc-footer__news-note a:focus-visible {
	color: var(--cc-color-on-action);
}

.cc-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--cc-space-2) var(--cc-space-6);
	padding-block: var(--cc-space-4) var(--cc-space-5);
	border-block-start: var(--cc-hairline) solid var(--cc-footer-rule);
	font-size: var(--cc-text-caption);
	color: var(--cc-footer-muted);
}

@media (min-width: 48rem) {
	.cc-footer__inner {
		grid-template-columns: 1.3fr 0.7fr 0.7fr;
		gap: var(--cc-space-8);
	}
}

@media (min-width: 64rem) {
	/* Doubled class: this must outrank the md rule above. */
	.cc-footer__inner.cc-footer__inner--news {
		grid-template-columns: 1.3fr 0.7fr 0.7fr 1.3fr;
	}
}

@media (min-width: 48rem) {
	.cc-header__brand {
		font-size: 1.5rem; /* 24px, the handoff's brand mark */
	}

}

/* ---------------------------------------------------------------------------
 * lg and up — 1024px. Navigation and languages sit inline; the disclosure
 * menu is retired.
 * ------------------------------------------------------------------------ */

@media (min-width: 64rem) {
	.cc-header__bar {
		grid-template-columns: 1fr auto 1fr;
	}

	.cc-header__brand {
		justify-self: start;
	}

	.cc-nav {
		display: block;
	}

	.cc-header__actions > .cc-lang {
		display: flex;
	}

	.cc-search {
		display: block;
	}

	.cc-menu {
		display: none;
	}
}
