/* ==========================================================================
   VoxQ Components — header, navigation, announcement, footer, drawers, search
   ========================================================================== */

/* ---------- Announcement bar ---------- */
.voxq-announcement {
	background: var(--vxq-color-accent-soft);
	color: var(--vxq-color-accent-text);
	font-size: var(--vxq-font-size-xs);
	letter-spacing: var(--vxq-letter-spacing-meta);
	text-transform: uppercase;
	text-align: center;
}

.voxq-announcement__inner {
	padding-block: 0.5rem;
}

/* ---------- Header ---------- */
.voxq-header {
	position: sticky;
	top: 0;
	z-index: var(--vxq-z-header);
	background: rgba(247, 245, 240, 0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--vxq-color-border);
}

.voxq-header--transparent {
	position: absolute;
	left: 0;
	right: 0;
	background: transparent;
	border-bottom: 0;
	backdrop-filter: none;
}

.voxq-header__row {
	display: flex;
	align-items: center;
	gap: var(--vxq-spacing-lg);
	min-height: var(--vxq-header-height);
}

.voxq-header__row--main {
	justify-content: space-between;
}

/* Logo */
.voxq-logo {
	font-family: var(--vxq-font-heading);
	font-size: 1.5rem;
	letter-spacing: 0.04em;
	color: var(--vxq-color-text);
	white-space: nowrap;
}

.voxq-logo img {
	max-height: 2.5rem;
	width: auto;
}

/* Desktop search (main row) */
.voxq-search {
	position: relative;
	flex: 1;
	max-width: 34rem;
}

.voxq-search__input-wrap {
	position: relative;
}

.voxq-search__input {
	width: 100%;
	padding: 0.625rem 3rem 0.625rem 1rem;
	border: 1px solid var(--vxq-color-border-strong);
	border-radius: var(--vxq-radius-full);
	background: var(--vxq-color-surface);
	font-size: var(--vxq-font-size-sm);
}

.voxq-search__input:focus {
	outline: none;
	border-color: var(--vxq-color-primary);
	box-shadow: 0 0 0 3px var(--vxq-color-focus-ring);
}

.voxq-search__submit {
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	width: 2.25rem;
	height: 2.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--vxq-radius-full);
	color: var(--vxq-color-text);
}

.voxq-search__submit:hover {
	background: var(--vxq-color-surface-muted);
}

/* Search results dropdown */
.voxq-search-results {
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	right: 0;
	background: var(--vxq-color-surface);
	border: 1px solid var(--vxq-color-border);
	border-radius: var(--vxq-radius-md);
	box-shadow: var(--vxq-shadow-md);
	z-index: var(--vxq-z-drawer);
	overflow: hidden;
}

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

.voxq-search-results__section-title {
	padding: 0.625rem 1rem;
	font-size: var(--vxq-font-size-xs);
	letter-spacing: var(--vxq-letter-spacing-meta);
	text-transform: uppercase;
	color: var(--vxq-color-muted);
	background: var(--vxq-color-surface-muted);
}

.voxq-search-results__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 1rem;
	transition: background var(--vxq-duration) var(--vxq-ease);
}

.voxq-search-results__item:hover,
.voxq-search-results__item.is-active {
	background: var(--vxq-color-surface-muted);
}

.voxq-search-results__thumb {
	width: 2.75rem;
	height: 3.25rem;
	object-fit: cover;
	border-radius: var(--vxq-radius-sm);
	flex-shrink: 0;
}

.voxq-search-results__name {
	font-weight: 600;
	line-height: 1.3;
}

.voxq-search-results__price {
	color: var(--vxq-color-muted);
	font-size: var(--vxq-font-size-sm);
}

.voxq-search-results__view-all {
	display: block;
	text-align: center;
	padding: 0.75rem 1rem;
	font-size: var(--vxq-font-size-sm);
	font-weight: 600;
	border-top: 1px solid var(--vxq-color-border);
}

/* Header actions */
.voxq-header-actions {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

/* Navigation row */
.voxq-header__nav {
	border-top: 1px solid var(--vxq-color-border);
}

.voxq-nav__menu {
	display: flex;
	justify-content: center;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.voxq-nav__menu li {
	position: relative;
}

.voxq-nav__menu a {
	display: block;
	padding: 0.75rem 1.125rem;
	font-size: var(--vxq-font-size-sm);
	font-weight: 600;
	letter-spacing: var(--vxq-letter-spacing-meta);
	text-transform: uppercase;
	color: var(--vxq-color-text);
}

.voxq-nav__menu a:hover {
	color: var(--vxq-color-accent-text);
}

.voxq-nav__menu .current-menu-item > a,
.voxq-nav__menu .current_page_item > a {
	color: var(--vxq-color-accent-text);
}

/* Dropdown (mega-ready) */
.voxq-nav__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 14rem;
	background: var(--vxq-color-surface);
	border: 1px solid var(--vxq-color-border);
	border-radius: var(--vxq-radius-md);
	box-shadow: var(--vxq-shadow-md);
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--vxq-duration) var(--vxq-ease), transform var(--vxq-duration) var(--vxq-ease), visibility var(--vxq-duration);
}

.voxq-nav__menu li:hover > .sub-menu,
.voxq-nav__menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.voxq-nav__menu .sub-menu a {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
}

/* Mobile header */
.voxq-header-mobile {
	display: none;
}

.voxq-mobile-menu-toggle {
	display: none;
}

/* Mobile drawer menu */
.voxq-mobile-menu {
	position: fixed;
	inset: 0 auto 0 0;
	width: min(22rem, 86vw);
	background: var(--vxq-color-surface);
	z-index: var(--vxq-z-drawer);
	transform: translateX(-100%);
	transition: transform var(--vxq-duration-slow) var(--vxq-ease);
	display: flex;
	flex-direction: column;
}

.voxq-mobile-menu.is-open {
	transform: translateX(0);
}

.voxq-mobile-menu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem var(--vxq-gutter);
	border-bottom: 1px solid var(--vxq-color-border);
}

.voxq-mobile-menu__nav {
	padding: var(--vxq-spacing-md) var(--vxq-gutter);
	overflow-y: auto;
}

.voxq-mobile-menu__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.voxq-mobile-menu__nav a {
	display: block;
	padding: 0.75rem 0;
	font-size: 1.0625rem;
	font-weight: 600;
	border-bottom: 1px solid var(--vxq-color-border);
}

/* ---------- Footer ---------- */
.voxq-footer {
	background: var(--vxq-color-text);
	color: #cfccc2;
	padding-block: var(--vxq-spacing-xl) var(--vxq-spacing-lg);
}

.voxq-footer a {
	color: #cfccc2;
}

.voxq-footer a:hover {
	color: #fff;
}

.voxq-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: var(--vxq-spacing-xl);
}

.voxq-footer__brand .voxq-logo {
	color: #fff;
	font-size: 1.75rem;
}

.voxq-footer__desc {
	margin-top: var(--vxq-spacing-md);
	font-size: var(--vxq-font-size-sm);
	max-width: 22rem;
}

.voxq-footer__title {
	font-family: var(--vxq-font-body);
	font-size: var(--vxq-font-size-xs);
	letter-spacing: var(--vxq-letter-spacing-meta);
	text-transform: uppercase;
	color: #fff;
	margin-bottom: var(--vxq-spacing-md);
}

.voxq-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.voxq-footer__menu li {
	margin-bottom: 0.5rem;
}

.voxq-footer__menu a {
	font-size: var(--vxq-font-size-sm);
}

.voxq-footer__bottom {
	margin-top: var(--vxq-spacing-xl);
	padding-top: var(--vxq-spacing-md);
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--vxq-spacing-md);
	flex-wrap: wrap;
	font-size: var(--vxq-font-size-xs);
	color: #9a968b;
}

/* ---------- Drawers (mini cart, generic) ---------- */
.voxq-drawer {
	position: fixed;
	inset: 0;
	z-index: var(--vxq-z-drawer);
}

.voxq-drawer__overlay {
	position: absolute;
	inset: 0;
	background: var(--vxq-color-overlay);
	animation: voxq-fade-in var(--vxq-duration) var(--vxq-ease);
}

.voxq-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(28rem, 100vw);
	max-width: 100%;
	background: var(--vxq-color-surface);
	display: flex;
	flex-direction: column;
	box-shadow: var(--vxq-shadow-lg);
	transform: translateX(100%);
	transition: transform var(--vxq-duration-slow) var(--vxq-ease);
}

.voxq-drawer.is-open .voxq-drawer__panel {
	transform: translateX(0);
}

.voxq-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.125rem var(--vxq-gutter);
	border-bottom: 1px solid var(--vxq-color-border);
}

.voxq-drawer__title {
	font-family: var(--vxq-font-body);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: var(--vxq-letter-spacing-meta);
	text-transform: uppercase;
	margin: 0;
}

/* ---------- Mini cart ---------- */
.voxq-mini-cart__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: var(--vxq-spacing-md) var(--vxq-gutter);
}

.voxq-mini-cart__item {
	display: flex;
	gap: var(--vxq-spacing-md);
	padding-block: var(--vxq-spacing-md);
	border-bottom: 1px solid var(--vxq-color-border);
}

.voxq-mini-cart__thumb {
	width: 4rem;
	flex-shrink: 0;
}

.voxq-mini-cart__thumb img {
	width: 4rem;
	height: 5rem;
	object-fit: cover;
	border-radius: var(--vxq-radius-sm);
}

.voxq-mini-cart__info {
	flex: 1;
	min-width: 0;
}

.voxq-mini-cart__name {
	font-weight: 600;
	line-height: 1.35;
}

.voxq-mini-cart__variation {
	display: block;
	color: var(--vxq-color-muted);
	font-size: var(--vxq-font-size-sm);
	margin-top: 0.25rem;
}

.voxq-mini-cart__meta {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	color: var(--vxq-color-muted);
	font-size: var(--vxq-font-size-sm);
}

.voxq-mini-cart__price {
	color: var(--vxq-color-text);
	font-weight: 600;
}

.voxq-mini-cart__remove {
	width: 2rem;
	height: 2rem;
	color: var(--vxq-color-muted);
}

.voxq-mini-cart__empty {
	display: grid;
	place-content: center;
	min-height: 12rem;
	padding: var(--vxq-spacing-xl) 0;
	text-align: center;
}

.voxq-mini-cart__empty p {
	margin-bottom: var(--vxq-spacing-md);
	color: var(--vxq-color-muted);
}

.voxq-mini-cart__footer {
	flex-shrink: 0;
	padding: var(--vxq-spacing-md) var(--vxq-gutter);
	padding-bottom: calc(var(--vxq-spacing-md) + env(safe-area-inset-bottom));
	border-top: 1px solid var(--vxq-color-border);
	background: var(--vxq-color-surface);
	display: flex;
	flex-direction: column;
	gap: var(--vxq-spacing-sm);
}

.voxq-mini-cart__subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--vxq-spacing-xs);
}

.voxq-mini-cart__subtotal span {
	color: var(--vxq-color-muted);
	font-size: var(--vxq-font-size-sm);
}

.voxq-mini-cart__subtotal strong {
	font-size: var(--vxq-font-size-lg);
}

/* Checkout is the drawer's single decisive action; the cart link stays
   available but intentionally quiet. */
.voxq-mini-cart .voxq-btn--quiet {
	border-color: var(--vxq-color-border-strong);
	background: transparent;
	color: var(--vxq-color-muted);
}

.voxq-mini-cart .voxq-btn--quiet:hover {
	border-color: var(--vxq-color-text);
	background: var(--vxq-color-surface-muted);
	color: var(--vxq-color-text);
}

.voxq-mini-cart .voxq-btn--primary {
	min-height: 2.875rem;
	color: var(--vxq-color-on-primary);
}

@media (max-width: 639px) {
	.voxq-drawer__panel {
		width: 100vw;
	}

	.voxq-mini-cart__body,
	.voxq-mini-cart__footer {
		padding-inline: max(var(--vxq-gutter), env(safe-area-inset-left)) max(var(--vxq-gutter), env(safe-area-inset-right));
	}
}

/* ---------- Toast ---------- */
.voxq-toast {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%) translateY(1rem);
	background: var(--vxq-color-primary);
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: var(--vxq-radius-full);
	font-size: var(--vxq-font-size-sm);
	z-index: var(--vxq-z-toast);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--vxq-duration) var(--vxq-ease), transform var(--vxq-duration) var(--vxq-ease);
}

.voxq-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ---------- Animations ---------- */
@keyframes voxq-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
	.voxq-header__row--main {
		display: none;
	}

	.voxq-header--transparent {
		position: sticky;
	}

	.voxq-header-mobile {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--vxq-spacing-sm);
		min-height: var(--vxq-header-height-mobile);
	}

	.voxq-mobile-menu-toggle {
		display: inline-flex;
	}

	.voxq-footer__grid {
		grid-template-columns: 1fr 1fr;
		gap: var(--vxq-spacing-xl) var(--vxq-gutter);
	}
}

@media (max-width: 639px) {
	.voxq-footer__grid {
		grid-template-columns: 1fr;
	}
}
