/* WooCommerce shop/listing styles — matched to the original Flatsome rendering.
   Enqueued after woocommerce.css (priority 20) so equal-specificity rules win by source order. */

/* ---- Shop listing layout (live: Flatsome .row.category-page) ----
   Full-width toolbar row, then a 25/75 row of Browse sidebar + products with 15px gutters: at 1440
   the sidebar is 240 wide at x=195 and the products 780 wide at x=465. Kept down to 768 (162/546). */
.mcb-shop--listing { padding-top: 30px; padding-bottom: 0; }
.mcb-shop--listing .mcb-shop__cols { display: flex; align-items: flex-start; margin: 0 -15px; }
.mcb-shop--listing .mcb-shop__cols > .mcb-shop__sidebar,
.mcb-shop--listing .mcb-shop__cols > .mcb-shop__main { min-width: 0; padding: 0 15px; }
.mcb-shop--listing .mcb-shop__cols > .mcb-shop__sidebar { flex: 0 0 25%; width: 25%; max-width: 25%; }
.mcb-shop--listing .mcb-shop__cols > .mcb-shop__main { flex: 0 0 75%; width: 75%; max-width: 75%; }
/* The sidebar follows the products in the source (as on live) but sits on the left. */
.mcb-shop--listing .mcb-shop__cols > .mcb-shop__sidebar { order: -1; }

/* ---- Category footer row (live: .row > .large-12 > .cat-footer > hr, after the listing) ----
   On terms whose cat_meta has a cat_footer key: a 90px block, the 1px #eee rule 30px below the products.
   flow-root (live: Foundation's .row clearfix) keeps the rule's margin from merging with a margin that
   escapes the stacked phone listing, e.g. the 20px under "No products were found". */
.mcb-cat-footer-row { display: flow-root; }
.cat-footer { padding-bottom: 30px; }
.cat-footer hr {
  box-sizing: content-box; height: 0; margin: 30px 0 29px; padding: 0;
  border: solid #eee; border-width: 1px 0 0; clear: both;
}

/* Single product keeps its own two-column layout (woocommerce-single lane). */
.mcb-shop__sidebar { flex: 0 0 180px; max-width: 180px; }
.mcb-shop__main    { flex: 1 1 auto; min-width: 0; }

/* ---- Notices row (live: a .row > .large-12.columns per notice, straight after the header) ----
   flow-root keeps the message's 30px top/bottom margins inside the row (82.2px for one line at 1440),
   ahead of the listing's own 30px top padding. */
.mcb-shop-notices { display: flow-root; }

/* ---- Toolbar row (live: .breadcrumb-row): breadcrumb left, count + ordering right ----
   line-height 1 as on live: the 38px right side is the 36px select plus its and the form's 1px margins. */
.mcb-breadcrumb-row { margin: 0 0 30px; overflow: hidden; line-height: 1; }
.mcb-breadcrumb-row .left { float: left; }
.mcb-breadcrumb-row .right { float: right; }
.mcb-breadcrumb-row h3.breadcrumb {
  margin: 0; padding: 5px 0 0; font-size: 1.25em; line-height: 1.4; font-weight: 700;
  text-transform: uppercase; color: #555;
}
.mcb-breadcrumb-row h3.breadcrumb a { color: #999; font-weight: 400; }
/* Live: the inline head a:hover/a:focus (#777) comes after flatsome's .breadcrumb a, so it wins. */
.mcb-breadcrumb-row h3.breadcrumb a:hover, .mcb-breadcrumb-row h3.breadcrumb a:focus { color: #777; }
.mcb-breadcrumb-row h3.breadcrumb span { display: inline-block; margin: 0 5px; color: #ccc; }
.woocommerce .mcb-breadcrumb-row .woocommerce-result-count {
  display: inline-block; float: none; margin: 0 20px 0 0; padding: 0;
  font-size: 1em; line-height: 1.6; color: #777;
}
.woocommerce .mcb-breadcrumb-row .woocommerce-ordering {
  display: inline-block; float: none; margin: 0 0 1px; vertical-align: baseline;
}
/* Flatsome's select: 95% of the row font in the body face, 36px tall, faint inset shade, and its 25x7
   PNG arrow (metadata chunks stripped, pixels unchanged) at 15% of the height. 189 wide at 1440. */
.woocommerce .mcb-breadcrumb-row .woocommerce-ordering select.orderby {
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
  height: 36px; margin: 0 0 1px; padding: 0 10px; vertical-align: baseline;
  font-family: inherit; font-size: 95%; font-weight: 400; line-height: 30px; color: #333;
  border: 1px solid #ddd; border-radius: 0; box-shadow: inset 0 -1.3em 1em 0 rgba(0, 0, 0, .02);
  background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAHCAYAAAD9NeaIAAAAXklEQVR42mLMzs42Z2Bg2AnE/AzEgb9AHD9lypSlRKpnYALik0DsDsQfibUAiIm2AGYJA5EWkWUBsiWELCLbAnRLcFlEkQXYLEG3iGILQIAFhzjMIiUgXs5AIQAIMACUkxvwyNEvVQAAAABJRU5ErkJggg==") no-repeat 100% 50% / auto 15%;
}
.woocommerce .mcb-breadcrumb-row .woocommerce-ordering select.orderby:hover { box-shadow: inset 0 -1.8em 1em 0 transparent; }

/* Archive / category description above the grid: Foundation's 1.25em paragraph spacing (theme base is 1em). */
.mcb-shop--listing .page-description p, .mcb-shop--listing .term-description p { margin-bottom: 1.25em; }

/* ---- Phone Filter button + off-canvas Browse panel (live: .category-filtering, Magnific off-canvas) ---- */
.mcb-filter-row, .mcb-filter-bg { display: none; }

/* ---- BROWSE sidebar (live: Flatsome Product Categories widget, also on single products) ----
   95% bold title over a 3px #eee rule; 90% uppercase #777 links in 120% rows, a 1px #eee rule under
   each top-level item but the last. Sub-lists stay collapsed except under the current category
   (and its parent), indented 15px with #f1f1f1 rules; the current category is bold black. */
.mcb-browse { margin: 0 0 30px; line-height: 1; }
.mcb-browse__title {
  margin: .2em 0 15px; padding: 0 0 5px; border-bottom: 3px solid #eee;
  font-size: 95%; line-height: 1.4; font-weight: 700; letter-spacing: normal;
  text-transform: uppercase; color: #555;
}
.mcb-browse__list, .mcb-browse__list ul { list-style: none; margin: 0; padding: 0; }
.mcb-browse__list li { position: relative; margin: 0; line-height: 120%; }
.mcb-browse__list > li { border-bottom: 1px solid #eee; }
.mcb-browse__list > li:last-child { border-bottom: 0; }
.mcb-browse__list a {
  display: inline-block; padding: 8px 15px 8px 0; border: 0;
  font-size: 90%; letter-spacing: normal; text-transform: uppercase; color: #777;
}
.mcb-browse__list a:hover { color: #000; text-decoration: underline; }
.mcb-browse__list li ul.children { display: none; padding: 5px 0 10px 15px; }
.mcb-browse__list li ul.children li { border-top: 1px solid #f1f1f1; }
.mcb-browse__list li.current-cat-parent ul.children,
.mcb-browse__list li.current-cat ul.children { display: block; }
.mcb-browse__list li.current-cat > a { color: #000; font-weight: 700; }

/* ---- Empty category: plain "No products found" (live: Flatsome's unboxed p.woocommerce-info) ---- */
.mcb-no-products {
  background: none; border: 0; margin: 0 0 20px; padding: 15px 0; color: #777;
}
.mcb-no-products::before { display: none; }

/* ---- WooCommerce buttons → brand dark (override WC default purple) ---- */
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce input.button.alt, .woocommerce .single_add_to_cart_button {
  background: var(--mcb-btn-bg); color: #fff; border-radius: 0;
  text-transform: uppercase; font-size: 13px; letter-spacing: .03em;
}
.woocommerce #respond input#submit:hover, .woocommerce a.button:hover,
.woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover {
  background: #000; color: #fff;
}
.woocommerce .quantity .qty { border: 1px solid #ddd; padding: 6px; width: 56px; }

/* WooCommerce page title (Cart / Checkout / etc.) */
.woocommerce .mcb-container > h1, .mcb-content h1.entry-title { color: var(--mcb-heading); }

/* ---- Single product: same left Browse sidebar + main column ---- */
.mcb-shop--single { display: flex; gap: 30px; align-items: flex-start; padding-top: 24px; padding-bottom: 40px; }
.mcb-shop--single .mcb-shop__main { flex: 1 1 auto; min-width: 0; }
.woocommerce div.product .product_title { font-size: 26px; line-height: 1.3; margin: 0 0 .3em; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: #f0a500; font-size: 22px; font-weight: 400; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { text-transform: uppercase; font-size: 13px; }
.woocommerce div.product .woocommerce-tabs .panel h2:first-child { display: none; }
.woocommerce .related.products > h2, .woocommerce .upsells.products > h2 {
  text-transform: uppercase; font-size: 18px; text-align: center; margin-bottom: 24px;
}
.woocommerce div.product form.cart .button { vertical-align: middle; }

/* ---- Product grid (live: Foundation large-block-grid-4 / small-block-grid-2) ----
   Floated percentage cells with 10px side padding inside a -10px row margin, no grid gaps:
   at 1440 the cells are 200 wide and the images 180 wide at x=465/665/865/1065.
   :nth-child(n) lifts the cell rules over woocommerce-smallscreen.css (float:right on 2n). */
.woocommerce ul.products, .woocommerce-page ul.products, ul.products {
  display: block; list-style: none; margin: 0 -10px; padding: 0; clear: both;
}
.woocommerce ul.products::before, .woocommerce ul.products::after,
.woocommerce-page ul.products::before, .woocommerce-page ul.products::after,
ul.products::before, ul.products::after { content: " "; display: table; }
.woocommerce ul.products::after, .woocommerce-page ul.products::after, ul.products::after { clear: both; }

ul.products li.product,
.woocommerce ul.products[class*=columns-] li.product:nth-child(n),
.woocommerce-page ul.products[class*=columns-] li.product:nth-child(n) {
  float: left; clear: none; width: 25%; margin: 0; padding: 0 10px 20px;
  display: block; text-align: left;
}
ul.products li.product:nth-child(4n+1),
.woocommerce ul.products[class*=columns-] li.product:nth-child(4n+1),
.woocommerce-page ul.products[class*=columns-] li.product:nth-child(4n+1) { clear: left; }
ul.products li.product a img { margin: 0 0 12px; width: 100%; height: auto; }

/* ---- Card image (live: .product-image.hover_fade_in_back) ----
   Overflow-hidden box; the front image is width:auto between 99.9% and 101% (181.8 x 218.4 in a
   180 box at 1440); the first gallery image fades in over it on hover. */
.mcb-card-image { position: relative; overflow: hidden; margin: 0; }
.mcb-card-image__link { display: block; }
ul.products li.product .mcb-card-image img,
.woocommerce ul.products li.product .mcb-card-image img {
  display: block; margin: 0; min-width: 99.9%; max-width: 101%; width: auto; height: auto; box-shadow: none;
}
ul.products li.product .mcb-card-image img.mcb-card-image__back,
.woocommerce ul.products li.product .mcb-card-image img.mcb-card-image__back {
  position: absolute; top: 0; left: 0; min-width: 100%; max-width: 100%; backface-visibility: hidden;
}
.mcb-card-image__back { opacity: 0; transition: opacity 200ms ease-out; }
.mcb-card-image:hover .mcb-card-image__back { opacity: 1; }
/* No hover image on iPad or iPhone, at any width (foundation.css: html[data-useragent*='iPad'] .back-image,
   html[data-useragent*='iPhone'] .back-image {display:none !important}; header.php sets the attribute). */
html[data-useragent*='iPad'] .mcb-card-image__back,
html[data-useragent*='iPhone'] .mcb-card-image__back { display: none !important; }

/* ---- Card caption (live: .info > a > p.name, then span.price; theme options force #777) ----
   Title 90% regular, line-height normal (26px lines in Chenla), 5px under the image; the price is an
   inline 90% span on the next line of the 25.6px card text. Only the title link underlines, on hover
   and on focus (live's inline a:hover, a:focus). */
ul.products li.product a.woocommerce-loop-product__link,
ul.products li.product a.woocommerce-loop-product__link:hover { color: #777; text-decoration: none; }
ul.products li.product a.woocommerce-loop-product__link:hover,
ul.products li.product a.woocommerce-loop-product__link:focus { text-decoration: underline; }
ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin: 5px 0 0; padding: 0; font-family: inherit; font-size: 90%; font-weight: 400;
  line-height: normal; letter-spacing: normal; text-transform: none; text-align: left; color: #777;
}
ul.products li.product .price,
.woocommerce ul.products li.product .price {
  display: inline; margin: 0; padding: 0; font-size: 90%; font-weight: 400; line-height: 1; color: #777;
}
ul.products li.product .price del { color: #bbb; font-weight: 400; margin-right: 6px; }
ul.products li.product .price ins { text-decoration: none; }

/* ---- Card bag icon (live: a.add-to-cart-grid > .cart-icon, no text button under the card) ----
   Parked 30px below the clipped image box, rising to 35px above its bottom on hover (just over the
   Quick View bar); always 10px up at <=768. An 18x19 2px-bordered bag with a 10x6 handle, 60% opacity
   (100% on hover), filled #2f2f36 when the bag itself is hovered and green with a tick once added. */
.mcb-card-cart {
  position: absolute; top: auto; right: auto; bottom: -30px; left: 10px;
  display: block; width: 28px; height: 25.6px; margin: 0; padding: 0;
  transition: all 350ms ease-out;
}
.mcb-card-image:hover .mcb-card-cart { bottom: 35px; }
.mcb-cart-icon { position: relative; display: block; width: 18px; height: 100%; opacity: .6; }
/* Hover states only where hover is real: a tap leaves no sticky hover (live: FastClick). */
@media (hover: hover) {
  .mcb-cart-icon:hover { opacity: 1; }
  .mcb-cart-icon strong:hover { background-color: #2f2f36; color: #fff; }
}
/* Live: .product-image .cart-icon strong is 8px text on a 14px line padded 1px 3px 0, so the icomoon
   glyph (span.icon-inner, 8px on a 1em line) sits on the bold Chenla strut's baseline: 8 x 9 at +5,+4. */
.mcb-cart-icon strong {
  position: absolute; top: 6px; left: 0; z-index: 10; display: block; box-sizing: border-box;
  width: 18px; height: 19px; margin: 0; padding: 1px 3px 0; border: 2px solid #2f2f36; color: #2f2f36;
  font-size: 8px; line-height: 14px; text-align: left; -webkit-font-smoothing: antialiased;
  transition: all 200ms ease-out;
}
.mcb-cart-icon__glyph::before { content: "\e00c"; }
.mcb-cart-icon__handle {
  position: absolute; top: 0; left: 4px; box-sizing: border-box; width: 10px; height: 6px;
  border: 2px solid #2f2f36; border-bottom: 0; border-radius: 99px 99px 0 0;
  transition: all 200ms ease-out;
}
.mcb-card-cart.loading .mcb-cart-icon__glyph::before, .mcb-card-cart.added .mcb-cart-icon__glyph::before { content: "\e00a"; }
.mcb-card-cart.loading strong, .mcb-card-cart.added strong { background-color: #7a9c59; border-color: #7a9c59; color: #fff; }
.mcb-card-cart.loading .mcb-cart-icon__handle, .mcb-card-cart.added .mcb-cart-icon__handle { border-color: #7a9c59; }
ul.products li.product.outofstock .mcb-card-cart { display: none; }

/* Bag-icon tooltip (live: tooltipster-default, appended to body; inc/woocommerce.php places it):
   an rgba(0,0,0,.8) box with 5px corners, Arial 14px/16px white text padded 8px 10px (87.7 x 32 for
   "Add to cart"), and a centred 16x8 arrow under it (over it when flipped below the icon). */
.mcb-tip {
  position: absolute; top: 0; left: 0; z-index: 9999999; box-sizing: border-box;
  margin: 0; padding: 8px 10px; border: 0; border-radius: 5px; background: rgba(0, 0, 0, .8);
  font: normal 400 14px/16px Arial, sans-serif; letter-spacing: normal; text-transform: none;
  text-align: left; white-space: nowrap; color: #fff;
  pointer-events: none; opacity: 0; transition: opacity 350ms;
}
.mcb-tip[hidden] { display: none; }
.mcb-tip.is-shown { opacity: 1; }
.mcb-tip::after {
  content: ""; position: absolute; bottom: -8px; left: var(--mcb-tip-shift, 0px); right: calc(-1 * var(--mcb-tip-shift, 0px));
  display: block; box-sizing: border-box; width: 0; height: 0; margin: 0 auto;
  border-top: 8px solid rgba(0, 0, 0, .8); border-left: 8px solid transparent; border-right: 8px solid transparent;
}
.mcb-tip--bottom::after { top: -8px; bottom: auto; border-top: 0; border-bottom: 8px solid rgba(0, 0, 0, .8); }
/* Woo appends a "View cart" link after an AJAX add; live hides it inside the image. */
.mcb-card-image .added_to_cart { display: none !important; }

/* "Out of season" / out-of-stock label overlay */
ul.products li.product .mcb-badge, ul.products li.product .out-of-stock-label {
  position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px;
}
ul.products li.product { position: relative; }

/* ---- WooCommerce store notice ---- */
/* Matches live Flatsome p.demo_store: a STATIC black bar that sits at the very bottom
   of the page, after the footer (theme-setup re-hooks it to wp_footer) — NOT fixed,
   NOT the teal promo colour. display:block outranks woocommerce.css's display:none (0,1,1) without
   !important, so it shows before JS runs, and woocommerce.js's inline display:none still dismisses it. */
.woocommerce-store-notice, p.woocommerce-store-notice.demo_store {
  display: block; position: static; margin: 0;
  background: #111; color: #999; text-align: center;
  padding: 6px 0 8px; border-radius: 0; box-shadow: none; /* woocommerce.css adds 0 1px 1em .2 black */
}
/* Live's Dismiss link is a plain theme link: black on the #111 bar, not underlined, straight after the text. */
p.woocommerce-store-notice.demo_store a.woocommerce-store-notice__dismiss-link {
  margin: 0; color: #000; text-decoration: none;
}

/* Single product sidebar stacking (woocommerce-single lane; unchanged). Listings override it above. */
@media (max-width: 849px) {
  .mcb-shop__sidebar { flex-basis: auto; max-width: none; width: 100%; }
}

/* Flatsome's 48em "mobile" rules (inclusive of 768): centred toolbar, no count, no hover extras. */
@media (max-width: 768px) {
  .mcb-breadcrumb-row { font-size: 80%; }
  .mcb-breadcrumb-row .left, .mcb-breadcrumb-row .right { width: 100%; text-align: center; }
  .mcb-breadcrumb-row .left { margin-bottom: 15px; }
  .woocommerce .mcb-breadcrumb-row .woocommerce-result-count { display: none !important; }

  ul.products li.product .mcb-card-image img,
  .woocommerce ul.products li.product .mcb-card-image img { width: 100%; }
  .mcb-card-image .mcb-card-image__back, .mcb-card-image .mcb-quickview { display: none !important; }
  .mcb-card-cart, .mcb-card-image:hover .mcb-card-cart { bottom: 10px; }
}

/* Phone (< 768): stacked, sidebar replaced by the Filter button + off-canvas panel, 2-up grid. */
@media (max-width: 767px) {
  /* Foundation headings are 1.2125em below 48em (1.4 from 48em up). */
  .mcb-breadcrumb-row h3.breadcrumb, .mcb-browse__title { line-height: 1.2125em; }

  .mcb-shop--listing .mcb-shop__cols { display: block; }
  .mcb-shop--listing .mcb-shop__cols > .mcb-shop__main { width: 100%; max-width: none; }
  .mcb-shop--listing .mcb-shop__cols > .mcb-shop__sidebar { display: none; }

  .mcb-filter-row { display: block; margin: -25px 0 5px; text-align: center; }
  .mcb-filter {
    position: relative; display: block; padding: 15px 0;
    font-size: 20px; line-height: 1; font-weight: 700; text-transform: uppercase; color: #000;
  }
  .mcb-filter { opacity: .6; }
  /* Live's later inline a:hover/a:focus (#777) beats a.filter-button's #000 at equal specificity.
     Hover only where hover is real, so a tap leaves the button at rest (live: FastClick). */
  .mcb-filter:focus { color: #777; }
}
@media (max-width: 767px) and (hover: hover) {
  .mcb-filter:hover { color: #777; opacity: 1; }
}
@media (max-width: 767px) {
  /* Closing the panel refocuses the button; live's foundation.css a:focus { outline: none } hides the ring. */
  .mcb-filter:focus { outline: none; }
  /* live: a.filter-button span { margin-right: 5px; position: relative; top: 0 } on the icomoon glyph. */
  .mcb-filter__icon { display: inline; position: relative; top: 0; margin-right: 5px; font-size: 20px; line-height: 1; }

  /* Live's Magnific off-canvas popup, in two states set by inc/woocommerce.php:
     body.mcb-filter-active - the popup is in the page (open, and for the 300ms removalDelay of a close);
     body.mcb-filter-open   - .mfp-ready, added 16ms after the open and dropped as the close starts.
     The panel waits at translateX(-270px) and slides in over .2s (ease); the overlay fades 0 -> .6
     over .2s (ease). A close runs both back. Live animates whatever prefers-reduced-motion says. */
  body.mcb-filter-active .mcb-shop--listing .mcb-shop__cols > .mcb-shop__sidebar {
    display: block; position: fixed; top: 0; bottom: 0; left: 0; z-index: 1043;
    width: 260px; max-width: none; height: 100%; padding: 30px; overflow-y: auto;
    background: #f6f6f6; box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5);
    transform: translateX(-270px); transition: transform .2s;
  }
  body.mcb-filter-open .mcb-shop--listing .mcb-shop__cols > .mcb-shop__sidebar { transform: translate(0, 0); }
  body.mcb-filter-active .mcb-filter-bg {
    display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1042;
    background: #0b0b0b; opacity: 0; transition: opacity .2s;
  }
  body.mcb-filter-open .mcb-filter-bg { opacity: .6; }
  /* Hammer's cssProps on live's .mfp-wrap: vertical panning only (the left swipe closes it, see
     inc/woocommerce.php), no text selection, no image/link dragging, no tap highlight. */
  body.mcb-filter-active .mcb-shop--listing .mcb-shop__cols > .mcb-shop__sidebar,
  body.mcb-filter-active .mcb-filter-bg {
    touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
  }
  /* The panel takes focus on open, as live's .mfp-wrap does (outline: none !important there). */
  #mcb-shop-sidebar:focus { outline: none; }
  /* Magnific's scroll lock while the panel is open (not on phones; inc/woocommerce.php decides). */
  html.mcb-filter-lock { overflow: hidden; }
  body.mcb-filter-active .mcb-shop--listing .mcb-browse__list li ul.children { display: block; }

  ul.products li.product,
  .woocommerce ul.products[class*=columns-] li.product:nth-child(n),
  .woocommerce-page ul.products[class*=columns-] li.product:nth-child(n) { width: 50%; clear: none; }
  ul.products li.product:nth-child(2n+1),
  .woocommerce ul.products[class*=columns-] li.product:nth-child(2n+1),
  .woocommerce-page ul.products[class*=columns-] li.product:nth-child(2n+1) { clear: left; }
}
