/* Member area (prototype v2-account.css, 9 Nov 2026): product-page save / alert buttons and the account dashboard. */

/* ── product page buttons ── */
.pt-mb { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.pt-mb button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid #d6e2f7; border-radius: 999px; background: #fff; font: 700 13px "Noto Sans Thai", Arial, sans-serif; color: #00184a; cursor: pointer; transition: background .15s, border-color .15s; }
.pt-mb button:hover { background: #f5f8ff; border-color: #b9cdff; }
.pt-mb button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pt-mb button[aria-pressed="true"] { background: #e8f0ff; border-color: #b9cdff; color: #004aeb; }
.pt-mb .pt-mb-save[aria-pressed="true"] svg { fill: #ef4444; stroke: #ef4444; }
.pt-mb-pop { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; display: grid; gap: 8px; width: min(320px, 100%); padding: 12px; border: 1px solid #d6e2f7; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(0, 24, 74, .14); }
.pt-mb-pop[hidden] { display: none; }
.pt-mb-pop label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; color: #00184a; }
.pt-mb-pop label span { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid #c5cdd9; border-radius: 10px; background: #f8faff; font-size: 15px; }
.pt-mb-pop input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font: 700 16px "Noto Sans Thai", Arial, sans-serif; color: #00184a; }
.pt-mb-pop small { font-size: 11.5px; color: #5b6b85; line-height: 1.45; }
.pt-mb-pop .pt-mb-row { display: flex; gap: 8px; }
.pt-mb-pop .pt-mb-row button { flex: 1; justify-content: center; height: 38px; }
.pt-mb-pop .pt-mb-row button[type="submit"] { background: #004aeb; border-color: #004aeb; color: #fff; }

/* ── account dashboard ── */
.pt-mem { --ink: #00184a; --mut: #5b6b85; --line: #e3e8f0; --blue: #004aeb; --org: #fe9300; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 14px 0 40px; font-family: "Noto Sans Thai", Arial, sans-serif; color: var(--ink); }
.pt-mem button { font: inherit; cursor: pointer; }
.pt-mem svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pt-mem-side { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.pt-mem-me { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); }
.pt-mem-me .av { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--org), #ffb648); color: #fff; font-weight: 800; font-size: 18px; }
.pt-mem-me b { display: block; font-size: 15px; }
.pt-mem-me small { font-size: 11.5px; color: var(--mut); }
.pt-mem-side nav { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; }
.pt-mem-side nav::-webkit-scrollbar { display: none; }
.pt-mem-side nav button, .pt-mem-side nav a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; text-decoration: none; }
.pt-mem-side nav button svg, .pt-mem-side nav a svg { width: 16px; height: 16px; }
.pt-mem-side nav button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pt-mem-side nav button small { padding: 0 6px; border-radius: 999px; background: #eef2f7; color: var(--ink); font-size: 11px; font-weight: 800; }
.pt-mem-side nav button[aria-current="true"] small { background: rgba(255, 255, 255, .2); color: #fff; }
.pt-mem-main { min-width: 0; }
.pt-mem-main [hidden] { display: none !important; }
.pt-mem-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.pt-mem-hd h2 { margin: 0; font-size: 20px; font-weight: 800; }
.pt-mem-hd small { font-size: 12px; color: var(--mut); }
.pt-mem-hd button, .pt-mem-hd a { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.pt-mem-hello { display: grid; grid-template-columns: minmax(0, 1fr) 84px; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, #eef4ff, #fff7ea); border: 1px solid #e4ebfb; }
.pt-mem-hello h1 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.pt-mem-hello p { margin: 0; font-size: 13.5px; color: var(--mut); line-height: 1.5; }
.pt-mem-hello img { width: 84px; height: 84px; object-fit: contain; }
.pt-mem-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
.pt-mem-kpi button { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; }
.pt-mem-kpi button small { font-size: 12px; color: var(--mut); }
.pt-mem-kpi button b { font-size: 24px; line-height: 1.1; font-weight: 800; }
.pt-mem-kpi button span { font-size: 11.5px; color: var(--mut); }
.pt-mem-kpi button.hot b { color: #e07b00; }
.pt-mem-kpi button.ok b { color: #0f8a4d; }
.pt-mem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pt-mem-grid .pt-pc { position: relative; }
.pt-mem-item { position: relative; }
.pt-mem-x { position: absolute; z-index: 2; top: 8px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--mut); font-size: 16px; line-height: 1; }
.pt-mem-x:hover { color: #c8102e; border-color: #f3c2c2; }
.pt-mem-empty { padding: 26px 16px; border: 1px dashed #c9d6ee; border-radius: 14px; background: #f8faff; text-align: center; font-size: 13.5px; color: var(--mut); line-height: 1.6; }
.pt-mem-empty a { color: var(--blue); font-weight: 700; }
.pt-mem h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 800; }
.pt-mem h3 span { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #eef2f7; font-size: 11.5px; color: var(--mut); }
/* alerts */
.pt-mem-alerts { display: grid; gap: 8px; }
.pt-mem-alert { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pt-mem-alert.hit { border-color: #bfe8d3; background: #f6fef9; }
.pt-mem-alert img { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: #f6f7fb; }
.pt-mem-alert .nm b { display: block; font-size: 13.5px; line-height: 1.35; }
.pt-mem-alert .nm b a { color: inherit; text-decoration: none; }
.pt-mem-alert .nm small { font-size: 11.5px; color: var(--mut); }
.pt-mem-alert .row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.pt-mem-alert .row > div small, .pt-mem-alert .row > label small { display: block; font-size: 11px; color: var(--mut); margin-bottom: 2px; }
.pt-mem-alert .row b { font-size: 16px; font-weight: 800; }
.pt-mem-alert .tg span { display: flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px; border: 1px solid #c5cdd9; border-radius: 10px; background: #f8faff; font-weight: 700; }
.pt-mem-alert .tg input { width: 100%; min-width: 0; border: 0; background: none; outline: 0; font: 700 15px "Noto Sans Thai", Arial, sans-serif; color: var(--ink); }
.pt-mem-alert .st { display: flex; align-items: center; gap: 8px; }
.pt-mem-alert .st em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--mut); }
.pt-mem-alert .st em.ok { color: #0f8a4d; }
.pt-mem-alert .pt-mem-x { position: static; }
/* reviews / rows */
.pt-mem-rows { display: grid; gap: 8px; }
.pt-mem-row { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pt-mem-row b { font-size: 14px; }
.pt-mem-row b a { color: inherit; text-decoration: none; }
.pt-mem-row .stars { color: #f5b700; letter-spacing: 1px; font-size: 13px; }
.pt-mem-row small { font-size: 12.5px; color: var(--mut); line-height: 1.5; }
.pt-mem-row .pend { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #fff3e0; color: #b45309; font-size: 10.5px; font-weight: 800; }
/* switches */
.pt-mem-sw { display: grid; gap: 8px; }
.pt-mem-sw label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pt-mem-sw label b { display: block; font-size: 14px; }
.pt-mem-sw label small { display: block; font-size: 12px; color: var(--mut); }
.pt-mem-sw input { appearance: none; flex: none; width: 42px; height: 24px; border-radius: 999px; background: #d0d7e2; position: relative; cursor: pointer; transition: background .15s; }
.pt-mem-sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.pt-mem-sw input:checked { background: #12b76a; }
.pt-mem-sw input:checked::after { left: 21px; }
.pt-mem-note { margin: 10px 0 0; font-size: 12px; color: var(--mut); line-height: 1.5; }
.pt-mem-prof .my-account { margin: 0; }

@media (min-width: 1024px) {
  .pt-mem { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
  .pt-mem-side { position: sticky; top: 90px; padding: 14px; }
  .pt-mem-side nav { flex-direction: column; gap: 4px; overflow: visible; }
  .pt-mem-side nav button, .pt-mem-side nav a { height: 40px; justify-content: flex-start; border: 0; border-radius: 10px; font-size: 13.5px; }
  .pt-mem-side nav button small { margin-left: auto; }
  .pt-mem-side nav button:hover:not([aria-current="true"]) { background: #f5f8ff; }
  .pt-mem-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pt-mem-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pt-mem-alert { grid-template-columns: 64px minmax(0, 1fr) 120px 170px 150px; }
  .pt-mem-alert .row { display: contents; }
  .pt-mem-alert img { width: 64px; height: 64px; }
  .pt-mem-hello h1 { font-size: 26px; }
}

/* Save buttons everywhere (9 Nov): data-bm="kind:id" — products (heart on the card photo), credit cards, articles,
   shops. Outline heart when not saved, filled pink when saved, a short pop on press; toast links to the account. */
.pt-bm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-family: inherit; color: #3b4f73; -webkit-tap-highlight-color: transparent; }
.pt-bm svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: transform .15s; }
.pt-bm[aria-pressed="true"] { color: #e11d63; }
.pt-bm[aria-pressed="true"] svg { fill: currentColor; }
.pt-bm.pt-bm-pop svg { animation: pt-bm-pop .4s ease-out; }
@keyframes pt-bm-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.pt-bm:focus-visible { outline: 2px solid #004aeb; outline-offset: 2px; }
/* on a product photo */
.pt-pc-img { position: relative; }
.pt-bm-ov { position: absolute; z-index: 3; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 2px 8px rgba(0, 24, 74, .18); }
.pt-bm-ov svg { width: 18px; height: 18px; }
.pt-pc-inst ~ .pt-bm-ov { bottom: 34px; }
/* text buttons (credit-card rows, card page, articles) */
.pt-bm-txt { height: 34px; padding: 0 12px; border: 1px solid #d6e2f7; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; }
.pt-bm-txt:hover { border-color: #e11d63; color: #e11d63; }
.pt-bm-txt[aria-pressed="true"] { border-color: #f9c4d6; background: #fff1f6; }
.pt-bm-lg { height: 42px; padding: 0 16px; font-size: 14px; }
.pt-bm-art { margin: 6px 0 4px; }
/* icon only (shop cards) */
.pt-bm-ic { width: 32px; height: 32px; border: 1px solid #e3e9f3; border-radius: 50%; background: #fff; }
.pt-bm-ic:hover { border-color: #e11d63; color: #e11d63; }
.pt-vd-card .pt-vd-hd { grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 8px; }
.pt-vd-card .pt-vd-hd .pt-vd-go { padding: 0 10px; }
/* credit-card ranking rows: the save button sits under the two actions */
.pt-card .pt-bm-txt { width: 100%; margin-top: 2px; }
/* toast */
.pt-bm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 9999; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 999px; background: #00184a; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 10px 24px rgba(0, 24, 74, .3); transition: opacity .2s, transform .2s; }
.pt-bm-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pt-bm-toast a { color: #ffe08a !important; text-decoration: underline; margin-left: 4px; }

/* account › saved: one section per kind */
.pt-mem-sec { margin: 0 0 22px; }
.pt-mem-sec > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; font-weight: 800; color: #00184a; }
.pt-mem-sec > h3 small { padding: 1px 8px; border-radius: 999px; background: #eef3ff; color: #1d3f9e; font-size: 12px; font-weight: 700; }
.pt-mem-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pt-mem-row { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e3e9f3; border-radius: 14px; background: #fff; }
.pt-mem-row > img, .pt-mem-row > .ph { width: 76px; height: 48px; border-radius: 8px; object-fit: cover; background: #eef3ff; }
.pt-mem-row.shop > img, .pt-mem-row.shop > .ph { width: 48px; height: 48px; object-fit: contain; border: 1px solid #eef2f7; background: #fff; }
.pt-mem-row .nm { min-width: 0; }
.pt-mem-row .nm a { display: block; font-size: 14.5px; font-weight: 800; line-height: 1.35; color: #00184a !important; }
.pt-mem-row .nm a:hover { color: #004aeb !important; }
.pt-mem-row .nm small { display: block; margin-top: 2px; font-size: 12.5px; color: #57657b; }
.pt-mem-row .go { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: #004aeb; color: #fff !important; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.pt-mem-row .pt-mem-x { position: static; }
@media (min-width: 768px) { .pt-mem-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 10 Nov: small product photos (phone list rows such as "กำลังมาแรง") get a small heart in the top-right corner
   instead of a big one over the middle of the picture */
.pt-pc-img { container-type: inline-size; }
@container (max-width: 130px) {
	.pt-bm-ov { top: 4px; right: 4px; bottom: auto; width: 24px; height: 24px; box-shadow: 0 1px 4px rgba(0, 24, 74, .2); }
	.pt-bm-ov svg { width: 13px; height: 13px; }
	.pt-pc-inst ~ .pt-bm-ov { bottom: auto; }
}
