/* ==========================================================================
   OMA-SHOP — /shop/, product-category archives, product search   (P3)
   Loaded after oma-home.css. Depends on oma-tokens.css primitives.

   EVERY value below is measured. Sources, in order of authority:
     A  E:\omegamino\source-cdp\dom\shop.html  (BeBuilder dynamic inline CSS)
     B  E:\omegamino\source-cdp\merged.css     (be.min.css + be_classes.css)
     C  E:\omegamino\source-cdp\maps\shop.json (computed styles / rects)
     D  pixel measurements of E:\omegamino\_shots\{desktop-1440,tablet-820,
        mobile-390}\shop.png

   NOTHING in here restyles the shared product card's plate, badge, hover
   glyphs or out-of-stock state — that is P1's component and it is FIXED.
   Only the archive's own title/price/button sizes are overridden, because
   be_classes.css genuinely gives the archive a different scale from the home
   slider (26/50/600 slider vs 26/500/margin-top:30 archive).
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. THE SHARED "Shop" PHOTO HERO — sub-line width only
      The hero itself is P1's `.oma-pagehero` and is untouched. But the source
      puts the shop/category sub-line in a BeBuilder **one-third** column:
        <div class="column ... mcb-item-cdydc35o one-third laptop-one-third
                    tablet-three-fifth mobile-one column_column">
          <p>Our aminos are manufactured to the highest standards, ensuring
             purity, potency, and reliability.</p>
      so it wraps onto two lines at 1440. Measured in
      `_shots/desktop-1440/shop.png`: line 1 runs x 66→472 and breaks after
      "standards,", line 2 x 66→348. Our hero gives the sub-line P1's default
      720px, so it renders on one line ending at x 759.
      one-third of the 1310px content box, less the theme's 12px column gaps,
      = 412.6px — which is exactly where the source breaks.
      Scoped to the archive body classes so /faq/, /coas/, /contact/,
      /research-supplies/ and /videos/ (P8/P9, and their sub-lines are wider at
      source — measured max line ends x 566/560/566/587/577) are not touched.
   -------------------------------------------------------------------------- */
body.woocommerce-shop .oma-pagehero__sub,
body.tax-product_cat .oma-pagehero__sub {
  max-width: calc(33.3333% - 24px);   /* BeBuilder `one-third` */
}
@media (max-width: 959px) {
  /* source column class: tablet-three-fifth */
  body.woocommerce-shop .oma-pagehero__sub,
  body.tax-product_cat .oma-pagehero__sub { max-width: calc(60% - 24px); }
}
@media (max-width: 767px) {
  /* source column class: mobile-one */
  body.woocommerce-shop .oma-pagehero__sub,
  body.tax-product_cat .oma-pagehero__sub { max-width: 100%; }
}

/* --------------------------------------------------------------------------
   1. THE GRID SECTION            source: section.mcb-section-x593rdb4
      [A] padding-top:150px; padding-bottom:140px
          @max-width:1440 -> 120 / 110      (this is what renders at 1440)
          @max-width:959  -> 100 / 90
          @max-width:767  -> 80  / 70
      [C] rect y 722 h 3333 with computed padding "120px 0px 110px"  ✓
   -------------------------------------------------------------------------- */
.oma-shop {
  padding: 150px 0 140px;
}
@media (max-width: 1440px) { .oma-shop { padding: 120px 0 110px; } }
@media (max-width: 959px)  { .oma-shop { padding: 100px 0 90px;  } }
@media (max-width: 767px)  { .oma-shop { padding: 80px 0 70px;   } }

/* --------------------------------------------------------------------------
   2. THE PRODUCT GRID
      [B] .woocommerce ul.products.columns-4 li.product
            { width:23%; margin:0 1% 20px; float:left; clear:unset }
          + li.product:nth-child(4n+1){clear:both}
      [D] 1440: four plates at x 78-378 / 406-706 / 733-1033 / 1061-1361
          inside the 65px-guttered 1310px container
            -> 301.3px = 23% of 1310, pitch 328 = 25%, outer offset 13 = 1%  ✓
          820 : two plates at x 72 and 417, each 331 wide
            -> 331 = 48% of 690, offset 6.9 = 1%                              ✓
          390 : two plates at x 20 and 202, each 168 wide, 14px apart
            -> 48% of 350 with space-between and NO side margins              ✓
      The 1240 (3-up) step is BeTheme's standard responsive ladder
      (`.woocommerce ul.products li.product{width:31.3%;margin:0 1% 20px}`);
      it sits between two directly-measured breakpoints.
   -------------------------------------------------------------------------- */
/* ⚠ SPECIFICITY, and why every rule below is prefixed.
   The source's grid <ul> carries `products columns-4` (we keep those classes:
   they are source markup and third-party JS keys off them). That pulls in the
   whole of WooCommerce's own woocommerce.css, whose archive rules are (0,3,2)
   and (0,3,3):
       .woocommerce ul.products li.product
           {float:left;margin:0 3.8% 2.992em 0;width:22.05%;margin-left:0}
       .woocommerce ul.products li.product a img
           {width:100%;height:auto;display:block;margin:0 0 1em}
       .woocommerce ul.products li.product .price
           {display:block;font-weight:400;margin-bottom:.5em;font-size:.857em}
       .woocommerce ul.products li.product .button{margin-top:1em}
   At source BeTheme out-specifies all of those; we have no BeTheme, so a plain
   `.oma-shop__grid > li.product` (0,2,1) LOSES. Measured proof of the loss on
   the first build of this file: plates came out 289 px wide at x 65 (= Woo's
   22.05% with no side margin) instead of the source's 301 px at x 78 (= 23%
   with a 1% margin). Prefixing with `.oma-shop ul.oma-shop__grid.products`
   gives (0,4,2)+ and wins. This is NOT a restyle of the shared card — it is
   restoring the card P1 already wrote, which Woo core was overriding.
   -------------------------------------------------------------------------- */
.oma-shop ul.oma-shop__grid.products {
  display: block;          /* float layout, exactly like source */
  list-style: none;
  margin: 0;
  padding: 0;
}
.oma-shop ul.oma-shop__grid.products::after { content: ""; display: table; clear: both; }

.oma-shop ul.oma-shop__grid.products > li.product {
  float: left;
  clear: none;
  width: 23%;
  margin: 0 1% 20px;
  padding: 0;
  position: relative;
}
.oma-shop ul.oma-shop__grid.products > li.product:nth-child(4n + 1) { clear: both; }

/* Give P1's card its plate back (Woo core's `a img{height:auto;margin:0 0 1em}`
   was adding a 16px gap inside the plate and killing the 1:1 aspect box). */
.oma-shop ul.oma-shop__grid.products li.product .oma-card__plate a img {
  display: inline-block;
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  box-shadow: none;
  /* kills the inline-block line-box descender: without it the plate measured
     407px live instead of the source's 401px (50 + 301 + 50). */
  vertical-align: top;
}

@media (max-width: 1240px) {
  .oma-shop ul.oma-shop__grid.products > li.product { width: 31.3%; }
  .oma-shop ul.oma-shop__grid.products > li.product:nth-child(4n + 1) { clear: none; }
  .oma-shop ul.oma-shop__grid.products > li.product:nth-child(3n + 1) { clear: both; }
}
@media (max-width: 959px) {
  .oma-shop ul.oma-shop__grid.products > li.product { width: 48%; }
  .oma-shop ul.oma-shop__grid.products > li.product:nth-child(3n + 1) { clear: none; }
  .oma-shop ul.oma-shop__grid.products > li.product:nth-child(2n + 1) { clear: both; }
}
@media (max-width: 767px) {
  /* measured: no side margins, 14px gutter from space-between */
  .oma-shop ul.oma-shop__grid.products { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .oma-shop ul.oma-shop__grid.products::after { content: none; }
  .oma-shop ul.oma-shop__grid.products > li.product { float: none; clear: none; width: 48%; margin: 0 0 20px; }
}

/* --------------------------------------------------------------------------
   3. ARCHIVE CARD TYPOGRAPHY — the ONLY card override, scoped to the grid
      [B] be_classes.css:
            li.product .title { font-size:26px; font-weight:500; margin-top:30px }
                  @max-width:1440 -> font-size:24px
                  @max-width:767  -> font-size:18px; margin-top:14px
            li.product .price { color:rgba(0,0,0,.6); margin-top:12px }
                  @max-width:767  -> font-size:16px; margin-top:5px
            li.product .button{ padding:8px 17px }
            li.product .star-rating{ display:none }
      [C] computed on the source archive:
            .title  24px / 23.4 / 500, margin 30px 0px 3px
            .price  18px / 23.4 / 400 rgba(0,0,0,0.6), margin 12px 0px 7px
            .button bg rgb(132,242,254) #000 r9 pad 8px 17px 18/400
      The home slider stays 26/50/600 — that rule lives in oma-home.css and is
      untouched.
   -------------------------------------------------------------------------- */
.oma-shop ul.oma-shop__grid.products li.product .oma-card__title {
  margin: 30px 0 3px;
  font-size: 26px;
  line-height: 23.4px;
  font-weight: 500;
}
@media (max-width: 1440px) { .oma-shop ul.oma-shop__grid.products li.product .oma-card__title { font-size: 24px; } }
@media (max-width: 767px)  { .oma-shop ul.oma-shop__grid.products li.product .oma-card__title { font-size: 18px; margin-top: 14px; } }

.oma-shop ul.oma-shop__grid.products li.product .oma-card__price,
.oma-shop ul.oma-shop__grid.products li.product .oma-card__price .woocommerce-Price-amount {
  font-size: 18px;
  line-height: 23.4px;
  font-weight: 400;
  color: var(--oma-text-60, rgba(0, 0, 0, .6));
}
.oma-shop ul.oma-shop__grid.products li.product .oma-card__price { display: block; margin: 12px 0 7px; }
@media (max-width: 767px) {
  .oma-shop ul.oma-shop__grid.products li.product .oma-card__price,
  .oma-shop ul.oma-shop__grid.products li.product .oma-card__price .woocommerce-Price-amount { font-size: 16px; }
  .oma-shop ul.oma-shop__grid.products li.product .oma-card__price { margin-top: 5px; }
}

/* merged.css: .mfn-li-product-row-button{display:inline-flex;align-items:center;
   margin-bottom:7px} — this 7px is exactly the per-row height gap measured
   between the clone (li 535) and the source (li 542). */
.oma-shop ul.oma-shop__grid.products li.product .oma-card__button {
  display: inline-flex;
  align-items: center;
  margin: 0 0 7px;
}
.oma-shop ul.oma-shop__grid.products li.product .star-rating { display: none; }

/* The loop "Add to cart" / "Read more" button.
   MEASURED at source (maps/shop.json section 4, all 10 buttons identical):
     bg rgb(132,242,254) · color rgb(0,0,0) · radius 9px · padding 8px 17px
     · 18px / 400 · border 0
   Woo core's `.woocommerce a.button` (0,2,1) was winning over `.oma-btn`
   (0,1,0) and rendering the WooCommerce-default grey pill —
   measured live before this rule: rgb(233,230,237) on rgb(81,81,81),
   radius 3px, height 34px. The home slider never exposed this because the
   'slider' card variant has no button at all. Values come straight from the
   theme's own button tokens; nothing new is invented. */
.oma-shop ul.oma-shop__grid.products li.product .oma-card__button a.button,
.oma-shop ul.oma-shop__grid.products li.product a.oma-btn--cart {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 17px;
  border: 0;
  border-radius: var(--oma-btn-radius, 9px);
  background-color: var(--oma-btn-bg, #84f2fe);
  color: var(--oma-btn-color, #000);
  font-family: inherit;
  font-size: var(--oma-btn-fs, 18px);
  line-height: var(--oma-btn-lh, 21.6px);
  font-weight: 400;
  text-decoration: none;
  text-transform: none;
}
.oma-shop ul.oma-shop__grid.products li.product .oma-card__button a.button:hover,
.oma-shop ul.oma-shop__grid.products li.product a.oma-btn--cart:hover {
  background-color: var(--oma-btn-bg-hover, #76e4f3);
  color: var(--oma-btn-color, #000);
}
/* Woo's AJAX "View cart" trailer — the source archive has no such link. */
.oma-shop ul.oma-shop__grid.products li.product a.added_to_cart { display: none; }

/* --------------------------------------------------------------------------
   4. NUMERIC PAGER              source: .pager_wrapper > .pager > .pages
      [B] .pager{text-align:center;margin-bottom:40px}
          .pager .pages{display:inline-block;margin:20px 30px 0;padding:4px 3px;
                        background-color:#f8f8f8;border-radius:50px}
          .pager .pages a,.pager .pages span.page-numbers
                       {display:inline-block;margin:0 1px;width:35px;height:35px;
                        line-height:35px;text-align:center;border-radius:5px}
          .pager .pages a:hover,.pager .pages span.page-numbers.current{color:#fff}
      [D] the active pill is rgb(28,107,186) on a rgb(248,248,248) track —
          sampled from _shots/desktop-1440/shop.png rows 3868-3900, x 620-830.
      No prev/next arrows at source: page 1 renders "1 2", page 2 renders "1 2".
   -------------------------------------------------------------------------- */
.oma-shop__pager-wrapper { position: relative; z-index: 1; margin-bottom: 0; }
.oma-shop__pager { text-align: center; margin-bottom: 40px; }
.oma-shop__pager .pages {
  display: inline-block;
  margin: 20px 30px 0;
  padding: 4px 3px;
  background-color: var(--oma-tint-f8f8f8, #f8f8f8);
  border-radius: 50px;
}
.oma-shop__pager .pages a,
.oma-shop__pager .pages span.page-numbers {
  display: inline-block;
  box-sizing: border-box;
  width: 35px;
  height: 35px;
  margin: 0 1px;
  line-height: 35px;
  text-align: center;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  text-decoration: none;
  transition: all .3s ease-in-out;
}
.oma-shop__pager .pages a:hover,
.oma-shop__pager .pages span.page-numbers.current {
  background-color: var(--oma-blue, #1c6bba);
  color: #fff;
}
.oma-shop__pager .pages span.page-numbers.dots {
  background: none;
  color: rgba(0, 0, 0, .6);
}

/* --------------------------------------------------------------------------
   5. THE SOURCE-HIDDEN TOOLBAR
      merged.css hides the whole thing at every breakpoint:
        .mfn-woo-filters-wrapper{display:none}
        .shop-filters .mfn-woo-list-options,
        .shop-filters .woocommerce-result-count{display:none}
        .woocommerce-ordering{display:none!important}
      Proof it is invisible and not merely low-contrast: rows 722-890 of
      _shots/desktop-1440/shop.png are pure #ffffff across the full 1448px.
      So the default here is display:none, matching source exactly. The styling
      below only applies when `add_filter('oma/shop/show_toolbar','__return_true')`
      adds .oma-shop--toolbar, and it reproduces BeTheme's own metrics:
        .mfn-woo-list-options{margin-left:auto}
        .mfn-woo-list-options .mfn-woo-list{margin-left:25px;display:flex;align-items:center}
        .mfn-woo-list-options .show{margin-right:5px}
        ul li{opacity:.4;margin:0 3px} li.active{opacity:1}
        li.active .num{border-bottom:1px solid}  li:hover{opacity:.6}
        .woocommerce-ordering select{width:145px;border:0;background:transparent;
                                     line-height:2;padding:0 30px 0 0}
   -------------------------------------------------------------------------- */
.oma-shop__filters { display: none; }

.oma-shop--toolbar .oma-shop__filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.oma-shop--toolbar .woocommerce-result-count { margin: 0; font-size: 16px; }
.oma-shop--toolbar .oma-shop__opts { display: flex; align-items: center; margin-left: auto; }
.oma-shop--toolbar .oma-shop__perpage { display: flex; align-items: center; margin-left: 25px; }
.oma-shop--toolbar .oma-shop__perpage-label { margin-right: 5px; }
.oma-shop--toolbar .oma-shop__perpage ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.oma-shop--toolbar .oma-shop__perpage li { position: relative; margin: 0 3px; opacity: .4; transition: opacity .2s ease-in-out; }
.oma-shop--toolbar .oma-shop__perpage li:last-child { margin-right: 0; }
.oma-shop--toolbar .oma-shop__perpage li:hover { opacity: .6; }
.oma-shop--toolbar .oma-shop__perpage li.active { opacity: 1; }
.oma-shop--toolbar .oma-shop__perpage li.active .num { border-bottom: 1px solid; }
.oma-shop--toolbar .oma-shop__perpage .num { padding: 0 2px; color: inherit; text-decoration: none; }
.oma-shop--toolbar .oma-shop__ordering { display: block; margin: 0 0 0 25px; }
.oma-shop--toolbar .oma-shop__ordering select {
  width: 145px;
  margin-bottom: 0;
  padding: 0 30px 0 0;
  border: 0;
  background-color: transparent;
  color: inherit;
  line-height: 2;
  cursor: pointer;
  box-shadow: none;
}
@media (max-width: 767px) {
  .oma-shop--toolbar .oma-shop__filters { flex-direction: column; align-items: flex-start; gap: 10px; }
  .oma-shop--toolbar .oma-shop__opts { margin-left: 0; }
  .oma-shop--toolbar .oma-shop__perpage { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   6. SEARCH + EMPTY STATES
      NOT source surfaces — the source exposes no search UI and (with 31
      always-published products) never renders an empty archive. Styled from
      the theme's own tokens only; no invented source design.
   -------------------------------------------------------------------------- */
.oma-shop__searchmeta {
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 23.4px;
  color: rgba(0, 0, 0, .6);
}
.oma-shop__searchmeta strong { color: #000; font-weight: 600; }

.oma-shop__intro { margin: 0 0 40px; }

.oma-shop__empty { padding: 20px 0 0; }
.oma-shop__empty-text { margin: 0 0 24px; font-size: 18px; line-height: 23.4px; }
.oma-shop__empty-cta { margin: 24px 0 0; }

.oma-searchform { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; max-width: 560px; }
.oma-searchform__field {
  flex: 1 1 240px;
  box-sizing: border-box;
  padding: 12px 20px;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: var(--oma-r-9, 9px);
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  color: #000;
}
.oma-searchform__field:focus { outline: none; border-color: var(--oma-blue, #1c6bba); }
.oma-searchform__submit { flex: 0 0 auto; }

/* Bare /?s= results list (search.php) — plain by design. */
.oma-searchlist { list-style: none; margin: 0; padding: 0; }
.oma-searchlist__item { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.oma-searchlist__item:last-child { border-bottom: 0; }
.oma-searchlist__title { margin: 0 0 8px; font-size: 24px; line-height: 34px; font-weight: 500; }
.oma-searchlist__title a { color: #000; }
.oma-searchlist__title a:hover { color: var(--oma-blue, #1c6bba); }
.oma-searchlist__excerpt { margin: 0; color: rgba(0, 0, 0, .6); }
