/* Rodwick top bar — Joomla "header .gdwcontact" (courr-tel layout) inside Divi's #top-header.
   33px black bar, items right-aligned with 5.2% right padding, 74px apart; email Roboto 14px,
   phones Roboto 12px bold with the 15px phone icon and a 10×1.5px dash; hover light blue. */

#top-header.rw-topbar,
.et-fixed-header#top-header.rw-topbar,
#top-header.rw-topbar.et-fixed-header {
	background-color: #161a1d !important; /* Divi's fixed-header rule would turn it blue on scroll */
	height: 33px !important;             /* and would collapse it to a thin strip */
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	line-height: 1 !important;
	overflow: visible;
}
.et-fixed-header#top-header.rw-topbar a,
#top-header.rw-topbar.et-fixed-header a { font-size: .75rem; }
.et-fixed-header#top-header.rw-topbar .rw-topbar__email a,
#top-header.rw-topbar.et-fixed-header .rw-topbar__email a { font-size: .875rem; }
#top-header.rw-topbar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	height: 33px;
	padding: 0 5.209% 0 0;
	background-color: #161a1d;
	font-family: "Roboto", sans-serif, "PT Serif", serif, Arial, Helvetica, sans-serif;
	line-height: 1;
	color: #fff;
}
#top-header.rw-topbar .rw-topbar__inner {
	display: flex;
	align-items: center;
	max-width: 1820px;
	padding-top: 1px;
}
#top-header.rw-topbar .rw-topbar__inner > * + * { margin-left: 4.625rem; }
#top-header.rw-topbar .rw-topbar__item { letter-spacing: .24px; }
#top-header.rw-topbar a {
	display: flex;
	align-items: center;
	min-height: 2.063rem;
	color: #fff !important; /* Divi recolours #top-header links in its fixed state */
	font-weight: 700;
	font-size: .75rem;
	text-transform: none; /* Divi's secondary header is uppercase */
	text-decoration: none;
	transition: color 175ms ease;
}
#top-header.rw-topbar .rw-topbar__email a {
	font-size: .875rem;
	font-weight: 400;
}
#top-header.rw-topbar a svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
	flex: 0 0 auto;
}
#top-header.rw-topbar .rw-topbar__dash {
	display: block;
	width: 10px;
	height: 1.5px;
	margin: 0 12px;
	background-color: #fff;
	transition: background-color 175ms ease;
}
#top-header.rw-topbar .rw-topbar__label { margin-left: 3px; }
#top-header.rw-topbar a:hover,
#top-header.rw-topbar a:focus-visible { color: #169cd9 !important; }
#top-header.rw-topbar a:hover .rw-topbar__dash { background-color: #169cd9; }

/* Divi normally hides the secondary bar on phones; the Joomla site keeps the two phone numbers */
@media (max-width: 980px) {
	#top-header.rw-topbar { display: flex !important; }
}
@media (max-width: 900.98px) {
	#top-header.rw-topbar { justify-content: center; padding-right: 0; }
	#top-header.rw-topbar .rw-topbar__email { display: none; }
	#top-header.rw-topbar .rw-topbar__inner { width: 80%; justify-content: center; margin: auto; }
	#top-header.rw-topbar .rw-topbar__inner > * + * { margin-left: 0; }
	#top-header.rw-topbar .rw-topbar__tele + .rw-topbar__tele { margin-left: 30px; }
}
@media (max-width: 678.98px) {
	#top-header.rw-topbar .rw-topbar__label { display: none; }
}

/* ---- product search box + language toggle in the Divi primary menu (Joomla header) ---- */
/* desktop: a floated block after Divi's search icon; the menu copy is for the mobile menu only */
#et-top-navigation .rw-lang {
	float: left;
	margin: -15px 0 0 20px; /* centres the 50px button on the menu text line */
}
/* While Divi's search field is open (.et_pb_menu_hidden on the menu container) the close "X"
   lands on the language button: hide the button along with the menu */
.et_menu_container.et_pb_menu_hidden #et-top-navigation .rw-lang { visibility: hidden; opacity: 0; pointer-events: none; }
#et-top-navigation .rw-lang { transition: opacity .2s ease; }
/* the header now runs to the viewport edge, so give Divi's search close "X" and field some air */
@media (min-width: 1250px) {
	#main-header .et_search_form_container .et_close_search_field { right: 40px !important; }
	#main-header .et_search_form_container .et-search-form { padding-right: 90px; box-sizing: border-box; }
}
/* Below 1250px the hamburger is in use and the language button is hidden: Divi then sizes the open
   search field from the (hidden) menu, so it came out ~150px wide with the "X" over the text, and on
   phones its 50% width truncated the upper-case "RECHERCHER UN PRODUIT" placeholder. Give the open
   field the header width minus the logo, and a normal-case, tighter placeholder. */
@media (max-width: 1249.98px) {
	#main-header .et_header_style_left .et-search-form,
	#main-header .et-search-form { width: calc(100% - 300px) !important; max-width: none !important; padding-right: 0; }
	#main-header .et_search_form_container .et_close_search_field { right: 0 !important; }
	.et_search_form_container input.et-search-field,
	.et_search_form_container input.et-search-field::placeholder { text-transform: none !important; letter-spacing: 0 !important; font-size: 15px; }
}
/* phones and small tablets: the logo steps aside while the search field is open (Divi flags the
   open state with .et_pb_menu_hidden on the menu container) and the field takes the full width */
@media (max-width: 980px) {
	#main-header .et_menu_container.et_pb_menu_hidden .logo_container { visibility: hidden; }
	#main-header .et_header_style_left .et-search-form,
	#main-header .et-search-form { width: 100% !important; }
	.et_search_form_container input.et-search-field,
	.et_search_form_container input.et-search-field::placeholder { font-size: 14px; }
}
/* Divi floats its search icon to the right; float it left so the order is menu → search → EN */
@media (min-width: 981px) {
	#et-top-navigation #et_top_search { float: left !important; margin: 3px 0 0 22px !important; }
}
#top-menu > li.rw-lang-mobile { display: none !important; }
.rw-nav-search__form {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0;
}
.rw-nav-search__input {
	box-sizing: border-box;
	width: 219px;
	height: 49px;
	margin: 0;
	padding: 6px 38px 6px 24px;
	border: 0;
	border-radius: 0;
	background-color: #f5f5f5;
	font-family: "PT Serif", serif, Arial, Helvetica, sans-serif;
	font-size: 14px;
	letter-spacing: .28px;
	color: #161a1d;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.rw-nav-search__input::placeholder { color: #161a1d; opacity: 1; }
.rw-nav-search__input:focus { background-color: #ededed; }
.rw-nav-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.rw-nav-search__btn {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: #000;
	cursor: pointer;
	line-height: 0;
	transition: color 175ms ease;
}
.rw-nav-search__btn svg { width: 14px; height: 14px; fill: currentColor; }
.rw-nav-search__btn:hover { color: #003e7e; }

.rw-lang__link {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 50px;
	padding: 0 !important;
	background-color: #003e7e;
	color: #fff !important;
	font-family: "PT Serif", serif, Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 175ms ease;
}
.rw-lang__link:after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 5px;
	width: 3px;
	background-color: #fff;
}
.rw-lang__link:hover { background-color: #169cd9; opacity: 1 !important; }

/* Divi mobile menu: show the copy, hide the floated block */
.et_mobile_menu li.rw-lang-mobile { display: block !important; padding: 10px 5%; border-bottom: 0; }
@media (max-width: 980px) { #et-top-navigation .rw-lang { display: none; } }

/* Divi's header container is 80% / 1080px wide: too narrow for the menu + search icon + language
   button. rodwick.com runs the header edge to edge with the logo 100px from the left. */
@media (min-width: 981px) {
	#main-header .container {
		width: calc(100% - 100px) !important;
		max-width: none !important;
		margin: 0 0 0 100px !important;
		padding-left: 0;
	}

}
@media (min-width: 981px) and (max-width: 1500px) {
	#main-header .container { width: calc(100% - 60px) !important; margin-left: 60px !important; }
}
@media (min-width: 981px) and (max-width: 1250px) {
	#main-header .container { width: calc(100% - 30px) !important; margin-left: 30px !important; }
}

/* ---- search results page (only products are searched) ---- */
.rw-search {
	box-sizing: border-box;
	max-width: 1280px;
	margin: 0 auto;
	padding: 60px 20px 100px;
	font-family: "PT Serif", serif, Arial, Helvetica, sans-serif;
	color: #161a1d;
}
.rw-search__title {
	margin: 0 0 10px;
	font-family: "Oswald", sans-serif;
	font-weight: 700;
	font-size: 36px;
	line-height: 1.2;
	letter-spacing: 1.8px;
	color: #003e7e;
}
.rw-search__count { margin: 0 0 40px; font-size: 16px; }
.rw-search__form { display: flex; max-width: 480px; margin: 0 0 50px; }
.rw-search__form .rw-nav-search__form { width: 100%; }
.rw-search__form .rw-nav-search__input { width: 100%; }
.rw-search__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.rw-search__card {
	display: block;
	background: #fff;
	box-shadow: 0 0 13px rgba(0, 0, 0, .1);
	text-decoration: none;
	color: inherit;
	transition: box-shadow .25s ease;
}
.rw-search__card:hover { box-shadow: 0 0 13px rgba(0, 0, 0, .25); }
.rw-search__card img { display: block; width: 100%; height: auto; margin: 20px 0; }
.rw-search__card h2 {
	min-height: 90px;
	margin: 0;
	padding: 0 10px 20px;
	font-family: "Oswald", sans-serif;
	font-weight: 500;
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: 1px;
	text-align: center;
	color: #161a1d;
}
.rw-search__empty { font-size: 18px; }
.rw-search__empty a { color: #003e7e; }
.rw-search .rw-hero__btn { margin-top: 30px; }
.rw-search__pagination { margin-top: 50px; text-align: center; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 20px; }
.rw-search__pagination .page-numbers { display: inline-block; padding: 6px 12px; color: #003e7e; text-decoration: none; }
.rw-search__pagination .page-numbers.current { color: #169cd9; }
@media (max-width: 980px) { .rw-search__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .rw-search__grid { grid-template-columns: 1fr; } .rw-search__title { font-size: 28px; } }

/* ---- 981px–1249px: Divi only switches to its hamburger menu below 981px, but the logo (250px),
   the eight menu items (784px), the search icon and the EN/FR button need about 1185px, so on
   tablets in landscape and small laptops the menu ran over the logo. Use Divi's mobile menu in
   that range too (rules copied from Divi's max-width:980px block for the "left" header style). ---- */
@media (min-width: 981px) and (max-width: 1249.98px) {
	#main-header #top-menu { display: none; }
	.et_header_style_left #et-top-navigation,
	.et_header_style_left .et-fixed-header #et-top-navigation { padding-top: 24px !important; display: block; } /* !important: Divi's JS sets its desktop padding (53px) inline above 980px, which pushed the icons below the logo centre */
	#main-header #et_mobile_nav_menu { display: block; }
	#et-top-navigation { margin-right: 0; }
	#et-top-navigation #et_top_search { float: left !important; margin: 0 35px 0 0 !important; }
	#et-top-navigation #et_search_icon:before { top: 7px; }
	#et-top-navigation .rw-lang { display: none; }
	#main-header .container { width: calc(100% - 60px) !important; margin: 0 30px !important; }
}
