/* ============================================================
   Rexzy-style Frontend ใหม่ (ธีมม่วง พื้นขาว)
   ใช้กับหน้าหลักหน้าหลังบ้าน (admin) — admin ใช้ธีมเดิมใน includes/meta.php
   ============================================================ */
:root {
    --rx-primary: #a855f7;            /* สีหลักม่วง */
    --rx-secondary: #7c3aed;          /* สีคู่สำหรับปลายไล่เฉดปุ่ม */
    --rx-primary-ink: #7c3aed;        /* ม่วงเข้ม ใช้เป็นตัวอักษร/ขอบเน้น */
    --rx-primary-soft: #f3e8ff;       /* ม่วงอ่อน (ชิป/ปุ่มรอง) */
    --rx-announce: #a13df3;           /* แถบประกาศด้านบน */
    --rx-bg: #ffffff;
    --rx-fg: #0a0a0a;
    --rx-fg-muted: #6c6c6c;
    --rx-border: #e8e8e8;
    --rx-radius: 15px;
    --rx-announce-h: 0px;             /* สูงของแถบประกาศ (ตั้งโดย JS ตามเนื้อหาจริง) */
    --rx-header-h: 3.5rem;            /* ความสูง navbar เดสก์ท็อป */
    --rx-content-w: 1180px;
}
html[data-rx-mode="dark"] {
    --rx-primary: #c084fc;
    --rx-secondary: #a855f7;
    --rx-primary-ink: #d8b4fe;
    --rx-primary-soft: #26162f;
    --rx-announce: #7c34d4;
    --rx-bg: #0a0a0c;
    --rx-fg: #fafafa;
    --rx-fg-muted: #a3a3a3;
    --rx-border: #26262a;
}

/* ---------- Base ---------- */
body {
    background-color: var(--rx-bg);
    color: var(--rx-fg);
    font-family: 'Kanit', sans-serif;
    overflow-x: hidden;
}
html { scroll-behavior: smooth; }
.rx-muted { color: var(--rx-fg-muted); }
.rx-text-primary { color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-text-primary { color: var(--rx-primary); }
.rx-card { background: var(--rx-bg); border: 1px solid var(--rx-border); border-radius: var(--rx-radius); }

/* ---------- Splash ตอนโหลดหน้า ---------- */
#rx-splash { transition: opacity .35s ease; }
#rx-splash.rx-splash-hide { opacity: 0; pointer-events: none; }
@keyframes rxLogoWobble {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.08) rotate(-4deg); }
    50% { transform: scale(.96) rotate(3deg); }
    75% { transform: scale(1.04) rotate(-2deg); }
}
.normal-logo-image { animation: rxLogoWobble 2.3s ease-in-out infinite; }

/* ---------- แถบประกาศด้านบน (วิ่ง) ---------- */
.rx-announce-header { background: var(--rx-announce); overflow: hidden; height: 28px; display: flex; align-items: center; position: fixed; inset-inline: 0; top: 0; z-index: 120; }
html[data-rx-announce="on"] { --rx-announce-h: 28px; }
.rx-announce-track { display: inline-flex; white-space: nowrap; will-change: transform; }
.rx-announce-item { color: #fff; font-weight: 600; font-size: 13px; padding-inline: 3rem; }
@keyframes rxScrollLeft { from { transform: translateX(100vw); } to { transform: translateX(calc(100vw - 50%)); } }
.rx-announce-header .rx-announce-track { animation: rxScrollLeft var(--dur, 24s) linear infinite; }

/* ---------- Header (navbar กล่องลอย) ---------- */
.rx-header { position: fixed; inset-inline: 0; top: var(--rx-announce-h, 0px); z-index: 110; padding: .5rem .5rem; }
@media (min-width: 640px) { .rx-header { padding: .5rem 1rem; } }
.rx-nav-bar { max-width: 80rem; margin-inline: auto; height: 3.5rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-inline: 1rem; background: var(--rx-bg); border: 1px solid var(--rx-border); border-radius: var(--rx-radius); box-shadow: 0 4px 6px -1px rgb(0 0 0 / .08); }
.rx-nav-logo { height: 2rem; width: auto; max-width: 7.5rem; object-fit: contain; flex-shrink: 0; }
.rx-nav-search { flex: 1; max-width: 28rem; margin-inline: auto; }
.rx-nav-search input { width: 100%; height: 2rem; border-radius: 9999px; border: 1px solid var(--rx-border); background: color-mix(in srgb, var(--rx-fg) 4%, transparent); padding-inline: 2.4rem 1rem; font-size: 13px; color: var(--rx-fg); outline: none; }
.rx-nav-search input::placeholder { color: var(--rx-fg-muted); opacity: .75; }
.rx-nav-search input:focus { border-color: var(--rx-primary); }
.rx-nav-search { position: relative; display: none; }
@media (min-width: 768px) { .rx-nav-search { display: block; } }
.rx-nav-search .rx-search-icon { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--rx-fg-muted); font-size: 15px; pointer-events: none; }
.rx-nav-menu { display: none; align-items: center; gap: .15rem; }
@media (min-width: 768px) { .rx-nav-menu { display: flex; } }
.rx-nav-link { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--rx-fg); text-decoration: none; white-space: nowrap; }
.rx-nav-link:hover { background: var(--rx-primary-soft); }
.rx-nav-link.is-active { color: var(--rx-primary-ink); font-weight: 600; }
html[data-rx-mode="dark"] .rx-nav-link.is-active { color: var(--rx-primary); }
.rx-nav-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 10px; color: var(--rx-fg); font-size: 17px; background: none; border: none; cursor: pointer; }
.rx-nav-icon-btn:hover { background: var(--rx-primary-soft); color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-nav-icon-btn:hover { color: var(--rx-primary); }
.rx-nav-divider { width: 1px; height: 1.5rem; background: var(--rx-border); margin-inline: .35rem; }
.rx-nav-login { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 10px; border: 1px solid var(--rx-border); font-size: 13.5px; font-weight: 500; color: var(--rx-fg); text-decoration: none; transition: border-color .2s; white-space: nowrap; }
.rx-nav-login:hover { border-color: var(--rx-primary); color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-nav-login:hover { color: var(--rx-primary); }
.rx-mobile-search-btn { display: inline-flex; }
@media (min-width: 768px) { .rx-mobile-search-btn { display: none; } }

/* dropdown ของ navbar */
.rx-drop { position: relative; }
.rx-drop-panel { position: absolute; top: calc(100% + .7rem); inset-inline-end: 0; min-width: 13.5rem; background: var(--rx-bg); border: 1px solid var(--rx-border); border-radius: var(--rx-radius); box-shadow: 0 10px 30px rgb(0 0 0 / .12); padding: .4rem; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s ease; z-index: 50; }
.rx-drop.is-open .rx-drop-panel { opacity: 1; visibility: visible; transform: none; }
.rx-drop-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--rx-fg); text-decoration: none; }
.rx-drop-item:hover, .rx-drop-item.is-active { background: var(--rx-primary-soft); color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-drop-item:hover { color: var(--rx-primary); }

/* ---------- Mobile bottom nav ---------- */
.rx-mob-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 110; background: var(--rx-bg); border-top: 1px solid var(--rx-border); padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(5, 1fr); }
@media (min-width: 768px) { .rx-mob-nav { display: none; } }
.rx-mob-item { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .3rem 0; font-size: 10px; font-weight: 500; color: var(--rx-fg-muted); text-decoration: none; border-radius: 10px; }
.rx-mob-item i { font-size: 20px; }
.rx-mob-item.is-active { color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-mob-item.is-active { color: var(--rx-primary); }

/* ---------- คอนเทนต์หลัก ---------- */
.rx-main-wrap { display: flex; min-height: 100vh; flex-direction: column; padding-top: calc(5rem + var(--rx-announce-h, 0px)); }
@media (min-width: 640px) { .rx-main-wrap { padding-top: calc(3.5rem + var(--rx-announce-h, 0px)); } }
@media (max-width: 767px) { .rx-main-wrap { padding-bottom: 4rem; } }
.rx-main-wrap > main { padding-inline: 1rem; }
@media (min-width: 768px) { .rx-main-wrap > main { padding-inline: 0; } }
.rx-container { width: 100%; max-width: 800px; margin-inline: auto; }
@media (min-width: 1024px) { .rx-container { max-width: 900px; } }
@media (min-width: 1280px) { .rx-container { max-width: 1000px; } }
@media (min-width: 1536px) { .rx-container { max-width: 1180px; } }
.rx-container.rx-wide { max-width: 1180px; }
@media (min-width: 1280px) { .rx-container.rx-wide { max-width: 1180px; } }
.rx-page { display: flex; flex-direction: column; gap: 1rem; padding-bottom: 1.5rem; padding-top: 1rem; }
@media (min-width: 640px) { .rx-page { padding-top: 2rem; } }

/* ---------- หัวเซกชัน ---------- */
.rx-sec-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.rx-sec-head .rx-sec-left { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.rx-sec-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.15rem; height: 2.15rem; border-radius: 11px; background: linear-gradient(135deg, var(--rx-primary), var(--rx-secondary)); color: #fff; font-size: 17px; flex-shrink: 0; box-shadow: 0 4px 12px color-mix(in srgb, var(--rx-primary) 35%, transparent); }
.rx-sec-title { font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-sec-title { color: var(--rx-primary); }
.rx-sec-sub { font-size: 11.5px; color: var(--rx-fg-muted); line-height: 1.3; }
.rx-sec-more { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .9rem; border-radius: 10px; border: 1px solid var(--rx-border); background: var(--rx-bg); font-size: 12.5px; font-weight: 500; color: var(--rx-fg); text-decoration: none; flex-shrink: 0; transition: border-color .2s, color .2s; }
.rx-sec-more:hover { border-color: var(--rx-primary); color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-sec-more:hover { color: var(--rx-primary); }

/* ---------- Hero carousel ---------- */
.rx-carousel { position: relative; border-radius: 12px; overflow: hidden; }
.rx-carousel-track { display: flex; transition: transform .6s cubic-bezier(.3, .7, .3, 1); }
.rx-carousel-track > * { flex: 0 0 100%; min-width: 0; }
.rx-carousel-slide { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; }
.rx-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2rem; height: 2.9rem; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, #000 35%, transparent); border: 1px solid color-mix(in srgb, #fff 22%, transparent); color: #fff; border-radius: 6px; cursor: pointer; backdrop-filter: blur(4px); transition: background .2s; z-index: 5; font-size: 16px; }
.rx-carousel-arrow:hover { background: rgba(23,23,23,.85); }
.rx-carousel-arrow.is-prev { inset-inline-start: .6rem; }
.rx-carousel-arrow.is-next { inset-inline-end: .6rem; }
.rx-carousel-arrow:disabled { opacity: .35; cursor: default; }
.rx-carousel-dots { position: absolute; inset-inline: 0; bottom: .55rem; display: flex; justify-content: center; gap: .35rem; z-index: 5; }
.rx-carousel-dot { width: .4rem; height: .4rem; border-radius: 9999px; background: rgba(255,255,255,.55); border: none; cursor: pointer; padding: 0; transition: all .2s; }
.rx-carousel-dot.is-on { background: #fff; width: 1rem; }

/* ---------- ชิปประกาศวิ่ง (marquee ลูกบี้) ---------- */
.rx-chipmarquee { border: 1px solid var(--rx-border); border-radius: var(--rx-radius); background: var(--rx-bg); display: flex; align-items: center; overflow: hidden; height: 2.4rem; position: relative; }
.rx-chipmarquee-lead { position: absolute; left: .15rem; top: 50%; transform: translateY(-50%); width: 2.18rem; height: 2.18rem; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--rx-primary-soft); color: var(--rx-primary-ink); font-size: 15px; z-index: 3; }
html[data-rx-mode="dark"] .rx-chipmarquee-lead { color: var(--rx-primary); }
.rx-chipmarquee-fade { position: sticky; inset-inline: 0; }
.rx-chipmarquee-track { display: flex; align-items: center; gap: .5rem; white-space: nowrap; margin-inline-start: 2.6rem; animation: rxMarquee var(--dur, 30s) linear infinite; padding-inline: 1rem; }
@keyframes rxMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.rx-chip-pill { display: inline-flex; align-items: center; border-radius: 9999px; background: var(--rx-primary-soft); color: var(--rx-primary-ink); font-size: 12.5px; font-weight: 500; padding: .3rem .95rem; flex-shrink: 0; }
html[data-rx-mode="dark"] .rx-chip-pill { color: var(--rx-primary); }

/* ---------- การ์ดสถิติ (static widget) ---------- */
.rx-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 1024px) { .rx-stats { grid-template-columns: repeat(4, 1fr); } }
.rx-stat { position: relative; overflow: hidden; padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.rx-stat-label { font-size: 13px; color: var(--rx-fg-muted); font-weight: 500; }
.rx-stat-value { display: flex; align-items: baseline; gap: .3rem; margin-top: .1rem; color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-stat-value { color: var(--rx-primary); }
.rx-stat-num { font-size: 1.85rem; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.rx-stat-unit { font-size: 13px; font-weight: 500; color: var(--rx-fg-muted); }
.rx-stat-ghost { position: absolute; inset-inline-end: -.4rem; top: 50%; transform: translateY(-50%); font-size: 4.6rem; line-height: 1; color: color-mix(in srgb, var(--rx-primary) 26%, transparent); pointer-events: none; }

/* ---------- รายการซื้อและรีวิวล่าสุด ---------- */
.rx-activity-window { overflow: hidden; }
.rx-activity-track { display: flex; width: max-content; animation: rxActivityScroll var(--rx-activity-duration, 60s) linear infinite; }
.rx-activity-group { display: flex; gap: 12px; padding-right: 12px; }
.rx-activity-card { width: 280px; flex: 0 0 280px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.rx-activity-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rx-activity-heading img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.rx-activity-icon { display: grid; place-items: center; width: 48px; height: 48px; background: var(--rx-primary-soft); color: var(--rx-primary-ink); border-radius: 50%; flex-shrink: 0; font-size: 23px; }
.rx-activity-info { min-width: 0; }
.rx-activity-info strong { font-size: 14px; color: var(--rx-primary-ink); }
.rx-activity-info p { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-activity-card time { margin-top: auto; color: var(--rx-fg-muted); font-size: 11px; }
.rx-activity-stars { color: #eab308; font-size: 17px; }
.rx-activity-card.is-review { width: 300px; flex-basis: 300px; min-height: 200px; }
.rx-activity-comment { font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rx-recent-empty { padding: 20px; font-size: 13px; color: var(--rx-fg-muted); }
.rx-activity-window:hover .rx-activity-track, .rx-activity-window:active .rx-activity-track { animation-play-state: paused; }
@keyframes rxActivityScroll { to { transform: translateX(-50%); } }

/* ---------- สินค้าขายดี: แถวเดียว เลื่อนช้า วนต่อเนื่อง ---------- */
.rx-best-slider { --rx-best-visible: 2; overflow: hidden; }
@media (min-width: 768px) { .rx-best-slider { --rx-best-visible: 4; } }
.rx-best-track { display: flex; width: 100%; animation: rxBestScroll var(--rx-best-duration, 56s) linear infinite; }
.rx-best-group { box-sizing: border-box; display: flex; gap: 1rem; padding-right: 1rem; flex: 0 0 calc(var(--rx-best-count) * (100% + 1rem) / var(--rx-best-visible)); }
.rx-best-group > * { flex: 1 1 0; min-width: 0; }
.rx-best-slider:hover .rx-best-track,
.rx-best-slider:focus-within .rx-best-track,
.rx-best-slider:active .rx-best-track { animation-play-state: paused; }
@keyframes rxBestScroll { to { transform: translateX(calc(-1 * var(--rx-best-count) * (100% + 1rem) / var(--rx-best-visible))); } }

/* ---------- การ์ดสินค้า (จัตุรัส) ---------- */
.rx-prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .rx-prod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .rx-prod-grid { grid-template-columns: repeat(4, 1fr); } }
.rx-prod { min-width: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-color .25s; }
.rx-prod:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgb(0 0 0 / .12); border-color: color-mix(in srgb, var(--rx-primary) 45%, var(--rx-border)); }
.rx-prod-media { position: relative; display: block; width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f6f6f8; }
html[data-rx-mode="dark"] .rx-prod-media { background: #16161a; }
.rx-prod-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.rx-prod:hover .rx-prod-media img { transform: scale(1.06); }
.rx-prod-tag { position: absolute; top: .45rem; right: .4rem; z-index: 4; }
.rx-prod-tag.hot { width: 2.6rem; }
.rx-sale-pct { position: absolute; top: .45rem; left: .45rem; z-index: 4; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; padding: .28rem .55rem; border-radius: 999px; box-shadow: 0 2px 6px rgb(0 0 0 / .28); }
.rx-prod-body { padding: .7rem .85rem .85rem; text-align: center; }
.rx-prod-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; color: var(--rx-fg); }
.rx-prod-price { margin-top: .25rem; font-size: 15px; font-weight: 700; color: var(--rx-fg); }
.rx-prod-btn { margin-top: .6rem; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 2.1rem; border-radius: 10px; font-size: 13.5px; font-weight: 600; text-decoration: none; transition: filter .2s, transform .15s; }
.rx-prod-btn.is-buy { background: linear-gradient(90deg, var(--rx-primary), var(--rx-secondary)); color: #fff; }
.rx-prod-btn.is-out { background: #fb7185; color: #fff; }
.rx-prod-btn:hover { filter: brightness(1.05); }
.rx-prod-btn:active { transform: scale(.97); }
.rx-prod-stock { margin-top: .5rem; font-size: 11.5px; color: var(--rx-fg-muted); display: inline-flex; align-items: center; gap: .3rem; }

/* HOT ป้ายไฟล์รูปจริงที่โปรเจกต์มี */
.rx-hot-badge { width: 2.55rem; height: auto; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .25)); }

/* ---------- การ์ดหมวดหมู่ (การ์ดกว้าง 1640×500) ---------- */
.rx-cat-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .rx-cat-grid { grid-template-columns: repeat(2, 1fr); } }
.rx-cat { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; text-decoration: none; }
.rx-cat:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgb(0 0 0 / .12); }
.rx-cat-media { display: block; width: 100%; aspect-ratio: 164/50; overflow: hidden; background: #f6f6f8; }
html[data-rx-mode="dark"] .rx-cat-media { background: #16161a; }
.rx-cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.rx-cat:hover .rx-cat-media img { transform: scale(1.05); }
.rx-cat-body { padding: .55rem .9rem .8rem; display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.rx-cat-name { font-size: 15px; font-weight: 700; color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-cat-name { color: var(--rx-primary); }
.rx-cat-count { font-size: 11.5px; color: var(--rx-fg-muted); display: flex; gap: .55rem; }
.rx-cat-price { font-size: 12.5px; font-weight: 600; color: var(--rx-primary-ink); white-space: nowrap; }
html[data-rx-mode="dark"] .rx-cat-price { color: var(--rx-primary); }

/* ---------- หมวดหมู่บล็อกกว้าง 2x2 (aspect 2/1) ---------- */
.rx-cat2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding-inline: .25rem; }
@media (min-width: 640px) { .rx-cat2-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rx-cat2 { min-width: 0; padding: .25rem; overflow: hidden; text-decoration: none; display: block; transition: transform .25s, box-shadow .25s; }
.rx-cat2:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgb(0 0 0 / .12); }
@media (min-width: 1024px) { .rx-cat2 { padding: .5rem; } }
.rx-cat2 img { display: block; border-radius: 12px; width: 100%; aspect-ratio: 2/1; object-fit: cover; transition: transform .5s; }
.rx-cat2:hover img { transform: scale(1.05); }

/* ---------- การ์ดบริการเติมเงิน (ภาพใบตั้ง) ---------- */
.rx-svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .rx-svc-grid { grid-template-columns: repeat(4, 1fr); } }
.rx-svc { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.rx-svc:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgb(0 0 0 / .12); }
.rx-svc-media { display: block; width: 100%; aspect-ratio: 31/50; overflow: hidden; background: #f6f6f8; position: relative; }
html[data-rx-mode="dark"] .rx-svc-media { background: #16161a; }
.rx-svc-media > * { position: absolute; inset: 1rem 1.6rem; border-radius: 12px; box-shadow: 0 6px 18px rgb(0 0 0 / .1); overflow: hidden; }
.rx-svc-media .rx-svc-inner { width: 100%; height: 100%; object-fit: cover; display: block; }
.rx-svc-body { padding: .75rem .75rem .85rem; text-align: center; }
.rx-svc-name { font-size: 13.5px; font-weight: 600; color: var(--rx-fg); line-height: 1.3; }
.rx-svc-price { margin-top: .3rem; font-size: 13px; font-weight: 700; color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-svc-price { color: var(--rx-primary); }
.rx-svc-btn { margin-top: .55rem; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 2.05rem; border-radius: 10px; background: var(--rx-primary-soft); color: var(--rx-primary-ink); font-size: 13px; font-weight: 600; text-decoration: none; transition: filter .2s; }
html[data-rx-mode="dark"] .rx-svc-btn { color: var(--rx-primary); }
.rx-svc-btn:hover { filter: brightness(.97); }
html[data-rx-mode="light"] .rx-svc-btn:hover, html:not([data-rx-mode]) .rx-svc-btn:hover { background: color-mix(in srgb, var(--rx-primary-soft) 70%, var(--rx-primary) 16%); }
.rx-svc-sold { margin-top: .45rem; font-size: 11px; color: var(--rx-fg-muted); display: inline-flex; align-items: center; gap: .3rem; }

/* ---------- ข่าวสาร/ประกาศการ์ด ---------- */
.rx-news-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .rx-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .rx-news-grid { grid-template-columns: repeat(3, 1fr); } }
.rx-news { overflow: hidden; padding: .55rem; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; text-decoration: none; color: inherit; }
.rx-news:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgb(0 0 0 / .12); }
.rx-news-media { display: block; width: 100%; aspect-ratio: 7/4; border-radius: 10px; overflow: hidden; position: relative; }
.rx-news-media img { width: 100%; height: 100%; object-fit: cover; }
.rx-news-title { margin-top: .6rem; padding-inline: .35rem; font-size: 15px; font-weight: 600; color: var(--rx-primary-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-rx-mode="dark"] .rx-news-title { color: var(--rx-primary); }
.rx-news-text { margin-top: .25rem; padding-inline: .35rem; font-size: 12.5px; color: var(--rx-fg-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rx-news-meta { margin-top: .55rem; padding-inline: .35rem; padding-bottom: .15rem; display: flex; flex-direction: column; gap: .3rem; }
.rx-news-meta > span { display: inline-flex; align-items: center; gap: .45rem; font-size: 12px; color: var(--rx-fg-muted); }
.rx-news-meta i { font-size: 13px; color: var(--rx-fg-muted); }

/* ---------- FAQ ---------- */
.rx-faq-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .rx-faq-grid { grid-template-columns: repeat(2, 1fr); } }
.rx-faq { overflow: hidden; }
.rx-faq-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem .9rem; background: none; border: none; cursor: pointer; text-align: start; font-family: inherit; }
.rx-faq-q { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.rx-faq-qicon { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 11px; background: var(--rx-primary); color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; box-shadow: 0 4px 10px color-mix(in srgb, var(--rx-primary) 32%, transparent); }
.rx-faq-title { font-size: 14px; font-weight: 600; color: var(--rx-primary-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-rx-mode="dark"] .rx-faq-title { color: var(--rx-primary); }
.rx-faq-chev { color: var(--rx-fg-muted); transition: transform .25s; flex-shrink: 0; }
.rx-faq.is-open .rx-faq-chev { transform: rotate(180deg); }
.rx-faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.rx-faq.is-open .rx-faq-body { grid-template-rows: 1fr; }
.rx-faq-body > div { overflow: hidden; }
.rx-faq-text { padding: 0 .9rem .9rem; font-size: 13px; color: var(--rx-fg-muted); line-height: 1.6; }

/* ---------- Footer ---------- */
.rx-footer { position: relative; z-index: 10; margin-top: 2.5rem; flex-shrink: 0; border-top: 1px solid var(--rx-border); background: var(--rx-bg); padding-block: .9rem; }
@media (min-width: 640px) { .rx-footer { margin-top: 3.5rem; } }
.rx-footer-inner { margin-inline: auto; max-width: 76rem; padding-inline: 1rem; display: flex; flex-direction: column; gap: .65rem; }
.rx-footer-rows { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
@media (min-width: 768px) { .rx-footer-rows { flex-direction: row; align-items: center; justify-content: space-between; column-gap: .75rem; } }
.rx-footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; row-gap: .25rem; width: 100%; }
@media (min-width: 768px) { .rx-footer-links { width: auto; justify-content: flex-start; } }
.rx-footer-link { font-size: 11px; line-height: 1.2; color: var(--rx-fg-muted); text-decoration: none; }
@media (min-width: 640px) { .rx-footer-link { font-size: 12px; } }
.rx-footer-link:hover { color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-footer-link:hover { color: var(--rx-primary); }
.rx-footer-dot { margin-inline: .65rem; width: 4px; height: 4px; border-radius: 9999px; background: var(--rx-fg-muted); opacity: .45; flex-shrink: 0; }
.rx-footer-hr { height: 1px; width: 100%; background: var(--rx-border); border: none; margin: 0; }
.rx-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: .75rem; row-gap: .25rem; font-size: 11px; line-height: 1.2; text-align: center; }
@media (min-width: 640px) { .rx-footer-bottom { font-size: 12px; } }
.rx-footer-made { display: inline-flex; align-items: center; color: #8000ff; font-weight: 500; gap: .15rem; }
.rx-footer-report { display: inline-flex; align-items: center; gap: .25rem; color: #39b3fe; text-decoration: none; border: none; background: none; font: inherit; cursor: pointer; padding: 0; }
.rx-footer-report:hover { text-decoration: underline; }

/* ---------- ปุ่มลอยขวา ---------- */
.rx-float-col { position: fixed; inset-inline-end: .6rem; bottom: 4.6rem; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.rx-float-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 9999px; border: 1px solid color-mix(in srgb, var(--rx-primary) 45%, var(--rx-border)); background: var(--rx-bg); color: var(--rx-primary-ink); font-size: 18px; cursor: pointer; transition: all .2s; text-decoration: none; box-shadow: 0 4px 14px rgb(0 0 0 / .1); }
html[data-rx-mode="dark"] .rx-float-btn { color: var(--rx-primary); }
.rx-float-btn:hover { background: var(--rx-primary-soft); transform: translateY(-2px); }

/* พาแนลรายการเพลง (ปุ่มอัพเปย์) */
.rx-music-panel { position: fixed; inset-inline-end: 3.3rem; bottom: 5rem; z-index: 96; display: none; width: 15rem; }
.rx-music-panel.is-open { display: block; }
.rx-song { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--rx-fg); border: none; background: none; font-family: inherit; text-align: start; }
.rx-song:hover { background: var(--rx-primary-soft); }
.rx-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; flex-shrink: 0; }
.rx-eq span { width: 3px; background: var(--rx-primary); border-radius: 2px; height: 7px; animation: rxEq 1.05s ease-in-out infinite; transform-origin: bottom; }
.rx-eq span:nth-child(2) { animation-delay: .18s; height: 12px; }
.rx-eq span:nth-child(3) { animation-delay: .36s; height: 9px; }
@keyframes rxEq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.rx-song:not(.is-on) .rx-eq span { animation-play-state: paused; transform: scaleY(.45); }
.rx-song.is-on { background: var(--rx-primary-soft); color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-song.is-on { color: var(--rx-primary); }
.rx-song-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-music-play { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--rx-primary); color: #fff; border: none; cursor: pointer; font-size: 15px; flex-shrink: 0; }
.rx-music-play:hover { filter: brightness(1.08); }
.rx-music-volume { flex: 1; min-width: 0; accent-color: var(--rx-primary); cursor: pointer; }
.rx-float-btn.is-on { animation: rxBtnPulse 1.4s ease-in-out infinite; }
@keyframes rxBtnPulse { 0%, 100% { box-shadow: 0 0 0 0 var(--rx-primary-soft); } 50% { box-shadow: 0 0 0 6px var(--rx-primary-soft); } }

/* ---------- ประกาศลอยซ้าย/ขวา ---------- */
.rx-side { position: fixed; top: 55%; transform: translateY(-50%); z-index: 95; display: none; flex-direction: column; align-items: center; }
@media (min-width: 1280px) { .rx-side { display: flex; } }
.rx-side.is-left { left: .4rem; }
.rx-side.is-right { right: .4rem; }
.rx-side img { height: 21rem; width: auto; border-radius: 10px; display: block; }
.rx-side .rx-side-close { margin-top: .35rem; width: 4.5rem; height: 1.35rem; border-radius: 7px; background: #fe5d5d; color: #fff; border: 1px solid #fff; font-size: 12px; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / .2); font-weight: 700; }

/* ---------- ป๊อปอัปต้อนรับ ---------- */
.rx-welcome-overlay { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: color-mix(in srgb, #0f0518 55%, transparent); backdrop-filter: blur(5px); }
.rx-welcome-overlay.is-open { display: flex; }
.rx-welcome-card { width: min(500px, 88vw); aspect-ratio: 1/1; border-radius: 15px; overflow: hidden; box-shadow: 0 30px 80px rgb(0 0 0 / .45); display: flex; }
.rx-welcome-card img { width: 100%; height: 100%; object-fit: cover; }
.rx-welcome-foot { position: fixed; inset-inline: 0; width: min(500px, 88vw); margin-inline: auto; /* ชิดใต้ขอบล่างของรูปป๊อปอัป: การ์ดสูง min(500px,88vw) กึ่งกลางจอ → ขอบล่างอยู่ที่ (100vh - H)/2 จากล่าง */ bottom: max(calc((100vh - min(500px, 88vw)) / 2 - 40px), 12px); display: flex; align-items: center; justify-content: space-between; gap: 1rem; z-index: 201; }
.rx-welcome-check { display: inline-flex; align-items: center; gap: .5rem; background: #101014; color: #fff; font-size: 12.5px; font-weight: 500; padding: .5rem .8rem; border-radius: 8px; cursor: pointer; }
.rx-welcome-check input { width: .95rem; height: .95rem; accent-color: var(--rx-announce); cursor: pointer; }
.rx-welcome-close { background: #101014; color: #fff; font-size: 13px; font-weight: 600; padding: .5rem 1.35rem; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; }
.rx-welcome-close:hover { background: #26262c; }
/* กัน scroll เมื่อแสดงป๊อป/ประกาศ */
body.rx-popup-open { overflow: hidden !important; }
body.rx-popup-open .rx-announce-track, body.rx-popup-open .rx-chipmarquee-track { animation-play-state: paused !important; }

/* ---------- การ์ดทั่วไปอื่น ---------- */
.rx-panel { background: var(--rx-bg); border: 1px solid var(--rx-border); border-radius: var(--rx-radius); }
.rx-empty { padding: 2.2rem 1rem; text-align: center; color: var(--rx-fg-muted); }
.rx-empty i { font-size: 2.6rem; color: color-mix(in srgb, var(--rx-primary) 45%, transparent); }

/* ---------- หน้ารายละเอียดสินค้า / แผงข้อความ ---------- */
.rx-detail { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 1024px) { .rx-detail { grid-template-columns: 1.05fr .95fr; align-items: start; } }
.rx-detail-media { position: relative; overflow: hidden; border-radius: var(--rx-radius); border: 1px solid var(--rx-border); background: #f6f6f8; aspect-ratio: 1/1; }
html[data-rx-mode="dark"] .rx-detail-media { background: #16161a; }
.rx-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.rx-detail-title { font-size: 1.35rem; font-weight: 700; line-height: 1.35; }
.rx-detail-price { display: flex; align-items: baseline; gap: .6rem; margin-top: .4rem; }
.rx-detail-price .now { font-size: 1.7rem; font-weight: 800; color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-detail-price .now { color: var(--rx-primary); }
.rx-detail-price .old { font-size: 15px; color: var(--rx-fg-muted); text-decoration: line-through; }
.rx-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .8rem; border-radius: 9999px; font-size: 12px; font-weight: 600; }
.rx-chip.is-soft { background: var(--rx-primary-soft); color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-chip.is-soft { color: var(--rx-primary); }
.rx-chip.is-gray { background: color-mix(in srgb, var(--rx-fg) 6%, transparent); color: var(--rx-fg-muted); }
.rx-desc { line-height: 1.75; font-size: 13.5px; color: color-mix(in srgb, var(--rx-fg) 78%, var(--rx-fg-muted)); }
.rx-desc p { margin-bottom: .6rem; }

/* ---------- ตาราง/แถวรายการ (ประวัติ สถานะ อันดับ) ---------- */
.rx-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem .95rem; border-bottom: 1px solid var(--rx-border); }
.rx-row:last-child { border-bottom: 0; }
.rx-row-title { font-size: 13.5px; font-weight: 600; color: var(--rx-fg); }
.rx-row-sub { font-size: 11.5px; color: var(--rx-fg-muted); margin-top: .1rem; }
.rx-row-side { text-align: end; white-space: nowrap; }
.rx-amount { font-size: 13.5px; font-weight: 700; color: var(--rx-primary-ink); }
html[data-rx-mode="dark"] .rx-amount { color: var(--rx-primary); }
.rx-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: 11px; font-weight: 600; padding: .22rem .6rem; border-radius: 9999px; }
.rx-badge.ok { background: #d9f7e8; color: #0f9d58; }
.rx-badge.wait { background: #fff4d6; color: #b8860b; }
.rx-badge.fail { background: #ffe3e3; color: #e03131; }

/* ---------- โปรไฟล์ ---------- */
.rx-profile-head { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.25rem .9rem; }
.rx-avatar { width: 4.2rem; height: 4.2rem; border-radius: 9999px; background: var(--rx-primary-soft); color: var(--rx-primary-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 2.1rem; font-weight: 700; border: 2px solid color-mix(in srgb, var(--rx-primary) 40%, transparent); flex-shrink: 0; }
html[data-rx-mode="dark"] .rx-avatar { color: var(--rx-primary); }

/* ---------- ฟอร์มเติมเงิน/ตัวเลือก ---------- */
.rx-opt { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem .95rem; border: 1px solid var(--rx-border); border-radius: 12px; cursor: pointer; transition: border-color .2s; }
.rx-opt:hover { border-color: color-mix(in srgb, var(--rx-primary) 55%, var(--rx-border)); }
.rx-opt-title { font-size: 13.5px; font-weight: 600; }
.rx-opt-sub { font-size: 11.5px; color: var(--rx-fg-muted); }

/* อัตรากำไร: แถบสถานะร้าน */
.rx-status-dot { width: .65rem; height: .65rem; border-radius: 9999px; background: #22c55e; box-shadow: 0 0 0 3px #22c55e33; display: inline-block; }
.rx-status-dot.warn { background: #f59e0b; box-shadow: 0 0 0 3px #f59e0b33; }
.rx-status-dot.down { background: #ef4444; box-shadow: 0 0 0 3px #ef444433; }

/* ---------- ทั่วไป ---------- */
.rx-section-pad { padding: 1.1rem 1.15rem; }
.rx-wide { max-width: 1180px !important; }

/* ---------- ฟอร์มมูลพื้นฐาน (ธีมม่วง) ---------- */
.rx-input, .rx-select, .rx-textarea { width: 100%; background: var(--rx-bg); border: 1px solid var(--rx-border); border-radius: 12px; padding: .7rem .95rem; font-size: 14px; font-family: inherit; color: var(--rx-fg); outline: none; transition: border-color .2s; }
.rx-input:focus, .rx-select:focus, .rx-textarea:focus { border-color: var(--rx-primary); }
.rx-label { display: block; font-size: 13px; font-weight: 500; color: var(--rx-fg); margin-bottom: .35rem; }
.rx-btn-main { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.4rem; border-radius: 12px; background: linear-gradient(90deg, var(--rx-primary), var(--rx-secondary)); color: #fff; font-size: 14px; font-weight: 600; border: none; cursor: pointer; font-family: inherit; transition: filter .2s, transform .15s; text-decoration: none; }
.rx-btn-main:hover { filter: brightness(1.08); }
.rx-btn-main:active { transform: scale(.98); }
.rx-btn-main:disabled { opacity: .6; cursor: not-allowed; }
.rx-btn-soft { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.4rem; border-radius: 12px; background: var(--rx-primary-soft); color: var(--rx-primary-ink); font-size: 14px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--rx-primary) 25%, transparent); cursor: pointer; font-family: inherit; text-decoration: none; }
html[data-rx-mode="dark"] .rx-btn-soft { color: var(--rx-primary); }

/* แท็บย่อหน้า */
.rx-tabs { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .15rem; scrollbar-width: none; }
.rx-tabs::-webkit-scrollbar { display: none; }
.rx-tab { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; padding: .5rem 1.05rem; border-radius: 9999px; border: 1px solid var(--rx-border); background: var(--rx-bg); color: var(--rx-fg-muted); font-size: 13px; font-weight: 500; text-decoration: none; transition: all .2s; flex-shrink: 0; }
.rx-tab:hover { border-color: var(--rx-primary); color: var(--rx-primary-ink); }
.rx-tab.is-active { background: linear-gradient(90deg, var(--rx-primary), var(--rx-secondary)); border-color: transparent; color: #fff; }
html[data-rx-mode="dark"] .rx-tab.hover-color, html[data-rx-mode="dark"] .rx-tab:hover { color: var(--rx-primary); }
/* ============================================================
   LAYOUT v2 — โครงสร้างใหม่เฉพาะหน้า: ชุดไอดี / ร้านรถ / บริการเสริม
   (สไตล์เดิม แต่จัดวางแบบ "แถวตั๋ว / ลิสต์รถ / ตารางราคา" ไม่ซ้ำหน้าอื่น)
   ============================================================ */

/* ---------- 1) แถวตั๋ว (ticket row) — ชุดไอดี ---------- */
.rx-tickets { display: flex; flex-direction: column; gap: .85rem; }
.rx-ticket { display: flex; align-items: stretch; overflow: hidden; transition: transform .22s, box-shadow .22s, border-color .22s; text-decoration: none; color: inherit; }
.rx-ticket:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgb(0 0 0 / .12); border-color: color-mix(in srgb, var(--rx-primary) 45%, var(--rx-border)); }
.rx-ticket-media { position: relative; flex: 0 0 9.5rem; min-height: 9.5rem; overflow: hidden; background: #f6f6f8; }
html[data-rx-mode="dark"] .rx-ticket-media { background: #16161a; }
.rx-ticket-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.rx-ticket:hover .rx-ticket-media img { transform: scale(1.07); }
.rx-ticket-media .rx-prod-tag { position: absolute; top: .4rem; right: .4rem; z-index: 4; }
.rx-ticket-body { position: relative; flex: 1 1 auto; min-width: 0; padding: .8rem 1.05rem; display: flex; flex-direction: column; justify-content: center; gap: .3rem; }
.rx-ticket-body::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-left: 2px dashed color-mix(in srgb, var(--rx-primary) 35%, var(--rx-border)); }
.rx-ticket-name { font-size: 15px; font-weight: 700; color: var(--rx-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-ticket-sub { font-size: 11.5px; color: var(--rx-fg-muted); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.rx-ticket-side { flex: 0 0 auto; display: flex; align-items: center; gap: 1rem; padding-inline: 1.05rem; border-inline-start: 1px dashed color-mix(in srgb, var(--rx-primary) 35%, var(--rx-border)); background: color-mix(in srgb, var(--rx-primary-soft) 55%, transparent); }
.rx-ticket-price { text-align: center; }
.rx-ticket-price .num { font-size: 1.25rem; font-weight: 800; color: var(--rx-primary-ink); line-height: 1.1; white-space: nowrap; }
html[data-rx-mode="dark"] .rx-ticket-price .num { color: var(--rx-primary); }
.rx-ticket-price .was { font-size: 11px; color: var(--rx-fg-muted); text-decoration: line-through; white-space: nowrap; }
@media (max-width: 767px) {
    /* เมนูการ์ดกะทัดรัด (แบบที่นิยม): thumb ซ้าย + ชื่อกลาง + ราคา/ปุ่มขวา — กดง่ายสะดวก */
    .rx-ticket { flex-wrap: nowrap; align-items: center; }
    .rx-ticket-media { flex: 0 0 6.4rem; min-height: 0; aspect-ratio: 1/1; border-radius: 11px; }
    .rx-ticket-media img { position: absolute; inset: 0; }
    .rx-ticket-media .rx-prod-tag { top: .3rem; right: .3rem; }
    .rx-ticket-body { padding: .55rem .7rem; gap: .18rem; justify-content: center; }
    .rx-ticket-body::before { display: none; }
    .rx-ticket-name { white-space: normal; font-size: 13.5px; }
    .rx-ticket-side { width: auto; border-inline-start: 1px dashed color-mix(in srgb, var(--rx-primary) 35%, var(--rx-border)); border-top: 0; flex-direction: column; gap: .3rem; padding-inline: .7rem; }
    .rx-ticket-price .num { font-size: 1.02rem; }
}

/* ---------- 2) ลิสต์รถโชว์รูม (showroom row) — ร้านรถ ---------- */
.rx-garage { display: flex; flex-direction: column; gap: .85rem; }
.rx-car { display: flex; align-items: center; gap: 1rem; padding: .75rem; transition: transform .22s, box-shadow .22s, border-color .22s; }
.rx-car:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgb(0 0 0 / .12); border-color: color-mix(in srgb, var(--rx-primary) 45%, var(--rx-border)); }
.rx-car-media { position: relative; flex: 0 0 11.5rem; aspect-ratio: 4/3; border-radius: 11px; overflow: hidden; background: #f6f6f8; flex-shrink: 0; }
html[data-rx-mode="dark"] .rx-car-media { background: #16161a; }
.rx-car-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.rx-car:hover .rx-car-media img { transform: scale(1.06); }
.rx-car-media .rx-car-class { position: absolute; top: .45rem; left: .45rem; z-index: 4; }
.rx-car-media .rx-car-tag { position: absolute; top: .45rem; right: .45rem; z-index: 4; }
.rx-car-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .28rem; }
.rx-car-name { font-size: 15.5px; font-weight: 700; color: var(--rx-fg); }
.rx-car-desc { font-size: 12px; color: var(--rx-fg-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rx-car-chips { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .15rem; }
.rx-car-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; padding-inline-end: .5rem; }
.rx-car-price { font-size: 1.2rem; font-weight: 800; color: var(--rx-primary-ink); white-space: nowrap; }
html[data-rx-mode="dark"] .rx-car-price { color: var(--rx-primary); }
.rx-car-side .rx-prod-btn { width: auto; padding-inline: 1.1rem; }
@media (max-width: 767px) {
    /* เมนูการ์ดกะทัดรัด (แบบที่นิยม): thumb สี่เหลี่ยมซ้าย + ชื่อกลาง + ราคาบน/ปุ่มล่าง ฝั่งขวา */
    .rx-car { flex-wrap: nowrap; gap: .7rem; }
    .rx-car-media { flex: 0 0 6.4rem; aspect-ratio: 1/1; }
    .rx-car-info { flex: 1 1 auto; gap: .16rem; }
    .rx-car-chips { display: none; } /* ชิปตกแต่งยาว — ยอมละไว้บนมือถือ กันแถบราคา/ปุ่มหลุดจอ */
    .rx-car-name { font-size: 13.5px; }
    .rx-car-desc { -webkit-line-clamp: 2; font-size: 11px; }
    .rx-car-side { width: auto; flex-direction: column; align-items: flex-end; gap: .3rem; padding-inline-end: 0; }
    .rx-car-price { font-size: 1rem; }
    .rx-car-side .rx-prod-btn { padding-block: .42rem; padding-inline: .9rem; font-size: 12px; }
}

/* ---------- 3) แถบตารางราคา (tier strip) — ต่ออายุปลดแบน ---------- */
.rx-tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
@media (min-width: 900px) { .rx-tiers { grid-template-columns: repeat(5, 1fr); } }
.rx-tier { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.2rem .9rem 1.15rem; gap: .45rem; overflow: hidden; transition: transform .22s, box-shadow .22s, border-color .22s; }
.rx-tier:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgb(0 0 0 / .13); border-color: color-mix(in srgb, var(--rx-primary) 50%, var(--rx-border)); }
.rx-tier::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3.5px; background: linear-gradient(90deg, var(--rx-primary), var(--rx-secondary)); opacity: .85; }
.rx-tier-days { display: inline-flex; align-items: center; justify-content: center; width: 3.1rem; height: 3.1rem; border-radius: 9999px; background: var(--rx-primary-soft); color: var(--rx-primary-ink); font-size: 1.05rem; font-weight: 800; border: 2px solid color-mix(in srgb, var(--rx-primary) 35%, transparent); }
html[data-rx-mode="dark"] .rx-tier-days { color: var(--rx-primary); }
.rx-tier-days small { font-size: .6rem; font-weight: 600; margin-inline-start: .12rem; }
.rx-tier-name { font-size: 13.5px; font-weight: 700; color: var(--rx-fg); }
.rx-tier-price { font-size: 1.45rem; font-weight: 800; color: var(--rx-primary-ink); line-height: 1; }
html[data-rx-mode="dark"] .rx-tier-price { color: var(--rx-primary); }
.rx-tier-note { font-size: 10.5px; color: var(--rx-fg-muted); min-height: 1.9em; line-height: 1.35; }
.rx-tier .rx-btn-main { width: 100%; padding-block: .55rem; font-size: 13px; }
.rx-tier.is-pop::after { content: "ยอดนิยม"; position: absolute; top: .55rem; inset-inline-end: -.65rem; transform: rotate(35deg); background: linear-gradient(90deg, #f59e0b, #f97316); color: #fff; font-size: 9.5px; font-weight: 700; padding: .18rem 2.2rem; letter-spacing: .02em; }

/* ---------- 4) หน้ารายละเอียดแบบแบนเนอร์บน (banner-top detail) — ชุดไอดี ---------- */
.rx-dtop { position: relative; border-radius: var(--rx-radius); overflow: hidden; aspect-ratio: 164/50; background: #f6f6f8; }
html[data-rx-mode="dark"] .rx-dtop { background: #16161a; }
.rx-dtop img { width: 100%; height: 100%; object-fit: cover; }
.rx-dtop .rx-prod-tag { position: absolute; top: .6rem; right: .6rem; z-index: 4; }
.rx-detail-v2 { display: grid; grid-template-columns: 1fr; gap: 1.15rem; }
@media (min-width: 1024px) { .rx-detail-v2 { grid-template-columns: .92fr 1.08fr; align-items: start; } }
.rx-sticky { position: static; }
@media (min-width: 1024px) { .rx-sticky { position: sticky; top: calc(var(--rx-header-h) + var(--rx-announce-h, 0px) + 1rem); } }

/* ---------- 5) สองคอลัมน์หมวดซ้าย (sidebar + ro
สองคอลัมน์หมวดซ้าย (sidebar + rows) — จูนรถ ---------- */
.rx-split-nav { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; padding: .3rem; }
@media (min-width: 900px) { .rx-split-nav { flex-direction: column; overflow: visible; } }
.rx-split-nav::-webkit-scrollbar { display: none; }
.rx-ticket-media > *, .rx-dtop > * { width: 100%; height: 100%; object-fit: cover; }
.rx-dtop > span.rx-dtop-chip { width: auto; height: auto; }

/* ---------- 6) หน้าเติมเงิน: การ์ดเลือกช่องทาง (v3 — เห็นทุกช่องทางพร้อมรูป) ---------- */
.rx-tchannels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 820px) { .rx-tchannels { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .rx-tchannels { grid-template-columns: 1fr; } }
.rx-tch { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.1rem 1.1rem 1.25rem; border-radius: 15px; background: var(--rx-bg); border: 1.5px solid var(--rx-border); box-shadow: var(--rx-shadow, 0 10px 30px rgb(20 10 40 / .08)); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; font-family: inherit; cursor: pointer; color: inherit; width: 100%; }
.rx-tch:hover { transform: translateY(-4px); border-color: var(--rx-primary, #a855f7); box-shadow: var(--rx-shadow-h, 0 16px 40px rgb(20 10 40 / .14)); }
.rx-tch-media { width: 100%; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; margin-bottom: .8rem; }
.rx-tch-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rx-tch-name { font-weight: 700; color: var(--rx-fg, #17111f); font-size: 14.5px; line-height: 1.2; }
.rx-tch-sub { font-size: 11.5px; color: var(--rx-fg-muted,#8a8194); margin-top: .25rem; line-height: 1.4; }
.rx-tch-btn { margin-top: .8rem; display: inline-flex; align-items: center; gap: .4rem; background: var(--rx-primary-soft, #f2e9ff); color: var(--rx-primary-ink, #8b2fe8); font-size: 12.5px; font-weight: 700; padding: .45rem 1.1rem; border-radius: 9px; }
.rx-tch:hover .rx-tch-btn { background: var(--rx-primary, #a855f7); color: #fff; }
.rx-tsec { scroll-margin-top: 96px; } /* ให้กระโดดไปฟอร์มแล้วไม่โดนแถบบนบัง */
