/* Mercantile v0.7.6.13 — mobile Home/Shop containment + compact catalog cards. */
html.mm-v074-root,
body.mm-ui-v074,
body.mm-ui-v076{max-width:100%!important;overflow-x:hidden!important}

/* Mercantile owns the public header. Keep it visible and exactly viewport-wide. */
.mm-v074-header.mm-v076-header,
body.home .mm-v074-header.mm-v076-header,
body.woocommerce-shop .mm-v074-header.mm-v076-header,
body.tax-product_cat .mm-v074-header.mm-v076-header,
body.tax-product_tag .mm-v074-header.mm-v076-header{
  display:block!important;
  visibility:visible!important;
  position:relative!important;
  left:auto!important;
  right:auto!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  box-sizing:border-box!important;
}

/* Theme/block WooCommerce controls can sit outside the classic hooks. Hide only
   the duplicates; Mercantile's ordering form inside its own toolbar is restored. */
body.woocommerce-shop .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count,
body.woocommerce-shop .wc-block-product-results-count,
body.tax-product_cat .wc-block-product-results-count,
body.tax-product_tag .wc-block-product-results-count,
body.woocommerce-shop .wc-block-catalog-sorting,
body.tax-product_cat .wc-block-catalog-sorting,
body.tax-product_tag .wc-block-catalog-sorting,
body.woocommerce-shop>.wp-site-blocks .woocommerce-ordering,
body.tax-product_cat>.wp-site-blocks .woocommerce-ordering,
body.tax-product_tag>.wp-site-blocks .woocommerce-ordering{display:none!important}
body.woocommerce-shop .mm-v07611-tools .woocommerce-ordering,
body.tax-product_cat .mm-v07611-tools .woocommerce-ordering,
body.tax-product_tag .mm-v07611-tools .woocommerce-ordering{display:block!important}

/* Shop counters now use the same visual language as the homepage activity card. */
.mm-v07611-marketbar{border-radius:14px!important;overflow:hidden!important;box-shadow:0 8px 24px rgba(23,16,48,.07)!important}
.mm-v07611-marketbar .mm-v07611-marketstat,
.mm-v07611-marketbar .mm-v07611-location-jump{
  display:flex!important;
  min-width:0!important;
  align-items:center!important;
  gap:12px!important;
  min-height:76px!important;
  padding:12px 16px!important;
  border-radius:0!important;
}
.mm-v07611-marketbar .mm-market-stat-icon{width:44px!important;height:44px!important;flex:0 0 44px!important}
.mm-v07611-marketbar .mm-market-stat-icon svg{width:25px!important;height:25px!important}
.mm-v07611-marketbar .mm-market-stat-copy{display:grid!important;flex:1 1 auto!important;width:auto!important;height:auto!important;min-width:0!important;place-items:initial!important;align-content:center!important;gap:2px!important;line-height:1.05!important;text-align:left!important;font-size:inherit!important;color:inherit!important}
.mm-v07611-marketbar .mm-market-stat-copy>strong{font-size:24px!important;line-height:1!important;font-weight:900!important;letter-spacing:-.025em!important;color:#101827!important}
.mm-v07611-marketbar .mm-market-stat-copy>span{margin:2px 0 0!important;color:#101827!important;font-size:10px!important;line-height:1.15!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.025em!important}
.mm-v07611-marketbar .mm-v07611-location-jump .mm-market-stat-copy>strong{font-size:14px!important;letter-spacing:-.01em!important}
.mm-v07611-marketbar .mm-v07611-location-jump .mm-market-stat-copy>span{text-transform:none!important;font-size:9px!important;color:#6d6878!important;font-weight:650!important;letter-spacing:0!important}
.mm-v07611-marketbar .mm-v07611-location-jump>b{margin-left:auto!important;color:#3c2370!important}

/* Prevent equal-height grid rows from turning compact mobile listings into long cards. */
.mm-v07611-results ul.products{align-items:start!important;grid-auto-rows:auto!important}
.mm-v07611-results ul.products li.product,
.mm-v07611-results ul.products li.product:nth-child(n){height:auto!important;min-height:0!important;align-self:start!important}
.mm-v07611-card{height:auto!important;min-height:0!important}
.mm-v07611-card-body{flex:0 0 auto!important;min-height:0!important}
.mm-v07611-vendor{margin-top:5px!important;margin-bottom:7px!important}
.mm-v07611-card-action{margin-top:5px!important}

@media(max-width:900px){
  /* Header children stay inside the viewport on phones. */
  .mm-v074-main{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:4px 9px 0!important;
    box-sizing:border-box!important;
  }
  .mm-v074-action-zone,.mm-v074-actions{min-width:0!important;max-width:100%!important}

  /* The first account action sits at the far left, so right-aligning its 230px
     dropdown sends it off-screen. Anchor it to the left on mobile instead. */
  .mm-v074-account{position:relative!important;min-width:0!important}
  .mm-v074-account-menu{
    left:0!important;
    right:auto!important;
    width:min(280px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    margin:0!important;
    transform:none!important;
    box-sizing:border-box!important;
    overflow-wrap:anywhere!important;
  }
  .mm-v074-account-menu .mm-v074-signin,
  .mm-v074-account-menu a,
  .mm-v074-account-menu p{max-width:100%!important;box-sizing:border-box!important}

  /* Hamburger menu stays right-anchored and cannot exceed viewport width. */
  .mm-v074-menu{position:relative!important;min-width:44px!important;justify-self:end!important}
  .mm-v074-menu>div{
    left:auto!important;
    right:0!important;
    width:min(320px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    margin:0!important;
    transform:none!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  /* Release common block-theme homepage ancestors even before the v0.7.4
     JavaScript compatibility marker runs. */
  body.home.mm-ui-v074 .wp-site-blocks>main,
  body.home.mm-ui-v076 .wp-site-blocks>main,
  body.home.mm-ui-v074 main.wp-block-group,
  body.home.mm-ui-v076 main.wp-block-group,
  body.home.mm-ui-v074 .entry-content,
  body.home.mm-ui-v076 .entry-content,
  body.home.mm-ui-v074 .wp-block-post-content,
  body.home.mm-ui-v076 .wp-block-post-content{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;box-sizing:border-box!important}

  /* The older 100vw + left:50% breakout could resolve against a constrained
     block-theme ancestor and leave half of the hero off-canvas. Break out from
     the known 9px mobile shell instead, with no viewport-relative positioning. */
  body.home.mm-ui-v074 .mm-hp-approved-design,
  body.home.mm-ui-v076 .mm-hp-approved-design{width:100%!important;max-width:100%!important;margin:0!important;overflow:hidden!important}
  body.home.mm-ui-v074 .mm-hp-approved-design .mm-hp-shell,
  body.home.mm-ui-v076 .mm-hp-approved-design .mm-hp-shell{
    width:calc(100% - 18px)!important;
    max-width:none!important;
    margin:0 auto!important;
    padding-top:0!important;
    box-sizing:border-box!important;
  }
  body.home.mm-ui-v074 .mm-hp-hero-approved,
  body.home.mm-ui-v076 .mm-hp-hero-approved{
    position:relative!important;
    left:auto!important;
    right:auto!important;
    width:calc(100% + 18px)!important;
    max-width:none!important;
    margin-left:-9px!important;
    margin-right:-9px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.home.mm-ui-v074 .mm-hp-hero-approved .mm-hp-hero-main,
  body.home.mm-ui-v076 .mm-hp-hero-approved .mm-hp-hero-main{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    margin:0!important;
    border-radius:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.home.mm-ui-v074 .mm-hp-hero-approved .mm-hp-hero-copy,
  body.home.mm-ui-v076 .mm-hp-hero-approved .mm-hp-hero-copy{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;overflow:hidden!important}
  body.home.mm-ui-v074 .mm-hp-hero-approved .mm-hp-hero-copy h1,
  body.home.mm-ui-v076 .mm-hp-hero-approved .mm-hp-hero-copy h1,
  body.home.mm-ui-v074 .mm-hp-hero-approved .mm-hp-hero-copy p,
  body.home.mm-ui-v076 .mm-hp-hero-approved .mm-hp-hero-copy p{max-width:100%!important;overflow-wrap:break-word!important}
  body.home.mm-ui-v074 .mm-hp-hero-approved .mm-hp-hero-collage.mm-hp-hero-photo,
  body.home.mm-ui-v076 .mm-hp-hero-approved .mm-hp-hero-collage.mm-hp-hero-photo{left:0!important;right:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}

  /* Compact 2-column Shop catalog: same browse density without long blank cards. */
  .mm-v07611-results ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;align-items:start!important}
  .mm-v07611-card-body{display:flex!important;flex-direction:column!important;padding:9px 9px 10px!important}
  .mm-v07611-card h2{min-height:0!important;margin-bottom:6px!important}
  .mm-v07611-review-row{min-height:0!important;margin-bottom:4px!important}
  .mm-v07611-stockline{min-height:0!important;margin-bottom:5px!important}
  .mm-v07611-vendor{min-height:24px!important}
}

@media(max-width:520px){
  .mm-v07611-shop{width:calc(100% - 16px)!important;max-width:100%!important}
  .mm-v07611-marketbar{grid-template-columns:1fr 1fr!important;border-radius:12px!important}
  .mm-v07611-marketbar .mm-v07611-marketstat,
  .mm-v07611-marketbar .mm-v07611-location-jump{min-height:82px!important;padding:10px 9px!important;gap:8px!important;border-top:1px solid #ebe8f0!important}
  .mm-v07611-marketbar .mm-v07611-marketstat:nth-child(-n+2){border-top:0!important}
  .mm-v07611-marketbar .mm-market-stat-icon{width:38px!important;height:38px!important;flex-basis:38px!important}
  .mm-v07611-marketbar .mm-market-stat-icon svg{width:22px!important;height:22px!important}
  .mm-v07611-marketbar .mm-market-stat-copy>strong{font-size:22px!important}
  .mm-v07611-marketbar .mm-market-stat-copy>span{font-size:8px!important}
  .mm-v07611-marketbar .mm-v07611-location-jump .mm-market-stat-copy>strong{font-size:12px!important;line-height:1.08!important}
  .mm-v07611-marketbar .mm-v07611-location-jump .mm-market-stat-copy>span{font-size:8px!important}

  .mm-v07611-results ul.products{gap:8px!important}
  .mm-v07611-card-media{aspect-ratio:1/1!important}
  .mm-v07611-card-body{padding:8px!important}
  .mm-v07611-card h2{font-size:11px!important;line-height:1.22!important}
  .mm-v07611-review-row{font-size:8px!important}
  .mm-v07611-price-row strong,.mm-v07611-price-row strong .amount{font-size:14px!important}
  .mm-v07611-condition,.mm-v07611-stockline{font-size:8px!important}
  .mm-v07611-vendor>a{font-size:8px!important;gap:5px!important}
  .mm-v07611-vendor-avatar{width:20px!important;height:20px!important}
  .mm-v07611-card-action .button,.mm-v07611-card-action a.button{min-height:34px!important;font-size:9px!important}
}
