/* ============================================================================
   account.css — บัญชีของฉัน /account/ หน้าเดียว คำสั่งซื้อล่าสุดเด่นสุด
   ใช้ค่ากลางจาก base.css ทั้งหมด (ดำ ขาว ทองอุ่น) ไม่มีสีใหม่ · ฟอร์มกับปุ่มใช้ .fld .btn .panel ของ base.css
   ========================================================================== */

.page-account main { font-family: var(--f-th); }
/* เครื่องที่เข้าระบบอยู่ (คุกกี้ sw_in) ซ่อนฟอร์มเข้าระบบตั้งแต่แรก กันหน้ากระพริบ account.js เปิดส่วนที่ถูกเอง */
.acc-in #acOut { display: none; }
.ac-flash { max-width: 1180px; margin: 18px auto 0; padding: 12px 16px; border-radius: 6px; background: #EAF3EC; color: var(--ok); font-weight: 600; font-size: 14.5px; width: calc(100% - 2 * var(--s-pad)); }
.ac-flash.bad { background: #F6E3E3; color: var(--bad); }
.ok-msg { color: var(--ok); font-size: 14px; font-weight: 600; }
.ac-p { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; max-width: 62ch; }
.opt { font-weight: 400; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- ยังไม่เข้าระบบ */
.ac-o { background: var(--soft); }
.ac-og { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.ac-box { padding: clamp(18px, 3vw, 28px); }
.ac-box h2 { --h2: 20px; }
.ac-side { --f-head: var(--f-th); --h2: 22px; --h2-w: 700; padding-top: 14px; }
.ac-side h2 { margin-bottom: 14px; }
.ac-perks { margin: 0 0 18px; font-size: 14.5px; }
.ac-guest { font-size: 14px; color: var(--muted); }
.ac-guest a { color: var(--gold-t); font-weight: 600; display: inline-flex; align-items: center; min-height: 46px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; padding: 4px; gap: 4px; margin-bottom: 20px; background: var(--soft); }
.seg button { min-height: 46px; border: 0; border-radius: 4px; background: none; font-family: var(--f-th); font-size: 15px; color: var(--muted); }
.seg button[aria-selected="true"] { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(0, 0, 0, .5); }
.seg button:active { color: var(--text); }
.ac-form { display: grid; }
.ac-form .err { margin-bottom: 10px; }
.ac-form .ok-msg { margin-bottom: 12px; }
.pw { position: relative; }
.pw input { padding-right: 70px; }
.pw-eye { position: absolute; right: 0; top: 0; height: 100%; min-width: 64px; border: 0; background: none; color: var(--gold-t); font-family: var(--f-th); font-size: 13.5px; font-weight: 600; }
.pw-eye:active { color: var(--text); }
.ac-ok { display: flex; align-items: flex-start; gap: 10px; min-height: 46px; font-size: 14px; margin-bottom: 14px; cursor: pointer; }
.ac-ok input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gold-t); flex: none; }
.ac-ok a { color: var(--gold-t); }
.ac-go { width: 100%; }
.ac-link { justify-self: center; display: inline-flex; align-items: center; min-height: 46px; padding: 0 10px; margin-top: 4px; border: 0; background: none; color: var(--gold-t); font-family: var(--f-th); font-size: 14px; text-decoration: underline; }
.ac-link:active { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .ac-link:hover { color: var(--text); } }

/* ---------------------------------------------------------------- คำสั่งซื้อล่าสุด กล่องดำเส้นสถานะ 5 ขั้น */
.ac-last { background: radial-gradient(ellipse 900px 380px at 50% -60px, rgba(201, 165, 92, .16), transparent 70%), #0B0A08; color: #EEE7D8; padding-block: 28px 32px; }
.ac-lc { border: 1px solid rgba(201, 165, 92, .38); border-radius: 14px; padding: clamp(18px, 3vw, 28px); display: grid; gap: 20px; }
.ac-lh { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.ac-lh h2 { --f-head: var(--f-th); --h2: 20px; --c-head: #F6F0E3; }
.ac-lh p { color: #BDB29B; font-size: 14px; }
.ac-lh b { color: #F6F0E3; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ac-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ac-steps li { display: grid; justify-items: center; gap: 8px; font-size: 13px; color: #8F8778; text-align: center; position: relative; }
.ac-steps li::before { content: ""; position: absolute; top: 7px; left: -50%; right: 50%; height: 2px; background: #3A362F; }
.ac-steps li:first-child::before { display: none; }
.ac-steps li.done::before, .ac-steps li.now::before { background: var(--gold); }
.ac-steps i { position: relative; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #3A362F; background: #0B0A08; }
.ac-steps li.done i { background: var(--gold); border-color: var(--gold); }
.ac-steps li.done { color: #D9D2C2; }
.ac-steps li.now i { border-color: var(--gold-l); box-shadow: 0 0 0 4px rgba(201, 165, 92, .25); background: var(--gold-l); }
.ac-steps li.now { color: var(--gold-l); font-weight: 600; }
.ac-lcut { color: #F2A7A0; font-weight: 600; }
.ac-lb { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; border-top: 1px solid rgba(201, 165, 92, .22); padding-top: 16px; }
.ac-lb img { width: 56px; height: 70px; object-fit: cover; border-radius: 4px; background: #14110C; }
.ac-lb p { font-size: 14.5px; line-height: 1.5; }
.ac-lb span { color: #BDB29B; font-size: 13.5px; }
.ac-lb b { color: #F6F0E3; letter-spacing: .03em; }

/* ---------------------------------------------------------------- แถบลิงก์ในหน้า (ไม่ลอยตาม) */
.ac-jump { border-bottom: 1px solid var(--line); background: #fff; }
.ac-jump .s-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ac-jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 14px; color: var(--text); text-decoration: none; font-size: 14.5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.ac-jump a svg { width: 18px; height: 18px; color: var(--gold-t); }
.ac-jump a:active { background: var(--soft); }
@media (hover: hover) and (pointer: fine) { .ac-jump a:hover { border-bottom-color: var(--gold); } }
.ac-out { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; margin-left: auto; align-self: center; flex: none; white-space: nowrap; border: 0; background: none; color: var(--muted); font-family: var(--f-th); font-size: 14.5px; border-radius: 6px; }
.ac-out svg { width: 19px; height: 19px; }
.ac-out:active { background: #EEE9DE; }
@media (hover: hover) and (pointer: fine) { .ac-out:hover { color: var(--bad); } }

.ac-body { padding-block: 28px 48px; }
.ac-sec { padding-block: 22px 26px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hd-h) + 10px); }
.ac-sec:first-of-type, .ac-note + .ac-sec { border-top: 0; padding-top: 0; }
.ac-sec > h2 { --f-head: var(--f-th); --h2: 22px; --h2-w: 700; margin-bottom: 16px; }
.ac-note { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; background: #FBF6EA; border: 1px solid #EADDBF; border-radius: 6px; padding: 12px 16px; margin-bottom: 22px; font-size: 14.5px; }
.ac-note > svg { width: 22px; height: 22px; color: var(--gold-t); flex: none; }
.ac-note p { flex: 1 1 260px; }
.ac-note b { overflow-wrap: anywhere; }
.ac-stack { display: grid; gap: 14px; margin-bottom: 14px; }
.ac-empty { color: var(--muted); font-size: 14.5px; }
.ac-empty a { color: var(--gold-t); font-weight: 600; display: inline-flex; align-items: center; min-height: 46px; }

/* ---------------------------------------------------------------- คำสั่งซื้อ */
.ao { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; }
.ao-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ao-h h3 { font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ao-h p { font-size: 13.5px; color: var(--muted); }
.ao-shop { margin: 12px 0 0; font-size: 13.5px; font-weight: 600; color: var(--gold-t); }
.ao-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.ao-it { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ao-it img { width: 56px; height: 70px; object-fit: cover; border-radius: 4px; background: #14110C; }
.ao-it b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.ao-it span { display: block; font-size: 13.5px; color: var(--muted); }
.ao-rv { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; margin: 2px 0 -10px; padding: 0; border: 0; background: none; color: var(--gold-t); font-family: var(--f-th); font-size: 14px; font-weight: 600; }
.ao-rv svg { width: 17px; height: 17px; }
.ao-rv:active { color: var(--text); }
.ao-done { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ok); }
.ao-done svg { width: 16px; height: 16px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { .ao-rv:hover { text-decoration: underline; } }
.ao .tr-ship p { display: block; min-height: 0; padding-block: 12px; }
.ao .tr-ship { margin-bottom: 12px; }
.ao-f { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.ao-f p { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ao-f p b { color: var(--text); font-size: 16px; }
.ao-btn { display: flex; flex-wrap: wrap; gap: 8px; }
.ao-log { list-style: none; padding: 12px 0 0; margin: 12px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 6px; font-size: 14px; }
.ao-log li { display: flex; justify-content: space-between; gap: 12px; }
.ao-log time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ao-more { justify-self: start; }

.ac-claim { border: 1px dashed #CFC8B9; border-radius: 6px; background: var(--soft); }
.ac-claim summary { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 16px; cursor: pointer; list-style: none; font-size: 14.5px; }
.ac-claim summary::-webkit-details-marker { display: none; }
.ac-claim summary span { flex: 1; }
.ac-claim summary svg { width: 18px; height: 18px; color: var(--gold-t); flex: none; }
.ac-claim[open] summary > svg:last-child { transform: rotate(180deg); }
.ac-claim-f { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0 12px; align-items: end; padding: 0 16px 6px; }
.ac-claim-f .btn { margin-bottom: 14px; }
.ac-claim-f .err, .ac-claim-f .ok-msg { grid-column: 1 / -1; margin-bottom: 10px; }

/* ---------------------------------------------------------------- รายการโปรด */
.wi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.wi-grid > .ac-empty { grid-column: 1 / -1; }
.wi { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.wi-img { display: block; aspect-ratio: 4 / 5; background: #14110C; }
.wi-img img { width: 100%; height: 100%; object-fit: cover; }
.wi-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wi-b h3 { font-size: 15px; line-height: 1.35; }
.wi-b h3 a { text-decoration: none; }
.wi-b .btn { margin-top: auto; }
.hrt { position: absolute; top: 10px; right: 10px; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(11, 10, 8, .55); color: #F6F0E3; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: transform .2s; }
.hrt svg { width: 21px; height: 21px; }
.hrt[aria-pressed="true"] { color: var(--gold-l); border-color: rgba(227, 200, 142, .6); }
.hrt[aria-pressed="true"] svg { fill: currentColor; }
.hrt:active { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) { .hrt:hover { border-color: var(--gold-l); } }

/* ---------------------------------------------------------------- ที่อยู่ */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ad { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ad.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.ad-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-h h3 { font-size: 15.5px; }
.ad-main { font-size: 12.5px; font-weight: 600; color: var(--gold-t); background: #F3EBD9; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.ad p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.ad-btn { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.ad-del, .ac-del { min-height: 46px; padding: 0 12px; border: 0; background: none; color: var(--bad); font-family: var(--f-th); font-size: 14px; border-radius: 3px; }
.ad-del:active, .ac-del:active { background: #F6E3E3; }
.ad-del.sure { background: #F6E3E3; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .ad-del:hover, .ac-del:hover { text-decoration: underline; } }
.ad-add { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 160px; border: 1px dashed #CFC8B9; border-radius: 6px; background: var(--soft); color: var(--text); font-family: var(--f-th); font-size: 15px; font-weight: 600; }
.ad-add svg { width: 24px; height: 24px; color: var(--gold-t); }
.ad-add:active { background: #EEE9DE; }
@media (hover: hover) and (pointer: fine) { .ad-add:hover { border-color: var(--gold); } }
.ad-form { margin-top: 14px; }

/* ---------------------------------------------------------------- ข้อมูลบัญชี */
.pf { display: grid; gap: 14px; }
.pf-h { font-size: 17px; margin-bottom: 14px; }
.pf-mail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.pf-mail b { overflow-wrap: anywhere; }
.pf-pill { font-size: 12.5px; font-weight: 600; color: var(--warn); background: #F7EBD6; padding: 3px 10px; border-radius: 99px; }
.pf-pill.ok { color: var(--ok); background: #EAF3EC; }
.pf-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pf-sub { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.pf .ok-msg { margin-top: 10px; }
.pf-btn .ok-msg { margin-top: 0; }
.ac-warn { color: var(--bad); font-size: 14px; margin-bottom: 12px; }
.btn-del { background: var(--bad); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-del:hover { filter: brightness(1.08); box-shadow: var(--shadow-btn-h); } }

/* ---------------------------------------------------------------- หน้าต่างให้ดาว */
.rv-dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 10px; padding: 0; color: var(--text); font-family: var(--f-th); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.rv-dlg::backdrop { background: rgba(11, 10, 8, .6); }
.rv-dlg form { padding: 18px 20px 20px; display: grid; }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.rv-top h2 { --f-head: var(--f-th); --h2: 20px; --h2-w: 700; }
.rv-x { width: 46px; height: 46px; margin-right: -10px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.rv-x svg { width: 20px; height: 20px; }
.rv-x:active { background: var(--soft); border-radius: 6px; }
.rv-name { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.stars { display: flex; gap: 4px; }
.stars label { width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer; color: #CFC8B9; border-radius: 6px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars svg { width: 30px; height: 30px; }
.stars label.on { color: var(--gold); }
.stars label.on svg { fill: currentColor; }
.stars label:active { background: var(--soft); }
.stars input:focus-visible + svg { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

/* ---------------------------------------------------------------- จอเล็ก */
@media (max-width: 760px) {
  .ac-og { grid-template-columns: minmax(0, 1fr); }
  .ac-side { order: -1; padding-top: 0; }
  .ac-steps li { font-size: 11.5px; }
  .ac-lb { grid-template-columns: 56px minmax(0, 1fr); }
  .ac-lb .btn { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .ao-it { grid-template-columns: 56px minmax(0, 1fr); }
  .ao-it .price { grid-column: 2; }
  .ac-claim-f { grid-template-columns: minmax(0, 1fr); }
}

/* ป้ายสถานะกับกล่องเลขพัสดุ ชุดเดียวกับหน้าติดตามพัสดุ (cart.css .tr-st .tr-ship) หน้านี้ไม่โหลด cart.css เลยมีของตัวเอง */
.tr-st { background: #F3EBD9; color: var(--gold-t); font-size: 13.5px; font-weight: 700; padding: 5px 12px; border-radius: 99px; white-space: nowrap; }
.tr-st.cut { background: #F6E3E3; color: var(--bad); }
.tr-ship { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--soft); border-radius: 8px; padding: 0 14px; font-size: 14.5px; }
.tr-ship > svg { width: 22px; height: 22px; color: var(--gold-t); margin-top: 12px; }
.tr-ship b { font-variant-numeric: tabular-nums; letter-spacing: .03em; overflow-wrap: anywhere; }
