/*
Theme Name: Weigh & Buy Base
Theme URI: https://weighandbuy.example
Author: Miltonica Garb Private Limited
Author URI: https://weighandbuy.example
Description: Parent theme holding all shared logic for the Weigh & Buy WooCommerce build — the weight-based pricing engine, shipping methods, wishlist, and every template. Not meant to be activated directly in production; activate the "Weigh & Buy" child theme instead, which inherits everything here and is the safe place for future branding/copy edits so they survive a parent-theme update. (The parent is still a fully valid, activatable theme on its own — useful for testing the base build in isolation.)
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
WC requires at least: 8.0
WC tested up to: 9.0
Text Domain: weighandbuy
License: Proprietary
Tags: e-commerce, custom-colors, custom-logo, custom-menu, featured-images, translation-ready

This is the theme's required stylesheet header (WordPress reads the block
above for the theme name/description/version shown in wp-admin). The actual
compiled Tailwind CSS lives in assets/css/tailwind.css and is enqueued from
functions.php — nothing below this comment block is required, but a couple
of small print-only rules live here since they're theme-level, not
Tailwind-generated.
*/

/*
 * Self-hosted Manrope — a single variable-font file covers every weight
 * 200–800, so no separate @font-face per weight is needed. Loaded from
 * @fontsource-variable/manrope's own latin subset rather than
 * fonts.googleapis.com; on a machine with no/blocked outbound internet
 * (a local dev box like WAMP, most notably) a Google Fonts request just
 * silently fails and the browser falls back to a system font. Self-
 * hosting removes that dependency entirely, in production too.
 *
 * Swapped in for the theme's previous font, Inter (self-hosted the same
 * way — see git history for that @font-face block if it's ever needed
 * again; the file itself, inter-variable-latin.woff2, is left in
 * assets/fonts/ unused rather than deleted). assets/css/tailwind.css is a
 * static, pre-compiled file with no build config in this theme folder
 * (see its own contents), so its `html` base rule and `.font-display`
 * utility — the two places that actually set font-family sitewide, since
 * neither a live `.font-sans` utility class nor a tailwind.config.js
 * exist here to update instead — were hand-edited from "Inter" to
 * "Manrope" to match the family name below. Both WooCommerce's own
 * stylesheet is dequeued theme-wide (inc/setup.php) and no WooCommerce
 * template sets its own font-family, so cart/checkout/my-account inherit
 * this exactly like every other page — no separate WooCommerce-specific
 * change was needed.
 */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope-variable-latin.woff2") format("woff2-variations");
}

/*
 * Type-scale weight — see TYPOGRAPHY.md for the full sitewide scale this
 * belongs to. assets/css/tailwind.css is the static, pre-compiled file
 * described above (no build config in this theme folder to regenerate
 * it from), and its JIT purge never compiled a `font-extrabold` utility
 * because no template used Manrope's 800 weight before this scale existed
 * — every other weight the scale needs (400/500/600/700 via font-normal/
 * font-medium/font-semibold/font-bold) was already compiled in, since
 * some template used each of those already. Added by hand here, the same
 * "extend what tailwind.css can't be rebuilt to include" approach as the
 * @font-face block above, rather than hand-editing a new selector into
 * that generated file directly.
 */
.font-extrabold {
  font-weight: 800;
}

/*
 * Top promo bar (header.php) — three short trust messages (new stock /
 * free delivery / delivery time), replacing the single dynamic
 * "Shop by weight… £X per kg" message that used to be the header's only
 * announcement. A custom component class rather than composed Tailwind
 * utility classes: assets/css/tailwind.css is the static, pre-compiled
 * file described above the @font-face block, and this exact layout
 * (a border-based divider between flex items, split row/column gap
 * spacing, a couple of specific white opacity levels) mixes utilities
 * that already happened to be compiled with several that weren't ever
 * used elsewhere in the theme before this bar existed — rather than
 * hand-verify each one against the compiled file (and re-verify again
 * every time this bar's markup changes), a small dedicated class is
 * both simpler and immune to whatever tailwind.css does or doesn't
 * already contain.
 */
.wnb-promo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0;
  padding: 0.5rem 0;
  text-align: center;
}
.wnb-promo-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.wnb-promo-bar__item:first-child {
  border-left: none;
}
.wnb-promo-bar__icon {
  display: block;
  height: 1rem;
  width: 1rem;
  flex-shrink: 0;
}
.wnb-promo-bar__icon--accent {
  color: #FF6A00; /* brand-600 — the theme's one and only orange, used
                      for every UI accent AND the wordmark's "N" alike
                      (header.php/footer.php's inline styles). Previously
                      this "ordinary UI" orange was Tailwind's stock
                      #EA580C, deliberately kept different from the
                      logo's #FF6A00 per BRAND_SPEC.txt -- unified to a
                      single orange sitewide by request; there is no
                      longer a second shade anywhere. */
}
@media (max-width: 640px) {
  .wnb-promo-bar__item {
    padding: 0 0.625rem;
    font-size: 0.7rem;
  }
}

/*
 * Weight/price-per-kg pill badge on every product card (grid, related
 * products, homepage featured products — anywhere WooCommerce prints a
 * price via get_price_html(), see the woocommerce_get_price_html filter
 * in inc/weight-pricing.php). Only the vertical padding lives here:
 * `py-0.5` was never compiled into assets/css/tailwind.css (nothing used
 * it before this badge existed — see that file's own comment on why
 * nothing here can just add a missing utility class), every other
 * property is set with ordinary compiled Tailwind utility classes
 * directly in the badge's own markup.
 */
.wnb-weight-badge {
  padding-top: 2px;
  padding-bottom: 2px;
}

@media print {
  .site-header,
  .site-footer,
  [data-mobile-nav],
  .woocommerce-message,
  .cart-collaterals {
    display: none !important;
  }
}

/*
 * .site-header is `fixed` (header.php) on every page, which — unlike the
 * `sticky` positioning it used before — never reserves its own space in
 * normal flow. This padding-top replaces that reserved space so ordinary
 * page content still starts right where it always did, everywhere. --header-h
 * is kept in sync with the header's real rendered height by
 * assets/js/main.js's syncHeaderHeight() (already existed for the checkout
 * sticky sidebar offset; reused here), so this stays correct whether the
 * header is one row tall or wraps to two on a narrow screen.
 *
 * The homepage's cover slider section cancels this out with a matching
 * negative top margin (front-page.php's wnb-hero-overlay-tuck class) so
 * that one section alone starts at the very top of the page, underneath
 * the transparent header, instead of below it like everything else.
 */
body {
  padding-top: var(--header-h);
}

/*
 * Homepage "transparent header over the hero" — see the doc comment above
 * $wnb_hero_overlay in header.php for the full mechanism. Two states:
 *
 * 1. [data-header-overlay] alone (page at the top, not yet scrolled): no
 *    background/border, and every nav-row control recolored to white so it
 *    reads over whatever's showing through from the cover slider behind it.
 * 2. [data-header-overlay].is-scrolled (assets/js/main.js adds this once
 *    the user scrolls past the hero): falls back to the theme's normal
 *    solid header — same bg-paper/95 + backdrop-blur + ink text every other
 *    page always has, just re-declared here since state 1 cleared it.
 *
 * Selectors are 2–3 levels deep (e.g. ".site-header-nav-row a") specifically
 * so they outrank the single-class Tailwind utilities already on these same
 * elements (.text-ink, .text-ink-soft, .form-input, etc.) on specificity
 * alone — no !important needed, and it still loses cleanly to any inline
 * style or more specific rule added later.
 */
[data-header-overlay] {
  /* A flat `transparent` background looked fine over a dark photo slide
     but made the white nav icons/text disappear entirely over the family
     banner slide, which has a light cream background near the top — white
     on near-white is invisible no matter how the text color logic works.
     A permanent dark scrim (not tied to which slide happens to be active)
     guarantees enough contrast for white text/icons against ANY slide,
     photo or light banner alike — the same technique the slides themselves
     already use at their own bottom edge (see the ink gradient behind each
     slide's heading in wnb_offer_slider()/wnb_cover_slider()), just placed
     behind the header instead. It's subtle enough to still read as
     "transparent header over the image", not a solid bar. */
  background-color: transparent;
  background-image: linear-gradient(to bottom, rgba(20, 24, 31, 0.55) 0%, rgba(20, 24, 31, 0.28) 65%, rgba(20, 24, 31, 0) 100%);
  border-bottom-color: transparent;
}
[data-header-overlay].is-scrolled {
  /* Clears the dark scrim (background-image) from the state above — without
     this it would still paint on top of the solid background-color here,
     since background-image layers over background-color, muddying the
     normal solid header once scrolled. */
  background-image: none;
  background-color: rgba(253, 251, 247, 0.95);
  border-bottom-color: rgba(20, 24, 31, 0.1);
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row,
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row * {
  color: #fff;
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row a:hover,
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row button:hover {
  background-color: rgba(255, 255, 255, 0.15);
}
/* The cart/wishlist count badges keep their solid brand-orange circle +
   white number regardless of overlay state — the blanket `* { color: #fff }`
   above already matches their own white text, so nothing more is needed
   here; called out just so it's clear this was checked, not missed. */
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row .form-input {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row .form-input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}
/*
 * Both popovers below (account menu + live-search results) are solid
 * white cards nested inside .site-header-nav-row — the blanket
 * white-text rule above would otherwise make their own text invisible
 * against their own white background while the header is overlaid.
 *
 * Two earlier attempts at a fix were each wrong in their own way:
 *   1. `color: revert` looked right in isolation, but every <a> in these
 *      popovers is a real link — revert falls back to the BROWSER's own
 *      default link colors (blue for unvisited, purple for visited),
 *      not this theme's ink/brand palette. That's what made "Orders &
 *      account" etc. render purple instead of black.
 *   2. Setting `color: #14181f` only on the popover's own wrapper
 *      element does nothing for the <a>/<span> children — the blanket
 *      `.site-header-nav-row *` rule matches every descendant directly
 *      (not just the wrapper), and a rule that directly matches an
 *      element always wins over an ancestor's color, inherited or not.
 *
 * The fix needs the same shape as the blanket rule it's overriding: a
 * `*` selector matching every descendant directly, at higher
 * specificity, set to `color: inherit` (NOT revert) so it cascades the
 * REAL color down from whichever ancestor sets one explicitly. Each
 * popover's own wrapper sets that real ink color; a couple of
 * higher-specificity rules below then override `inherit` back to the
 * theme's actual secondary/brand/error colors for the specific elements
 * that use those Tailwind classes (text-ink-soft/70, text-brand-600,
 * text-error-600), same as they render in the normal solid header.
 */
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-account-menu-panel] {
  color: #14181f; /* ink */
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-account-menu-panel] * {
  color: inherit;
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-account-menu-panel] .text-ink-soft\/70 {
  color: rgba(63, 70, 83, 0.7); /* ink-soft/70 — email line, sign-in helper text */
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-account-menu-panel] .text-error-600,
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-account-menu-panel] .text-error-600 * {
  color: #a52b24; /* error-600 — Sign out link */
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-account-menu-panel] .btn-primary,
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-account-menu-panel] .btn-primary * {
  color: #fff; /* signed-out "Sign in" button — sits on its own bg-ink (black)
                  background, so it needs to stay white, not inherit the
                  panel's ink-black text color (which made it invisible —
                  black label on a black button). */
}

[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-live-search-results] {
  color: #14181f; /* ink */
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-live-search-results] * {
  color: inherit;
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-live-search-results] .text-ink-soft\/70 {
  color: rgba(63, 70, 83, 0.7); /* ink-soft/70 — price line under each title */
}
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-live-search-results] .text-brand-600,
[data-header-overlay]:not(.is-scrolled) .site-header-nav-row [data-live-search-results] .text-brand-600 * {
  color: #FF6A00; /* brand-600 — "See all results for …" link */
}
/* The active-nav underline (wnb-nav-current, drawn via ::after above) is
   brand-orange year-round — kept as-is in both states since it already
   reads fine on both a transparent hero and a solid header. */

/*
 * Safety net for the inline icon SVGs used throughout the theme
 * (inc/template-tags.php's wnb_icon()). They carry no width/height
 * attribute by design — Tailwind's h-4/w-5/etc. utility classes on a
 * wrapping <span> are what size them normally. If a future edit ever
 * echoes wnb_icon() without that wrapper, this keeps the SVG from
 * falling back to the browser's oversized default replaced-element size
 * (historically ~300×150px) instead of silently breaking the layout.
 * Any element-level default here is lower specificity than the Tailwind
 * utility classes that size icons correctly, so this never overrides them.
 */
svg {
  width: 1em;
  height: 1em;
  max-width: 2em;
  max-height: 2em;
}

/*
 * WordPress's custom-logo support is declared with a fixed, non-flexing
 * 36×36 size (see inc/setup.php), so WordPress itself crops/scales any
 * uploaded image to that size server-side. This is a CSS backstop only —
 * belt and braces in case that declaration is ever changed to allow a
 * flexible size again.
 */
.custom-logo-link img,
.custom-logo {
  max-height: 36px;
  width: auto;
  height: auto;
}

/*
 * Active-state underline for wp_nav_menu() links (an admin-assigned
 * Primary menu) — matches the underline wnb_nav_link() draws inline for
 * the built-in fallback nav in header.php.
 */
.wnb-nav-current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 100%;
  border-radius: 9999px;
  background-color: #FF6A00;
}

/*
 * Reviews tab (woocommerce/single-product-reviews.php). Fully rebuilt to
 * match the mockup's two-column layout — avg rating + write-review form on
 * the left, review list on the right — using the theme's own Tailwind
 * component classes (.form-input/.form-label/.form-fieldset/.badge-success)
 * directly in that template's markup, so no bespoke CSS is needed here
 * beyond what the .wnb-star-picker rule below already covers for the
 * "Your rating" field (progressively enhanced by
 * assets/js/product-review-rating.js).
 */

/*
 * WooCommerce's own .stock status text — printed by wc_get_stock_html()
 * (out-of-stock case in add-to-cart/simple.php) and injected client-side
 * into .single_variation by WooCommerce's variation-matching script
 * (add-to-cart/variable.php) when a variation is selected. Unstyled, this
 * was invisible/easy to miss sitting next to the Add to cart button.
 */
.stock {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.stock.in-stock {
  color: #166c50;
}
.stock.out-of-stock,
.stock.unavailable {
  color: #a52b24;
}
.stock.available-on-backorder {
  color: #95610a;
}

/*
 * Review "Your rating" field — progressively enhanced into clickable
 * stars by assets/js/product-review-rating.js. The original control (a
 * <select> or a set of radios, depending on WooCommerce's configuration)
 * is kept for real screen-reader/keyboard use and form submission, just
 * visually hidden once the star buttons exist.
 */
.wnb-star-picker {
  display: flex;
  gap: 0.25rem;
}
.wnb-star-picker button {
  cursor: pointer;
  padding: 0;
  border: none;
  background: none;
  color: rgba(20, 24, 31, 0.1);
}
.wnb-star-picker button svg {
  width: 1.75rem;
  height: 1.75rem;
}
.wnb-star-picker button[data-active] {
  color: #f59e0b;
}

/*
 * Footer widget columns (footer.php's `[data-footer-accordion-panel]`,
 * fed by the "Footer: Shop/Customer care/Company" sidebars registered in
 * inc/setup.php) only had `text-white/60` set on the wrapping <div> plus a
 * Tailwind `[&_a]:hover:text-white` arbitrary variant for the hover state.
 * That's enough for the theme's own hardcoded fallback <ul> (plain <a>
 * tags with no color of their own correctly inherit the parent's color),
 * but WordPress's own core widgets — the block-editor Navigation block,
 * the List block, even a legacy "Custom Links" widget — ship their own
 * block-library CSS that sets link colors directly on the <a>/<li>
 * (dark, meant for a light background), which wins over simple
 * inheritance and is exactly why "Contact Us" / "About" etc. showed up
 * as near-black text on this dark footer once real widgets were added.
 * Setting color explicitly ON the links themselves, scoped to this
 * footer panel, beats that regardless of which widget type produced the
 * markup.
 */
.site-footer [data-footer-accordion-panel] a,
.site-footer [data-footer-accordion-panel] a:visited {
  color: rgba(255, 255, 255, 0.6) !important;
}
.site-footer [data-footer-accordion-panel] a:hover,
.site-footer [data-footer-accordion-panel] a:focus {
  color: #fff !important;
}

/*
 * Checkout login-reminder form (WooCommerce core's own, unmodified
 * templates/checkout/form-login.php — this theme has never overridden
 * it, same situation History-woocommerce.md already documents for
 * forgot-password/reset-password before those got their own overrides).
 * It was invisible/unused before this session: guest checkout was always
 * allowed, so `woocommerce_enable_checkout_login_reminder` was off and
 * `woocommerce_checkout_login_form()` never printed anything here. Now
 * that guest checkout is disabled (inc/checkout-restrictions.php) and the
 * reminder is turned on so a returning shopper can sign in without
 * leaving checkout, this core markup renders for the first time — with
 * none of `woocommerce_enqueue_styles` disabled fallback styling (this
 * theme turns that stylesheet off entirely, see inc/setup.php) and no
 * Tailwind classes of its own, so every field/button rendered as bare
 * browser defaults.
 *
 * Rather than override the whole template (risking silently dropping a
 * hook order WooCommerce/a plugin depends on, or drifting from whatever
 * this site's exact WooCommerce version actually outputs), this restyles
 * WooCommerce's own default classes directly — the same approach already
 * used for woocommerce/checkout/form-billing.php, which also has no
 * template override in this theme and relies on global CSS hitting its
 * stock `.form-row`/`.input-text` classes. Property values below are
 * copied 1:1 from this theme's own compiled .form-input/.btn-primary/
 * .form-checkbox component classes (assets/css/tailwind.css) so a signed-
 * out shopper's login box matches every other input/button on the site
 * exactly, not an approximation.
 */
.woocommerce-form-login {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(20, 24, 31, 0.1); /* form-fieldset border */
  background-color: #fff;
}
.woocommerce-form-login .form-row {
  margin-bottom: 1rem;
}
.woocommerce-form-login .form-row:last-child {
  margin-bottom: 0;
}
.woocommerce-form-login label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #14181f; /* ink */
}
.woocommerce-form-login .input-text {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(20, 24, 31, 0.15);
  background-color: #fff;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #14181f; /* ink */
}
.woocommerce-form-login .input-text:focus {
  outline: 2px solid rgba(234, 88, 12, 0.4); /* brand-600, matches .form-input:focus elsewhere */
  outline-offset: 1px;
}
.woocommerce-form-login .woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #14181f; /* ink */
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
}
/*
 * Separate rule (not comma-joined with the one above) on purpose: in a
 * browser old enough to not support :has() at all, an invalid selector
 * in a comma-joined list can invalidate the WHOLE rule in some parsers —
 * keeping this as its own rule means that failure mode, if it ever
 * happens, only drops this one redundant fallback, not the primary
 * class-name rule above too.
 */
.woocommerce-form-login label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #14181f; /* ink */
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
}
/*
 * Belt-and-braces: the rule above targets WooCommerce's documented
 * `woocommerce-form-login__rememberme` wrapper class by name, but
 * `input[type="checkbox"]` here applies regardless of what the exact
 * wrapper class turns out to be on this site's WooCommerce version —
 * there's only ever one checkbox in this form, so this can't
 * accidentally catch anything else.
 */
.woocommerce-form-login input[type="checkbox"] {
  height: 1rem;
  width: 1rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(20, 24, 31, 0.3);
  accent-color: #FF6A00; /* brand-600, matches .form-checkbox */
}
.woocommerce-form-login button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  background-color: #14181f; /* ink, matches .btn-primary */
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.woocommerce-form-login button[type="submit"]:hover {
  background-color: #B24A00; /* matches .btn-primary:hover */
}
.woocommerce-form-login button[type="submit"]:active {
  background-color: #8C3A00; /* matches .btn-primary:active */
}
.woocommerce-form-login .lost_password {
  margin-top: 0.875rem;
  margin-bottom: 0;
  font-size: 0.8125rem;
}
.woocommerce-form-login .lost_password a {
  color: #FF6A00; /* brand-600 */
  font-weight: 500;
  text-decoration: underline;
}
.woocommerce-form-login .lost_password a:hover {
  color: #B24A00;
}

/* WhatsApp floating chat button (inc/whatsapp-chat.php). WhatsApp's own
   brand green rather than a theme token, since the button's whole job is
   to be instantly recognisable as WhatsApp. Sits above everything else
   (z-index higher than the mobile nav / modals use) but out of the way
   of the bottom-right corner on small screens. */
.wnb-whatsapp-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background-color: #25d366;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  transition: background-color 150ms ease, transform 150ms ease;
}
.wnb-whatsapp-btn svg {
  width: 1.75rem;
  height: 1.75rem;
}
.wnb-whatsapp-btn:hover {
  background-color: #1ebe57;
  transform: translateY(-2px);
}
.wnb-whatsapp-btn:active {
  background-color: #128c7e;
  transform: translateY(0);
}
.wnb-whatsapp-btn:focus-visible {
  outline: 2px solid #128c7e;
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .wnb-whatsapp-btn {
    right: 1rem;
    bottom: 1rem;
    width: 3.25rem;
    height: 3.25rem;
  }
}

/*
 * Inline (non-floating) variant for the Contact page's WhatsApp button
 * (page-conact-us.php) -- same WhatsApp brand green, but sized/shaped by
 * ordinary compiled Tailwind utilities (inline-flex, rounded-full, px-4,
 * py-2.5, gap-2) on the element itself rather than the fixed-position
 * circle above, since this one sits inline in the contact-details list
 * instead of floating over the page. Only the brand color needs hand
 * -writing here -- see this file's own header comment on why colors
 * outside the compiled utility set can't just be a bg-[#25d366] class.
 */
.wnb-whatsapp-inline-btn {
  background-color: #25d366;
  color: #fff;
  transition: background-color 150ms ease;
}
.wnb-whatsapp-inline-btn:hover {
  background-color: #1ebe57;
  color: #fff;
}
.wnb-whatsapp-inline-btn:active {
  background-color: #128c7e;
}
.wnb-whatsapp-inline-btn:focus-visible {
  outline: 2px solid #128c7e;
  outline-offset: 2px;
}

/* Added by monica */
@media (min-width: 1024px) {

    /* Home */
    .site-header-nav-row .menu-item-home > a,

    /* Men */
    .site-header-nav-row nav[aria-label="Primary"] a[href*="/product-category/men"],

    /* Women */
    .site-header-nav-row nav[aria-label="Primary"] a[href*="/product-category/women"],

    /* Kids */
    .site-header-nav-row nav[aria-label="Primary"] a[href*="/product-category/kids"] {
        font-size: 16px !important;
        font-weight: 600 !important;
    }
}


[style*="display: flex"][style*="align-items: center"][style*="justify-content: center"][style*="height: 100%"] {
    opacity: 0 !important;
}


/* ==========================================================================
   Size guide modal (template-parts/size-chart-modal.php) -- hand-written
   styles, deliberately not left to Tailwind utility classes.

   Two separate reasons this section exists instead of relying on the
   compiled assets/css/tailwind.css:

   1. That file is a purged/compiled build generated from whatever
      template files existed the last time it was built. This modal was
      added afterwards and the build was never re-run, so several classes
      used only here (bg-ink/50, shadow-xl, border-ink/10, hover:bg-ink/5,
      hover:text-ink, etc.) were never compiled in at all.

   2. A category's own Size guide content (inc/size-chart-admin.php) is
      pasted HTML stored in the database as term meta -- not in a
      template file -- so the Tailwind build can NEVER see it, no matter
      how many times the theme is rebuilt. Whatever classes an admin
      pastes in (their own, or copied from somewhere else entirely) will
      not have matching CSS here.

   So rather than depending on classes that may or may not exist, the
   card chrome and the *default* chart below are unclassed markup styled
   by plain selectors, and the .wnb-size-chart-content rules near the
   bottom style admin-pasted table/dl/p markup directly by tag -- so any
   category's guide looks consistent and finished regardless of what
   classes (if any) are on the HTML that was pasted into it. Colours
   below are this theme's actual ink/brand tokens, read directly out of
   the compiled Tailwind file: ink #14181f, ink-soft #3f4653, brand-700
   #d95a00.
   ========================================================================== */

#wnb-size-chart-modal {
	padding: 1rem;
}

#wnb-size-chart-modal.flex {
	display: flex;
}

.wnb-size-chart-backdrop {
	background-color: rgba(20, 24, 31, 0.55);
}

.wnb-size-chart-card {
	width: 100%;
	max-width: 32rem;
	background: #fff;
	padding: 1.5rem;
	border-radius: 1rem;
	box-shadow: 0 20px 25px -5px rgba(20, 24, 31, 0.18), 0 8px 10px -6px rgba(20, 24, 31, 0.1);
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	box-sizing: border-box;
}

.wnb-size-chart-header {
	border-bottom: 1px solid rgba(20, 24, 31, 0.08);
	padding-bottom: 0.9rem;
}

.wnb-size-chart-title {
	margin: 0;
}

.wnb-size-chart-close {
	flex-shrink: 0;
	padding: 0.375rem;
}

.wnb-size-chart-close svg {
	width: 1.25rem;
	height: 1.25rem;
	display: block;
}

.wnb-size-chart-title-icon {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

.wnb-size-chart-close:hover {
	background-color: rgba(20, 24, 31, 0.06);
	color: #14181f;
}

.wnb-size-chart-close:focus-visible {
	outline: 2px solid #d95a00;
	outline-offset: 1px;
}

/* Shared table look -- covers both the built-in default chart above
   (unclassed <table>/<td> markup, by design) and any table pasted into
   a category's own Size guide field, whatever classes it does or
   doesn't carry. */
.wnb-size-chart-content {
	margin-top: 1rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #14181f;
}

.wnb-size-chart-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.wnb-size-chart-content th,
.wnb-size-chart-content td {
	padding: 0.65rem 1rem;
	text-align: left;
	border-bottom: 1px solid rgba(20, 24, 31, 0.08);
}

.wnb-size-chart-content th:first-child,
.wnb-size-chart-content td:first-child {
	padding-left: 0.25rem;
}

.wnb-size-chart-content thead th {
	background-color: rgba(20, 24, 31, 0.04);
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #3f4653;
	border-bottom: 1px solid rgba(20, 24, 31, 0.14);
}

.wnb-size-chart-content thead th:first-child {
	border-top-left-radius: 0.5rem;
	border-bottom-left-radius: 0.5rem;
}

.wnb-size-chart-content thead th:last-child {
	border-top-right-radius: 0.5rem;
	border-bottom-right-radius: 0.5rem;
}

.wnb-size-chart-content tbody tr:nth-child(even) td {
	background-color: rgba(20, 24, 31, 0.025);
}

.wnb-size-chart-content tbody tr:last-child td {
	border-bottom: none;
}

.wnb-size-chart-content td:first-child,
.wnb-size-chart-content th:first-child {
	font-weight: 500;
}

.wnb-size-chart-content dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.45rem 1.25rem;
	margin: 0;
}

.wnb-size-chart-content dl dt {
	font-weight: 500;
	color: #3f4653;
}

.wnb-size-chart-content dl dd {
	margin: 0;
	color: #14181f;
}

.wnb-size-chart-content ul,
.wnb-size-chart-content ol {
	margin: 0.5rem 0 0;
	padding-left: 1.15rem;
}

.wnb-size-chart-content a {
	color: #d95a00;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wnb-size-chart-content > :first-child {
	margin-top: 0;
}

/* The small disclaimer line under the default chart -- styled as a
   quiet callout rather than a bare line of grey text. */
.wnb-size-chart-note {
	margin: 0.9rem 0 0;
	padding: 0.6rem 0.85rem;
	background-color: rgba(20, 24, 31, 0.035);
	border-radius: 0.5rem;
	font-size: 0.78rem;
	color: #3f4653;
}

/* ------------------------------------------------------------------
   .badge-error -- the "something was declined" counterpart to
   .badge-brand / .badge-success, used by the return flow
   (inc/returns.php, woocommerce/myaccount/returns.php) for a rejected
   request or a rejected inspection.

   Defined here rather than in assets/css/tailwind.css because that file
   is a pre-compiled build artifact with no build config in this theme
   folder -- a class added there would be silently lost the next time it
   was regenerated, whereas style.css is hand-maintained and is enqueued
   after it (see wnb_enqueue_assets() in inc/setup.php).

   The geometry deliberately matches .badge-success exactly. The colours
   do NOT come from the error-600 text token: that one token compiles to
   rgb(255 106 0), an orange, which reads as the sale/brand accent rather
   than as a rejection and is close to illegible on the pink error-50
   background. The red used here is text-error-500 (rgb(192 52 44)) --
   the palette's actual red -- which is also what the return card's own
   rejection callouts use. That error-600 oddity is pre-existing and
   affects every current use of .text-error-600 (the cancel/return modal
   error line included), so it's flagged in the return-flow report rather
   than changed here.
   ------------------------------------------------------------------ */
.badge-error {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border-radius: 9999px;
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 600;
	background-color: rgb(253 241 240);
	color: rgb(192 52 44);
}

/* The request-return modal grew a photo widget on top of its reason and
   note fields, which is enough content to overflow a short viewport.
   assets/css/tailwind.css ships no max-h utility above max-h-96 (24rem)
   and no arbitrary-value one, and it's a pre-compiled file with no build
   config in this theme, so the viewport-relative cap lives here instead
   of as a class that would silently do nothing. */
.wnb-modal-scroll {
	max-height: 90vh;
	overflow-y: auto;
}

/* ==========================================================================
   Account modals (cancel order / request a return / delete account) --
   inc/order-cancellation.php, inc/returns.php and inc/account-deletion.php
   all render the same accessible-dialog markup (driven by assets/js/
   order-actions.js), styled with Tailwind utility classes -- but five of
   those classes (bg-ink/40, shadow-xl, space-y-4, min-h-20, hover:text-ink)
   were never compiled into assets/css/tailwind.css: same root cause as the
   size-guide modal section above -- this theme's Tailwind build is a
   pre-compiled, static file with no build config here to re-run, and these
   three modals were added after whatever the last build was. Without
   these, the backdrop was fully transparent (page content showed straight
   through, undimmed) and the dialog card had no shadow separating it from
   that same content -- exactly the "content bleeding through the popup"
   look reported against the live site.

   Scoped by [data-wnb-modal] and [role="dialog"] -- the two attributes
   already used as JS hooks in all three files -- rather than adding more
   one-off classes across three separate PHP files for the base fix. The
   icon badge and close button further down are a UI/UX pass on top of
   that (an at-a-glance sense of what kind of action this is, and a real
   hit target instead of a bare "×" character) and do need one small,
   matching markup change per file -- see wnb_icon( 'close' ) and the
   .wnb-modal-icon usage in those three render functions. */

[data-wnb-modal] {
	background-color: rgba(20, 24, 31, 0.4);
	backdrop-filter: blur(2px);
}

[data-wnb-modal] > [role="dialog"] {
	box-shadow: 0 20px 25px -5px rgba(20, 24, 31, 0.18), 0 8px 10px -6px rgba(20, 24, 31, 0.1);
}

[data-wnb-modal] form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

[data-wnb-modal] textarea.form-input {
	min-height: 5rem;
}

/* Entrance animation, skipped for anyone who's asked their OS for less
   motion -- matching this JS's existing care around focus/inert/ARIA. */
@media (prefers-reduced-motion: no-preference) {
	[data-wnb-modal].flex {
		animation: wnbModalBackdropIn .15s ease;
	}
	[data-wnb-modal].flex > [role="dialog"] {
		animation: wnbModalCardIn .18s cubic-bezier(0.16, 1, 0.3, 1);
	}
}

@keyframes wnbModalBackdropIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes wnbModalCardIn {
	from { opacity: 0; transform: scale(0.96) translateY(4px); }
	to { opacity: 1; transform: none; }
}

.wnb-modal-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 9999px;
	color: rgb(63, 70, 83);
	background-color: transparent;
	transition: background-color .15s ease, color .15s ease;
}

.wnb-modal-close svg {
	width: 1rem;
	height: 1rem;
}

.wnb-modal-close:hover {
	background-color: rgba(20, 24, 31, 0.06);
	color: rgb(20, 24, 31);
}

.wnb-modal-close:focus-visible {
	outline: 2px solid rgba(234, 88, 12, 0.4);
	outline-offset: 2px;
}

/* Small tinted badge next to a modal's title -- amber for "you're undoing
   something", red for "this one's permanent", muted ink for "this is just
   a normal request flow, nothing to be alarmed about". */
.wnb-modal-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 9999px;
	flex: none;
}

.wnb-modal-icon svg {
	width: 1.125rem;
	height: 1.125rem;
}

.wnb-modal-icon--warning {
	background-color: rgba(217, 90, 0, 0.1);
	color: rgb(217, 90, 0);
}

.wnb-modal-icon--danger {
	background-color: rgba(192, 52, 44, 0.1);
	color: rgb(192, 52, 44);
}

.wnb-modal-icon--neutral {
	background-color: rgba(20, 24, 31, 0.06);
	color: rgb(63, 70, 83);
}

