/* Product comparison (functions/product-compare.php): the tick on product cards, the tray at the bottom and the
   comparison page. After the prototype's v2-ux.js compare boxes and PriceTag_Page_Compare.html (3 Nov). */

/* Tick on product cards */
.pt-cmp-tick { position: absolute; right: 8px; bottom: 8px; z-index: 5; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px 0 5px; border: 1px solid #c9d5ea; border-radius: 8px; background: rgba(255, 255, 255, .94); color: #3b4f73; font: 600 12px/1 "Noto Sans Thai", Arial, sans-serif; cursor: pointer; user-select: none; }
.pt-cmp-tick i { position: relative; width: 16px; height: 16px; border: 1.5px solid #9fb0cc; border-radius: 4px; background: #fff; }
.pt-cmp-tick:hover { border-color: #004aeb; color: #004aeb; }
.pt-cmp-tick[aria-checked="true"] { border-color: #004aeb; background: #eaf1ff; color: #004aeb; }
.pt-cmp-tick[aria-checked="true"] i { border-color: #004aeb; background: #004aeb; }
.pt-cmp-tick[aria-checked="true"] i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pt-cmp-tick:focus-visible { outline: 2px solid #004aeb; outline-offset: 2px; }
/* theme cards keep their offer count bottom right: the tick sits on the picture's top left (under a rank badge) */
.card-product-item .pt-cmp-tick { top: 8px; right: auto; bottom: auto; left: 8px; }
.card-product-item:has(> .z-\[4\]) .pt-cmp-tick { top: 40px; }
/* home cards on desktop: a strip under the tags for the tick, so it never sits on them */
@media (min-width: 1024px) {
	.pt-pc[data-cmp-id] > .pt-pc-body { padding-bottom: 38px; }
}
@media (max-width: 1023px) {
	.pt-cmp-tick { height: 28px; }
	.pt-cmp-tick span { display: none; }
	.pt-cmp-tick { padding: 0 5px; }
}

/* Tray */
.pt-cmp-tray { position: fixed; left: 50%; bottom: 16px; z-index: 9990; width: min(720px, calc(100% - 24px)); transform: translateX(-50%); border: 1px solid #c9d8f6; border-radius: 16px; background: #fff; box-shadow: 0 12px 32px rgba(0, 24, 74, .22); font-family: "Noto Sans Thai", Arial, sans-serif; color: #00184a; }
.pt-cmp-tray[hidden] { display: none; }
.pt-cmp-in { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.pt-cmp-txt { display: grid; gap: 1px; min-width: 0; }
.pt-cmp-txt b { font-size: 14px; font-weight: 800; white-space: nowrap; }
.pt-cmp-txt small { font-size: 12.5px; color: #5b6b85; }
.pt-cmp-slots { display: flex; gap: 8px; margin-left: auto; }
.pt-cmp-slot { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #e3e8ef; border-radius: 10px; background: #f8fafc; }
.pt-cmp-slot img { width: 40px; height: 40px; object-fit: contain; }
.pt-cmp-slot b { font-size: 13px; color: #5b6b85; }
.pt-cmp-slot.empty { border-style: dashed; border-color: #c9d5ea; color: #9fb0cc; font-size: 20px; }
.pt-cmp-slot button { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #00184a; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.pt-cmp-clear { flex: none; height: 40px; padding: 0 12px; border: 0; background: none; color: #5b6b85; font: 600 14px "Noto Sans Thai", Arial, sans-serif; cursor: pointer; }
.pt-cmp-clear:hover { color: #00184a; text-decoration: underline; }
.pt-cmp-go { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border-radius: 12px; background: #004aeb; color: #fff !important; font-size: 15px; font-weight: 800; text-decoration: none !important; box-shadow: 0 6px 14px rgba(0, 74, 235, .28); }
.pt-cmp-go:hover { background: #003bc0; }
.pt-cmp-go[aria-disabled="true"] { background: #c9d5ea; box-shadow: none; cursor: not-allowed; }
body.pt-cmp-has-tray { padding-bottom: 88px; }
@media (max-width: 640px) {
	.pt-cmp-tray { bottom: 8px; width: calc(100% - 16px); }
	.pt-cmp-in { flex-wrap: wrap; gap: 8px 10px; padding: 10px; }
	.pt-cmp-slots { gap: 6px; }
	.pt-cmp-slot { width: 42px; height: 42px; }
	.pt-cmp-slot img { width: 34px; height: 34px; }
	.pt-cmp-clear { margin-left: auto; height: 38px; }
	.pt-cmp-go { flex: 1; justify-content: center; height: 40px; }
	body.pt-cmp-has-tray { padding-bottom: 132px; }
}
.pt-cmp-toast { position: fixed; left: 50%; bottom: 110px; z-index: 9995; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: #00184a; color: #fff; font: 600 14px "Noto Sans Thai", Arial, sans-serif; opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.pt-cmp-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Comparison page */
.pt-cmpp { background: #f4f6f9; color: #00184a; font-family: "Noto Sans Thai", Arial, Helvetica, sans-serif; }
.pt-cmpp-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 64px; }
.pt-cmpp-eyebrow { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; color: #004aeb; }
.pt-cmpp-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pt-cmpp-title h1 { margin: 4px 0 6px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 800; }
.pt-cmpp-count { flex: none; padding: 6px 12px; border-radius: 999px; background: #e8efff; color: #003b9b; font-size: 13px; font-weight: 800; }
.pt-cmpp-intro { margin: 0 0 14px; font-size: 15px; color: #57657b; }
.pt-cmpp-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #c7d8ff; border-left: 4px solid #004aeb; border-radius: 9px; background: #f3f7ff; font-size: 14px; line-height: 1.5; }
.pt-cmpp-note b { color: #004aeb; }
.pt-cmpp-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.pt-cmpp-diff { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.pt-cmpp-diff input { width: 18px; height: 18px; accent-color: #004aeb; }
.pt-cmpp-hint { display: none; font-size: 13px; color: #57657b; }
.pt-cmpp-scroll { overflow: auto; border: 1px solid #d7dfec; border-radius: 12px; background: #fff; box-shadow: 0 6px 22px rgba(0, 24, 74, .05); }
.pt-cmpp-table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.pt-cmpp-table th, .pt-cmpp-table td { padding: 12px 16px; border-bottom: 1px solid #e3e9f1; text-align: left; vertical-align: top; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.pt-cmpp-table .pt-cmpp-lab { position: sticky; left: 0; z-index: 1; width: 180px; background: #f7f9fd; color: #526077; font-size: 13.5px; font-weight: 700; box-shadow: 1px 0 0 #d7dfec; }
.pt-cmpp-table thead th { background: #f0f4fb; border-bottom: 2px solid #c6d5ed; vertical-align: bottom; }
.pt-cmpp-table thead .pt-cmpp-lab { z-index: 3; background: #f0f4fb; }
.pt-cmpp-item { position: relative; }
.pt-cmpp-item > a { display: block; color: #00184a; text-decoration: none; }
.pt-cmpp-pic { display: grid !important; place-items: center; height: 120px; margin: 0 0 8px; border-radius: 10px; background: #fff; }
.pt-cmpp-pic img { max-width: 100%; max-height: 112px; object-fit: contain; }
.pt-cmpp-name { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pt-cmpp-name:hover { color: #004aeb; }
.pt-cmpp-price { display: block; font-size: 20px; color: #f97316; }
.pt-cmpp-na { display: block; font-size: 14px; color: #57657b; }
.pt-cmpp-go { display: inline-flex !important; align-items: center; margin-top: 8px; padding: 6px 12px; border-radius: 10px; background: #004aeb; color: #fff !important; font-size: 13.5px; font-weight: 700; }
.pt-cmpp-go:hover { background: #003bc0; }
.pt-cmpp-x { position: absolute !important; top: 8px; right: 8px; display: grid !important; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 24, 74, .07); font-size: 17px; line-height: 1; }
.pt-cmpp-x:hover { background: #00184a; color: #fff !important; }
.pt-cmpp-group th { padding: 10px 16px; background: #00184a; color: #fff; font-size: 14px; font-weight: 800; position: sticky; left: 0; }
.pt-cmpp-table tbody tr:not(.pt-cmpp-group):nth-child(odd) td { background: #fbfcfe; }
.pt-cmpp-table td.best { background: #e8f8ef !important; color: #0a6b40; font-weight: 800; }
.pt-cmpp-table td.empty { color: #8a97ab; }
.pt-cmpp-diff-on tr[data-same] { display: none; }
.pt-cmpp-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; color: #57657b; }
.pt-cmpp-foot a, .pt-cmpp-empty a { color: #003b9b; font-weight: 700; text-decoration: underline; }
.pt-cmpp-empty { max-width: 520px; margin: 40px auto; padding: 28px 24px; border: 1px solid #d7dfec; border-radius: 16px; background: #fff; text-align: center; }
.pt-cmpp-empty img { width: 160px; margin: 0 auto 8px; }
.pt-cmpp-empty h1 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.pt-cmpp-empty p { margin: 0 0 14px; font-size: 15px; color: #57657b; }
@media (max-width: 767px) {
	.pt-cmpp-wrap { padding: 18px 12px 48px; }
	.pt-cmpp-hint { display: block; }
	.pt-cmpp-table { min-width: 100%; table-layout: auto; }
	.pt-cmpp-table .pt-cmpp-lab { width: 96px; min-width: 96px; padding: 10px 8px; font-size: 12.5px; }
	.pt-cmpp-table th, .pt-cmpp-table td { padding: 10px 8px; font-size: 13.5px; }
	.pt-cmpp-table thead th:not(.pt-cmpp-lab), .pt-cmpp-table td { min-width: 120px; }
	.pt-cmpp-pic { height: 90px; }
	.pt-cmpp-pic img { max-height: 84px; }
	.pt-cmpp-name { font-size: 14px; }
	.pt-cmpp-price { font-size: 17px; }
	.pt-cmpp-go { padding: 6px 10px; font-size: 13px; }
	.pt-cmpp-tools { flex-wrap: wrap; }
}

/* 11 Nov 2026: fuller comparison (kakaku-style sections); header shows the brand and where the lowest price is */
.pt-cmpp-brand { display: block; margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #6b7a90; }
.pt-cmpp-shopline { display: block; margin: 2px 0 8px; font-size: 12.5px; font-weight: 500; color: #5b6b84; }
.pt-cmpp-nospec { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: #fff8e8; font-size: 13px; line-height: 1.55; color: #6b4a00; }
.pt-cmpp-nospec b { font-weight: 700; }

/* 12 Nov 2026: where the Apple spec sheets were read */
.pt-cmpp-src { margin: 12px 0 0; font-size: 12.5px; line-height: 1.6; color: #6b7280; overflow-wrap: anywhere; }
.pt-cmpp-src a { color: #1d4ed8; text-decoration: underline; }
