/* =========================================================
   InkFireBook Header — same header as the new home page
   (build_home.py in InkFireBook_new_home: change both together).
   Logo 200 px, links centered, account + cart + Compare Options,
   gray line below, frosted once the page scrolls,
   full-screen menu on phones.
   ========================================================= */

/* The theme header and its phone menu are replaced */
body.ifbh-on #wrapper-navbar,
body.ifbh-on .uicore-mobile-menu-wrapper { display: none !important; }
/* without the theme header, the space above the page would slip out of the white page area */
body.ifbh-on .uicore-body-content { display: flow-root; }

/* One page width for the whole site: 1180 px like the home page and the header (the theme used 1360 px) */
body.ifbh-on,
body.ifbh-on .e-con { --container-max-width: min(95%, 1180px) !important; }
body.ifbh-on .uicore-container,
body.ifbh-on .elementor-section.elementor-section-boxed > .elementor-container { max-width: min(95%, 1180px) !important; }
/* From tablet up, the page boxes follow exactly the home rule (22 px each side, 1180 px at most),
   so on a 1024 px screen too the content starts and ends where the header does */
@media (min-width: 768px) {
  body.ifbh-on .elementor > .e-con.e-con-boxed { padding-left: 0 !important; padding-right: 0 !important; }
  body.ifbh-on .elementor > .e-con.e-con-boxed > .e-con-inner,
  body.ifbh-on .uicore-container { max-width: min(calc(100% - 44px), 1180px) !important; }
  body.ifbh-on .uicore-container { width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }
}

.ifbh {
  --ifbh-ink: #101828;
  --ifbh-line: #EAECF0;
  --ifbh-orange: #FF6638;
  --ifbh-orange-ink: #C2410C;
  --ifbh-soft: #FFF3EE;
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 9990;
  border-bottom: 1px solid var(--ifbh-line);
  background: #fff;
  font-family: 'DM Sans', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s;
}
.ifbh *, .ifbh *::before, .ifbh *::after { box-sizing: border-box; }
.ifbh.is-scrolled {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
/* a blur on the header would make the full-screen menu sit inside it */
.ifbh.is-open { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }

.ifbh-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 44px));
  min-height: 84px;
  margin: 0 auto;
}
.ifbh a { text-decoration: none; }
.ifbh-brand, .ifbh-brand svg { display: block; width: 200px; height: auto; }
.ifbh-brand { justify-self: start; line-height: 0; }

.ifbh-nav { justify-self: center; }
.ifbh-nav ul,
.ifbh-mobile ul { margin: 0; padding: 0; list-style: none; }
.ifbh-nav ul { display: flex; align-items: center; gap: 2px; }
.ifbh-nav li, .ifbh-mobile li { margin: 0; padding: 0; list-style: none; }
.ifbh-nav li::before, .ifbh-mobile li::before { display: none; }
.ifbh-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ifbh-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .15s, color .15s;
}
.ifbh-nav a:hover,
.ifbh-nav a[aria-current="page"] { background: var(--ifbh-soft); color: var(--ifbh-orange-ink); }

.ifbh-tools { display: flex; align-items: center; justify-self: end; gap: 4px; }
.ifbh-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ifbh-ink);
  transition: background-color .15s, color .15s;
}
.ifbh-icon svg { width: 20px; height: 20px; }
.ifbh-icon:hover { background: var(--ifbh-soft); color: var(--ifbh-orange-ink); }
/* Cart with item count and preview (same as the home page header, 08/11/2026) */
.ifbh-cartwrap { position: relative; }
button.ifbh-cart { min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer; }
button.ifbh-cart:hover, button.ifbh-cart:focus { background: var(--ifbh-soft); color: var(--ifbh-orange-ink); }
/* the theme draws a green ring on focused buttons: keep only our orange outline for keyboard focus */
button.ifbh-cart:focus { outline: none; box-shadow: none; }
button.ifbh-cart:focus-visible { outline: 3px solid var(--ifbh-orange); outline-offset: 3px; }
.ifbh-cart[aria-expanded="true"] { background: var(--ifbh-soft); color: var(--ifbh-orange-ink); }
.ifbh-count {
  position: absolute;
  top: 2px;
  right: 0;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--ifbh-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.ifbh-count[hidden], .ifbh-cart-pop[hidden] { display: none; }
.ifbh-cart-pop {
  position: absolute;
  z-index: 9991;
  top: calc(100% + 12px);
  right: -8px;
  width: 340px;
  padding: 18px;
  border: 1px solid var(--ifbh-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .22);
  color: var(--ifbh-ink);
  text-align: left;
}
.ifbh-cart-pop::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.ifbh-cart-title { margin: 0 0 12px; color: var(--ifbh-ink); font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1.2; }
.ifbh-cart-empty { margin: 0; color: #475467; font-size: 15px; line-height: 1.5; }
.ifbh-cart-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.ifbh .ifbh-cart-links a, .ifbh .ifbh-cart-name { color: var(--ifbh-orange-ink); font-size: 14px; font-weight: 700; line-height: 1.35; }
.ifbh .ifbh-cart-links a:hover, .ifbh .ifbh-cart-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.ifbh-cart-items { display: grid; gap: 12px; max-height: 260px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.ifbh-cart-items li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ifbh-cart-items li::before { display: none; }
.ifbh-cart-items img, .ifbh-cart-noimg { flex: none; width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: #FFF4EC; }
.ifbh .ifbh-cart-items .ifbh-cart-name { display: block; color: var(--ifbh-ink); }
.ifbh-cart-qty { display: block; margin-top: 2px; color: #475467; font-size: 13px; }
.ifbh-cart-sub { display: flex; justify-content: space-between; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--ifbh-line); color: #344054; font-size: 15px; }
.ifbh-cart-sub b { color: var(--ifbh-ink); }
.ifbh-cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ifbh-cart-actions .ifbh-btn { min-height: 44px; padding: 0 12px; box-shadow: none; }

.ifbh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 2px solid var(--ifbh-orange);
  border-radius: 999px;
  background: var(--ifbh-orange);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(255, 102, 56, .28);
  transition: box-shadow .2s;
}
.ifbh a.ifbh-btn, .ifbh a.ifbh-btn:hover, .ifbh a.ifbh-btn:focus { color: #fff; }
.ifbh-btn:hover { box-shadow: 0 8px 24px rgba(255, 102, 56, .4); }
.ifbh-cta { margin-left: 10px; }
.ifbh a.ifbh-btn-ghost, .ifbh a.ifbh-btn-ghost:hover { border-color: var(--ifbh-ink); background: #fff; color: var(--ifbh-ink); box-shadow: none; }

.ifbh-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 0;
  margin: 0 0 0 4px;
  padding: 0;
  border: 1px solid var(--ifbh-line);
  border-radius: 12px;
  background: #fff;
  color: var(--ifbh-ink);
  box-shadow: none;
  cursor: pointer;
}
.ifbh-toggle:hover, .ifbh-toggle:focus { background: #fff; color: var(--ifbh-ink); }
.ifbh-toggle svg { width: 20px; height: 20px; overflow: visible; }
.ifbh-toggle path { transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.ifbh.is-open .ifbh-b1 { transform: translateY(4px) rotate(45deg); }
.ifbh.is-open .ifbh-b2 { transform: translateY(-4px) rotate(-45deg); }

.ifbh :focus-visible { outline: 3px solid var(--ifbh-orange); outline-offset: 3px; }

.ifbh-mobile {
  position: fixed;
  top: var(--ifbh-top, 84px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9989;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 22px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: #fff;
}
.ifbh-mobile[hidden] { display: none; }
.ifbh-mobile li a {
  display: block;
  padding: 15px 4px;
  border-bottom: 1px solid var(--ifbh-line);
  color: var(--ifbh-ink);
  font-size: 18px;
  font-weight: 600;
}
.ifbh-mobile li a:hover,
.ifbh-mobile li a[aria-current="page"] { color: var(--ifbh-orange-ink); }
.ifbh-mobile-actions { display: grid; gap: 10px; }
.ifbh-mobile-actions .ifbh-btn { width: 100%; min-height: 52px; font-size: 16px; }

@media (max-width: 1100px) {
  .ifbh-nav a { padding: 8px 10px; font-size: 14px; }
  .ifbh-inner { gap: 12px; }
}
@media (max-width: 960px) {
  .ifbh-nav, .ifbh-cta { display: none; }
  .ifbh-inner { grid-template-columns: 1fr auto; }
  .ifbh-toggle { display: grid; }
}
@media (max-width: 480px) {
  .ifbh-inner { min-height: 72px; width: calc(100% - 32px); }
  .ifbh-brand, .ifbh-brand svg { width: min(190px, calc(100vw - 168px)); }
  .ifbh-icon { width: 38px; height: 38px; }
  .ifbh-cart-pop { position: fixed; top: var(--ifbh-cart-top, 72px); left: 12px; right: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ifbh, .ifbh-toggle path { transition: none; }
}

/* The theme footer (an Elementor footer template) is replaced by the site footer printed by this plugin */
body.ifbh-on [data-elementor-type="footer"] { display: none !important; }

/* remove button in the cart preview (1.0.7) */
.ifbh-cart-items li > div { flex: 1; min-width: 0; }
.ifbh .ifbh-cart-remove { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: 0; padding: 0; border: 1px solid #EAECF0; border-radius: 50%; background: #fff; color: #667085; cursor: pointer; transition: color .15s, border-color .15s, background-color .15s; }
.ifbh .ifbh-cart-remove svg { width: 16px; height: 16px; }
.ifbh .ifbh-cart-remove:hover { border-color: #FECDCA; background: #FEF3F2; color: #B42318; }
.ifbh .ifbh-cart-remove:focus-visible { outline: 2px solid #FF6638; outline-offset: 2px; }
.ifbh .ifbh-cart-remove[aria-disabled="true"] { cursor: default; }
.ifbh-cart-items li.is-removing { opacity: .45; transition: opacity .2s; }
