/**
 * Lindex Header Styles
 * --------------------------------------------------------------
 * Storefront header + multi-pane drawer matching lindex.com layout.
 */

:root {
	--lindex-header-bg: #f6f3ee;
	--lindex-header-ink: #1a1a1a;
	--lindex-header-muted: #1a1a1a;
	--lindex-logo-red: #d6253b;
	--lindex-search-bg: #ffffff;
	--lindex-search-border: #d8d3ca;
	--lindex-divider: #e6e1d8;
	--lindex-card-bg: #efeae0;
	--lindex-chip-bg: #efeae0;
	--lindex-chip-bg-hover: #e5dfd1;
	--lindex-header-h: 64px;
	--lindex-topbar-h: 36px;
	--lindex-pad-x: clamp(16px, 2.5vw, 32px);
}

/* =============================================================================
   SKIP LINK
   ========================================================================== */
.lindex-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: #000;
	color: #fff;
	padding: 12px 16px;
}
.lindex-skip-link:focus {
	left: 16px;
	top: 16px;
}

/* =============================================================================
   HEADER WRAPPER
   ========================================================================== */
.lindex-header {
	background: var(--lindex-header-bg);
	color: var(--lindex-header-ink);
	font-family: var(--cb-font-body, "Manrope", -apple-system, "Helvetica Neue", sans-serif);
	border-bottom: 1px solid var(--lindex-divider);
	position: sticky;
	top: 0;
	z-index: 1000;
}

/* =============================================================================
   TOP BAR
   ========================================================================== */
.lindex-topbar {
	font-size: 12px;
	line-height: 1;
	color: var(--lindex-header-ink);
}

.lindex-topbar__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	min-height: var(--lindex-topbar-h);
	padding: 0 var(--lindex-pad-x);
}

.lindex-topbar__left  { display: flex; align-items: center; gap: 24px; justify-self: start; }
.lindex-topbar__center{ justify-self: center; text-align: center; }
/* Language toggle (SQ | EN) */
.lindex-lang { display: inline-flex; align-items: center; gap: 6px; }
.lindex-lang__opt {
	padding: 1px 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
	color: #9b958a; text-decoration: none; border-radius: 3px;
	transition: color 150ms ease;
}
.lindex-lang__opt:hover { color: #242118; }
.lindex-lang__opt.is-active { color: #242118; }
.lindex-lang__sep { color: #cfc8bd; font-size: 12px; }
.lindex-lang--drawer { justify-content: flex-start; padding: 8px 0 4px 24px; font-size: 14px; }
.lindex-lang--drawer .lindex-lang__opt { font-size: 14px; padding: 2px 6px; }

.lindex-topbar__right { justify-self: end; display: flex; align-items: center; gap: 16px; }

.lindex-topbar__link,
.lindex-topbar__country {
	color: inherit;
	text-decoration: none;
	font-weight: 400;
	transition: opacity 150ms ease;
}
.lindex-topbar__link:hover,
.lindex-topbar__country:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Language switcher (SQ / EN) */
.lindex-langswitch {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}
.lindex-langswitch__item {
	color: inherit;
	text-decoration: none;
	font-weight: 400;
	line-height: 1;
	padding: 2px 6px;
	border-radius: 3px;
	opacity: 0.65;
	transition: opacity 150ms ease;
}
.lindex-langswitch__item:hover {
	opacity: 1;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.lindex-langswitch__item.is-active {
	opacity: 1;
	font-weight: 600;
	cursor: default;
}
.lindex-langswitch__item + .lindex-langswitch__item {
	border-left: 1px solid currentColor;
	border-left-color: color-mix(in srgb, currentColor 30%, transparent);
}

@media (max-width: 768px) {
	.lindex-topbar { display: none; }
}

/* =============================================================================
   MAIN HEADER ROW
   ========================================================================== */
.lindex-header__main { background: var(--lindex-header-bg); }

.lindex-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
	min-height: var(--lindex-header-h);
	padding: 0 var(--lindex-pad-x);
}

.lindex-header__left  { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }
.lindex-header__center{ min-width: 0; }
.lindex-header__right { display: flex; align-items: center; gap: 4px; }

/* =============================================================================
   MENU TOGGLE
   ========================================================================== */
.lindex-menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: 0;
	padding: 8px 4px;
	margin: 0;
	color: #242118;
	font: inherit;
	font-size: 16px;
	font-weight: 400;
	cursor: pointer;
	min-width: 44px;
	min-height: 44px;
}
.lindex-menu-toggle__icon {
	display: inline-flex;
	flex-direction: column;
	gap: 5px;
	width: 22px;
}
.lindex-menu-toggle__icon span {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 0;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	transform: translateZ(0);
}
.lindex-menu-toggle:hover .lindex-menu-toggle__icon span { transform: translate3d(1px, 0, 0); }

@media (max-width: 480px) {
	.lindex-menu-toggle__label { display: none; }
}

/* =============================================================================
   LOGO
   ========================================================================== */
.lindex-logo {
	display: inline-flex;
	align-items: center;
	color: var(--lindex-logo-red);
	text-decoration: none;
	line-height: 1;
}
.lindex-logo img {
	display: block;
	height: 28px;
	width: auto;
	max-width: 160px;
}
.lindex-logo__text {
	font-family: var(--cb-font-display, "Cormorant Garamond", Georgia, serif);
	font-weight: 700;
	font-size: 24px;
	letter-spacing: 0.04em;
	color: var(--lindex-logo-red);
}

/* =============================================================================
   SEARCH
   ========================================================================== */
.lindex-search {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 720px;
	width: 100%;
	margin: 0 auto;
	background: var(--lindex-search-bg);
	border: 1px solid var(--lindex-search-border);
	border-radius: 9999px;
	padding: 0 18px;
	height: 40px;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}
.lindex-search:focus-within {
	border-color: var(--lindex-header-ink);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}
.lindex-search__icon {
	display: inline-flex;
	color: var(--lindex-header-ink);
	margin-right: 10px;
	flex-shrink: 0;
}
.lindex-search__input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: var(--lindex-header-ink);
	height: 100%;
	padding: 0;
	min-width: 0;
}
.lindex-search__input::placeholder { color: #6b6b6b; opacity: 1; }
.lindex-search__input::-webkit-search-cancel-button,
.lindex-search__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}
@media (max-width: 768px) {
	.lindex-search { height: 36px; padding: 0 14px; }
}

/* =============================================================================
   ICON BUTTONS
   ========================================================================== */
.lindex-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--lindex-header-ink);
	border-radius: 9999px;
	transition: background-color 150ms ease;
	text-decoration: none;
}
.lindex-icon-btn:hover { background: rgba(0, 0, 0, 0.04); }
.lindex-icon-btn svg { display: block; }
.lindex-icon-btn__count {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	background: var(--lindex-logo-red);
	color: #fff;
	border-radius: 9999px;
	font-size: 10px;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
}

/* =============================================================================
   DRAWER (MULTI-PANE)
   ========================================================================== */
.lindex-drawer {
	position: fixed;
	inset: 0;
	z-index: 1100;
	pointer-events: none;
	visibility: hidden;
}
.lindex-drawer.is-open {
	pointer-events: auto;
	visibility: visible;
}

.lindex-drawer__backdrop {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(0, 0, 0, 0);
	transition: background 200ms ease;
}
.lindex-drawer.is-open .lindex-drawer__backdrop { background: rgba(0, 0, 0, 0.35); }

.lindex-drawer__panel {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	height: 100dvh;
	width: min(520px, 100vw);
	background: #fff;
	transform: translateX(-100%);
	transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
	display: flex;
	flex-direction: column;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
	overflow: hidden;
}
.lindex-drawer.is-open .lindex-drawer__panel { transform: translateX(0); }

/* Account for WP admin bar */
body.admin-bar .lindex-drawer__panel {
	top: 32px;
	height: calc(100dvh - 32px);
}
@media (max-width: 782px) {
	body.admin-bar .lindex-drawer__panel {
		top: 46px;
		height: calc(100dvh - 46px);
	}
}

body.lindex-drawer-open { overflow: hidden; }

/* =============================================================================
   PANES
   ========================================================================== */
.lindex-pane {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	transform: translateX(100%);
	transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
	visibility: hidden;
}
.lindex-pane--home {
	transform: translateX(0);
	visibility: visible;
}
.lindex-pane.is-active {
	transform: translateX(0);
	visibility: visible;
}
.lindex-pane.is-behind {
	transform: translateX(-25%);
	visibility: visible;
	pointer-events: none;
	opacity: 0.6;
}

.lindex-pane__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	min-height: 56px;
	flex-shrink: 0;
}

.lindex-pane__head--home {
	justify-content: space-between;
}

.lindex-pane__title {
	font: inherit;
	font-size: 24px;
	font-weight: 600;
	color: #242118;
	margin: 0;
	flex: 1;
	text-align: center;
}

.lindex-pane__back,
.lindex-pane__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: none;
	border: 0;
	padding: 0;
	color: var(--lindex-header-ink);
	cursor: pointer;
	border-radius: 9999px;
	transition: background 150ms ease;
}
.lindex-pane__back:hover,
.lindex-pane__close:hover {
	background: rgba(0, 0, 0, 0.05);
}

.lindex-pane__head--home .lindex-pane__close {
	background: #1a1a1a;
	color: #fff;
}
.lindex-pane__head--home .lindex-pane__close:hover { background: #000; }

.lindex-pane__auth {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--lindex-header-ink);
	text-decoration: none;
	font-size: 15px;
	font-weight: 400;
	padding: 6px 4px;
}
.lindex-pane__auth:hover { text-decoration: underline; text-underline-offset: 3px; }

.lindex-pane__body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 0 24px;
	-webkit-overflow-scrolling: touch;
}

.lindex-pane__empty {
	padding: 24px 8px;
	text-align: center;
	color: var(--lindex-header-muted);
}
.lindex-pane__empty a { color: var(--lindex-logo-red); }

/* =============================================================================
   HOME PANE — TOP-LEVEL CARD LIST
   ========================================================================== */
.lindex-cardlist {
	list-style: none;
	margin: 0;
	padding: 0 16px;
}

.lindex-cardlist__item + .lindex-cardlist__item { margin-top: 4px; }

.lindex-cardlist__link {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	background: var(--lindex-card-bg);
	border: 0;
	border-radius: 0;
	padding: 0 0 0 20px;
	min-height: 72px;
	font: inherit;
	font-size: 20px;
	font-weight: 500;
	color: #242118;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	overflow: hidden;
	transition: color 150ms ease;
}
.lindex-cardlist__link:hover,
.lindex-cardlist__link:focus-visible {
	color: var(--lindex-logo-red);
	background: var(--lindex-card-bg);
}
.lindex-cardlist__link:hover .lindex-cardlist__chevron,
.lindex-cardlist__link:focus-visible .lindex-cardlist__chevron {
	color: var(--lindex-logo-red);
}

.lindex-cardlist__label {
	flex: 0 1 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.lindex-cardlist__chevron {
	display: inline-block;
	width: 22px;
	height: 22px;
	color: #9b958a;
	stroke-width: 1.6;
	transform: translateY(1px);
	flex-shrink: 0;
	margin-left: 8px;
	transition: color 150ms ease;
}

/* Media slot */
.lindex-cardlist__media {
	margin-left: auto;
	flex-shrink: 0;
	display: block;
	width: 160px;
	height: 72px;
	border-radius: 0;
	overflow: hidden;
}
.lindex-cardlist__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Placeholder state */
.lindex-cardlist__media.is-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e5dfd1;
	color: #b3aa9a;
}
.lindex-cardlist__media.is-placeholder svg {
	width: 26px;
	height: 26px;
	display: block;
}

@media (max-width: 480px) {
	.lindex-cardlist__media { width: 120px; height: 66px; }
}

/* =============================================================================
   HOME PANE — UTILITY LIST + COUNTRY PILL
   ========================================================================== */
.lindex-utillist {
	list-style: none;
	margin: 28px 0 0;
	padding: 0 16px;
}

.lindex-utillist__item + .lindex-utillist__item { margin-top: 4px; }

.lindex-utillist__link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 8px;
	color: var(--lindex-header-ink);
	text-decoration: none;
	font-size: 15px;
	border-radius: 8px;
	transition: background 150ms ease;
}
.lindex-utillist__link:hover { background: rgba(0, 0, 0, 0.04); }

.lindex-utillist__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	color: var(--lindex-header-ink);
}

.lindex-pane__footer {
	margin-top: 24px;
	padding: 8px 16px;
}

.lindex-country-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--lindex-header-ink);
	border-radius: 9999px;
	padding: 12px 24px;
	background: transparent;
	color: var(--lindex-header-ink);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 150ms ease, color 150ms ease;
}
.lindex-country-pill:hover {
	background: var(--lindex-header-ink);
	color: #fff;
}

/* =============================================================================
   CATEGORY PANE — GROUP LIST
   ========================================================================== */
.lindex-grouplist {
	list-style: none;
	margin: 0 0 8px;
	padding: 0 16px;
}
.lindex-grouplist__item {
	border-bottom: none;
}
.lindex-grouplist__item:first-child {
	border-top: none;
}
.lindex-grouplist__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	appearance: none;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 18px 8px;
	color: #242118;
	text-align: left;
	text-decoration: none;
	font-family: inherit;
	font-size: 18px;
	font-weight: 400;
	transition: color 150ms ease;
}
.lindex-grouplist__label {
	font-size: 18px;
	color: #242118;
}
.lindex-grouplist__link:hover,
.lindex-grouplist__link:hover .lindex-grouplist__label { color: var(--lindex-logo-red); }
.lindex-grouplist__link:hover { color: var(--lindex-logo-red); }
.lindex-grouplist__link:hover .lindex-grouplist__chevron { color: var(--lindex-logo-red); }
.lindex-grouplist__chevron {
	width: 20px;
	height: 20px;
	color: #9b958a;
	stroke-width: 1.6;
	flex-shrink: 0;
	transition: color 150ms ease;
}

/* =============================================================================
   CATEGORY PANE — TAG CHIPS
   ========================================================================== */
.lindex-chiplist {
	list-style: none;
	margin: 20px 0 24px;
	padding: 0 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.lindex-chip {
	display: inline-flex;
	align-items: center;
	background: #f4eee7;
	color: #242118;
	padding: 10px 18px;
	border-radius: 9999px;
	font-family: var(--cb-font-body, "Lindex Sans", -apple-system, BlinkMacSystemFont, sans-serif);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: color 150ms ease;
}
.lindex-chip:hover,
.lindex-chip:focus-visible {
	color: var(--lindex-logo-red);
	background: #f4eee7;
}

/* =============================================================================
   CATEGORY PANE — IMAGE CARDS
   ========================================================================== */
.lindex-imagecards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-top: 8px;
	padding: 0 16px;
}

.lindex-imagecard {
	display: block;
	color: var(--lindex-header-ink);
	text-decoration: none;
	background: transparent;
	border-radius: 4px;
	overflow: hidden;
	transition: color 150ms ease;
}
.lindex-imagecard:hover,
.lindex-imagecard:focus-visible {
	color: var(--lindex-logo-red);
}
.lindex-imagecard:hover .lindex-imagecard__label,
.lindex-imagecard:focus-visible .lindex-imagecard__label {
	color: var(--lindex-logo-red);
}

.lindex-imagecard__media {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var(--lindex-card-bg);
	overflow: hidden;
}
.lindex-imagecard__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.lindex-imagecard:hover .lindex-imagecard__media img { transform: scale(1.02); }

.lindex-imagecard__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 4px;
	border-bottom: none;
}
.lindex-imagecard__label {
	font-size: 16px;
	font-weight: 500;
	transition: color 150ms ease;
}

/* =============================================================================
   MOBILE TWEAKS
   ========================================================================== */
@media (max-width: 480px) {
	.lindex-pane__title { font-size: 20px; }
	.lindex-cardlist__link { min-height: 66px; font-size: 18px; }
	.lindex-grouplist__link { padding: 16px 4px; font-size: 16px; }
	.lindex-grouplist__label { font-size: 16px; }
}

/* =============================================================================
   MOBILE HEADER — SEARCH ON SECOND ROW
   ========================================================================== */
@media (max-width: 768px) {
	.lindex-header__inner {
		grid-template-columns: auto 1fr;
		grid-template-rows: auto auto;
		gap: 0;
		min-height: auto;
		padding-bottom: 10px;
	}
	.lindex-header__left {
		grid-column: 1;
		grid-row: 1;
		min-height: var(--lindex-header-h);
	}
	.lindex-header__right {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
		min-height: var(--lindex-header-h);
	}
	.lindex-header__center {
		grid-column: 1 / -1;
		grid-row: 2;
		padding-top: 2px;
	}
}