/* ==========================================================================
   Opsi E on WordPress: chrome integration (loaded on every Opsi E page, after e.css)
   - neutralise Twenty Twenty-Five / legacy layout that fights the new chrome
   - announcement bar (admin-controlled text + countdown), product menu, cart count
   - footer extras, WhatsApp widget restyle
   Never use: .site-header .site-branding .main-navigation .navigation .site-navigation
   #masthead .wp-block-navigation (hidden site-wide by the nav plugin).
   ========================================================================== */

/* Sticky header needs no clipping ancestor with overflow:hidden (legacy CSS sets it on all four). */
html, body.e-design, body.e-design #page, body.e-design .wp-site-blocks { overflow-x: clip !important; }
body.e-design { background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--f-body); letter-spacing: normal; }
/* Twenty Twenty-Five's global styles (inline on every page) set Plus Jakarta Sans 300 on body and on every
   link via a:where(:not(.wp-element-button)), and on headings. Opsi E fonts win whatever the print order. */
html body.e-design { font: 400 16px/1.6 var(--f-body); }
body.e-design a:where(:not(.wp-element-button)) { font-family: inherit; }
/* zero-specificity on purpose: design classes (.h-display, .h-section, .loud, ...) must still win */
body.e-design { --wp--preset--font-family--plus-jakarta-sans: var(--f-body); }
:where(body.e-design) :where(h1, h2, h3, h4, h5, h6) { letter-spacing: inherit; line-height: inherit; }
:where(body.e-design img[width][height]) { height: auto; }
body.e-design .woocommerce-Price-currencySymbol { margin-right: .14em; }
body.e-design #page { margin: 0; padding: 0; max-width: none; }
/* Twenty Twenty-Five's own header/footer template parts ("Designed with WordPress") */
body.e-design .wp-site-blocks > header.wp-block-template-part,
body.e-design .wp-site-blocks > footer.wp-block-template-part,
body.e-design footer.wp-block-template-part { display: none !important; }
body.e-design #header, body.e-design #headerimg { display: none !important; }
/* wp-admin bar (logged-in staff) */
body.e-design.admin-bar .head { top: 32px; }
@media (max-width: 782px) { body.e-design.admin-bar .head { top: 46px; } }

/* ---------- announcement bar ---------- */
.e-bar { position: relative; height: var(--promo-h); background: var(--ink); color: #E8F1F0; display: flex; align-items: center; overflow: hidden; }
.e-bar.dismissed { display: none; }
.e-bar-link { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; text-decoration: none; color: inherit; overflow: hidden; }
.e-bar-track { display: flex; white-space: nowrap; }
.e-bar-group { display: flex; flex: none; }
.e-bar-item { display: inline-flex; align-items: center; gap: 34px; padding-right: 34px; font: 500 11.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.e-bar-item::after { content: "●"; color: var(--aqua); font-size: 9px; }
.e-bar-clock { margin-left: .5em; padding: 3px 6px; border-radius: 5px; background: rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; }
/* static (centred, first item only) until the first interaction, then a marquee */
.e-bar:not(.marquee-on) .e-bar-track { width: 100%; justify-content: center; }
.e-bar:not(.marquee-on) .e-bar-group + .e-bar-group,
.e-bar:not(.marquee-on) .e-bar-item:not(:first-child),
.e-bar:not(.marquee-on) .e-bar-item::after { display: none; }
.e-bar:not(.marquee-on) .e-bar-item { padding: 0 44px 0 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.e-bar.marquee-on .e-bar-track { animation: marquee 34s linear infinite; padding-left: 34px; }
.e-bar.marquee-on:hover .e-bar-track, .e-bar.marquee-on:focus-within .e-bar-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .e-bar .e-bar-track { animation: none !important; } }
.e-bar-close { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; color: #E8F1F0; font-size: 18px; line-height: 28px; background: var(--ink); }
.e-bar-close:hover { background: rgba(255, 255, 255, .12); }

/* ---------- header additions ---------- */
.e-nav-products { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: background .2s, color .2s; }
.e-nav-products i { width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.e-nav-products:hover, .e-nav-products[aria-expanded="true"] { background: var(--cream); color: var(--ink); }
.e-nav-products[aria-expanded="true"] i { transform: translateY(1px) rotate(-135deg); }
.nav a[aria-current="page"] { background: var(--cream); color: var(--ink); }
.e-cart { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink); }
.e-cart svg { width: 21px; height: 21px; }
.e-cart:hover { background: var(--cream); }
.e-cart-n { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--coral); color: var(--on-coral); font: 700 11px/19px var(--f-body); text-align: center; }
.e-cart-n[hidden] { display: none; }
.e-products { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(18, 63, 67, .45); }
.e-products[hidden] { display: none; }
.e-products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 18px; padding-bottom: 22px; }
.e-products-link { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--r-m); text-decoration: none; background: color-mix(in srgb, var(--p) 10%, var(--paper)); }
.e-products-link:hover, .e-products-link[aria-current="page"] { background: color-mix(in srgb, var(--p) 22%, var(--paper)); }
.e-products-link img { width: 58px; height: 52px; object-fit: contain; border-radius: 8px; flex: none; }
.e-products-link b { display: block; font: 400 21px/1.1 var(--f-display); }
.e-products-link .mono { font-size: 10.5px; color: var(--ink-2); }
.e-products-all { grid-column: 1 / -1; justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; padding: 6px 2px; }
.e-products-all .ar { width: 18px; }
[data-tint="sg"] { --p: var(--sg); } [data-tint="hc"] { --p: var(--hc); } [data-tint="lb"] { --p: var(--lb); }
[data-tint="mb"] { --p: var(--mb); } [data-tint="rl"] { --p: var(--rl); }
@media (max-width: 1023px) { .e-products { display: none !important; } .head-cta .e-cart { width: 40px; height: 40px; } }
.e-sheet-h { margin: 30px 0 4px; }
.sheet a.sheet-link[aria-current="page"] { color: var(--teal); }

/* ---------- footer additions ---------- */
.foot-brand a { display: inline-block; }
.e-foot-social { display: flex; gap: 18px; }
.e-foot-social a { font-weight: 700; padding: 0; }
.e-foot-addr { margin-top: 12px; font-style: normal; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.e-foot-addr b { color: var(--ink); }
.e-foot-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; }
.e-foot-badges li { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.e-foot-badges svg { width: 18px; height: 18px; color: var(--teal); }
.foot-bottom a { text-decoration: none; }
.foot-bottom a:hover { color: var(--teal); }

/* ---------- WhatsApp widget (bloomlab-whatsapp-widget.php keeps its markup, script and tracking) ---------- */
body.e-design .bloomlab-wa-widget {
  --wa-size: 56px; --wa-offset: 22px;
  background: #25D366; color: #fff; box-shadow: 0 16px 34px -14px rgba(18, 63, 67, .55), 0 0 0 4px rgba(252, 251, 247, .9);
  transition: transform .35s var(--ease), bottom .35s var(--ease), opacity .3s;
}
body.e-design .bloomlab-wa-widget::before { display: none; }
body.e-design .bloomlab-wa-widget:hover { transform: translateY(-2px); background: #1fbe5a; }
@media (max-width: 1023px) {
  body.e-design .bloomlab-wa-widget { --wa-size: 54px; --wa-offset: 16px; }
  body.e-design.e-bar-up .bloomlab-wa-widget { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
.menu-open body.e-design .bloomlab-wa-widget, html.menu-open .bloomlab-wa-widget { opacity: 0; pointer-events: none; }

/* ---------- generic content (pages without their own template) ---------- */
.e-main { display: block; }
body.e-design .e-generic { padding: clamp(36px, 6vw, 72px) 0; }
