/* Product cards, noon style (wm-cards.php). GreenLight block product lists (shop, categories, search, related) and the home page cards (.hx-card). */
:root{--wm-card-green:#16794a;--wm-card-green-bg:#ecfdf3;--wm-card-green-line:#a6e3c0;--wm-card-navy:#1e3a8a}

/* Photo tile */
.wm-grid .wc-block-components-product-image{border-radius:12px;margin:0 0 10px}
.wm-grid .wc-block-components-product-image img:not(.wm-hover-img){aspect-ratio:1;object-fit:contain!important;mix-blend-mode:multiply}

/* Corner tag: inset like the "+", so it never fights the photo's rounded corner */
.wm-tag{position:absolute;top:8px;left:8px;z-index:2;padding:3px 8px;border-radius:6px;color:#fff;font-size:11px;font-weight:700;line-height:1.3;letter-spacing:.01em;pointer-events:none}
.wm-tag--sale{background:var(--wm-sale)}
.wm-tag--stock{background:var(--wm-card-navy)}
.wm-tag--combo{background:#111827;color:#fcd34d}
/* Stock price saving: green like the strip, one step smaller than the other tags so the photo leads */
.wm-tag--save{padding:2px 6px;border-radius:5px;background:var(--wm-card-green);font-size:10px}

/* "+" on the photo (selector long enough to beat the product page's related-products button style in wm.css) */
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add{position:absolute;right:8px;bottom:8px;z-index:3;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid var(--wm-line);border-radius:10px;background:#fff;color:var(--wm-ink);font:400 24px/1 var(--wm-font);text-decoration:none;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.08);transition:background .15s,color .15s,transform .15s}
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add:hover,:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add:focus-visible{background:var(--wm-blue);border-color:var(--wm-blue);color:#fff}
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add:focus-visible{outline:2px solid var(--wm-blue);outline-offset:2px}
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add:active{transform:scale(.92)}
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add.wm-anim{position:absolute;overflow:visible}
/* Small button: a spinner while adding and a tick when added, instead of the words used on big buttons */
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add.wm-is-adding::before{content:"";inset:0;width:16px;height:16px;padding:0;margin:auto;box-sizing:border-box;background:none;border:2px solid var(--wm-blue);border-right-color:transparent;border-radius:50%;animation:wm-card-spin .7s linear infinite}
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add:is(.wm-is-adding,.wm-is-added)::after{content:none}
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add.wm-is-added{background:var(--wm-card-green);border-color:var(--wm-card-green)}
:is(.wm-grid .wc-block-product .wc-block-components-product-image,.hx-card__media) .wm-add.wm-is-added::before{content:"\2713";inset:0;color:#fff;background:none;padding:0;font-size:18px;font-weight:700}
@keyframes wm-card-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.wm-add.wm-is-adding::before{animation:none}}

/* Title: two lines */
.wm-grid .wc-block-product .wp-block-post-title{white-space:normal;min-height:2.8em;margin:0 0 6px;line-height:1.4}
.wm-grid .wc-block-product .wp-block-post-title a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* Fact chips */
.wm-chips{display:flex;flex-wrap:wrap;gap:4px;max-width:100%;margin:0 0 6px;padding:0}
.wm-chips span{max-width:100%;padding:2px 8px;border-radius:6px;background:#f3f4f6;color:#374151;font-size:12px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wm-chips--fomo span{background:#fde8e8;color:#a11d1d;font-weight:600}

/* Price row: price, crossed-out normal price, green % */
.wm-grid .wc-block-product .wc-block-components-product-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 6px}
.wm-grid .wc-block-product .wc-block-components-product-price ins{order:1;text-decoration:none}
.wm-grid .wc-block-product .wc-block-components-product-price del{order:2;font-size:12px;font-weight:400;color:var(--wm-muted)}
.wm-grid .wc-block-product .wc-block-components-product-price .wm-off{order:3;font-size:13px;font-weight:700;color:var(--wm-card-green)}
.wm-grid .wc-block-product .wc-block-components-product-price::after{content:"";order:4;flex-basis:100%;height:0}
.wm-grid .wc-block-product .wc-block-components-product-price .wm-bulkline{order:5}

/* Stock price line as a green strip, edge to edge across the card (cards everywhere) */
.wm-bulkline{display:inline-flex;align-items:center;gap:7px;max-width:100%;width:100%;box-sizing:border-box;margin-top:4px;padding:5px 10px 5px 6px;border:1px solid #a6e3c0;border-radius:6px;background:#ecfdf3;color:#16794a;font-size:14px;font-weight:600;line-height:1.35}
/* Scalloped % badge (our own drawing), green with a white % */
.wm-bulkline::before{content:"";flex:none;width:20px;height:20px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2316794a' d='M23.6 12.0L23.2 13.1L22.2 14.0L21.1 14.8L20.5 15.5L20.4 16.5L20.6 17.8L20.7 19.2L20.2 20.2L19.2 20.7L17.8 20.6L16.5 20.4L15.5 20.5L14.8 21.1L14.0 22.2L13.1 23.2L12.0 23.6L10.9 23.2L10.0 22.2L9.2 21.1L8.5 20.5L7.5 20.4L6.2 20.6L4.8 20.7L3.8 20.2L3.3 19.2L3.4 17.8L3.6 16.5L3.5 15.5L2.9 14.8L1.8 14.0L0.8 13.1L0.3 12.0L0.8 10.9L1.8 10.0L2.9 9.2L3.5 8.5L3.6 7.5L3.4 6.2L3.3 4.8L3.8 3.8L4.8 3.3L6.2 3.4L7.5 3.6L8.5 3.5L9.2 2.9L10.0 1.8L10.9 0.8L12.0 0.3L13.1 0.8L14.0 1.8L14.8 2.9L15.5 3.5L16.5 3.6L17.8 3.4L19.2 3.3L20.2 3.8L20.7 4.8L20.6 6.2L20.4 7.5L20.5 8.5L21.1 9.2L22.2 10.0L23.2 10.9Z'/%3E%3Cpath d='M8.6 15.4 15.4 8.6' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='9.1' cy='9.1' r='1.55' fill='%23fff'/%3E%3Ccircle cx='14.9' cy='14.9' r='1.55' fill='%23fff'/%3E%3C/svg%3E") center/contain no-repeat}

/* Home page cards (wm-home.php) */
.hx-card .wm-chips{margin:-2px 0 8px}
.hx-card__price .wm-off{order:3;font-size:13px;font-weight:700;color:var(--wm-card-green)}
.hx-card .wm-bulkline{margin-top:0;gap:6px;padding:4px 8px 4px 5px;font-size:13px}
/* Home cards are narrower (scrolling rows), so the pill is one size down there */
.hx-card .wm-bulkline::before{width:18px;height:18px}
/* Never cut a price off: a very long line (e.g. R 1,299 each from 12+) wraps inside the pill instead */
.wm-bulkline{white-space:normal;overflow:visible}

/* Prices line up across a row: the price area sits at the bottom of every card and always keeps room
   for the stock price pill, so chips, one-line titles or a missing pill don't push prices up or down. */
.wm-grid .wc-block-product .wp-block-woocommerce-product-price{margin-top:auto;min-height:80px}
.hx-card__buy{margin-top:auto;min-height:64px}

/* Product page: chips under the title, deal strip under the price, table savings as the card's green tag */
.wm-chips--pdp{margin:6px 0 10px}
.wm-chips--pdp span{font-size:13px;padding:3px 10px}
.wm-bulkline--pdp{width:auto;margin-top:8px}
/* Saving as a green tag at the end of the strip, like the card's corner tag */
.wm-bulkline--pdp .wm-bulkline__save{margin-left:6px;padding:2px 7px;border-radius:5px;background:var(--wm-card-green);color:#fff;font-size:12px;font-weight:700;line-height:1.4;white-space:nowrap}
.hsp-tier .hsp-tier__save{display:inline-block;padding:2px 6px;border-radius:5px;background:var(--wm-card-green);color:#fff;font-size:11px;font-weight:700;line-height:1.3}

/* "See more in <category>" under the related products ([wm_more_in]) */
.wm-morein-wrap{margin:20px 0 0;text-align:center}
.wm-morein{display:inline-flex;align-items:center;gap:4px;padding:10px 18px;border:1px solid var(--wm-line);border-radius:8px;background:#fff;color:var(--wm-ink);font-size:14px;text-decoration:none}
.wm-morein b{color:var(--wm-blue);font-weight:600}
.wm-morein:hover,.wm-morein:focus-visible{border-color:var(--wm-blue)}

/* Product page "Highlights": the short description's list in a soft green box. Each line can carry an icon
   (<li data-icon="size|power|water|material|for|box|settings|safety|clean|origin">), chosen when the product is
   added; lines without one get the green tick. Icons: Tabler Icons 3.19.0 (MIT, tabler.io/icons), inlined. */
.wm-hl{margin:0 0 4px;padding:14px 16px;border:1px solid #d6eadf;border-radius:10px;background:#f3f8f5}
.wm-hl__title{margin:0 0 10px!important;color:var(--wm-ink);font-size:14px;font-weight:700;line-height:1.3}
.wm-pdp__excerpt .wm-hl li{display:flex;align-items:center;min-height:28px;margin:0 0 8px;padding-left:38px;color:var(--wm-ink);line-height:1.5}
.wm-pdp__excerpt .wm-hl li:last-child{margin-bottom:0}
.wm-pdp__excerpt .wm-hl li::before{top:50%;width:28px;height:28px;margin-top:-14px;box-sizing:border-box;border:1px solid #d6eadf;border-radius:7px;background:#fff center/16px no-repeat}
.wm-pdp__excerpt .wm-hl li[data-icon=size]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.875 12c.621 0 1.125 .512 1.125 1.143v5.714c0 .631 -.504 1.143 -1.125 1.143h-15.875a1 1 0 0 1 -1 -1v-5.857c0 -.631 .504 -1.143 1.125 -1.143h15.75z'/%3E%3Cpath d='M9 12v2'/%3E%3Cpath d='M6 12v3'/%3E%3Cpath d='M12 12v3'/%3E%3Cpath d='M18 12v3'/%3E%3Cpath d='M15 12v2'/%3E%3Cpath d='M3 3v4'/%3E%3Cpath d='M3 5h18'/%3E%3Cpath d='M21 3v4'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=power]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054z'/%3E%3Cpath d='M4 20l3.5 -3.5'/%3E%3Cpath d='M15 4l-3.5 3.5'/%3E%3Cpath d='M20 9l-3.5 3.5'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=water]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.502 19.423c2.602 2.105 6.395 2.105 8.996 0c2.602 -2.105 3.262 -5.708 1.566 -8.546l-4.89 -7.26c-.42 -.625 -1.287 -.803 -1.936 -.397a1.376 1.376 0 0 0 -.41 .397l-4.893 7.26c-1.695 2.838 -1.035 6.441 1.567 8.546z'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=material]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21c.5 -4.5 2.5 -8 7 -10'/%3E%3Cpath d='M9 18c6.218 0 10.5 -3.288 11 -12v-2h-4.014c-9 0 -11.986 4 -12 9c0 1 0 3 2 5h3z'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=for]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0'/%3E%3Cpath d='M6 21v-2a4 4 0 0 1 4 -4h4'/%3E%3Cpath d='M15 19l2 2l4 -4'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=box]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5'/%3E%3Cpath d='M12 12l8 -4.5'/%3E%3Cpath d='M12 12l0 9'/%3E%3Cpath d='M12 12l-8 -4.5'/%3E%3Cpath d='M16 5.25l-8 4.5'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=settings]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0'/%3E%3Cpath d='M6 4v4'/%3E%3Cpath d='M6 12v8'/%3E%3Cpath d='M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0'/%3E%3Cpath d='M12 4v10'/%3E%3Cpath d='M12 18v2'/%3E%3Cpath d='M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0'/%3E%3Cpath d='M18 4v1'/%3E%3Cpath d='M18 9v11'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=safety]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06'/%3E%3Cpath d='M15 19l2 2l4 -4'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=clean]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li[data-icon=origin]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0'/%3E%3Cpath d='M3.6 9h16.8'/%3E%3Cpath d='M3.6 15h16.8'/%3E%3Cpath d='M11.5 3a17 17 0 0 0 0 18'/%3E%3Cpath d='M12.5 3a17 17 0 0 1 0 18'/%3E%3C/svg%3E")}
.wm-pdp__excerpt .wm-hl li::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316794a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E")}

/* Keep last: overrides the pill rules above */
/* Phones (measured: shop cards ~166px inside, home cards ~148px): smaller badge and tighter spacing so the
   longest line, "R 899 each from 15+", fits whole with the badge */
@media (max-width:600px){
  .wm-bulkline{gap:4px;padding:5px 6px 5px 3px;font-size:13px}.wm-bulkline::before{width:17px;height:17px}
  .hx-card .wm-bulkline{gap:3px;padding:4px 5px 4px 3px;font-size:11.5px}.hx-card .wm-bulkline::before{width:15px;height:15px}
}
