/*
 * ESS Theme — main stylesheet.
 * Design tokens + header/footer layout. Page/section styling is added
 * gradually from provided designs.
 */

/* --------------------------------------------------------------- Tokens */
:root {
	--ess-font-heading: "Playfair Display", serif;
	--ess-font-body: "Poppins", sans-serif;

	--ess-blue: #4cbfea;
	--ess-blue-dark: #2ba3d4;
	--ess-topbar-bg: #ffffff;
	--ess-topbar-text: #000000;
	--ess-ink: #2b2b2b;
	--ess-muted: #666666;
	--ess-whatsapp: #25d366;
	--ess-snapchat: #fee101;

	--ess-container: 1200px;
}

/* --------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--ess-font-body);
	color: var(--ess-ink);
}

h1, h2, h3, h4, h5, h6 { font-family: var(--ess-font-heading); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.ess-container {
	width: 100%;
	max-width: var(--ess-container);
	margin: 0 auto;
	padding: 0 20px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}

.ess-icon {
	width: 1em; height: 1em;
	fill: currentColor;
	vertical-align: middle;
	flex: none;
}

/* --------------------------------------------------------------- Social icons (shared) */
.ess-social {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0; padding: 0;
	list-style: none;
}
.ess-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	font-size: 20px;
	color: #fff;
	border-radius: 50%;
	overflow: hidden;
	transition: background .3s ease, box-shadow .3s ease;
}
.ess-social__link--facebook  { background: #1877f2; }
.ess-social__link--instagram { background: linear-gradient(45deg, #f9a03f 0%, #f77737 18%, #e1306c 50%, #c13584 72%, #833ab4 100%); }
.ess-social__link--linkedin  { background: #0a66c2; }
.ess-social__link--snapchat  { background: var(--ess-snapchat); }
.ess-social__link--tiktok    { background: #010101; }

/* Hover: badge turns white with a blue ring (box-shadow avoids layout shift
   and the background-origin artifact a transparent border caused). */
.ess-social__link:hover { background: #fff; box-shadow: inset 0 0 0 2px var(--ess-blue); }

/* Icon roll: on hover the visible glyph slides down and out while the hidden
   solid-blue one drops in from the top (with a gap between them). */
.ess-social__roll {
	position: relative;
	width: 1em; height: 1em;
	overflow: hidden;
}
.ess-social__roll .ess-icon {
	position: absolute;
	left: 0;
	width: 100%; height: 100%;
	transition: top .35s cubic-bezier(.2, .7, .3, 1);
}
.ess-social__roll .ess-icon:nth-child(1) { top: -135%; color: var(--ess-blue); }
.ess-social__roll .ess-icon:nth-child(2) { top: 0; }
.ess-social__link:hover .ess-social__roll .ess-icon:nth-child(1) { top: 0; }
.ess-social__link:hover .ess-social__roll .ess-icon:nth-child(2) { top: 135%; }

/* Snapchat: white ghost with a dark outline (visible glyph only). */
.ess-social__link--snapchat .ess-social__roll .ess-icon:nth-child(2) {
	fill: #fff;
	stroke: #141414;
	stroke-width: .7;
	stroke-linejoin: round;
	paint-order: stroke;
}

/* --------------------------------------------------------------- Header: top bar */
.ess-topbar {
	position: relative;
	background: var(--ess-topbar-bg);
	color: var(--ess-topbar-text);
}
.ess-topbar__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 74px;
}
.ess-topbar__row { display: flex; align-items: center; }
.ess-topbar__logo { flex: none; }
.ess-topbar__logo img { max-height: 48px; width: auto; }
.ess-logo-text {
	font-family: var(--ess-font-heading);
	font-size: 24px;
	font-weight: 700;
	color: var(--ess-topbar-text);
}

.ess-topbar__contact {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	margin-left: auto;
	font-size: 12px;
	font-weight: 400;
}
.ess-topbar__item { color: var(--ess-topbar-text); white-space: nowrap; }
.ess-topbar__item + .ess-topbar__item { margin-left: 26px; position: relative; }
.ess-topbar__item + .ess-topbar__item::before {
	content: "|";
	position: absolute;
	left: -15px;
	color: var(--ess-topbar-text);
	opacity: .35;
}
/* Phone option can hold several labelled numbers ("Lebanon: … | Dubai: …"):
   each number is its own tel: link, labels stay plain text. */
.ess-phone__link { color: inherit; text-decoration: none; }
.ess-phone__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ess-phone__sep { margin: 0 6px; opacity: .35; }
/* Let a two-number list wrap between numbers on narrow screens, never inside one. */
.ess-topbar__phone { white-space: normal; }
.ess-topbar__phone .ess-phone__label,
.ess-topbar__phone .ess-phone__link { white-space: nowrap; }

/* Track Shipment: hidden for now (markup kept). Remove to re-enable. */
.ess-topbar__track { display: none !important; text-decoration: underline; text-underline-offset: 3px; }

/* Language switcher — shows only the language(s) you can switch to */
.ess-lang { display: inline-flex; align-items: center; }
.ess-lang__item {
	color: var(--ess-topbar-text);
	font-weight: 600;
	letter-spacing: .04em;
	opacity: .9;
	transition: opacity .2s ease;
}
.ess-lang__item:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.ess-lang__item + .ess-lang__item { margin-left: 14px; position: relative; }
.ess-lang__item + .ess-lang__item::before {
	content: "/";
	position: absolute;
	left: -9px;
	opacity: .5;
	font-weight: 400;
}

.ess-topbar .ess-social { margin-left: 24px; }

/* Hamburger button */
.ess-nav-toggle {
	display: none;
	position: relative;
	z-index: 1001;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--ess-topbar-text);
	cursor: pointer;
}
.ess-nav-toggle:focus { outline: none; }
.ess-nav-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.ess-burger { position: relative; width: 26px; height: 18px; }
.ess-burger span {
	position: absolute;
	left: 0;
	width: 100%; height: 2.5px;
	background: currentColor;
	border-radius: 2px;
	transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.ess-burger span:nth-child(1) { top: 0; }
.ess-burger span:nth-child(2) { top: 50%; margin-top: -1.25px; }
.ess-burger span:nth-child(3) { top: 100%; margin-top: -2.5px; }
body.ess-nav-open .ess-burger span:nth-child(1) { top: 50%; margin-top: -1.25px; transform: rotate(45deg); }
body.ess-nav-open .ess-burger span:nth-child(2) { opacity: 0; }
body.ess-nav-open .ess-burger span:nth-child(3) { top: 50%; margin-top: -1.25px; transform: rotate(-45deg); }

/* --------------------------------------------------------------- Header: nav bar */
.ess-navbar { background: var(--ess-blue); }
.ess-menu {
	display: flex;
	margin: 0; padding: 0;
	list-style: none;
}
.ess-menu > li { flex: 1 1 0; text-align: center; }
.ess-menu > li + li { box-shadow: -1px 0 0 rgba(255, 255, 255, .3); }
.ess-menu > li > a {
	display: block;
	padding: 10px 20px;
	color: #fff;
	font-size: 19px;
	font-weight: 500;
	letter-spacing: .04em;
	text-transform: uppercase;
	transition: background .2s ease, color .2s ease;
}
.ess-menu > li > a:hover,
.ess-menu > li.current-menu-item > a { background: var(--ess-blue-dark); }

/* Sub-menus (desktop dropdown) */
.ess-menu li { position: relative; }
.ess-menu .sub-menu {
	position: absolute;
	top: 100%; left: 0;
	min-width: 320px;
	margin: 0; padding: 0;
	list-style: none;
	background: var(--ess-blue);
	text-align: left;
	display: none;
	z-index: 20;
}
.ess-menu li:hover > .sub-menu { display: block; }
.ess-menu .sub-menu a {
	display: block;
	padding: 10px 20px;
	color: #fff;
	font-size: 14px;
	text-transform: uppercase;
}
.ess-menu .sub-menu a:hover { background: var(--ess-blue-dark); }

/* Accordion caret for parent items — only shown inside the mobile drawer. */
.ess-submenu-toggle { display: none; }

/* Off-canvas overlay (mobile only) */
.ess-nav-overlay { display: none; }

/* --------------------------------------------------------------- Footer */
.ess-footer {
	background: #fff;
	padding: 70px 0 40px;
	border-top: 1px solid #eee;
}
.ess-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
	gap: 40px;
}
.ess-footer__logo img { max-height: 70px; width: auto; margin-bottom: 20px; }
.ess-footer__brand .ess-social { margin: 20px 0; }
.ess-footer__brand .ess-social__link { width: 42px; height: 42px; font-size: 24px; }
.ess-footer__copyright {
	margin: 20px 0 0;
	font-size: 13px;
	line-height: 1.7;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--ess-muted);
}
.ess-footer__copyright .ess-credit {
	color: #e30613;
	font-weight: 600;
	transition: opacity .2s ease;
}
.ess-footer__copyright .ess-credit:hover { text-decoration: underline; opacity: .85; }
.ess-footer__heading {
	margin: 0 0 24px;
	font-family: var(--ess-font-body);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ess-ink);
}
.ess-footer__menu,
.ess-footer__contact-list {
	margin: 0; padding: 0;
	list-style: none;
	color: var(--ess-muted);
}
.ess-footer__menu li { margin-bottom: 14px; }
.ess-footer__contact-list li { margin-bottom: 16px; }
.ess-footer__menu a,
.ess-footer__contact-list a { color: var(--ess-muted); transition: color .2s ease; }
.ess-footer__menu a:hover,
.ess-footer__contact-list a:hover { color: var(--ess-blue); }

/* --------------------------------------------------------------- WhatsApp float */
.ess-whatsapp {
	position: fixed;
	right: 26px; bottom: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px; height: 60px;
	font-size: 34px;
	color: #fff;
	background: var(--ess-whatsapp);
	border-radius: 50%;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
	z-index: 998;
	transition: transform .2s ease;
}
.ess-whatsapp:hover { transform: scale(1.06); }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 992px) {
	/* Top bar splits into a white contact strip above a mauve logo row. */
	.ess-topbar__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		min-height: 0;
		padding: 0;
	}
	.ess-topbar__row {
		order: 1;
		justify-content: space-between;
		padding: 12px 20px;
	}
	.ess-topbar__logo img { max-height: 42px; }

	.ess-topbar__contact {
		order: 0;
		margin-left: 0;
		width: 100%;
		flex-wrap: nowrap;
		justify-content: center;
		background: var(--ess-blue);
		color: #fff;
		padding: 10px 12px;
		font-size: 12px;
	}
	.ess-topbar__item { color: #fff; }
	.ess-topbar__item + .ess-topbar__item { margin-left: 20px; }
	.ess-topbar__item + .ess-topbar__item::before { color: rgba(255, 255, 255, .6); }
	.ess-topbar__track { display: none; }
	.ess-topbar .ess-social { display: none; }

	.ess-nav-toggle { display: inline-flex; }

	/* Off-canvas drawer */
	.ess-navbar {
		position: fixed;
		top: 0; right: 0;
		height: 100%;
		width: min(82vw, 320px);
		background: #fff;
		transform: translateX(100%);
		transition: transform .35s cubic-bezier(.4, 0, .2, 1);
		z-index: 1000;
		overflow-y: auto;
		box-shadow: -10px 0 30px rgba(0, 0, 0, .15);
	}
	body.ess-nav-open .ess-navbar { transform: translateX(0); }
	.ess-navbar > .ess-container { max-width: none; padding: 60px 0 24px; }

	/* Close (X) button: black, pinned to the drawer's top-right corner. */
	body.ess-nav-open .ess-nav-toggle {
		position: fixed;
		top: 10px; right: 12px;
		color: var(--ess-ink);
	}

	.ess-menu { flex-direction: column; }
	.ess-menu > li { flex: none; text-align: left; }
	.ess-menu > li + li { box-shadow: none; border-top: 1px solid #eee; }
	.ess-menu > li > a { color: var(--ess-ink); padding: 15px 26px; font-size: 18px; }
	.ess-menu > li > a:hover,
	.ess-menu > li.current-menu-item > a { background: var(--ess-blue); color: #fff; }

	/* Collapsible sub-menus (accordion). */
	.ess-menu .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		background: #f6f6f6;
		max-height: 0;
		overflow: hidden;
		transition: max-height .35s ease;
	}
	.ess-menu .menu-item-has-children.ess-open > .sub-menu { max-height: 1500px; }
	.ess-menu .sub-menu a { color: var(--ess-muted); padding: 12px 34px; }

	/* Caret toggle sitting on the right edge of each parent row. */
	.ess-submenu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 0; right: 0;
		width: 56px; height: 52px;
		padding: 0;
		background: none;
		border: 0;
		border-left: 1px solid #eee;
		cursor: pointer;
	}
	.ess-caret {
		width: 9px; height: 9px;
		margin-top: -3px;
		border-right: 2px solid var(--ess-ink);
		border-bottom: 2px solid var(--ess-ink);
		transform: rotate(45deg);
		transition: transform .3s ease;
	}
	.ess-menu .menu-item-has-children.ess-open > .ess-submenu-toggle .ess-caret {
		margin-top: 3px;
		transform: rotate(-135deg);
	}

	/* Overlay */
	.ess-nav-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, .5);
		opacity: 0;
		visibility: hidden;
		transition: opacity .3s ease;
		z-index: 999;
	}
	body.ess-nav-open .ess-nav-overlay { opacity: 1; visibility: visible; }
	body.ess-nav-open { overflow: hidden; }

	.ess-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* Phones: the contact strip carries too much text for one line, so it becomes
   a two-column grid — phone numbers and email stacked at the logo edge, with
   the language switcher centred against both rows on the far side. */
@media (max-width: 600px) {
	.ess-topbar__contact {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		column-gap: 16px;
		row-gap: 4px;
		padding: 8px 20px;
		font-size: 11px;
		line-height: 1.45;
	}
	.ess-topbar__phone {
		grid-row: 1;
		grid-column: 1;
		text-align: start;
	}
	/* Row 2 is the email; it no longer follows anything, so drop the "|" gap. */
	.ess-topbar__phone + .ess-topbar__item {
		grid-row: 2;
		grid-column: 1;
		margin-left: 0;
	}
	.ess-topbar__phone + .ess-topbar__item::before { content: none; }
	/* Switcher spans both rows in its own column, so it centres against them.
	   Kept black on the blue strip by design — hence the explicit colour. */
	.ess-topbar__contact .ess-lang {
		grid-row: 1 / 3;
		grid-column: 2;
		margin-left: 0;
	}
	.ess-topbar__contact .ess-lang::before { content: none; }
	.ess-topbar__contact .ess-lang__item { color: #000; opacity: 1; }

	.ess-phone__sep { margin: 0 5px; }
	/* Zero-width space after the "|" gives the phone list a break point, so a
	   longer number list wraps between numbers instead of overflowing. */
	.ess-phone__sep::after { content: "\200B"; }
}

@media (max-width: 560px) {
	.ess-footer__grid { grid-template-columns: 1fr; }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.ess-social__roll .ess-icon,
	.ess-navbar,
	.ess-burger span,
	.ess-nav-overlay { transition: none; }
}
