/* ==========================================================================
   GoldCoast header — desktop (1200px+): menu | logo | tools; below 1200px: menu button | logo | search + cart
   ========================================================================== */

/* Fixed header: the page scrolls underneath it. .gcf-header-spacer keeps the
   header's full height in the page, so the top of every page looks as before and
   nothing jumps when the header shrinks.
   At the top of the page: white with a hairline. After 40px of scrolling
   (.is-scrolled, header.js): frosted glass, about 15% shorter.
   The background lives on ::before, not on the header itself: an element with
   backdrop-filter stops its descendants (the dropdowns) from blurring the page. */
.gcf-header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 100;
	font-family: var(--gcf-font);
	color: var(--gcf-charcoal);
}
/* Below 601px the WordPress admin bar scrolls away, so stick to the very top. */
@media (max-width: 600px) {
	.gcf-header { top: 0; }
}
.gcf-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--gcf-paper);
	border-bottom: 1px solid var(--gcf-line);
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.gcf-header-spacer { height: var(--gcf-header-h); }

.gcf-header.is-scrolled::before {
	background: var(--gcf-glass-bg-solid);
	border-bottom-color: var(--gcf-glass-border);
	box-shadow: var(--gcf-glass-shadow);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.gcf-header.is-scrolled::before {
		background: var(--gcf-glass-bg);
		-webkit-backdrop-filter: var(--gcf-glass-blur);
		backdrop-filter: var(--gcf-glass-blur);
	}
}

.gcf-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 24px;
	max-width: 1600px;
	min-height: var(--gcf-header-h);
	margin: 0 auto;
	padding: 0 40px;
	transition: min-height 0.3s ease, padding 0.3s ease;
}
.gcf-header.is-scrolled .gcf-header__inner { min-height: var(--gcf-header-h-compact); }

.gcf-header__left { display: flex; align-items: center; min-width: 0; }
.gcf-header__centre { display: flex; justify-content: center; }
.gcf-header__right { justify-self: end; }

/* Shared label style: small, uppercase, letter-spaced (Grift Medium). */
.gcf-nav__list > li > a,
.gcf-tool__label {
	font-family: var(--gcf-font-menu);
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* Links: charcoal, red on hover, never underlined. */
.gcf-header a,
.gcf-panel a,
.gcf-header a:hover,
.gcf-panel a:hover,
.gcf-header a:focus,
.gcf-panel a:focus {
	text-decoration: none;
}

.gcf-header a,
.gcf-header button,
.gcf-panel a,
.gcf-panel button,
.gcf-search button {
	color: var(--gcf-charcoal);
	transition: color 0.2s ease;
}

.gcf-header a:hover,
.gcf-header button:hover,
.gcf-panel a:hover,
.gcf-panel button:hover,
.gcf-search button:hover,
.gcf-header .current-menu-item > a,
.gcf-header .current-menu-ancestor > a {
	color: var(--gcf-red-ui);
}

/* Visible focus for every control. */
.gcf-header a:focus-visible,
.gcf-header button:focus-visible,
.gcf-panel a:focus-visible,
.gcf-panel button:focus-visible,
.gcf-search button:focus-visible,
.gcf-search input:focus-visible,
.gcf-skip-link:focus {
	outline: 2px solid var(--gcf-red-ui) !important;
	outline-offset: 3px;
	border-radius: 2px;
}

.gcf-icon { width: 20px; height: 20px; flex: none; display: block; }

.gcf-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

/* Skip link */
.gcf-skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	padding: 12px 16px;
	background: var(--gcf-paper);
	color: var(--gcf-ink);
	font-family: var(--gcf-font);
}

#gcf-main:focus { outline: none; }

/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */
.gcf-logo { display: inline-flex; align-items: center; line-height: 1; }
.gcf-logo__img { display: block; width: auto; height: 60px; max-width: 200px; object-fit: contain; transition: height 0.3s ease; }
.gcf-header.is-scrolled .gcf-logo__img { height: 51px; }

.gcf-logo--text { flex-direction: column; align-items: center; gap: 4px; color: var(--gcf-ink); }
.gcf-logo__word { font-family: var(--gcf-font-heading); font-size: 24px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.gcf-logo__sub { font-family: var(--gcf-font); font-size: 10px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gcf-red-ui); }

/* --------------------------------------------------------------------------
   Desktop menu
   -------------------------------------------------------------------------- */
.gcf-nav__list,
.gcf-nav__list ul,
.gcf-tools,
.gcf-panel__list,
.gcf-panel__list ul,
.gcf-panel__tools {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gcf-nav__list { display: flex; align-items: center; gap: 32px; }
.gcf-nav__list > li { position: relative; }
.gcf-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 12px 0;
}
.gcf-nav__list .gcf-icon--chevron { width: 14px; height: 14px; transition: transform 0.2s ease; }

/* Dropdown: opens on hover and when focus is inside (keyboard). Frosted glass. */
.gcf-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: -20px;
	min-width: 200px;
	padding: 12px 0;
	background: var(--gcf-glass-bg-solid);
	border: 1px solid var(--gcf-glass-border);
	border-radius: 12px;
	box-shadow: var(--gcf-glass-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
.gcf-nav__list > li:hover > .sub-menu,
.gcf-nav__list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}
.gcf-nav__list > li:hover .gcf-icon--chevron,
.gcf-nav__list > li:focus-within .gcf-icon--chevron { transform: rotate(180deg); }
.gcf-nav__list.is-closed > li > .sub-menu { opacity: 0; visibility: hidden; }

.gcf-nav__list .sub-menu a {
	display: block;
	padding: 10px 20px;
	font-family: var(--gcf-font-menu);
	font-size: 15px;
	letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Right-hand tools
   -------------------------------------------------------------------------- */
.gcf-tools { display: flex; align-items: center; gap: 6px; }
.gcf-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.gcf-tools__item--findus { margin-right: 10px; }
.gcf-tools__item--cart { margin-left: 8px; }
.gcf-cart-count { letter-spacing: 0.08em; }

/* Wishlist count badge (hidden while empty). */
.gcf-wishlist-link { position: relative; }
.gcf-wishlist-count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--gcf-red-ui);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
}
.gcf-wishlist-count[data-count="0"] { display: none; }

/* Language switcher (TranslatePress "EN / FR"): same label style as the tools.
   Colours come from the switcher settings (charcoal, red hover, no background). */
.gcf-tools__item--lang,
.gcf-panel__lang { display: flex; align-items: center; }
.gcf-header .trp-shortcode-switcher__wrapper,
.gcf-panel .trp-shortcode-switcher__wrapper {
	--font-size: 12px;
	display: flex;
	align-items: center;
	font-family: var(--gcf-font-menu);
}
/* The in-flow anchor is inline-block, which adds a baseline gap and lifts "FR" above the other labels. */
.gcf-header .trp-shortcode-anchor,
.gcf-panel .trp-shortcode-anchor { display: block; }
.gcf-header .trp-language-item-name,
.gcf-panel .trp-language-item-name {
	font-family: var(--gcf-font-menu);
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.gcf-header .trp-shortcode-arrow,
.gcf-panel .trp-shortcode-arrow { width: 14px; height: 14px; }
.gcf-tools .gcf-tool__label { white-space: nowrap; }
/* The open dropdown (TranslatePress's positioned overlay) gets the glass. */
.gcf-header .trp-shortcode-overlay.is-open,
.gcf-header .trp-shortcode-overlay[aria-expanded="true"] {
	margin: -10px 0 0 -14px;
	padding: 20px 14px 10px;
	background: var(--gcf-glass-bg-solid);
	border: 1px solid var(--gcf-glass-border);
	border-radius: 12px;
	box-shadow: var(--gcf-glass-shadow);
}

/* Glass dropdowns where backdrop-filter works (the menu panel: see "Panel" below). */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.gcf-nav__list .sub-menu,
	.gcf-header .trp-shortcode-overlay.is-open,
	.gcf-header .trp-shortcode-overlay[aria-expanded="true"] {
		background: var(--gcf-glass-bg);
		-webkit-backdrop-filter: var(--gcf-glass-blur);
		backdrop-filter: var(--gcf-glass-blur);
	}
}
.gcf-header .trp-language-item,
.gcf-panel .trp-language-item,
.gcf-header .trp-language-item:hover,
.gcf-panel .trp-language-item:hover { text-decoration: none !important; }

/* Menu button: hidden on desktop. */
.gcf-header__menu-btn { display: none; margin-left: -10px; }

/* --------------------------------------------------------------------------
   Phones, tablets and small laptops (< 1200px): below 1200px the full menu
   (French especially) is wider than its half of the header, so the menu
   button takes over.
   -------------------------------------------------------------------------- */
/* 1200–1365px: a tighter menu gap keeps the French menu ("ACCUEIL BOUTIQUE
   MARQUES À PROPOS CONTACT") on one line with room to spare beside the logo. */
@media (min-width: 1200px) and (max-width: 1365.98px) {
	.gcf-nav__list { gap: 20px; }
}
@media (max-width: 1199.98px) {
	.gcf-header__inner { grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 0 16px; }
	.gcf-header__menu-btn { display: inline-flex; }
	.gcf-nav,
	.gcf-tools__item--findus,
	.gcf-tools__item--wishlist,
	.gcf-tools__item--account { display: none; }
	.gcf-tools { gap: 0; }
	.gcf-tools__item--cart { margin-left: 0; }
	.gcf-logo__img { height: 42px; max-width: 150px; }
	.gcf-header.is-scrolled .gcf-logo__img { height: 36px; }
	.gcf-logo__word { font-size: 20px; }
	.gcf-logo__sub { font-size: 8px; }
}

/* Below 600px the language switcher is only in the menu panel: beside search
   + cart it pushes the logo off-centre (and off-screen at 360px). */
@media (max-width: 599.98px) {
	.gcf-tools__item--lang { display: none; }
}

/* On narrow phones show the cart as icon + count only. */
@media (max-width: 479.98px) {
	.gcf-tools__item--cart .gcf-tool__label { font-size: 0; letter-spacing: 0; }
	.gcf-tools__item--cart .gcf-cart-count { font-size: 12px; letter-spacing: 0.08em; }
	.gcf-tools__item--cart .gcf-tool { gap: 4px; padding: 0 4px; }
}

/* --------------------------------------------------------------------------
   Dialogs (search overlay + mobile panel) — native <dialog> handles focus and Esc
   -------------------------------------------------------------------------- */
.gcf-search,
.gcf-panel {
	margin: 0;
	padding: 0;
	border: 0;
	max-width: none;
	max-height: none;
	background: var(--gcf-paper);
	color: var(--gcf-charcoal);
	font-family: var(--gcf-font);
}
.gcf-search::backdrop,
.gcf-panel::backdrop { background: rgba(20, 20, 20, 0.45); }

.gcf-dialog-close { position: absolute; top: 12px; right: 12px; }

/* Search: full-width sheet from the top. */
.gcf-search { width: 100%; inset: 0 0 auto 0; }
.gcf-search__inner { position: relative; max-width: 880px; margin: 0 auto; padding: 56px 24px 48px; }
.gcf-search__label {
	display: block;
	margin-bottom: 16px;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gcf-grey);
}
.gcf-search__row { display: flex; align-items: center; border-bottom: 1px solid var(--gcf-charcoal); }
.gcf-search__input {
	flex: 1;
	min-width: 0;
	height: 56px;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: var(--gcf-font);
	font-size: 28px;
	color: var(--gcf-ink);
	box-shadow: none;
}
.gcf-search__input:focus { outline: none; }
.gcf-search__input::-webkit-search-cancel-button,
.gcf-search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.gcf-search__row:focus-within { border-bottom-color: var(--gcf-red-ui); }
.gcf-search__submit { width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; }
.gcf-search__submit .gcf-icon { width: 24px; height: 24px; margin: auto; }

/* Panel: full-height sheet from the left, frosted glass (solid fallback here, glass in @supports above). */
.gcf-panel {
	width: min(400px, 88vw);
	height: 100%;
	inset: 0 auto 0 0;
	background: var(--gcf-glass-bg-solid);
	border-right: 1px solid var(--gcf-glass-border);
	box-shadow: var(--gcf-glass-shadow);
}
.gcf-panel::backdrop { background: rgba(20, 20, 20, 0.3); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.gcf-panel {
		background: var(--gcf-glass-bg);
		-webkit-backdrop-filter: var(--gcf-glass-blur);
		backdrop-filter: var(--gcf-glass-blur);
	}
}
.gcf-panel__inner { display: flex; flex-direction: column; min-height: 100%; padding: 20px 24px 32px; }
.gcf-panel__top { display: flex; align-items: center; min-height: 48px; margin-bottom: 24px; }
.gcf-panel__top .gcf-logo--text { align-items: flex-start; }
.gcf-panel__top .gcf-dialog-close { top: 16px; right: 12px; }

.gcf-panel__list > li { border-bottom: 1px solid var(--gcf-line); }
.gcf-panel__list li { display: flex; flex-wrap: wrap; align-items: center; }
.gcf-panel__list a {
	flex: 1;
	display: block;
	padding: 16px 0;
	font-family: var(--gcf-font-menu);
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.gcf-panel__list a .gcf-icon--chevron { display: none; }
.gcf-panel__list .sub-menu { flex-basis: 100%; padding: 0 0 12px 16px; }
.gcf-panel__list .sub-menu[hidden] { display: none; }
.gcf-panel__list .sub-menu a { padding: 10px 0; font-size: 16px; letter-spacing: 0.02em; text-transform: none; }
.gcf-subtoggle { width: 44px; height: 44px; }
.gcf-subtoggle .gcf-icon { transition: transform 0.2s ease; }
.gcf-subtoggle[aria-expanded="true"] .gcf-icon { transform: rotate(180deg); }

.gcf-panel__tools { margin-top: 28px; display: grid; gap: 4px; }
.gcf-panel__tools .gcf-tool { min-height: 44px; }
.gcf-panel__tools .gcf-tool__label { font-size: 12px; }
.gcf-panel__lang { min-height: 44px; }

/* Entry animation (skipped for reduced motion). */
@media (prefers-reduced-motion: no-preference) {
	.gcf-panel[open] { animation: gcf-slide-in 0.25s ease-out; }
	.gcf-search[open] { animation: gcf-drop-in 0.2s ease-out; }
}
@keyframes gcf-slide-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes gcf-drop-in { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }

html.gcf-dialog-open { overflow: hidden; }

/* Reduced motion: the header doesn't shrink or animate; only the colour/blur changes. */
@media (prefers-reduced-motion: reduce) {
	.gcf-header,
	.gcf-header *,
	.gcf-header::before,
	.gcf-panel *,
	.gcf-search * { transition: none !important; }
	.gcf-header.is-scrolled .gcf-header__inner { min-height: var(--gcf-header-h); }
	.gcf-header.is-scrolled .gcf-logo__img { height: 60px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 1199.98px) {
	.gcf-header.is-scrolled .gcf-logo__img { height: 42px; }
}
