/* ============================================================================
   Strawberry for Beauty — site experience (header motion, smooth scroll, reveal,
   product-page chrome, BNPL widgets typography). Values marked var(--sfb-hdr-*)
   come from ستروبيري ▸ تجربة الموقع (inline :root block).
   ========================================================================== */

/* ---- Lenis (smooth scroll) essentials ---- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---- Header motion ---- */
.sfb-nav {
	--sfb-hdr-ease: cubic-bezier(.22, .61, .36, 1);
	will-change: transform;
	transition:
		transform var(--sfb-hdr-speed, 450ms) var(--sfb-hdr-ease),
		opacity var(--sfb-hdr-speed, 450ms) var(--sfb-hdr-ease),
		background .28s var(--sfb-hdr-ease), border-color .28s var(--sfb-hdr-ease),
		box-shadow .35s var(--sfb-hdr-ease), color .28s var(--sfb-hdr-ease);
}
.sfb-nav.is-hidden {
	transform: translate3d(0, var(--sfb-hdr-hide-y, -102%), 0);
	opacity: var(--sfb-hdr-hide-o, 0);
	pointer-events: none;
	box-shadow: none;
}
/* "static" mode: the bar scrolls away with the page */
.sfb-nav.is-static { position: absolute; will-change: auto; }

/* compact bar once scrolled: a touch slimmer, logo eases down, softer shadow */
.sfb-nav .sfb-nav__in { transition: block-size .35s var(--sfb-hdr-ease); }
.sfb-nav .sfb-logo { transition: transform .35s var(--sfb-hdr-ease); transform-origin: 50% 50%; }
.sfb-nav.is-compact .sfb-nav__in { block-size: calc(var(--sfb-nav-h) - 12px); }
.sfb-nav.is-compact .sfb-logo { transform: scale(.9); }
.sfb-nav.is-compact.is-stuck { box-shadow: 0 1px 2px rgba(23, 19, 20, .05), 0 10px 30px -12px rgba(23, 19, 20, .16); }

/* entrance */
@keyframes sfbNavIn {
	from { transform: translate3d(0, -100%, 0); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

/* nav link underline grow (all pages) */
.sfb-nav__links > ul > li > a { background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 2px; transition: background-size .35s var(--sfb-hdr-ease), color .2s; padding-block-end: 4px; }
.sfb-nav__links > ul > li > a:hover,
.sfb-nav__links > ul > li > a[aria-current="page"] { background-size: 100% 2px; }

/* scroll progress hairline */
.sfb-progress {
	position: absolute; inset-inline: 0; inset-block-end: -1px; block-size: 2px; pointer-events: none;
	background: var(--sfb-red, #DE2227); transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
	opacity: 0; transition: opacity .3s;
}
html[dir="rtl"] .sfb-progress { transform-origin: 100% 50%; }
.sfb-nav.is-stuck .sfb-progress { opacity: 1; }

/* ---- Product page: the standalone document now carries the site header/footer ---- */
body.sfb-sw-product .g,
body.sfb-sw-product .buy { top: calc(var(--sfb-nav-h) + 16px); transition: top var(--sfb-hdr-speed, 450ms) cubic-bezier(.22, .61, .36, 1); }
html.sfb-nav-away body.sfb-sw-product .g,
html.sfb-nav-away body.sfb-sw-product .buy { top: 20px; }
body.sfb-sw-product .modal { z-index: 100; }
body.sfb-sw-product .toast { z-index: 110; }
body.sfb-sw-product #sfb-main { outline: none; }
body.sfb-sw-product .crumbs { scroll-margin-block-start: var(--sfb-nav-h); }
@media (max-width: 782px) {
	body.sfb-sw-product { padding-block-end: 78px; } /* room for the sticky buy bar above the footer */
	body.sfb-sw-product .g, body.sfb-sw-product .buy { top: auto; }
}

/* ---- Reveal on scroll ---- */
.sfb-rv { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity .85s cubic-bezier(.16, 1, .3, 1), transform .85s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--rv-i, 0) * 70ms); }
.sfb-rv.is-in { opacity: 1; transform: none; }

/* ---- Footer payment logos (Tabby / Tamara) ---- */
.sfb-pay__logo { display: inline-flex; align-items: center; justify-content: center; block-size: 30px; padding: 0 10px; border-radius: 8px; background: #fff; }
.sfb-pay__logo img { display: block; block-size: 18px; inline-size: auto; max-inline-size: 72px; }
.sfb-pay li.is-bnpl .sfb-pay__label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Tabby / Tamara widgets on the product page use the site font ---- */
.bnpl, .bnpl *,
tamara-widget, .tamara-product-widget, .tamara-summary-widget, #tamara-product-widget,
#tabbyPromo, .tabby-promo, [id^="tabby"], [class*="tabby-"], [class*="Tabby"],
.tabby-product-widget, .tabby-promo * {
	font-family: var(--sfb-cairo, "Cairo", "Segoe UI", Tahoma, sans-serif) !important;
}
.bnpl { display: flex; flex-direction: column; gap: 10px; }
.bnpl > * { max-inline-size: 100%; }

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
	.sfb-nav, .sfb-nav * { transition-duration: .01ms !important; }
	.sfb-rv { opacity: 1; transform: none; transition: none; }
}

/* ---- Product breadcrumb: pill trail in the brand colours ---- */
nav.crumbs { padding-block: 14px 4px; }
nav.crumbs ol {
	display: flex; align-items: center; flex-wrap: nowrap; gap: 0; margin: 0; padding: 5px 6px; list-style: none;
	inline-size: max-content; max-inline-size: 100%;
	background: #fff; border: 1px solid var(--line, #e9e4de); border-radius: 999px;
	box-shadow: 0 2px 12px rgba(160, 110, 90, .08);
	overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
nav.crumbs ol::-webkit-scrollbar { display: none; }
nav.crumbs li { display: inline-flex; align-items: center; flex: 0 0 auto; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; }
nav.crumbs a {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
	color: var(--ink-2, #5c6064); text-decoration: none !important;
	transition: background-color .2s, color .2s;
}
nav.crumbs a:hover, nav.crumbs a:focus-visible { background: var(--blush, #fef5f0); color: var(--brand, #e8001c); }
nav.crumbs .cr-home { flex: 0 0 auto; color: var(--brand, #e8001c); }
nav.crumbs .cr-sep { color: #cdbfb8; padding-inline: 1px; }
nav.crumbs .cr-cur span {
	display: inline-block; max-inline-size: 36ch; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
	padding: 8px 14px; border-radius: 999px; background: var(--blush, #fef5f0); color: var(--ink, #24282c); font-weight: 800;
}
@media (max-width: 782px) {
	nav.crumbs { padding: 10px 16px 0; }
	nav.crumbs li { font-size: 12.5px; }
	nav.crumbs .cr-cur span { max-inline-size: 22ch; }
}


/* ======================================================================
   Header motion polish (2026-11-29). Same look; the motion is what changes.
   ====================================================================== */

/* nav links: the hover pill FADES in. (The old underline gradient above could never show — the pill's
   `background` shorthand wiped it — but its transition list dropped the background-color, so the pill popped.) */
.sfb-nav .sfb-nav__links > ul > li > a {
	background-image: none;
	transition: background-color .25s var(--sfb-hdr-ease), color .2s var(--sfb-hdr-ease), box-shadow .25s var(--sfb-hdr-ease);
}

/* mega panel: unhurried entrance, quick soft exit (never a slam, never a lag) */
.sfb-nav .sfb-mega {
	transform: translate3d(0, -12px, 0) scale(.992); transform-origin: 50% 0;
	transition: opacity .18s ease, transform .24s var(--sfb-hdr-ease), visibility 0s .24s;
}
.sfb-nav .sfb-nav__links li.is-open .sfb-mega {
	transform: none;
	transition: opacity .3s ease, transform .45s cubic-bezier(.16, 1, .3, 1), visibility 0s;
}
.sfb-mega-scrim { transition: opacity .32s ease, visibility 0s .32s; }
body.sfb-mega-open .sfb-mega-scrim { transition: opacity .3s ease, visibility 0s; }

/* search bar slides open instead of appearing */
@keyframes sfbSearchIn { from { opacity: 0; transform: translate3d(0, -10px, 0); } to { opacity: 1; transform: none; } }
.sfb-search:not([hidden]) { animation: sfbSearchIn .32s var(--sfb-ease, cubic-bezier(.16, 1, .3, 1)) both; }

/* icon buttons: a little press feedback; cart badge pops when the count changes */
.sfb-ico:active { transform: scale(.93); }
@keyframes sfbBump { 0% { transform: scale(1); } 35% { transform: scale(1.4); } 100% { transform: scale(1); } }
.sfb-cart-count.is-bump { animation: sfbBump .5s var(--sfb-ease, cubic-bezier(.16, 1, .3, 1)); }

@media (prefers-reduced-motion: reduce) {
	.sfb-nav .sfb-mega, .sfb-nav .sfb-nav__links li.is-open .sfb-mega { transform: none; transition-duration: .01ms !important; }
	.sfb-search:not([hidden]) { animation: none; }
	.sfb-cart-count.is-bump { animation: none; }
}
