/* SM Plant Sales: site header on Astra's header builder (scripts/header-setup.php). Loaded site-wide
   only while the smp_header_2026 option is on. */
body.smp-hdr-on { --smp-navy: #003768; --smp-navy-dark: #00264a; --smp-amber: #f9b101; --smp-line: #dfe3e8; --smp-muted: #545d68; }

/* Top bar: trust line (left) and phone (right), white on navy */
.smp-hdr-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.3; color: #fff; }
.smp-hdr-trust li { display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; }
.smp-hdr-trust a { color: #fff !important; text-decoration: none; }
.smp-hdr-trust .smp-reviews strong { font-weight: 600; }
.smp-hdr-trust a:hover, .smp-hdr-trust a:focus-visible { text-decoration: underline; }
.smp-hdr-trust .smp-icon, .smp-hdr-phone .smp-icon { flex: 0 0 auto; width: 16px; height: 16px; color: var(--smp-amber); }
.smp-hdr-phone { display: inline-flex; align-items: center; gap: 7px; color: #fff !important; font-size: 13px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.smp-hdr-phone strong { font-weight: 700; }
.smp-hdr-phone span { opacity: 0.85; }
.smp-hdr-phone:hover strong, .smp-hdr-phone:focus-visible strong { text-decoration: underline; }

/* VAT switch in the navy top bar */
.ast-above-header-bar .smp-vat-toggle { color: #fff; min-height: 28px; font-size: 13px; }
.ast-above-header-bar .smp-vat-toggle-track { background: rgba(255, 255, 255, 0.35); }
.ast-above-header-bar .smp-vat-toggle[aria-checked="true"] .smp-vat-toggle-track { background: var(--smp-amber); }
body.smp-hdr-on #ast-desktop-header .site-header-above-section-right { gap: 24px; }

/* Call button in the phone header */
.smp-hdr-call { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--smp-navy) !important; }
.smp-hdr-call .smp-icon { width: 24px; height: 24px; stroke-width: 1.8; }

/* Phone header: logo left, three matching 44px icon buttons right (call, basket, menu) */
@media (max-width: 921px) {
	body.smp-hdr-on #ast-mobile-header .ast-primary-header-bar .site-primary-header-wrap { min-height: 64px; }
	body.smp-hdr-on #ast-mobile-header .site-header-primary-section-right { display: flex; align-items: center; gap: 2px; }
	body.smp-hdr-on #ast-mobile-header .site-header-primary-section-right > * { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 !important; padding: 0 !important; }
	body.smp-hdr-on #ast-mobile-header img.custom-logo { width: 176px !important; max-width: 176px !important; height: auto; }
	/* basket: same size and line as the other icons, count as a small amber badge on its corner */
	body.smp-hdr-on #ast-mobile-header .ast-header-woo-cart .ast-site-header-cart,
	body.smp-hdr-on #ast-mobile-header .ast-header-woo-cart .ast-site-header-cart-li,
	body.smp-hdr-on #ast-mobile-header .ast-header-woo-cart .cart-container,
	body.smp-hdr-on #ast-mobile-header .ast-header-woo-cart .ast-addon-cart-wrap { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 !important; padding: 0 !important; border: 0 !important; }
	body.smp-hdr-on #ast-mobile-header .ast-header-woo-cart .astra-icon { position: relative; display: inline-flex; line-height: 1; color: var(--smp-navy) !important; }
	body.smp-hdr-on #ast-mobile-header .ast-header-woo-cart svg { width: 24px; height: 24px; fill: currentColor; }
	body.smp-hdr-on #ast-mobile-header .ast-header-woo-cart .astra-icon::after {
		top: -7px !important; right: -9px !important; left: auto !important; min-width: 18px; height: 18px; padding: 0 4px; line-height: 18px !important;
		border: 0 !important; border-radius: 9px; background: var(--smp-amber) !important; color: var(--smp-ink, #1a1a1a) !important; font-size: 11px; font-weight: 700;
	}
	/* menu: an outline icon like the others, not a filled block */
	body.smp-hdr-on #ast-mobile-header .menu-toggle { width: 44px; height: 44px; margin: 0; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--smp-navy) !important; }
	body.smp-hdr-on #ast-mobile-header .menu-toggle svg { width: 26px; height: 26px; fill: currentColor; }
	body.smp-hdr-on #ast-mobile-header .ast-below-header-bar { padding: 0 0 12px; border-bottom: 1px solid var(--smp-line); }
	body.smp-hdr-on #ast-mobile-header .ast-header-search .search-field, body.smp-hdr-on #ast-mobile-header .ast-header-search .search-submit { height: 44px !important; }
}

/* Search: a clear field with a navy search button */
/* Main row: logo and controls take what they need; the search takes the rest of the middle */
body.smp-hdr-on #ast-desktop-header .ast-primary-header-bar .ast-builder-grid-row { grid-template-columns: auto minmax(0, 1fr) auto !important; column-gap: 40px; }
body.smp-hdr-on #ast-desktop-header .site-header-primary-section-center { justify-content: center; }
body.smp-hdr-on #ast-desktop-header .ast-header-search { flex: 1 1 auto; width: 100%; max-width: 620px; }
body.smp-hdr-on .ast-header-search .ast-search-menu-icon.search-box { width: 100%; }
body.smp-hdr-on .ast-header-search .search-form {
	display: flex !important; align-items: stretch; width: 100%; margin: 0; padding: 0 !important;
	border: 1px solid #b9c1ca !important; border-radius: 6px; background: #fff; overflow: hidden;
}
body.smp-hdr-on .ast-header-search .search-form label { flex: 1 1 auto; min-width: 0; margin: 0; }
body.smp-hdr-on .ast-header-search .search-field {
	width: 100% !important; height: 46px !important; margin: 0; padding: 0 14px !important;
	border: 0 !important; background: transparent !important; color: #1a1a1a; font-size: 15px !important; box-shadow: none !important;
}
body.smp-hdr-on .ast-header-search .search-field::placeholder { color: #6b7480; opacity: 1; }
body.smp-hdr-on .ast-header-search .search-form:focus-within { border-color: var(--smp-navy) !important; box-shadow: 0 0 0 3px rgba(249, 177, 1, 0.55); }
body.smp-hdr-on .ast-header-search .search-submit {
	position: static !important; flex: 0 0 auto; display: inline-flex !important; align-items: center; justify-content: center;
	width: 52px; height: 46px; margin: 0; padding: 0 !important; border: 0; border-radius: 0;
	background: var(--smp-navy) !important; color: #fff !important; cursor: pointer;
}
body.smp-hdr-on .ast-header-search .search-submit:hover, body.smp-hdr-on .ast-header-search .search-submit:focus-visible { background: var(--smp-navy-dark) !important; }
body.smp-hdr-on .ast-header-search .search-submit svg { fill: currentColor; width: 18px; height: 18px; }

/* Account and basket: matching outline icons, basket count as a small amber badge */
body.smp-hdr-on #ast-desktop-header .site-header-primary-section-right { gap: 18px; }
body.smp-hdr-on .ast-header-account-link { display: inline-flex; align-items: center; gap: 7px; color: var(--smp-navy) !important; font-size: 14px; font-weight: 600; text-decoration: none; }
body.smp-hdr-on #ast-desktop-header .ast-header-account-link.ast-header-account-type-text::before {
	content: ""; width: 22px; height: 22px; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.smp-hdr-on .ast-header-account-link:hover, body.smp-hdr-on .ast-header-account-link:focus-visible { text-decoration: underline; }
body.smp-hdr-on #ast-desktop-header .ast-header-woo-cart .astra-icon { position: relative; display: inline-flex; color: var(--smp-navy) !important; }
body.smp-hdr-on #ast-desktop-header .ast-header-woo-cart svg { width: 24px; height: 24px; fill: currentColor; }
body.smp-hdr-on #ast-desktop-header .ast-header-woo-cart .astra-icon::after {
	top: -8px !important; right: -10px !important; left: auto !important; min-width: 18px; height: 18px; padding: 0 4px; line-height: 18px !important;
	border: 0 !important; border-radius: 9px; background: var(--smp-amber) !important; color: #1a1a1a !important; font-size: 11px; font-weight: 700;
}

/* Menu: words as written, no capitals */
body.smp-hdr-on .main-header-menu .menu-link { text-transform: none !important; letter-spacing: 0 !important; }
body.smp-hdr-on .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link { font-size: 15px; font-weight: 600; }

/* Top bar: trust line takes the room, switch and phone sit right, one line */
@media (min-width: 922px) {
	body.smp-hdr-on #ast-desktop-header .ast-above-header-bar .ast-builder-grid-row { grid-template-columns: minmax(0, 1fr) auto; }
}
/* Small laptops and landscape tablets: fewer words up top, more room for the search */
@media (min-width: 922px) and (max-width: 1199px) {
	.smp-hdr-trust li:nth-child(3) { display: none; }
	body.smp-hdr-on #ast-desktop-header .ast-primary-header-bar .ast-builder-grid-row { column-gap: 20px; }
	body.smp-hdr-on #ast-desktop-header .site-branding img.custom-logo { width: 190px !important; max-width: 190px !important; height: auto; }
	body.smp-hdr-on #ast-desktop-header .ast-header-account-link { font-size: 13px; }
}

/* Phones: the two ordering facts side by side, nothing scrolls sideways */
@media (max-width: 921px) {
	/* Phones: one row, just the reviews */
	.smp-hdr-trust { justify-content: center; padding: 7px 0; font-size: 13px; }
	.smp-hdr-trust li { display: none; }
	.smp-hdr-trust li:nth-child(2) { display: flex; }
	/* Phone search: full width under the logo row */
	body.smp-hdr-on #ast-mobile-header .site-header-below-section-center { flex: 1 1 auto; width: 100%; }
	body.smp-hdr-on #ast-mobile-header .ast-header-search { flex: 1 1 auto; width: 100%; }
}

/* The VAT pill lives in the header on desktop; on phones the listing and price pills stay */
@media (min-width: 922px) {
	body.smp-hdr-on .ast-shop-toolbar-container > .smp-vat-toggle,
	body.smp-hdr-on .smp-price > .smp-vat-toggle { display: none !important; }
}

/* The header search covers the parts pages, so their own search box steps aside */
body.smp-hdr-on .smp-parts-search { display: none; }

/* One left edge: header rows share the page content's inset (container 20px + shop container 30px),
   and the first menu item has no left padding, so logo, menu text and breadcrumb line up */
@media (min-width: 922px) {
	body.smp-hdr-on #ast-desktop-header .ast-above-header-bar,
	body.smp-hdr-on #ast-desktop-header .ast-primary-header-bar,
	body.smp-hdr-on #ast-desktop-header .ast-below-header-bar { padding-left: 0 !important; padding-right: 0 !important; } /* the theme adds 8% here */
	body.smp-hdr-on #ast-desktop-header .ast-builder-grid-row-container.ast-container { width: 100%; padding-left: 50px; padding-right: 50px; margin-left: auto; margin-right: auto; }
	body.smp-hdr-on #ast-desktop-header .ast-builder-menu-1 .main-header-menu > .menu-item:first-child > .menu-link { padding-left: 0; }
}

/* Less dead space between the header and the page */
@media (min-width: 922px) {
	body.smp-hdr-on.smp-part-page #primary, body.smp-hdr-on.smp-parts-archive #primary { margin-top: 32px; }
	body.smp-hdr-on.smp-part-page .ast-woocommerce-container, body.smp-hdr-on.smp-parts-archive .ast-woocommerce-container { padding-top: 0; }
}
