:root {
	--rfh-bg: rgba(255, 255, 255, 0.95);
	--rfh-text: #1e293b;
	--rfh-primary: #1a7f37;
	--rfh-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
	--rfh-radius: 24px;
}

.rusicaa-floating-header {
	position: fixed;
	top: 20px;
	left: 20px;
	right: 20px;
	z-index: 999;
	background: var(--rfh-bg);
	backdrop-filter: blur(12px);
	border-radius: var(--rfh-radius);
	box-shadow: var(--rfh-shadow);
	padding: 0 1.5rem;
	height: 100px;
	display: flex;
	align-items: center;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rusicaa-floating-header.scrolled {
	height: 70px;
	top: 0;
	left: 0;
	right: 0;
	border-radius: 0;
	box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
	background: rgba(255, 255, 255, 0.98);
	padding: 0 2rem;
}

/* Invisible full-width cover strip that sits above the floating header
   so that when scrolled, nothing shows through the gap between
   the viewport top and the header. */
.rusicaa-floating-header::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 20px; /* matches the header's top offset */
	background: #fff;
	z-index: 998;
	transition: opacity 0.3s ease;
	opacity: 0;
}
.rusicaa-floating-header.scrolled::before {
	opacity: 0; /* not needed once header goes flush */
}

.rfh-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.rfh-logo img {
	max-height: 60px;
	width: auto;
	display: block;
	transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
}
.rfh-logo img:hover {
	transform: scale(1.05);
}

.rusicaa-floating-header.scrolled .rfh-logo img {
	max-height: 40px;
}

.rfh-text-logo {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--rfh-primary);
	text-decoration: none;
}

.rfh-desktop-menu nav ul {
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rfh-desktop-menu nav ul li a {
	text-decoration: none;
	color: var(--rfh-text);
	font-weight: 500;
	font-size: 0.95rem;
	transition: color 0.2s;
	position: relative;
}
.rfh-desktop-menu nav ul li a::after {
	content: '';
	position: absolute;
	width: 0;
	height: 2px;
	bottom: -4px;
	left: 50%;
	background-color: var(--rfh-primary);
	transition: all 0.3s ease;
	transform: translateX(-50%);
}
.rfh-desktop-menu nav ul li a:hover {
	color: var(--rfh-primary);
}
.rfh-desktop-menu nav ul li a:hover::after {
	width: 100%;
}

.rfh-actions, .rfh-desktop-icons, .rfh-mobile-icons {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.rfh-icon, .rfh-hamburger {
	color: var(--rfh-text);
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	text-decoration: none;
	transition: color 0.2s;
}
.rfh-icon:hover, .rfh-hamburger:hover {
	color: var(--rfh-primary);
	transform: scale(1.1);
}

.rfh-cart {
	position: relative;
}
.rfh-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	background: var(--rfh-primary);
	color: #fff;
	font-size: 0.7rem;
	font-weight: bold;
	min-width: 16px;
	height: 16px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

/* Drawer Settings */
.rfh-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 320px;
	background: #fff;
	z-index: 10001;
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	box-shadow: -5px 0 25px rgba(0,0,0,0.05);
}
.rfh-drawer.active {
	transform: translateX(0);
}

.rfh-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.5);
	backdrop-filter: blur(4px);
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.4s ease;
}
.rfh-overlay.active {
	opacity: 1;
	visibility: visible;
}

.rfh-drawer-header {
	padding: 1.5rem;
	display: flex;
	justify-content: flex-end;
	border-bottom: 1px solid #f1f5f9;
}
.rfh-close-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #64748b;
	padding: 0.5rem;
}

.rfh-drawer-content {
	padding: 2rem;
	overflow-y: auto;
	flex-grow: 1;
}

.rfh-drawer-content nav ul {
	list-style: none;
	padding: 0;
	margin: 0 0 2rem 0;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.rfh-drawer-content nav ul li {
	opacity: 0;
	transform: translateY(15px);
	transition: all 0.4s ease;
}
.rfh-drawer.active .rfh-drawer-content nav ul li {
	opacity: 1;
	transform: translateY(0);
}
.rfh-drawer.active .rfh-drawer-content nav ul li:nth-child(1) { transition-delay: 0.1s; }
.rfh-drawer.active .rfh-drawer-content nav ul li:nth-child(2) { transition-delay: 0.15s; }
.rfh-drawer.active .rfh-drawer-content nav ul li:nth-child(3) { transition-delay: 0.2s; }
.rfh-drawer.active .rfh-drawer-content nav ul li:nth-child(4) { transition-delay: 0.25s; }
.rfh-drawer.active .rfh-drawer-content nav ul li:nth-child(5) { transition-delay: 0.3s; }
.rfh-drawer.active .rfh-drawer-content nav ul li:nth-child(6) { transition-delay: 0.35s; }

.rfh-drawer-content nav ul li a {
	text-decoration: none;
	color: var(--rfh-text);
	font-size: 1.1rem;
	font-weight: 600;
}

.rfh-drawer-footer {
	border-top: 1px solid #f1f5f9;
	padding-top: 1.5rem;
}
.rfh-drawer-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--rfh-text);
	font-weight: 600;
}

.hidden-on-mobile { display: flex; }
.hidden-on-desktop { display: none; }

@media (max-width: 767px) {
	.hidden-on-mobile { display: none !important; }
	.hidden-on-desktop { display: flex !important; }
	
	.rfh-logo img {
		max-height: 50px;
	}
	.rusicaa-floating-header.scrolled .rfh-logo img {
		max-height: 40px;
	}
}

/* Prevent page content from hiding under the floating header.
   At rest: header top(20px) + height(100px) = 120px.
   Once scrolled, the header collapses to 70px at top:0. */
body {
	padding-top: 120px !important;
	transition: padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
body.header-scrolled {
	padding-top: 70px !important;
}

/* Fallback for Elementor full-width pages that reset body padding */
.elementor-page body,
body.elementor-page {
	padding-top: 120px !important;
}

/* Search Overlay */
.rfh-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.98);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	backdrop-filter: blur(10px);
}
.rfh-search-overlay.active {
	opacity: 1;
	visibility: visible;
}
.rfh-search-content {
	width: 100%;
	max-width: 800px;
	padding: 0 2rem;
	transform: translateY(20px);
	transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.rfh-search-overlay.active .rfh-search-content {
	transform: translateY(0);
}
.rfh-search-form {
	position: relative;
	display: flex;
	align-items: center;
	border-bottom: 2px solid var(--rfh-primary);
}
.rfh-search-field {
	width: 100%;
	background: transparent;
	border: none;
	font-size: 2.5rem;
	font-weight: 700;
	font-family: var(--font-heading);
	color: var(--rfh-text);
	padding: 1rem 0;
	outline: none;
}
.rfh-search-field::placeholder {
	color: #94a3b8;
}
.rfh-search-submit {
	background: transparent;
	border: none;
	color: var(--rfh-primary);
	cursor: pointer;
	padding: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
}
.rfh-search-submit:hover {
	transform: scale(1.1);
}
.rfh-search-overlay .rfh-close-btn {
	position: absolute;
	top: 2rem;
	right: 2rem;
	background: transparent;
	border: none;
	color: var(--rfh-text);
	cursor: pointer;
	transition: color 0.2s, transform 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}
.rfh-search-overlay .rfh-close-btn:hover {
	color: var(--rfh-primary);
	transform: rotate(90deg);
}

@media (max-width: 767px) {
	.rfh-search-field {
		font-size: 1.5rem;
	}
	.rfh-search-overlay .rfh-close-btn {
		top: 1rem;
		right: 1rem;
	}
}
