/**
 * Inner pages header — matches test3.ant/shop/ (topbar + white logo row + purple nav).
 */

/* —— Announcement top bar —— */
.col-full.topbar-wrapper {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
	background-color: var(--hq-color-primary);
	border-bottom: 1px solid #eee;
}

.col-full.topbar-wrapper > .top-bar {
	width: 100%;
	overflow: hidden;
}

.col-full.topbar-wrapper .top-bar .col-full {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
	padding-inline: 1rem;
}

.col-full.topbar-wrapper .top-bar-center {
	width: 100%;
	text-align: center;
}

.col-full.topbar-wrapper .top-bar,
.col-full.topbar-wrapper .top-bar a {
	color: #323232;
	font-size: 14px;
}

.col-full.topbar-wrapper .top-bar em {
	display: inline-block;
	padding-left: 100%;
	white-space: nowrap;
	font-style: italic;
	animation: hq-move-topbar-text 30s linear infinite;
}

.col-full.topbar-wrapper .top-bar em strong {
	margin-right: 300px;
	font-weight: 700;
}

@keyframes hq-move-topbar-text {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-100%);
	}
}

@media (min-width: 992px) {
	.col-full.topbar-wrapper .textwidget {
		padding-top: 8px;
		padding-bottom: 8px;
	}
}

@media (max-width: 767px) {
	.col-full.topbar-wrapper .top-bar em {
		padding-left: 40%;
		animation: hq-move-topbar-text-mobile 10s linear infinite;
	}

	.col-full.topbar-wrapper .top-bar em strong {
		margin-right: 60px;
	}
}

@keyframes hq-move-topbar-text-mobile {
	0% {
		transform: translateX(40%);
	}
	100% {
		transform: translateX(-100%);
	}
}

/* —— Masthead (logo row) —— */
body.hq-header-inner .site-header {
	background: var(--hq-color-header-bg) !important;
	box-shadow: none;
}

body.hq-header-inner .main-header.col-full {
	padding-top: 5px;
	padding-bottom: 5px;
	min-height: var(--hq-home-logo-height);
}

body.hq-header-inner .site-branding .custom-logo-link img,
body.hq-header-inner .site-branding .custom-logo {
	max-height: var(--hq-home-logo-height);
}

/* —— Purple nav row (desktop) —— */
@media (min-width: 993px) {
	body.hq-header-inner .col-full-nav,
	body.hq-header-inner .col-full-nav.is_stuck {
		background-color: var(--hq-color-sticky-nav) !important;
		background: var(--hq-color-sticky-nav) !important;
	}

	body.hq-header-inner .col-full-nav:not(.is_stuck) {
		box-shadow: none;
	}

	body.hq-header-inner .col-full-nav.is_stuck {
		box-shadow: 0 15px 10px -15px rgba(0, 0, 0, 0.1);
	}

	body.hq-header-inner .main-header .header-utilities-left,
	body.hq-header-inner .main-header .hq-inner-masthead-utilities,
	body.hq-header-inner .main-header .mobile-search-toggle {
		display: none !important;
	}

	body.hq-header-inner .col-full-nav .shoptimizer-primary-navigation.col-full {
		width: min(100% - 2rem, var(--hq-col-full));
		max-width: var(--hq-col-full);
		margin-inline: auto;
		padding-inline: 1rem;
		box-sizing: border-box;
	}

	body.hq-header-inner .col-full-nav .shoptimizer-primary-navigation {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		min-height: var(--hq-home-nav-height);
	}

	body.hq-header-inner .col-full-nav .mobile-menu.close-drawer {
		display: none;
	}

	body.hq-header-inner .col-full-nav .site-search {
		display: none !important;
	}

	body.hq-header-inner .col-full-nav .main-navigation {
		grid-column: 1;
		width: 100%;
		justify-self: stretch;
	}

	/* Default: no compact logo, menu aligned left */
	body.hq-header-inner .col-full-nav .primary-navigation.with-logo {
		display: grid;
		grid-template-columns: 0 minmax(0, 1fr);
		column-gap: 0;
		align-items: center;
		width: 100%;
		transition: grid-template-columns 0.4s ease, column-gap 0.4s ease;
	}

	body.hq-header-inner .col-full-nav .logo-mark {
		grid-column: 1;
		grid-row: 1;
		width: 110px;
		min-width: 0;
		max-width: 0;
		overflow: hidden;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.4s ease, max-width 0.4s ease, min-width 0.4s ease, visibility 0.4s ease;
	}

	body.hq-header-inner .col-full-nav .logo-mark a {
		display: block;
		line-height: 0;
	}

	body.hq-header-inner .col-full-nav .logo-mark img {
		filter: brightness(0) invert(1);
	}

	body.hq-header-inner .col-full-nav .primary-navigation.with-logo .menu-primary-menu-container {
		grid-column: 2;
		grid-row: 1;
		display: flex;
		width: 100%;
		margin-left: 0 !important;
		justify-content: flex-start;
		transition: justify-content 0.4s ease;
	}

	body.hq-header-inner .col-full-nav .menu-primary-menu-container > ul.menu {
		justify-content: flex-start;
		width: auto;
		margin: 0;
		transition: margin 0.4s ease;
	}

	/* Sticky: reveal logo, center menu */
	body.hq-header-inner .col-full-nav.is_stuck .primary-navigation.with-logo {
		grid-template-columns: 110px minmax(0, 1fr);
		column-gap: 1.25rem;
	}

	body.hq-header-inner .col-full-nav.is_stuck .logo-mark {
		display: block !important;
		min-width: 110px;
		max-width: 110px;
		opacity: 1;
		visibility: visible;
	}

	body.hq-header-inner .col-full-nav.is_stuck .primary-navigation.with-logo .menu-primary-menu-container {
		justify-content: center;
	}

	body.hq-header-inner .col-full-nav.is_stuck .menu-primary-menu-container > ul.menu {
		justify-content: center;
	}

	body.hq-header-inner .col-full-nav .menu-primary-menu-container > ul > li > a,
	body.hq-header-inner .col-full-nav .menu-primary-menu-container > ul > li.nolink > span {
		color: #fff;
		font-size: 15px;
		font-weight: 600;
		line-height: var(--hq-home-nav-height);
		padding: 0 0.55rem;
		text-shadow: none;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right {
		grid-column: 2;
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-end;
		gap: var(--hq-header-icon-gap);
		justify-self: end;
		position: static;
		transform: none;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right .site-header-cart,
	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-myaccount,
	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-myaccount a {
		position: static !important;
		top: auto !important;
		right: auto !important;
		left: auto !important;
		height: auto !important;
		transform: none !important;
		display: inline-flex;
		align-items: center;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right .site-header-cart {
		order: 1;
		margin: 0;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-myaccount {
		order: 2;
	}

	body.hq-header-inner .col-full-nav .shoptimizer-cart a.cart-contents .amount {
		display: inline !important;
		font-weight: 700;
		color: #fff;
		font-size: 15px;
		margin-right: 0.25rem;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right .cart-contents {
		display: inline-flex;
		align-items: center;
		gap: 0.35rem;
		color: #fff;
		text-decoration: none;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-cart-icon,
	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-myaccount a {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: var(--hq-header-icon-size);
		height: var(--hq-header-icon-size);
	}

	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-cart-icon svg,
	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-myaccount svg {
		stroke: #fff;
		width: var(--hq-header-icon-size);
		height: var(--hq-header-icon-size);
		flex-shrink: 0;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right .shoptimizer-cart-icon .mini-count {
		background: #444;
		color: #fff;
		border: 1px solid #444;
	}

	body.hq-header-inner .site-branding button.menu-toggle {
		display: none;
	}
}

@media (min-width: 993px) and (prefers-reduced-motion: reduce) {
	body.hq-header-inner .col-full-nav .primary-navigation.with-logo,
	body.hq-header-inner .col-full-nav .logo-mark,
	body.hq-header-inner .col-full-nav .primary-navigation.with-logo .menu-primary-menu-container,
	body.hq-header-inner .col-full-nav .menu-primary-menu-container > ul.menu {
		transition: none;
	}
}

/* —— Mobile inner pages —— */
@media (max-width: 992px) {
	body.hq-header-inner .hq-inner-masthead-utilities {
		position: absolute;
		top: 50%;
		right: 15px;
		transform: translateY(-50%);
		z-index: 2;
		pointer-events: none;
	}

	body.hq-header-inner .hq-inner-masthead-utilities .site-header-cart,
	body.hq-header-inner .hq-inner-masthead-utilities .shoptimizer-myaccount {
		pointer-events: auto;
	}

	body.hq-header-inner .hq-inner-masthead-utilities .site-header-cart {
		order: 1;
	}

	body.hq-header-inner .hq-inner-masthead-utilities .shoptimizer-myaccount {
		order: 2;
	}

	body.hq-header-inner:not(.mobile-toggled).sticky-m .site-header {
		position: sticky;
		top: 0;
		z-index: 50;
		background: var(--hq-color-header-bg) !important;
		box-shadow: 0 1px 15px rgba(0, 0, 0, 0.08);
		transition: background-color 0.2s ease, box-shadow 0.2s ease;
	}

	body.hq-header-inner:not(.mobile-toggled).sticky-m #masthead.site-header.is_stuck {
		background: var(--hq-color-sticky-nav) !important;
		background-color: var(--hq-color-sticky-nav) !important;
		box-shadow: 0 1px 15px rgba(0, 0, 0, 0.1);
	}

	body.admin-bar.hq-header-inner:not(.mobile-toggled).sticky-m .site-header {
		top: var(--hq-admin-bar-height);
	}

	body.hq-header-inner .site-branding button.menu-toggle {
		display: block;
	}

	body.hq-header-inner .col-full-nav .header-utilities-right,
	body.hq-header-inner .col-full-nav .logo-mark {
		display: none !important;
	}
}
