/* ==========================================================================
   Citymall universal product card — used on shop, category, search,
   related products, [products], and the homepage grids.
   ========================================================================== */
:root{
  --ct-blue:#1b6fb3; --ct-navy:#0e3f6e; --ct-orange:#ff6a00;
  --ct-ink:#1f2a37; --ct-muted:#7c8aa0; --ct-line:#e4e9f0;
}

/* reset theme li styling so our card owns the cell */
ul.products li.product.ct-card-li,
li.product.ct-card-li{ margin:0!important; padding:0!important; border:0!important; box-shadow:none!important; background:transparent!important; text-align:left!important; }
.ct-card-li::before,.ct-card-li::after{ display:none!important; }

.ct-card{ background:#fff; border:1px solid var(--ct-line); border-radius:3px; display:flex; flex-direction:column; height:100%; overflow:hidden; transition:box-shadow .15s,border-color .15s; box-sizing:border-box; }
.ct-card *{ box-sizing:border-box; }
.ct-card:hover{ box-shadow:0 6px 20px rgba(16,40,70,.10); border-color:#cdd8e6; }

/* media */
.ct-card__media{ position:relative; display:flex; align-items:center; justify-content:center; padding:18px; aspect-ratio:1/1; }
.ct-card__media img{ max-height:210px; width:auto; max-width:100%; object-fit:contain; mix-blend-mode:multiply; }
.ct-card__badge{ position:absolute; top:10px; left:10px; background:var(--ct-orange); color:#fff; font-weight:800; font-size:12px; padding:3px 8px; border-radius:3px; }

/* body */
.ct-card__body{ padding:0 16px 16px; display:flex; flex-direction:column; flex:1; }
.ct-card__eyebrow{ text-transform:uppercase; font-size:11px; letter-spacing:.06em; color:var(--ct-muted); font-weight:700; margin-bottom:6px; display:block; text-decoration:none; }
.ct-card__eyebrow:hover{ color:var(--ct-blue); }
.ct-card__title{ font-size:14px; line-height:1.4; font-weight:700; color:var(--ct-ink); margin-bottom:10px; text-decoration:none; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.ct-card__title:hover{ color:var(--ct-blue); }

/* price — force dark price over theme's gold sale-price colour */
.ct-card__price{ font-size:20px; font-weight:800; color:var(--ct-ink)!important; margin-bottom:8px; line-height:1.2; }
.ct-card__price .amount,
.ct-card__price ins,
.ct-card__price ins .amount{ color:var(--ct-ink)!important; font-weight:800; }
.ct-card__price ins{ text-decoration:none; background:transparent; }
.ct-card__price .woocommerce-price-suffix{ font-size:12px; font-weight:600; color:var(--ct-muted)!important; white-space:nowrap; }
.ct-card__price del,
.ct-card__price del .amount{ color:#9aa7b8!important; font-weight:500; font-size:.62em; margin-right:6px; }

/* stock */
.ct-card__stock{ font-size:13px; font-weight:600; display:flex; align-items:center; gap:7px; margin-bottom:14px; }
.ct-card__stock.is-in{ color:#12a150; }
.ct-card__stock.is-out{ color:#e0563f; }
.ct-card__stock-ico{ width:16px; height:16px; flex:0 0 auto; background-color:currentColor; -webkit-mask:no-repeat center/contain; mask:no-repeat center/contain; }
.ct-card__stock.is-in .ct-card__stock-ico{ -webkit-mask-image:url(../img/ic-check.svg); mask-image:url(../img/ic-check.svg); }
.ct-card__stock.is-out .ct-card__stock-ico{ -webkit-mask-image:url(../img/ic-x.svg); mask-image:url(../img/ic-x.svg); }

/* actions — outlined buttons */
.ct-card__actions{ display:flex; flex-direction:column; gap:8px; margin-top:auto; }
.ct-card__actions .compare-button{ display:block; width:100%; margin:0; padding:0; }
.ct-card__actions .button,
.ct-card__actions a.compare{
  display:flex!important; align-items:center; justify-content:center; gap:8px;
  width:100%; box-sizing:border-box;
  background:#fff!important; color:var(--ct-blue)!important;
  border:1.5px solid var(--ct-blue)!important; border-radius:3px!important;
  padding:10px 12px!important; margin:0!important; font-size:14px!important; font-weight:700!important;
  line-height:1.2!important; min-height:0!important; height:auto!important; text-transform:none!important; box-shadow:none!important;
  transition:background .15s,color .15s;
}
.ct-card__actions .button:hover,
.ct-card__actions a.compare:hover{ background:var(--ct-blue)!important; color:#fff!important; }
.ct-card__actions .button.loading{ opacity:.7; }
.ct-card__actions .button:not(.compare)::before{ content:""; width:18px; height:18px; flex:0 0 auto; background-color:currentColor; -webkit-mask:url(../img/ic-cart.svg) no-repeat center/contain; mask:url(../img/ic-cart.svg) no-repeat center/contain; }
.ct-card__actions a.compare::before{ content:""; width:18px; height:18px; flex:0 0 auto; background-color:currentColor; -webkit-mask:url(../img/ic-compare.svg) no-repeat center/contain; mask:url(../img/ic-compare.svg) no-repeat center/contain; }
/* hide any plugin default icons/images inside the buttons */
.ct-card__actions a.compare img,.ct-card__actions a.compare svg,.ct-card__actions a.compare i{ display:none!important; }
/* the ajax "View cart" link that appears after add */
.ct-card__actions .added_to_cart{ display:inline-flex; align-items:center; justify-content:center; background:transparent!important; border:0!important; color:var(--ct-blue)!important; text-decoration:underline; padding:2px!important; font-weight:600!important; min-height:0!important; }
.ct-card__actions .added_to_cart::before{ display:none!important; }

/* wishlist — heart text link */
.ct-card__wishlist{ margin-top:10px; }
.ct-card__wishlist .yith-wcwl-add-to-wishlist{ margin:0!important; font-size:14px; }
.ct-card__wishlist a{ display:inline-flex!important; align-items:center; gap:8px; color:var(--ct-blue)!important; font-weight:600; font-size:14px; text-decoration:none; }
.ct-card__wishlist a:hover{ color:var(--ct-navy)!important; }
.ct-card__wishlist a.add_to_wishlist::before,
.ct-card__wishlist .yith-wcwl-wishlistaddedbrowse a::before,
.ct-card__wishlist .yith-wcwl-wishlistexistsbrowse a::before{ content:""!important; width:20px; height:20px; flex:0 0 auto; background-color:currentColor!important; -webkit-mask:url(../img/ic-heart.svg) no-repeat center/contain; mask:url(../img/ic-heart.svg) no-repeat center/contain; }
.ct-card__wishlist img,.ct-card__wishlist svg,.ct-card__wishlist i,.ct-card__wishlist .yith-wcwl-icon{ display:none!important; }
.ct-card__wishlist .yith-wcwl-add-button>a i{ display:none!important; }

/* hide CommerceKit's hover-injected wishlist/compare/quick-view on product cards
   (we render our own always-visible Add to cart / Compare / Wishlist) */
li.product .commercekit-wishlist,
li.product .commercekit-compare,
li.product .commercekit-quick-view,
li.product .cg-wishlist-loop,
li.product .cgkit-loop-buttons,
li.product .cgkit-buttons,
.ct-card .commercekit-wishlist,
.ct-card .commercekit-compare,
.ct-card .commercekit-quick-view{ display:none!important; }

/* homepage grids reuse the same card */
.ct-home .ct-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; list-style:none; margin:0; padding:0; }
.ct-home .ct-grid::before,.ct-home .ct-grid::after{ display:none!important; }
.ct-home .ct-grid li.product{ width:auto!important; float:none!important; margin:0!important; }

@media(max-width:1100px){ .ct-home .ct-grid{ grid-template-columns:repeat(4,1fr); } }
@media(max-width:680px){
  .ct-home .ct-grid{ grid-template-columns:repeat(2,1fr); gap:10px; }
  .ct-card__media img{ max-height:150px; }
  .ct-card__price{ font-size:17px; }
}
