/* ==========================================================================
   Lucid Roasters — UX & Mobile Enhancements (P0 Foundation)
   Awwwards-mcp standards:
   - Unified Design Tokens with subtle 4px corners
   - Tier-S compositor-only transitions (transform, opacity) — zero `transition: all`
   - 44x44px+ mobile touch targets & 16px mobile input floor (zero iOS zoom)
   - Opaque sticky header & off-canvas drawers (zero bleed-through)
   - Site-wide <select> double-arrow fix
   - Hero contrast scrim & mobile scroll-affordance height
   - Full prefers-reduced-motion compliance
   ========================================================================== */

:root {
	--lucid-ink: #0a0a0a;
	--lucid-ink-soft: #2c2c2c;
	--lucid-muted: #595959;
	--lucid-paper: #fefbf6;
	--lucid-surface: #ffffff;
	--lucid-surface-soft: #f6f4ef;
	--lucid-cobalt: #005996;
	--lucid-cobalt-bright: #006fbb;
	--lucid-cobalt-hover: #004475;
	--lucid-copper: #bb4c00;
	--lucid-copper-hover: #993d00;
	--lucid-success: #115e32;
	--lucid-success-bg: #eef7f1;
	--lucid-line: #e4e1da;
	--lucid-line-strong: #1c1c1c;
	--lucid-radius: 4px;
	--lucid-radius-sm: 3px;
	--lucid-tap: 44px;
	--lucid-cta-h: 48px;
	--lucid-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   1. GLOBAL ACCESSIBILITY, FOCUS HYGIENE & SUBTLE 4px CORNERS
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
	outline: 2px solid var(--lucid-cobalt-bright) !important;
	outline-offset: 2px !important;
}

.button,
button.button,
a.button,
input[type="submit"],
.single_add_to_cart_button,
.woocommerce-mini-cart__buttons a.button,
.wc-block-components-button {
	border-radius: var(--lucid-radius) !important;
	transition: background-color 0.2s var(--lucid-ease), color 0.2s var(--lucid-ease), border-color 0.2s var(--lucid-ease), transform 0.14s var(--lucid-ease), opacity 0.2s var(--lucid-ease);
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.button:active,
.single_add_to_cart_button:active,
.wc-block-components-button:active {
	transform: scale(0.985);
}

/* ==========================================================================
   2. SITE-WIDE <select> DOUBLE-ARROW / STRAY-TRIANGLE FIX
      Fixes Chromium UA dropdown indicator rendering at bottom-left alongside
      Flatsome's right Feather SVG chevron.
   ========================================================================== */

select,
form.woocommerce-ordering select,
.woocommerce-ordering select.orderby,
.variations select,
table.variations td.value select,
.lucid-sub-field select,
.woocommerce form .form-row select {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	background-color: var(--lucid-surface) !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 12px center !important;
	background-size: 16px 16px !important;
	border: 1px solid #cfcbc3 !important;
	border-radius: var(--lucid-radius) !important;
	box-shadow: none !important;
	color: var(--lucid-ink) !important;
	min-height: var(--lucid-tap) !important;
	height: auto !important;
	line-height: 1.3 !important;
	padding: 10px 40px 10px 14px !important;
	white-space: nowrap;
	text-overflow: ellipsis;
}

select::picker-icon {
	display: none !important;
}

select::-ms-expand {
	display: none;
}

/* ==========================================================================
   3. DESKTOP NAV SINGLE-ROW, TRANSPARENT HERO CONTRAST & OPAQUE STICKY/DRAWERS
   ========================================================================== */

/* Keep desktop primary nav, RO/EN & Cart icon strictly single-row (prevents 2nd-line wrap) */
@media (min-width: 850px) {
	#header .header-main .header-inner,
	#header .header-top .header-inner {
		max-width: 1320px !important;
	}

	#header .header-main .flex-right {
		flex: 0 0 auto !important;
	}

	#header .header-nav-main {
		flex-wrap: nowrap !important;
		align-items: center !important;
	}

	#header .header-nav-main > li {
		white-space: nowrap !important;
		margin-inline: 5px !important;
		flex: 0 0 auto !important;
	}

	#header .header-nav-main > li > a {
		display: inline-flex !important;
		align-items: center !important;
		flex-wrap: nowrap !important;
		white-space: nowrap !important;
		font-size: 13px !important;
		letter-spacing: 0.03em;
		padding-inline: 6px !important;
	}

	#header .cart-item > a.header-cart-link {
		display: inline-flex !important;
		align-items: center !important;
		flex-wrap: nowrap !important;
		gap: 8px !important;
		white-space: nowrap !important;
		width: auto !important;
	}

	#header .cart-item .header-cart-title {
		display: inline-flex !important;
		align-items: center !important;
		gap: 4px;
		white-space: nowrap !important;
		line-height: 1.2 !important;
	}

	#header .cart-item .cart-icon.image-icon {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex: 0 0 auto !important;
		margin: 0 !important;
	}

	#header .cart-item .cart-icon.image-icon strong {
		min-width: 28px !important;
		width: auto !important;
		padding-inline: 5px !important;
	}

	#header .header-wrapper.stuck .header-main {
		height: 68px !important;
		min-height: 68px !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	#header .header-wrapper.stuck #logo img {
		max-height: 52px !important;
	}
}

/* Transparent Hero Header (before scroll): subtle top gradient + crisp white logo/nav contrast */
#header.transparent .header-wrapper:not(.stuck) .header-main {
	background: linear-gradient(to bottom, rgba(10, 10, 10, 0.56) 0%, rgba(10, 10, 10, 0) 100%) !important;
}

#header.transparent .header-wrapper:not(.stuck) #logo img {
	filter: brightness(0) invert(1) !important;
}

#header.transparent .header-wrapper:not(.stuck) .header-nav > li > a,
#header.transparent .header-wrapper:not(.stuck) .mobile-nav > li > a,
#header.transparent .header-wrapper:not(.stuck) .header-nav > li > a i,
#header.transparent .header-wrapper:not(.stuck) .mobile-nav > li > a i {
	color: #ffffff !important;
}

/* Opaque Sticky Header (on scroll): guaranteed dark ink & dark logo on solid #ffffff */
#header .header-wrapper.stuck,
#header .header-wrapper.stuck .header-bg-color,
#header.header .header-wrapper.stuck .header-main,
.header-wrapper.stuck .header-bg-color {
	background: var(--lucid-surface) !important;
	background-color: var(--lucid-surface) !important;
	opacity: 1 !important;
	visibility: visible !important;
}

#header .header-wrapper.stuck {
	box-shadow: 0 1px 0 rgba(10, 10, 10, 0.08), 0 6px 20px rgba(10, 10, 10, 0.06) !important;
}

#header .header-wrapper.stuck #logo img {
	filter: none !important;
}

#header .header-wrapper.stuck .header-nav > li > a,
#header .header-wrapper.stuck .mobile-nav > li > a,
#header .header-wrapper.stuck .header-nav > li > a i,
#header .header-wrapper.stuck .mobile-nav > li > a i,
#header .header-wrapper.stuck .header-cart-title {
	color: var(--lucid-ink) !important;
}

/* Opaque backdrops for Mobile Nav Drawer, Shop Filter Drawer & Cart Drawer */
.off-canvas-left .mfp-content,
.off-canvas-right .mfp-content,
.off-canvas .mfp-content.off-canvas-cart,
.mfp-wrap.off-canvas .mfp-content,
#main-menu.mobile-sidebar,
#shop-sidebar,
#cart-popup,
#cart-popup .cart-popup-inner {
	background-color: var(--lucid-surface) !important;
	opacity: 1 !important;
	box-sizing: border-box !important;
}

.mfp-bg.off-canvas.mfp-ready,
.mfp-bg.main-menu-overlay.mfp-ready {
	background-color: #0a0a0a !important;
	opacity: 0.65 !important;
}

/* Unmistakable high-contrast 44x44px Close X button on all off-canvas drawers */
.mfp-wrap.off-canvas button.mfp-close {
	position: fixed !important;
	width: var(--lucid-tap) !important;
	height: var(--lucid-tap) !important;
	line-height: 40px !important;
	top: 10px !important;
	right: 10px !important;
	color: var(--lucid-ink) !important;
	background-color: var(--lucid-surface-soft) !important;
	border: 1px solid #d4d1ca !important;
	border-radius: var(--lucid-radius) !important;
	mix-blend-mode: normal !important;
	opacity: 1 !important;
	font-size: 26px !important;
	z-index: 99999 !important;
}

#cart-popup .cart-popup-title {
	padding-right: 48px !important;
}

/* Remove Flatsome's dated social share button row (Facebook / Twitter / Email / Pinterest / LinkedIn)
   Strictly targets share-icons only — preserves header/footer Instagram follow icons. */
.social-icons.share-icons,
.share-row,
.single-product .social-icons.share-icons,
.product-summary .social-icons.share-icons {
	display: none !important;
}

/* ==========================================================================
   4. FLOATING WIDGET HYGIENE (REMOVE CTA COLLISIONS)
   ========================================================================== */

#vue-app .kodee-fab,
#vue-app .float-btn__wrapper.chatbot-overwrite,
.kodee-fab,
button.kodee-fab__open {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

@media (max-width: 849px) {
	#cmplz-manage-consent,
	.cmplz-manage-consent,
	a#top-link.back-to-top {
		display: none !important;
	}
}

/* ==========================================================================
   5. HERO CONTRAST SCRIM & EDITORIAL LEGIBILITY
   ========================================================================== */

.banner.has-hover.is-full-height .banner-bg .overlay {
	background: linear-gradient(
		to top,
		rgba(10, 10, 10, 0.80) 0%,
		rgba(10, 10, 10, 0.38) 46%,
		rgba(10, 10, 10, 0.14) 100%
	) !important;
	opacity: 1 !important;
}

.banner.has-hover.is-full-height .text-box-content,
.banner.has-hover.is-full-height .text-box-content h1,
.banner.has-hover.is-full-height .text-box-content h2,
.banner.has-hover.is-full-height .text-box-content p {
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

/* Fix Flickity 1px left-edge slide seam */
.slider-wrapper .flickity-viewport {
	overflow: hidden;
}

.slider-wrapper .flickity-slider > .banner {
	width: 100.3% !important;
}

/* Prevent awkward orphan "lei." wrap on USP headings/descriptions */
.icon-box-text h3,
.icon-box-text h4,
.icon-box-text h5,
.icon-box-text p {
	text-wrap: balance;
}

/* ==========================================================================
   6. MOBILE HEADER, DRAWER & TOUCH TARGET OPTIMIZATION (<= 849px)
   ========================================================================== */

@media (max-width: 849px) {
	/* Defeat Flatsome .transparent .header-main (90px) specificity override */
	#header.transparent .header-main,
	#header .header-main,
	#header.header.transparent .header-main {
		height: 64px !important;
		min-height: 64px !important;
	}

	#header.transparent #logo img,
	#header #logo img,
	#header.header.transparent #logo img {
		height: 54px !important;
		max-height: 54px !important;
		width: auto !important;
		min-width: 48px !important;
		aspect-ratio: 81 / 90;
	}

	#header #logo a {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}

	/* Clean edge-aligned mobile header: Hamburger (left) | Logo (center) | Cart (right) */
	#header .header-main .header-inner {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		padding-inline: 10px !important;
	}

	#header .header-main .header-inner > .flex-left {
		order: 1 !important;
		flex: 0 0 auto !important;
		margin-right: 0 !important;
	}

	#header .header-main .header-inner > #logo {
		order: 2 !important;
		width: auto !important;
		flex: 1 1 auto !important;
		margin: 0 auto !important;
		display: flex !important;
		justify-content: center !important;
	}

	#header .header-main .header-inner > .flex-right {
		order: 3 !important;
		flex: 0 0 auto !important;
		margin-left: 0 !important;
	}

	/* Compact top announcement bar on mobile */
	#header .header-top {
		min-height: 28px !important;
		padding-block: 2px !important;
	}

	/* 44x44px minimum touch targets on mobile header icons */
	#header .mobile-nav .nav-icon > a,
	#header .mobile-nav .cart-item > a.header-cart-link {
		min-width: var(--lucid-tap) !important;
		min-height: var(--lucid-tap) !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 0 8px !important;
	}

	/* Mobile Nav Drawer: 44px+ rows & clean language/search controls */
	#main-menu.mobile-sidebar {
		padding-top: 48px !important;
		padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
	}

	#main-menu .nav-sidebar > li > a {
		min-height: 48px !important;
		display: flex !important;
		align-items: center !important;
		font-size: 16px !important;
		font-weight: 600;
		color: var(--lucid-ink) !important;
		padding-inline: 20px !important;
	}

	#main-menu .header-search-form input[type="search"],
	#main-menu input[type="search"] {
		font-size: 16px !important;
		min-height: var(--lucid-tap) !important;
		border-radius: var(--lucid-radius) 0 0 var(--lucid-radius) !important;
	}

	#main-menu .header-search-form button[type="submit"],
	#main-menu button.ux-search-submit {
		min-width: var(--lucid-tap) !important;
		min-height: var(--lucid-tap) !important;
		border-radius: 0 var(--lucid-radius) var(--lucid-radius) 0 !important;
	}

	#main-menu a[href*="/en"],
	#main-menu .trp-language-switcher-container a {
		min-width: var(--lucid-tap) !important;
		min-height: var(--lucid-tap) !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 0 12px !important;
	}

	/* Mobile Hero: leave slight peek below fold for scroll affordance */
	.banner.has-hover.is-full-height {
		height: 80svh !important;
		min-height: 540px !important;
		max-height: 680px !important;
	}

	.banner.has-hover.is-full-height .text-box {
		width: 90% !important;
		max-width: 90% !important;
	}

	.banner.has-hover.is-full-height .text-box .button {
		min-height: var(--lucid-cta-h) !important;
		padding-inline: 22px !important;
		font-size: 15px !important;
		font-weight: 700 !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}

	/* Global 16px mobile form input floor (prevents iOS Safari auto-zoom) */
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="search"],
	input[type="number"],
	input[type="password"],
	textarea,
	select {
		font-size: 16px !important;
	}

	/* Primary CTAs: 48px thumb-friendly height */
	.button.primary,
	.button.secondary,
	.single_add_to_cart_button,
	.woocommerce-mini-cart__buttons a.button {
		min-height: var(--lucid-cta-h) !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		font-size: 15px !important;
		line-height: 1.2 !important;
	}

	/* Shop "Filtrează" trigger: upgrade from 21px text link to crisp 44px pill */
	a.filter-button[data-open="#shop-sidebar"],
	.category-filtering a.filter-button {
		min-height: var(--lucid-tap) !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 8px !important;
		padding: 0 16px !important;
		border: 1px solid var(--lucid-line-strong) !important;
		border-radius: var(--lucid-radius) !important;
		background-color: var(--lucid-surface) !important;
		color: var(--lucid-ink) !important;
		font-size: 13px !important;
		font-weight: 700 !important;
		letter-spacing: 0.04em !important;
	}

	/* Cart Drawer safe-area, zero right-edge clipping & full-width buttons */
	.off-canvas .mfp-content.off-canvas-cart {
		--drawer-width: 100vw !important;
		width: 100vw !important;
		max-width: min(100vw, 390px) !important;
		overflow-x: hidden !important;
	}

	#cart-popup .cart-popup-inner,
	#cart-popup .cart-popup-inner--sticky {
		width: 100% !important;
		padding: 18px 16px max(24px, env(safe-area-inset-bottom)) !important;
		box-sizing: border-box !important;
	}

	#cart-popup .woocommerce-mini-cart-item a.remove {
		min-width: var(--lucid-tap) !important;
		min-height: var(--lucid-tap) !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}

	#cart-popup ul.woocommerce-mini-cart li.mini_cart_item > a:not(.remove) {
		padding-right: 44px !important;
		display: block;
	}

	#cart-popup .woocommerce-mini-cart__buttons a.button {
		width: 100% !important;
		margin-inline: 0 !important;
	}

	#cart-popup .woocommerce-mini-cart__buttons a.checkout {
		background-color: var(--lucid-cobalt) !important;
		color: #ffffff !important;
		border-color: var(--lucid-cobalt) !important;
	}
}

/* ==========================================================================
   7. WOOCOMMERCE CART BLOCK (/cart/) — TOUCH TARGETS & BRAND CTA POLISH
   ========================================================================== */

.wc-block-cart .wc-block-components-quantity-selector {
	border-radius: var(--lucid-radius) !important;
	border-color: #cfcbc3 !important;
	min-height: var(--lucid-tap) !important;
}

.wc-block-cart button.wc-block-components-quantity-selector__button {
	min-width: var(--lucid-tap) !important;
	min-height: var(--lucid-tap) !important;
	font-size: 18px !important;
	color: var(--lucid-ink) !important;
	opacity: 1 !important;
}

.wc-block-cart input.wc-block-components-quantity-selector__input {
	min-height: var(--lucid-tap) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
}

.wc-block-cart button.wc-block-cart-item__remove-link {
	min-height: var(--lucid-tap) !important;
	min-width: var(--lucid-tap) !important;
	display: inline-flex !important;
	align-items: center !important;
	padding: 0 6px !important;
	font-size: 13px !important;
	color: var(--lucid-muted) !important;
}

.wc-block-cart .wc-block-components-product-name {
	display: inline-block;
	padding-block: 4px;
	font-weight: 700;
	color: var(--lucid-ink) !important;
}

.wc-block-cart__submit-container a.wc-block-cart__submit-button,
.wc-block-cart__submit-container .wc-block-components-button.contained {
	background-color: var(--lucid-cobalt) !important;
	color: #ffffff !important;
	border: 1px solid var(--lucid-cobalt) !important;
	border-radius: var(--lucid-radius) !important;
	min-height: 52px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	width: 100% !important;
}

.wc-block-cart__submit-container a.wc-block-cart__submit-button:hover {
	background-color: var(--lucid-cobalt-hover) !important;
	border-color: var(--lucid-cobalt-hover) !important;
}

/* Keep B2B phone numbers from wrapping mid-number on /corporate/ */
a[href^="tel:"] {
	white-space: nowrap;
}

/* ==========================================================================
   8. PREFERS-REDUCED-MOTION (MANDATORY AWWWARDS-MCP A11Y/PERF GUARD)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
