/* BNW product card polish v3 (2026-11-16). Loaded from layout/theme.html after bnw-fixes.css.
   Scope: product cards on home / collection / search / recommendations (.block-product-card).
   1. spec chips fit the card (no clipped "6-8 Hou…"); phones show Difficulty + Pieces only
   2. price on one line, compare pill off the price row on desktop (hover icons already offer it)
   3. sale price in brand red, compare-at price muted
   4. review stars in brand gold instead of orange
   5. title weight 500, always two lines tall so cards line up
   6. phones show the star rating too
   7. add-to-cart: desktop round button grows a label on hover; phones get a full-width button */

:root{
  --bnw-card-ink:#2B2118;
  --bnw-card-green:#35513d;
  --bnw-card-red:#8B3232;
  --bnw-card-gold:#B8862B;
}

/* ---------- 1. spec chips ---------- */
html body .block-product-card .product-card__icons{
  padding:6px 2px !important;
  gap:0 !important;
  overflow:hidden !important;
  -webkit-mask-image:none !important;
          mask-image:none !important;
}
html body .block-product-card .product-card__icons{justify-content:space-between !important}
html body .block-product-card .product-card__icons-item{
  flex:0 1 auto !important;
  min-width:0 !important;
  padding:0 3px !important;
  gap:3px !important;
  justify-content:center !important;
}
/* the piece count is short: never shrink it, let the two text values share the slack */
html body .block-product-card .product-card__icons-item:nth-child(2){flex-shrink:0 !important}
html body .block-product-card .product-card__icons-icon{
  flex:0 0 auto;
  width:14px !important;
  height:14px !important;
  margin:0 !important;
}
html body .block-product-card .product-card__icons-icon img{width:14px !important;height:14px !important}
html body .block-product-card .product-card__icons-text{min-width:0}
html body .block-product-card .product-card__icons-value{
  font-size:10.5px !important;
  letter-spacing:0 !important;
  line-height:1.2 !important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
@media (max-width:959px){
  /* keep Difficulty + Pieces only; Build Time stays on the product page */
  html body .block-product-card .product-card__icons-item:nth-child(n+3){display:none !important}
  html body .block-product-card .product-card__icons-item{flex-direction:row !important}
  /* two chips on a wide single-column card: keep them together, not pinned to both edges */
  html body .block-product-card .product-card__icons{justify-content:space-around !important}
}

/* ---------- 5. title ---------- */
.block-product-card .product-card__title{
  font-weight:500 !important;
  line-height:1.3 !important;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  min-height:2.6em;
}
.block-product-card .product-card__title a{font-weight:inherit}

/* ---------- 2 + 3. price ---------- */
/* compact card: the round cart button is product-item > .product-card__mobile-atc (absolute, bottom-right);
   the desktop compare pill was absolute at inset-end 46px and the price row reserved 150px for both. */
.block-product-card .product-card__price{display:flex !important;align-items:center !important}
.block-product-card .product-card__price .product-price{
  display:inline-flex !important;
  flex-direction:row !important;
  flex-wrap:wrap;
  align-items:baseline;
  column-gap:6px;row-gap:0;
}
.block-product-card .product-price__item--compare{
  display:inline !important;
  order:1;
  font-size:12px !important;
  opacity:.55;
  text-decoration:line-through;
}
.block-product-card .product-price__item{order:2;font-weight:600 !important}
/* a compare-at price next to the sale price means the item is on sale: make the sale price read as a deal
   (blocks/product-card/card.css forces the text colour with !important and a :has() selector, so match it) */
html body .block-product-card .product-card__price .product-price:has(> .product-price__item--compare) .product-price__item,
html body .block-product-card .product-card__price .product-price__item--compare + .product-price__item{color:var(--bnw-card-red) !important}
html body .block-product-card .product-card__price .product-price:has(> .product-price__item--compare) .product-price__item--compare{color:var(--bnw-card-ink) !important}
@media (min-width:960px){
  /* compare pill off the price row: the hover icon on the image is the desktop entry point */
  .block-product-card .bnw-compare-pill{display:none !important}
  .block-product-card .product-card__price{padding-inline-end:52px !important}
}

/* ---------- 4 + 6. review stars (plugin block inside the theme card) ---------- */
.block-product-card .product-plugin-comment-rate-star{color:var(--bnw-card-gold) !important}
.block-product-card .product-plugin-comment-rate-star div{color:var(--bnw-card-gold) !important}
.block-product-card .ssr-plugin-comment-product-card-star-block{display:flex !important;margin:2px 0}
@media (max-width:959px){
  .block-product-card .ssr-plugin-comment-product-card-star-block{transform:scale(.85);transform-origin:0 50%}
}

/* ---------- 7. add to cart (product-item > .product-card__mobile-atc, from bnw-card-compact.css) ---------- */
product-item .product-card__mobile-atc-btn{
  background:var(--bnw-card-green) !important;
  color:#fff !important;
  border:0 !important;
  transition:width .2s ease,padding .2s ease,background-color .2s ease,box-shadow .2s ease;
}
@media (hover:hover) and (min-width:960px){
  /* the round button grows a label when the card is hovered */
  product-item:has(> .block-product-card):hover .product-card__mobile-atc-btn{
    width:auto !important;
    padding:0 14px 0 10px !important;
    border-radius:18px !important;
    background:#2a4030 !important;
  }
  product-item:has(> .block-product-card):hover .product-card__mobile-atc-label{
    position:static !important;
    width:auto !important;height:auto !important;
    margin:0 0 0 7px !important;padding:0 !important;
    clip:auto !important;clip-path:none !important;overflow:visible !important;
    white-space:nowrap;
    font-size:12px;font-weight:600;letter-spacing:.02em;line-height:1;
  }
  product-item:has(> .block-product-card):hover > .product-card__mobile-atc,
  product-item:has(> .block-product-card):hover > .product-card__mobile-atc theme-product-form,
  product-item:has(> .block-product-card):hover > .product-card__mobile-atc theme-quick-add-modal,
  product-item:has(> .block-product-card):hover > .product-card__mobile-atc details{width:auto !important}
}
@media (max-width:959px){
  /* phones: full-width "Add to cart" under the price row instead of the small round icon */
  product-item:has(> .block-product-card){display:flex;flex-direction:column}
  product-item > .product-card__mobile-atc{
    position:static !important;
    width:100% !important;
    margin:8px 0 0 !important;
    inset:auto !important;
  }
  product-item > .product-card__mobile-atc theme-product-form,
  product-item > .product-card__mobile-atc theme-quick-add-modal,
  product-item > .product-card__mobile-atc details,
  product-item > .product-card__mobile-atc form{display:block;width:100% !important}
  product-item .product-card__mobile-atc-btn{
    width:100% !important;
    height:36px !important;
    border-radius:9px !important;
    box-shadow:none !important;
  }
  product-item .product-card__mobile-atc-label{
    position:static !important;
    width:auto !important;height:auto !important;
    margin:0 0 0 7px !important;padding:0 !important;
    clip:auto !important;clip-path:none !important;overflow:visible !important;
    white-space:nowrap;
    font-size:12px;font-weight:600;letter-spacing:.02em;line-height:1;
  }
  .block-product-card .product-card__price{padding-inline-end:0 !important;min-height:0 !important}
}

