/* =========================================================================
   Voley PLT — header, search panel, mobile drawer
   ========================================================================= */

/* Fixed rather than sticky: the shortcode wrapper is only as tall as the header
   itself, so a sticky bar would have nothing to stick within and would scroll
   straight off. Non-overlay pages render a spacer to reserve its height. */
.voley-header {
	--v-hpad: 40px;   /* left gutter for the logo, right gutter inside the strap */

	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: var(--v-ink);
	color: var(--v-white);
}

.admin-bar .voley-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .voley-header {
		top: 46px;
	}
}

/* Overlay mode: transparent, sitting directly on top of the hero image. */
.voley-header--overlay {
	background: transparent;
}

.voley-header--overlay::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 190px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
	pointer-events: none;
	transition: opacity 0.35s var(--v-ease);
}

/* Once scrolled, the bar turns solid black in every mode. */
.voley-header.is-stuck {
	background: var(--v-ink);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px -30px rgba(0, 0, 0, 0.9);
}

.voley-header--overlay.is-stuck::before {
	opacity: 0;
}

/* Left gutter only — the strap bleeds to the true right edge, so its own
   padding supplies the right gutter. */
.voley-header__row {
	display: flex;
	align-items: stretch;
	height: var(--v-header-h);
	padding-left: var(--v-hpad);
	transition: height 0.3s var(--v-ease);
}

.voley-header.is-stuck .voley-header__row {
	height: calc(var(--v-header-h) - 6px);
}

.voley-header__inner {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 28px;
}

/* Brand ------------------------------------------------------------------- */
.voley-header__brand {
	flex: none;
	display: flex;
	align-items: center;
}

/* Prefixed with .voley-root so the explicit height survives page builders that
   ship a blanket `.elementor img { height: auto }` after our stylesheet. */
.voley-root .voley-header__logo {
	width: auto;
	height: 26px;
}

.voley-header__wordmark {
	font-family: var(--v-font-display);
	font-size: 22px;
	font-style: italic;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

/* Nav --------------------------------------------------------------------- */
.voley-nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
}

.voley-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
}

.voley-nav__item {
	position: relative;
}

.voley-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.005em;
	color: rgba(255, 255, 255, 0.82);
	border-radius: var(--v-r-pill);
	transition: color 0.2s var(--v-ease), background-color 0.2s var(--v-ease);
}

.voley-nav__link svg {
	opacity: 0.6;
	transition: transform 0.25s var(--v-ease);
}

.voley-nav__item:hover > .voley-nav__link,
.voley-nav__link:focus-visible {
	color: var(--v-white);
	background: rgba(255, 255, 255, 0.08);
}

.voley-nav__item:hover > .voley-nav__link svg {
	transform: rotate(180deg);
}

/* Dropdown */
.voley-nav__panel {
	position: absolute;
	top: calc(100% + 12px);
	left: 50%;
	z-index: 20;
	min-width: 236px;
	padding: 8px;
	border-radius: 12px;
	background: var(--v-white);
	box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--v-line-soft);
	color: var(--v-ink);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity 0.22s var(--v-ease), transform 0.22s var(--v-ease), visibility 0.22s;
}

.voley-nav__panel::before {
	content: "";
	position: absolute;
	inset: -12px 0 auto;
	height: 12px;
}

.voley-nav__item:hover > .voley-nav__panel,
.voley-nav__item:focus-within > .voley-nav__panel {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.voley-nav__panel a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 12px;
	border-radius: var(--v-r-sm);
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.18s var(--v-ease), color 0.18s var(--v-ease);
}

.voley-nav__panel a svg {
	opacity: 0;
	color: var(--v-accent);
	transform: translateX(-4px);
	transition: opacity 0.18s var(--v-ease), transform 0.18s var(--v-ease);
}

.voley-nav__panel a:hover {
	background: var(--v-grey-50);
}

.voley-nav__panel a:hover svg {
	opacity: 1;
	transform: none;
}

/* Mega menu ----------------------------------------------------------------
   Printed as a sibling of the header row, not inside its <li>, so the panel can
   span the full width of the fixed bar. `top: 100%` therefore tracks the row on
   its own — no maths needed for the shrunk sticky state or the admin bar.
   Opening and pane switching are driven from header.js. -------------------- */
.voley-mega {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 30;
	max-height: calc(100vh - var(--v-header-h) - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--v-ink);
	color: var(--v-white);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 34px 60px -34px rgba(0, 0, 0, 0.95);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.22s var(--v-ease), transform 0.22s var(--v-ease);
}

.voley-mega[hidden] {
	display: none;
}

.voley-mega.is-open {
	opacity: 1;
	transform: none;
}

/* An open panel needs an opaque bar above it, even in overlay mode. */
.voley-header.is-mega {
	background: var(--v-ink);
}

.voley-header--overlay.is-mega::before {
	opacity: 0;
}

/* Hover already rotates the chevron; this covers the keyboard-opened state. */
.voley-nav__link[aria-expanded="true"] {
	color: var(--v-white);
	background: rgba(255, 255, 255, 0.08);
}

.voley-nav__link[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.voley-mega__inner {
	display: grid;
	grid-template-columns: 210px minmax(0, 1fr);
	gap: 46px;
	padding-block: 34px 38px;
}

/* Left rail --------------------------------------------------------------- */
.voley-mega__side {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.voley-mega__eyebrow {
	margin-bottom: 20px;
	font-size: var(--v-fs-eyebrow);
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

.voley-mega__tabs {
	display: grid;
	gap: 2px;
}

/* Display face, but upright and mixed case — these are proper nouns, so the
   italic uppercase treatment used for headings reads wrong here. */
.voley-mega__tab {
	display: block;
	/* Tight leading plus vertical padding, so a category name long enough to
	   wrap still reads as one item rather than two. */
	padding-block: 5px;
	font-family: var(--v-font-display);
	font-size: 23px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.22;
	color: rgba(255, 255, 255, 0.34);
	transition: color 0.2s var(--v-ease);
}

.voley-mega__tab:hover,
.voley-mega__tab.is-active {
	color: var(--v-white);
}

.voley-mega__all {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 14px;
	font-weight: 600;
	color: var(--v-white);
	transition: color 0.2s var(--v-ease);
}

.voley-mega__all:hover {
	color: var(--v-accent);
}

/* Panes ------------------------------------------------------------------- */
.voley-mega__main {
	min-width: 0;
}

.voley-mega__pane[hidden] {
	display: none;
}

.voley-mega__head {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 22px;
	font-size: 15px;
	color: var(--v-white);
	transition: color 0.2s var(--v-ease);
}

.voley-mega__head b {
	font-weight: 700;
}

.voley-mega__head span {
	font-weight: 500;
	color: rgba(255, 255, 255, 0.5);
}

.voley-mega__head:hover {
	color: var(--v-accent);
}

.voley-mega__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

/* Product tile ------------------------------------------------------------
   A dark surface, so the photograph is the only bright thing in the tile and
   the grid reads as one row of images rather than a row of white boxes. The
   orange shows up three times, each time carrying meaning: the brand, the
   discount, and the rule that fills in under the cursor. */
.voley-mcard {
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: 14px;
	overflow: hidden;
	background: var(--v-ink-2);
	/* Inset rather than a border, so the hover colour change costs no layout. */
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
	color: var(--v-white);
	transition: transform 0.32s var(--v-ease), box-shadow 0.32s var(--v-ease);
}

.voley-mcard:hover {
	transform: translateY(-4px);
	box-shadow: inset 0 0 0 1px var(--v-accent), 0 24px 38px -22px rgba(0, 0, 0, 0.95);
}

.voley-mcard__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	/* White behind the photo: WooCommerce thumbnails are usually cut-outs on
	   white, and this keeps their edges invisible. */
	background: var(--v-white);
}

/* Woo crops thumbnails to 1:1 by default, so cover takes nothing off the top
   or sides — it just guarantees every tile lines up. */
.voley-root .voley-mcard__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--v-ease);
}

.voley-mcard:hover .voley-mcard__media img {
	transform: scale(1.05);
}

.voley-mcard__flags {
	position: absolute;
	left: 10px;
	top: 10px;
	display: grid;
	justify-items: start;
	gap: 6px;
}

.voley-mcard__off {
	padding: 4px 10px;
	border-radius: var(--v-r-pill);
	background: var(--v-accent);
	color: var(--v-white);
	font-family: var(--v-font-display);
	font-size: 11px;
	font-style: italic;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.45;
}

.voley-mcard__flag {
	padding: 4px 10px;
	border-radius: var(--v-r-pill);
	background: rgba(17, 18, 19, 0.74);
	color: var(--v-white);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.45;
}

.voley-mcard__body {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
	padding: 15px 14px 16px;
}

/* Short orange rule that runs the width of the card on hover. */
.voley-mcard__body::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 34px;
	height: 2px;
	background: var(--v-accent);
	transition: width 0.38s var(--v-ease);
}

.voley-mcard:hover .voley-mcard__body::before {
	width: 100%;
}

.voley-mcard__brand {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--v-accent);
}

/* Two lines, then ellipsis. Grid items stretch, so the price still lands on a
   shared baseline however short the name is. */
.voley-mcard__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.92);
}

.voley-mcard__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin-top: auto;
	padding-top: 6px;
	/* The display face ties the price to the buttons and headings. */
	font-family: var(--v-font-display);
	font-size: 14.5px;
	font-style: italic;
	font-weight: 800;
	letter-spacing: 0.01em;
	color: var(--v-white);
}

.voley-mcard__price del {
	font-family: var(--v-font-body);
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
	color: var(--v-grey-500);
}

.voley-mcard.is-out .voley-mcard__media img {
	filter: grayscale(1);
	opacity: 0.5;
}

.voley-mcard.is-out .voley-mcard__price ins {
	color: var(--v-grey-500);
}

/* Brand chips ------------------------------------------------------------- */
.voley-mega__brands {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.voley-mega__brands a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	font-family: var(--v-font-display);
	font-size: 16px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.86);
	transition: border-color 0.2s var(--v-ease), background-color 0.2s var(--v-ease), color 0.2s var(--v-ease);
}

.voley-mega__brands b {
	flex: none;
	font-family: var(--v-font-body);
	font-size: var(--v-fs-xs);
	font-weight: 600;
	color: rgba(255, 255, 255, 0.45);
}

.voley-mega__brands a:hover {
	border-color: var(--v-accent);
	background: var(--v-accent-soft);
	color: var(--v-white);
}

/* Actions ------------------------------------------------------------------
   The icon cluster rides on an orange brand strap that bleeds to the right
   edge of the viewport, in every header state. ----------------------------- */
.voley-header__strap-wrap {
	position: relative;
	flex: none;
	display: flex;
	align-items: center;
	padding: 0 var(--v-hpad) 0 46px;
}

.voley-header__strap {
	position: absolute;
	inset: 0;
	left: -36px;
	background: var(--v-accent);
	clip-path: polygon(36px 0, 100% 0, 100% 100%, 0 100%);
	pointer-events: none;
}

.voley-header__actions {
	position: relative;
	z-index: 1;
	flex: none;
	display: flex;
	align-items: center;
	gap: 2px;
}

.voley-iconbtn {
	position: relative;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	color: var(--v-white);
	transition: background-color 0.2s var(--v-ease), color 0.2s var(--v-ease);
}

.voley-iconbtn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.voley-count {
	position: absolute;
	top: 1px;
	right: 0;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: var(--v-r-pill);
	/* Dark, not accent — the badge sits on the orange strap. */
	background: var(--v-ink);
	color: var(--v-white);
	font-size: 10px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
	letter-spacing: 0;
}

.voley-count.is-empty {
	background: rgba(0, 0, 0, 0.3);
	color: rgba(255, 255, 255, 0.9);
}

.voley-iconbtn--burger {
	display: none;
}

/* Search panel ------------------------------------------------------------ */
.voley-search {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--v-ink);
	border-top: 1px solid rgba(255, 255, 255, 0.09);
	box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.8);
}

.voley-search[hidden] {
	display: none;
}

.voley-search__form {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 82px;
	color: var(--v-white);
}

.voley-search__form > svg {
	flex: none;
	opacity: 0.5;
}

.voley-search__field {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	padding: 0;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
	background: none;
	color: var(--v-white);
	font-size: 17px;
	border-radius: 0;
	appearance: none;
}

.voley-search__field::placeholder {
	color: rgba(255, 255, 255, 0.42);
}

.voley-search__field:focus {
	outline: none;
	border-bottom-color: var(--v-accent);
}

/* Header spacer — reserves the height the fixed bar no longer occupies. ---- */
.voley-header__spacer {
	height: var(--v-header-h);
}

/* Mobile drawer ----------------------------------------------------------- */
.voley-drawer {
	position: fixed;
	inset: 0;
	z-index: 1200;
}

.voley-drawer[hidden] {
	display: none;
}

.voley-drawer__scrim {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.3s var(--v-ease);
}

.voley-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(360px, 88vw);
	height: 100%;
	padding: 18px 22px 26px;
	background: var(--v-ink);
	color: var(--v-white);
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.34s var(--v-ease);
}

.voley-drawer.is-open .voley-drawer__scrim {
	opacity: 1;
}

.voley-drawer.is-open .voley-drawer__panel {
	transform: none;
}

.voley-drawer__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 18px;
	margin-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.voley-root .voley-drawer__top img {
	width: auto;
	height: 22px;
}

.voley-drawer__nav > li + li {
	border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.voley-drawer__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 14px 0;
	font-family: var(--v-font-display);
	font-size: 15px;
	font-style: italic;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	text-align: left;
	color: var(--v-white);
}

.voley-drawer__toggle svg {
	opacity: 0.6;
	transition: transform 0.25s var(--v-ease);
}

.voley-drawer__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
	color: var(--v-accent);
	opacity: 1;
}

.voley-drawer__sub {
	padding: 2px 0 14px;
	display: grid;
	gap: 2px;
}

.voley-drawer__sub[hidden] {
	display: none;
}

.voley-drawer__sub a {
	display: block;
	padding: 8px 0 8px 14px;
	border-left: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
}

.voley-drawer__sub a:hover {
	color: var(--v-white);
	border-color: var(--v-accent);
}

.voley-drawer__foot {
	margin-top: auto;
	padding-top: 24px;
	display: grid;
	gap: 14px;
}

.voley-drawer__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.72);
}

.voley-drawer__meta:hover {
	color: var(--v-white);
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1200px) {
	.voley-mega__inner {
		grid-template-columns: 168px minmax(0, 1fr);
		gap: 30px;
	}

	.voley-mega__tab {
		font-size: 19px;
	}

	.voley-mega__grid {
		gap: 12px;
	}

	.voley-mega__brands {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1100px) {
	.voley-nav__link {
		padding: 10px 10px;
		font-size: 13.5px;
	}

	.voley-header__inner {
		gap: 14px;
	}
}

@media (max-width: 980px) {
	.voley-nav {
		display: none;
	}

	/* The drawer takes over below this width — see voley_mega_links(). */
	.voley-mega {
		display: none;
	}

	.voley-iconbtn--burger {
		display: grid;
	}

	.voley-header {
		--v-hpad: 18px;
	}

	.voley-header__strap-wrap {
		padding-left: 32px;
	}

	.voley-header__strap {
		left: -24px;
		clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%);
	}

	.voley-root .voley-header__logo {
		height: 22px;
	}

	.voley-search__form {
		height: 68px;
		gap: 10px;
	}

	.voley-search__form > svg,
	.voley-search__form .voley-btn {
		display: none;
	}

	.voley-search__field {
		font-size: 15px;
	}
}

@media (max-width: 560px) {
	/* Five icons crowd the logo at phone widths. Account steps aside because the
	   drawer lists it; the wishlist heart stays, since it carries a count and a
	   count nobody can reach is worse than no icon. */
	.voley-iconbtn--desk.voley-iconbtn--account {
		display: none;
	}

	.voley-header__actions {
		gap: 0;
	}
}
