/* ============================================================
   BB SHELL — global header / sub-nav / footer / mobile system
   Pairs with template-parts/bb-*.php + assets/js/bb-shell.js
   Desktop shell >= 1024px, mobile shell < 1024px.
   ============================================================ */

/* Reset Shoptimizer header wrappers so the BB shell controls width. */
#masthead.site-header { background: var(--bb-surface); border: 0; box-shadow: none; }
#masthead .main-header.col-full { max-width: none; width: 100%; padding: 0; margin: 0; display: block; }
#masthead .menu-overlay { display: none; }
.col-full-nav { display: none !important; }            /* Shoptimizer secondary nav suppressed */
.shoptimizer-archive .archive-header { display: none; } /* default breadcrumb header off for now */

.bb-wrap { max-width: 1440px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.bb-only-mobile { display: none; }
.bb-only-desktop { display: block; }

/* ---------- Announcement bar ---------- */
.bb-announce { background: var(--bb-red-deep); color: rgba(255,255,255,.9); font-size: 12px; }
/* Force white on red — beats theme rules that paint .site-info / nav-style links black. */
.bb-announce, .bb-announce a, .bb-announce a:link, .bb-announce a:visited, .bb-announce span, .bb-announce b { color: rgba(255,255,255,.9) !important; }
.bb-announce a:hover { color: #fff !important; }
.bb-announce__inner { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.bb-announce__left, .bb-announce__right { display: flex; gap: 14px; align-items: center; }
.bb-announce a { cursor: pointer; }
.bb-announce .sep { opacity: .4; }
.bb-announce svg { width: 13px; height: 13px; }
.bb-announce__left .ic { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Desktop header ---------- */
.bb-head { position: sticky; top: 0; z-index: 50; background: var(--bb-surface); border-bottom: 1px solid var(--bb-line); transition: box-shadow .2s; }
.bb-head.is-stuck { box-shadow: var(--bb-sh-head); }
.bb-head__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; padding-top: 18px; padding-bottom: 18px; }
.bb-logo img { height: 34px; width: auto; display: block; }
.bb-logo .txt { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--bb-ink); }

/* Search */
.bb-search { position: relative; }
.bb-search__row { display: flex; border: 2px solid var(--bb-ink); border-radius: var(--bb-r-pill); overflow: hidden; background: #fff; transition: border-color .15s; }
.bb-search__row:focus-within { border-color: var(--bb-red); }
.bb-search select { border: 0; background: var(--bb-bg); padding: 0 18px; font-size: 13px; color: var(--bb-ink); outline: none; border-right: 1px solid var(--bb-line); cursor: pointer; width: auto !important; max-width: 180px; flex: 0 0 auto; min-width: 0; }
.bb-search input { flex: 1; border: 0; padding: 13px 18px; font-size: 15px; outline: none; background: #fff; color: var(--bb-ink); }
.bb-search button { padding: 0 28px; display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; background: var(--bb-red); color: #fff; border: 0; }
.bb-search button:hover { background: var(--bb-red-deep); }
.bb-search button svg { width: 18px; height: 18px; }

/* Right cluster */
.bb-actions { display: flex; gap: 22px; align-items: center; color: var(--bb-ink); }
.bb-action { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; border: 0; background: transparent; color: var(--bb-ink); cursor: pointer; padding: 0; }
.bb-action__ic { position: relative; display: inline-flex; line-height: 0; }
.bb-action svg { width: 22px; height: 22px; }
.bb-action:hover { color: var(--bb-red); }
.bb-badge { position: absolute; top: -4px; right: -6px; background: var(--bb-red); color: #fff; border-radius: var(--bb-r-pill); min-width: 16px; height: 16px; display: grid; place-items: center; font-size: 10px; font-weight: 700; padding: 0 4px; line-height: 1; }
.bb-badge[hidden] { display: none !important; }

/* ---------- Category sub-nav ---------- */
.bb-subnav { border-top: 1px solid var(--bb-line); background: var(--bb-surface); }
.bb-subnav__inner { display: flex; gap: 6px; align-items: center; padding-top: 10px; padding-bottom: 10px; font-size: 13px; font-weight: 500; }
.bb-allcats { background: var(--bb-red); color: #fff; border: 0; border-radius: var(--bb-r-input); padding: 8px 14px; display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; margin-right: 14px; white-space: nowrap; }
.bb-allcats svg { width: 16px; height: 16px; }
.bb-subnav__links { display: flex; gap: 2px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.bb-subnav__links::-webkit-scrollbar { display: none; }
.bb-subnav__links a { color: var(--bb-ink); padding: 8px 12px; border-radius: 6px; font-weight: 500; white-space: nowrap; transition: color .12s; }
.bb-subnav__links a:hover, .bb-subnav__links a.is-active { color: var(--bb-red); font-weight: 700; }
.bb-subnav__flash { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; font-size: 12px; color: var(--bb-red); font-weight: 700; white-space: nowrap; }
.bb-subnav__flash svg { width: 13px; height: 13px; }
/* §4 — sub-nav countdown rendered as a dark pill so it reads as a ticker, not yellow-on-white text. */
.bb-subnav__flash .bb-count { padding: 4px 10px; background: var(--bb-ink); color: #fff; border-radius: 6px; font-size: 12px; letter-spacing: .04em; }

/* Countdown ticker */
.bb-count { font-family: var(--bb-font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.bb-count--invert { color: #fff; }

/* ---------- Footer ---------- */
/* §12 — was margin-top:48px which left a white strip between dark brands band and dark footer.
   Dropped to 0 so the two dark blocks butt directly together. */
.bb-foot { background: var(--bb-ink); color: rgba(255,255,255,.85); padding: 72px 0 32px; margin-top: 0; }
/* §13 — items-start on the top grid so column 1 (with logo) aligns to the same top baseline as the other columns.
   Then the logo gets margin-bottom and the h3 has zero top margin, so the headline sits at the SAME y as SHOP/SUPPORT/COMPANY/VISIT. */
.bb-foot__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1); align-items: start; }
/* §13 — logo row lifted out of column-1 stack so h3 aligns with right columns' headings. */
.bb-foot__brand { padding-bottom: 32px; }
/* §11 — bulletproof the white pill in case theme rules override it. */
.bb-foot__logo { background: #fff !important; display: inline-block !important; padding: 10px 16px !important; border-radius: 6px !important; line-height: 0; }
.bb-foot__logo img { height: 28px; width: auto; display: block; max-width: none; }
.bb-foot h3 { font-size: 28px; color: #fff; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em; max-width: 380px; }
.bb-foot__news-sub { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.55; margin-bottom: 18px; max-width: 360px; }
.bb-foot__news { display: flex; gap: 8px; max-width: 380px; }
.bb-foot__news input { flex: 1; padding: 12px 14px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; border-radius: 6px; font-size: 13px; outline: none; }
.bb-foot__news button { padding: 0 18px; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--bb-red); color: #fff; border: 0; }
.bb-foot__news button:hover { background: var(--bb-red-deep); }
.bb-foot__col-h { font-size: 11px; color: rgba(255,255,255,.5); margin-bottom: 14px; letter-spacing: .14em; text-transform: uppercase; }
.bb-foot__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.bb-foot__col a { font-size: 14px; color: rgba(255,255,255,.85); }
.bb-foot__col a:hover { color: #fff; }
.bb-foot__visit { font-size: 14px; color: #fff; line-height: 1.65; }
.bb-foot__visit .meta { margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.7); display: flex; gap: 8px; align-items: center; }
.bb-foot__social { display: flex; gap: 8px; margin-top: 18px; }
.bb-foot__social a { width: 32px; height: 32px; border-radius: var(--bb-r-pill); background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.bb-foot__social a:hover { background: var(--bb-red); }
.bb-foot__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 12px; color: rgba(255,255,255,.55); }
.bb-foot__pay { display: flex; gap: 12px; align-items: center; }
.bb-foot__pay span.tag { padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 700; }

/* ---------- Mobile header ---------- */
.bb-mhead { position: sticky; top: 0; z-index: 50; background: var(--bb-surface); }
.bb-mhead__bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; border-bottom: 1px solid transparent; transition: border-color .2s; }
.bb-mhead.is-stuck .bb-mhead__bar { border-color: var(--bb-line); }
.bb-mhead__bar button { background: transparent; border: 0; color: var(--bb-ink); padding: 4px; cursor: pointer; position: relative; }
.bb-mhead__bar button svg { width: 22px; height: 22px; }
.bb-mhead__logo { display: flex; }
.bb-mhead__logo img { height: 22px; }
.bb-mhead__spacer { flex: 1; }
.bb-msearch { padding: 0 16px 12px; }
.bb-msearch button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--bb-bg-2); border: 0; border-radius: var(--bb-r-pill); color: var(--bb-mute); font-size: 13px; cursor: pointer; }
.bb-msearch svg { width: 16px; height: 16px; }
.bb-msearch .label { flex: 1; text-align: left; }
.bb-msearch .cod { background: var(--bb-red); color: #fff; padding: 3px 9px; border-radius: var(--bb-r-pill); font-size: 10px; font-weight: 700; }
.bb-mflash { background: var(--bb-red); color: #fff; padding: 7px 16px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.bb-mflash svg { width: 12px; height: 12px; }
.bb-mflash .ttl { font-weight: 700; }
.bb-mflash .more { margin-left: auto; font-weight: 600; opacity: .95; }

/* ---------- Mobile bottom nav ---------- */
.bb-bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: var(--bb-surface); border-top: 1px solid var(--bb-line); box-shadow: 0 -6px 20px -8px rgba(0,0,0,.08); padding-bottom: env(safe-area-inset-bottom, 8px); display: none; }
.bb-bottomnav__row { display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px 4px; }
.bb-bottomnav a { background: transparent; border: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--bb-mute); font-size: 10px; font-weight: 500; padding: 6px 4px 4px; }
.bb-bottomnav a.is-active { color: var(--bb-red); font-weight: 600; }
.bb-bottomnav a svg { width: 22px; height: 22px; }

/* ---------- Overlays: mobile menu drawer + search ---------- */
.bb-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 95; opacity: 0; visibility: hidden; transition: opacity .2s; }
.bb-scrim.is-open { opacity: 1; visibility: visible; }

.bb-drawer { position: fixed; top: 0; bottom: 0; left: 0; width: 300px; max-width: 86vw; background: var(--bb-surface); z-index: 100; display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .25s var(--bb-ease); }
.bb-drawer.is-open { transform: translateX(0); }
.bb-drawer__head { padding: 16px 20px; border-bottom: 1px solid var(--bb-line); display: flex; justify-content: space-between; align-items: center; }
.bb-drawer__head img { height: 24px; }
.bb-drawer__close { background: transparent; border: 0; font-size: 22px; color: var(--bb-ink); cursor: pointer; line-height: 1; }
.bb-drawer__auth { padding: 16px 20px; border-bottom: 1px solid var(--bb-line); }
.bb-drawer__auth .hi { font-size: 13px; color: var(--bb-mute); }
.bb-drawer__auth a { display: inline-block; margin-top: 8px; padding: 8px 14px; background: var(--bb-red); color: #fff; border-radius: var(--bb-r-input); font-weight: 600; font-size: 12px; }
.bb-drawer__body { flex: 1; overflow: auto; padding: 8px 0; }
.bb-drawer__h { padding: 12px 20px 8px; font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--bb-mute); text-transform: uppercase; }
.bb-drawer__body a.row { padding: 12px 20px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--bb-ink); }
.bb-drawer__body a.row .em { font-size: 18px; }
.bb-drawer__body a.row svg { width: 12px; height: 12px; margin-left: auto; color: var(--bb-mute); }
.bb-drawer__foot { padding: 14px 20px; border-top: 1px solid var(--bb-line); font-size: 11px; color: var(--bb-mute); display: flex; align-items: center; gap: 8px; }
.bb-drawer__foot svg { width: 14px; height: 14px; }

.bb-searchov { position: fixed; inset: 0; background: var(--bb-surface); z-index: 100; display: none; flex-direction: column; }
.bb-searchov.is-open { display: flex; }
.bb-searchov__bar { padding: 12px 16px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--bb-line); }
.bb-searchov__field { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bb-bg-2); border-radius: var(--bb-r-pill); padding: 10px 14px; }
.bb-searchov__field svg { width: 16px; height: 16px; color: var(--bb-mute); }
.bb-searchov__field input { flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--bb-ink); }
.bb-searchov__cancel { background: transparent; border: 0; color: var(--bb-red); font-weight: 600; font-size: 13px; cursor: pointer; }
.bb-searchov__body { flex: 1; overflow: auto; padding: 12px 16px; }
.bb-searchov__h { font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--bb-mute); text-transform: uppercase; margin-bottom: 10px; }
.bb-searchov__body a { padding: 10px 0; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--bb-ink); border-bottom: 1px solid var(--bb-line); }
.bb-searchov__body a svg { width: 14px; height: 14px; }

/* ---------- Add-to-cart toast ---------- */
.bb-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: var(--bb-ink); color: #fff; padding: 12px 18px; border-radius: var(--bb-r-input); font-size: 13px; font-weight: 600; z-index: 120; opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s; box-shadow: var(--bb-sh-modal); display: flex; align-items: center; gap: 10px; }
.bb-toast.is-open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.bb-toast svg { width: 18px; height: 18px; color: var(--bb-green-2); }

/* ---------- Responsive switch ---------- */
@media (max-width: 1023px) {
    .bb-only-desktop { display: none !important; }
    .bb-only-mobile  { display: block; }
    .bb-bottomnav    { display: block; }
    .bb-wrap         { padding-left: 16px; padding-right: 16px; }
    /* keep page content clear of the fixed bottom nav */
    #content, .site-content { padding-bottom: 72px; }
    .bb-foot { padding: 40px 0 28px; margin-top: 24px; }
    .bb-foot__top { grid-template-columns: 1fr 1fr; gap: 28px; }
    .bb-foot__news-block { grid-column: 1 / -1; }
    .bb-foot__bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
@media (min-width: 1024px) {
    .bb-only-mobile { display: none !important; }
}
@media (max-width: 560px) {
    .bb-foot__top { grid-template-columns: 1fr; }
}

/* ────────────────────────────────────────────────────────────────────── */
/* ── BB Order Tracking page (round 26, v2 — simplified) ──────────────── */
/* ────────────────────────────────────────────────────────────────────── */
/* WC [woocommerce_order_tracking] shortcode rendered on /order-tracking/.
 * Body class `bb-on-tracking` added by functions.bb.php URI filter.
 * Goal: frame the form as a clean BB card. Single-column layout — safer
 * than fighting WC's markup with pseudo-element text replacement. */

body.bb-on-tracking .entry-content {
	padding: 32px 24px 60px;
	background: var(--bb-soft, #f6f6f7);
}
body.bb-on-tracking .entry-title,
body.bb-on-tracking h1.entry-title { display: none; }

/* Container card */
body.bb-on-tracking .woocommerce {
	background: #fff;
	border: 1px solid var(--bb-line, #e8e8eb);
	border-radius: 18px;
	padding: 38px 32px 32px;
	max-width: 580px;
	margin: 0 auto;
	box-shadow: 0 30px 80px -30px rgba(229,27,35,0.12);
	display: flex;
	flex-direction: column;
	gap: 0;
}
/* Eyebrow pill at the top of the card */
body.bb-on-tracking .woocommerce::before {
	content: "📦 TRACK YOUR ORDER";
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--bb-red, #E51B23);
	background: #fff5f5;
	border: 1px solid #fee2e2;
	border-radius: 999px;
	padding: 5px 12px;
	margin-bottom: 18px;
	width: fit-content;
}

/* The WC intro text + form */
body.bb-on-tracking .woocommerce > p {
	font-size: 14px;
	color: #4b4b4b;
	line-height: 1.55;
	margin: 0 0 22px;
}

/* The form */
body.bb-on-tracking form.track_order {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
}
body.bb-on-tracking form.track_order p {
	margin: 0;
	padding: 0;
}
body.bb-on-tracking form.track_order label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #1f1f1f;
	margin-bottom: 6px;
	letter-spacing: 0.02em;
}
body.bb-on-tracking form.track_order label .required { color: var(--bb-red, #E51B23); }
body.bb-on-tracking form.track_order input[type="text"],
body.bb-on-tracking form.track_order input[type="email"] {
	width: 100% !important;
	padding: 13px 14px !important;
	border: 1.5px solid var(--bb-line, #e8e8eb) !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	font-family: inherit !important;
	background: #fff !important;
	color: #1f1f1f !important;
	box-shadow: none !important;
	box-sizing: border-box;
}
body.bb-on-tracking form.track_order input:focus {
	border-color: var(--bb-red, #E51B23) !important;
	outline: 0 !important;
	box-shadow: 0 0 0 3px rgba(229,27,35,0.12) !important;
}
body.bb-on-tracking form.track_order button[type="submit"] {
	background: var(--bb-red, #E51B23) !important;
	color: #fff !important;
	border: 0 !important;
	padding: 14px 26px !important;
	border-radius: 10px !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	cursor: pointer;
	letter-spacing: 0.01em;
	transition: background .15s ease;
	font-family: inherit;
	margin-top: 8px;
	align-self: flex-start;
	min-width: 160px;
}
body.bb-on-tracking form.track_order button[type="submit"]:hover {
	background: var(--bb-red-deep, #B8141B) !important;
}

/* WhatsApp fallback callout — separate card under the form card */
body.bb-on-tracking .entry-content::after {
	content: "Don't have the order ID? WhatsApp 0762 070 095 with your phone number — we'll find it for you.";
	display: block;
	max-width: 580px;
	margin: 14px auto 0;
	padding: 18px 22px;
	background: #1f1f1f;
	color: rgba(255,255,255,0.85);
	border-radius: 14px;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.55;
}

/* Results card (after successful track lookup) */
body.bb-on-tracking .woocommerce-order {
	margin-top: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--bb-line, #e8e8eb);
}
body.bb-on-tracking .woocommerce-order h2 {
	font-size: 18px;
	font-weight: 800;
	color: #1f1f1f;
	margin: 0 0 14px;
}

/* WC notices */
body.bb-on-tracking .woocommerce-error,
body.bb-on-tracking .woocommerce-info,
body.bb-on-tracking .woocommerce-message {
	max-width: 580px;
	margin: 0 auto 16px;
	border-radius: 10px;
	padding: 14px 18px;
	font-size: 13px;
	list-style: none;
}
body.bb-on-tracking .woocommerce-error {
	background: #fef2f2;
	border: 1px solid #fee2e2;
	color: #b91c1c;
}

/* Mobile */
@media (max-width: 640px) {
	body.bb-on-tracking .entry-content { padding: 24px 14px 40px; }
	body.bb-on-tracking .woocommerce { padding: 28px 22px; }
}

/* Hard override: WC sets .form-row-first/-last to float:left width:48%.
 * On our tracking card we want simple full-width stacking. */
body.bb-on-tracking form.track_order p.form-row,
body.bb-on-tracking form.track_order p.form-row-first,
body.bb-on-tracking form.track_order p.form-row-last,
body.bb-on-tracking form.track_order p.form-row-wide {
	width: 100% !important;
	float: none !important;
	clear: both;
	display: block;
}
/* WC sometimes outputs the form inside a .woocommerce-form-track-order wrapper —
 * neutralise any float / column-count on the form/parents. */
body.bb-on-tracking form,
body.bb-on-tracking .woocommerce > div {
	float: none !important;
	column-count: auto !important;
}
