/* Update 5 V38: jewelry catalogue cards and the product page's related pieces.
   Name, then "purity | category" with the price on the same level, then three boxes: wishlist, cart, long Buy now / Contact.
   Desktop (mouse): the info rests at the bottom of the card; on hover or keyboard focus it moves up and the boxes fade in below it
   (transform and opacity only, so nothing changes size). Touch and narrow screens always show the boxes.
   Scoped to .jc-card: Home, wishlist and bullion cards are not touched. The !important marks answer older !important rules. */
.jc-card{--jc-btn:44px;--jc-gap:8px;--jc-top:12px;--jc-end:14px;--jc-pad:16px;--jc-side:var(--jc-pad);--jc-ease:cubic-bezier(.22,.7,.25,1)}
/* the space of the boxes is always kept, before they are added (products.js) and while they are hidden */
html body #dynamicProducts .jc-card{position:relative;flex-direction:column;padding-bottom:calc(var(--jc-top) + var(--jc-btn) + var(--jc-end))!important}
html body #dynamicProducts .product-card.jc-card .product-open{flex:1 1 auto;overflow:visible!important}
html body #dynamicProducts .product-card.jc-card .product-body{display:flex!important;flex-direction:column;flex:1 1 auto;padding:8px var(--jc-pad) 0!important}
html body #dynamicProducts .product-card.jc-card .product-name{margin:0!important;padding:0!important}

/* one level: facts left, price right, with a small "From" just left of the price */
html body #dynamicProducts .jc-card .jc-line{display:flex!important;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:2px 10px;width:100%;margin:auto 0 0!important;padding:8px 0 0!important;border:0}
html body #dynamicProducts .jc-card .jc-facts{display:inline-flex;align-items:center;min-width:0;white-space:nowrap;line-height:1.4}
html body #dynamicProducts .jc-card .jc-facts>:is(.product-purity,.product-category){display:inline!important;flex:none;width:auto!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;color:#5f6675;font-size:.84rem!important;line-height:1.4!important}
html body #dynamicProducts .jc-card .jc-facts>.product-category{flex:0 1 auto;min-width:0;overflow:hidden!important;text-overflow:ellipsis}
html body #dynamicProducts .jc-card .jc-facts{max-width:100%}
html body #dynamicProducts .jc-card .jc-sep{flex:none;width:1px;height:.85em;margin:0 9px;background:#0d1b3d;opacity:.3}
html body #dynamicProducts .jc-card .jc-line>:is(.product-price,.related-piece-price){flex:none;display:block!important;margin:0 0 0 auto!important;padding:0!important;text-align:right!important;white-space:nowrap;line-height:1.2!important}
html body #dynamicProducts .jc-card .jc-line .product-price-from{display:inline!important;margin:0 5px 0 0!important;padding:0!important;font-size:.68rem!important;line-height:1!important}
/* desktop widths with narrower cards, and Malay ("Daripada" is longer): slightly smaller, so the price stays on the same level */
@media(min-width:981px) and (max-width:1500px){
html body #dynamicProducts .product-card.jc-card .jc-line{column-gap:6px}
html body #dynamicProducts .product-card.jc-card .jc-facts>:is(.product-purity,.product-category){font-size:0.76rem!important}
html body #dynamicProducts .product-card.jc-card .jc-sep{margin:0 7px}
html body #dynamicProducts .product-card.jc-card .jc-line>.product-price{font-size:1.12rem!important}
html body #dynamicProducts .product-card.jc-card .jc-line .product-price-from{margin-right:4px!important;font-size:0.62rem!important}
}
@media(min-width:981px) and (max-width:1340px){
html body #dynamicProducts .product-card.jc-card .jc-line{column-gap:6px}
html body #dynamicProducts .product-card.jc-card .jc-facts>:is(.product-purity,.product-category){font-size:0.71rem!important}
html body #dynamicProducts .product-card.jc-card .jc-sep{margin:0 5px}
html body #dynamicProducts .product-card.jc-card .jc-line>.product-price{font-size:1.04rem!important}
html body #dynamicProducts .product-card.jc-card .jc-line .product-price-from{margin-right:3px!important;font-size:0.58rem!important}
}
@media(min-width:981px){
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-line{column-gap:6px}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-facts>:is(.product-purity,.product-category){font-size:0.68rem!important}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-sep{margin:0 5px}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-line>.product-price{font-size:1.06rem!important}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-line .product-price-from{margin-right:3px!important;font-size:0.54rem!important}
}
@media(min-width:981px) and (max-width:1340px){
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-line{column-gap:6px}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-facts>:is(.product-purity,.product-category){font-size:0.66rem!important}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-sep{margin:0 4px}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-line>.product-price{font-size:0.98rem!important}
html[lang^="ms"] body #dynamicProducts .product-card.jc-card .jc-line .product-price-from{margin-right:3px!important;font-size:0.52rem!important}
}

/* the three boxes: two equal squares, then the long one */
html body #dynamicProducts .jc-card .jc-actions{position:absolute;right:var(--jc-side);bottom:var(--jc-end);left:var(--jc-side);display:grid;grid-template-columns:var(--jc-btn) var(--jc-btn) minmax(0,1fr);gap:var(--jc-gap);height:var(--jc-btn);margin:0;opacity:0;transition:opacity .26s ease}
html body #dynamicProducts .jc-card.jc-ready .jc-actions{opacity:1}
html body #dynamicProducts .jc-card .jc-actions>.jc-box{position:static!important;inset:auto!important;display:flex!important;align-items:center;justify-content:center;width:100%!important;min-width:0!important;max-width:none!important;height:var(--jc-btn)!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0;border:1px solid #0d1b3d!important;border-radius:0!important;background:transparent;box-shadow:none!important;color:#0d1b3d;cursor:pointer;opacity:1;transform:none!important;transition:background-color .2s ease,color .2s ease,border-color .2s ease,opacity .2s ease}
/* the product page's shine stripe on buttons would be drawn across the whole card */
html body #dynamicProducts .jc-card .jc-actions>.jc-box::after{content:none!important}
html body #dynamicProducts .jc-card .jc-actions>.jc-wish{font:400 1.25rem/1 Arial,sans-serif!important}
html body #dynamicProducts .jc-card .jc-actions>.jc-wish.is-loved{background:#0d1b3d!important;color:#e9cf94!important}
html body #dynamicProducts .jc-card .jc-cart::before{content:"";display:block;width:20px;height:20px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h2.2l2.1 10.2a1.5 1.5 0 0 0 1.5 1.2h8.6a1.5 1.5 0 0 0 1.5-1.1L21 8H6.3' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.4'/%3E%3Ccircle cx='17' cy='19.5' r='1.4'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h2.2l2.1 10.2a1.5 1.5 0 0 0 1.5 1.2h8.6a1.5 1.5 0 0 0 1.5-1.1L21 8H6.3' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.4'/%3E%3Ccircle cx='17' cy='19.5' r='1.4'/%3E%3C/svg%3E") center/contain no-repeat}
html body #dynamicProducts .jc-card .jc-actions>.jc-box[aria-busy]{opacity:.6;cursor:progress}
html body #dynamicProducts .jc-card .jc-actions>.jc-cart:disabled{opacity:.35;cursor:not-allowed}
html body #dynamicProducts .jc-card .jc-actions>.jc-buy{overflow:hidden;padding:0 8px;background:#0d1b3d;color:#fff;font:600 .78rem/1.1 Montserrat,Arial,sans-serif;letter-spacing:.04em;text-transform:none;white-space:nowrap}
@media(hover:hover) and (pointer:fine){
html body #dynamicProducts .jc-card .jc-actions>:is(.jc-wish,.jc-cart):not(:disabled):not(.is-loved):hover{background:#f4ecdc}
html body #dynamicProducts .jc-card .jc-actions>.jc-buy:hover{border-color:#c6a15b!important;background:#c6a15b;color:#0d1b3d}
}
html body #dynamicProducts .jc-card .jc-actions>.jc-box:focus-visible{outline:2px solid #c6a15b;outline-offset:2px}

/* related pieces: the same text and boxes under the beige picture frame */
html body #dynamicProducts .jc-related{--jc-end:2px;--jc-side:2px;display:flex}
html body #dynamicProducts .jc-related .related-piece-info{display:flex!important;flex-direction:column;gap:0;flex:1 1 auto;min-height:0!important;padding:10px 2px 0!important}
html body #dynamicProducts .jc-related .related-piece-name{min-height:0!important;margin:0!important;text-decoration:none}
html body #dynamicProducts .jc-related .related-piece-price{font-size:1.02rem}

/* desktop: rest at the bottom, rise on hover or keyboard focus */
@media(min-width:981px) and (hover:hover) and (pointer:fine){
.jc-card{--jc-drop:calc(var(--jc-btn) + var(--jc-top))}
html body #dynamicProducts .jc-card :is(.product-body,.related-piece-info){transform:translateY(var(--jc-drop));transition:transform .34s var(--jc-ease)}
html body #dynamicProducts .jc-card.jc-card .jc-actions{opacity:0;pointer-events:none;transform:translateY(10px);transition:opacity .26s ease,transform .34s var(--jc-ease)}
html body #dynamicProducts .jc-card:is(:hover,:focus-visible,:has(:focus-visible)) :is(.product-body,.related-piece-info){transform:none}
html body #dynamicProducts .jc-card.jc-ready:is(:hover,:focus-visible,:has(:focus-visible)) .jc-actions{opacity:1;pointer-events:auto;transform:none}
}
@supports not selector(:has(*)){@media(min-width:981px) and (hover:hover) and (pointer:fine){html body #dynamicProducts .jc-card:focus-within :is(.product-body,.related-piece-info){transform:none}html body #dynamicProducts .jc-card.jc-ready:focus-within .jc-actions{opacity:1;pointer-events:auto;transform:none}}}
@media(max-width:980px){
.jc-card{--jc-btn:40px;--jc-gap:6px;--jc-top:10px;--jc-pad:12px}
html body #dynamicProducts .jc-card .jc-facts>:is(.product-purity,.product-category){font-size:.74rem!important}
html body #dynamicProducts .jc-card .jc-sep{margin:0 6px}
html body #dynamicProducts .product-card.jc-card .jc-line>.product-price{font-size:1rem!important}
html body #dynamicProducts .product-card.jc-card .product-name{font-size:1.2rem!important}
}
@media(max-width:560px){
.jc-card{--jc-btn:38px;--jc-gap:5px;--jc-top:8px;--jc-end:9px;--jc-pad:9px}
html body #dynamicProducts .product-card.jc-card .product-name{font-size:.98rem!important}
html body #dynamicProducts .jc-card .jc-facts>:is(.product-purity,.product-category){font-size:.68rem!important}
html body #dynamicProducts .jc-card .jc-sep{margin:0 5px}
html body #dynamicProducts .jc-card .jc-line>:is(.product-price,.related-piece-price){font-size:.86rem!important}
html body #dynamicProducts .jc-card .jc-line .product-price-from{font-size:.6rem!important}
html body #dynamicProducts .jc-card .jc-actions>.jc-buy{padding:0 4px;font-size:.72rem;letter-spacing:0}
}
@media(max-width:380px){.jc-card{--jc-btn:35px;--jc-gap:4px;--jc-pad:8px}html body #dynamicProducts .jc-card .jc-actions>.jc-buy{padding:0 2px;font-size:.68rem}}
@media(prefers-reduced-motion:reduce){html body #dynamicProducts .jc-card :is(.product-body,.related-piece-info,.jc-actions,.jc-box){transition:none!important}}
