/* Shared product card (templates/objects/card-product.twig), same look as the home card (.pt-pc in home.css,
   prototype v2-card). Variables fall back to the home palette so the card looks the same outside .pt-home. */
.pt-pc { position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--line, #e3e8ef); border-radius: 12px; color: #1f2933; overflow: visible; transition: border-color .15s, box-shadow .15s; font-family: "Noto Sans Thai", Arial, Helvetica, sans-serif; text-decoration: none; }
.pt-pc:hover { border-color: #b9c7e2; box-shadow: 0 2px 10px #00184a14; color: #1f2933; }
.pt-pc-x { width: 100%; height: 100%; }
.pt-pc-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #f8fafc; border-radius: 11px 11px 0 0; overflow: hidden; }
.pt-pc-img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.pt-pc-empty { width: 40%; aspect-ratio: 1.4; border: 2px solid #c3cde0; border-radius: 4px; }
.pt-pc .pt-rank { position: absolute; top: -15px; left: -8px; z-index: 4; width: 43px; height: 47px; max-width: none; pointer-events: none; }
.pt-pc-off { position: absolute; top: 8px; right: 6px; padding: 3px 7px; border-radius: 999px; background: #ef2b2b; color: #fff; font-size: 12.5px; font-weight: 800; line-height: 1.3; }
.pt-pc-avg { display: none; }
.pt-pc-inst { position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; border: 1.5px solid var(--acc, #1d4ed8); border-radius: 6px; background: #fff; color: var(--acc, #1d4ed8); font-size: 12px; font-weight: 700; line-height: 1.3; }
.pt-pc-body { display: grid; gap: 2px; padding: 6px 7px 8px; align-content: start; flex: 1; }
.pt-pc-name { font-size: 14px; line-height: 1.3; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.pt-pc-price { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.pt-pc-price img { width: 14px; height: 14px; flex: none; border-radius: 3px; object-fit: contain; }
.pt-pc-price b { font-size: 16.5px; font-weight: 800; color: #f97316; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-pc-price b.na { color: var(--mut, #5b6b85); font-size: 13.5px; }
.pt-pc-price s { font-size: 12.5px; color: #9aa5b1; }
.pt-pc-meta, .pt-pc-shop { font-size: 12px; line-height: 1.35; color: #52606d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-star { color: #f5a623; margin-right: 1px; }
.pt-pc-tags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; min-height: 17px; }
.pt-pc-tags em { flex: none; font-style: normal; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.pt-pc-tags .ship { background: #ecfdf3; color: #05603a; }
.pt-pc-tags .low { background: #fffaeb; color: #b54708; }
/* the compare tick sits in a strip under the tags (desktop rule lives in product-compare.css) */
@media (max-width: 1023px) {
	.pt-pc-x[data-cmp-id] > .pt-pc-body { padding-bottom: 38px; }
}
/* slides and grid cells stretch the card */
.swiper-slide > .pt-pc-x { height: auto; }
.related-product-swiper .swiper-slide > .pt-pc-x, .best-price-product-swiper .swiper-slide > .pt-pc-x { align-self: stretch; }

/* Review sections with no reviews yet (product page, credit card page): one friendly line and the write box,
   no 0/5 score, empty bars, filters or "no reviews found" (9 Nov). */
.pt-rv-none { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: #f3f7ff; font-family: "Noto Sans Thai", Arial, sans-serif; color: #00184a; }
.pt-rv-none img { width: 44px; height: 44px; flex: none; object-fit: contain; }
.pt-rv-none div { display: grid; gap: 1px; }
.pt-rv-none b { font-size: 15px; font-weight: 800; }
.pt-rv-none span { font-size: 13.5px; color: #3b4f73; }
.pt-rv-empty #product-rating-average, .pt-rv-empty #product-rating-stars, .pt-rv-empty #product-total-reviews, .pt-rv-empty #product-rating-bars,
.pt-rv-empty .pt-ccd-revsum, .pt-rv-empty .pt-ccd-revfilter, .pt-rv-empty .pt-ccd-revlist,
.pt-pdp-reviews.pt-rv-empty .grid > .col-span-1:first-child,
.pt-pdp-reviews.pt-rv-empty #review-image-filter, .pt-pdp-reviews.pt-rv-empty #review-image-filter + div { display: none !important; }
.pt-pdp-reviews.pt-rv-empty #review-image-filter { display: none; }
.pt-pdp-reviews.pt-rv-empty .grid { display: block; margin-top: 8px; }
.pt-pdp-reviews.pt-rv-empty .py-6.mt-6.border-t { display: none; }
.pt-pdp-reviews.pt-rv-empty .facetwp-template { display: none; }

/* 11 Nov 2026: product card lines in the prototype's order; "sold" line and the official-store / 0% tags */
.pt-pc-stats { font-size: 12px; line-height: 1.35; color: #52606d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-pc-tags .mall { background: #fef3f2; color: #b42318; }
.pt-pc-tags .inst { background: #eff4ff; color: #1d4ed8; }

/* 11 Nov 2026: the shop in front of the price — marketplace logo, or the shop's first letter when it has no icon */
.pt-pc-price img { width: 16px; height: 16px; }
.pt-pc-shopi { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: #e8eefc; color: #1d4ed8; font-style: normal; font-size: 10.5px; line-height: 1; font-weight: 800; }

/* the "ถูกกว่าเฉลี่ย N%" pill on listing cards too (desktop, as on the home page) */
@media (min-width: 1024px) {
	.pt-pc-avg { display: inline-flex; position: absolute; left: 6px; bottom: 6px; z-index: 2; padding: 2px 8px; border: 1.5px solid #18a364; border-radius: 8px; background: #fff; color: #0f7a4d; font-size: 12px; line-height: 1.35; font-weight: 800; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 24, 74, .12); }
}
