/* ==========================================================================
   DFN — ธีมหน้าตาเว็บ (body.theme-lumen | theme-midnight | theme-gold | theme-pastel)
   สีทั้งหมดมาจาก "จัดการสี" (--c-*) ไฟล์นี้กำหนดรูปทรง ระยะ และลูกเล่นของแต่ละธีม
   ========================================================================== */

:root { --card-r: 16px; --hero-r: 20px; --media-r: 14px; --btn-r: 12px; --input-r: 12px; --nav-r: 18px; }

body, h1, h2, h3, h4, h5, h6, p, a, span, div, button, input, select, textarea, label, td, th, li, small, strong, b, .btn, .nav-link { font-family: var(--theme-font, 'Kanit', sans-serif); }
code, pre, .aw-key { font-family: ui-monospace, Menlo, Consolas, monospace !important; }
body:not(.use-bg) { background-image: none !important; }
body { -webkit-font-smoothing: antialiased; }
.btn { border-radius: var(--btn-r) !important; }
.form-control, .form-select { border-radius: var(--input-r) !important; }
:focus-visible { outline: 2px solid var(--c-main); outline-offset: 2px; }

/* ============================== แถบเมนู ============================== */
.dn-wrap { position: sticky; top: 0; z-index: 1030; padding: 12px 16px 0; margin-bottom: 20px; }
.dn { max-width: 1296px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px;
  border-radius: var(--nav-r); border: 1px solid var(--c-card_border); box-shadow: 0 8px 28px -18px rgba(20, 16, 60, .35);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); }
.dn-brand { flex: 0 0 auto; display: block; }
.dn-brand img { height: var(--logo-h, 40px); max-width: 220px; width: auto; display: block; object-fit: contain; }
.dn-search { position: relative; flex: 0 1 260px; margin-left: 10px; }
.dn-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: .85rem; color: var(--c-muted) !important; pointer-events: none; }
.dn-search input { width: 100%; height: 38px; padding: 0 14px 0 36px; border-radius: 999px; border: 1px solid var(--c-input_border);
  background: var(--c-input_bg); color: var(--c-input_text); font-size: .9rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.dn-search input::placeholder { color: var(--c-placeholder); }
.dn-search input:focus { border-color: var(--c-main); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-main) 18%, transparent); }
.dn-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.dn-link { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 0; background: none; border-radius: 10px;
  font-size: .93rem; font-weight: 500; white-space: nowrap; text-decoration: none; color: var(--c-nav_text) !important; transition: background .15s, color .15s; }
.dn-link i { font-size: .92em; opacity: .7; color: inherit !important; }
.dn-link:hover { background: color-mix(in srgb, var(--c-main) 9%, transparent); color: var(--c-main) !important; }
.dn-link.is-active { color: var(--c-main) !important; font-weight: 600; }
.dn-link.is-active i { opacity: 1; }
.dn-link .dn-caret { font-size: .6em; opacity: .55; margin-left: -1px; }
.dn-badge { font-style: normal; font-size: .62rem; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 99px;
  background: var(--c-nav_badge_bg); color: var(--c-nav_badge_text) !important; }
.dn-right { display: flex; align-items: center; gap: 4px; margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--c-card_border); }
.dn-icon { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center;
  text-decoration: none; color: var(--c-nav_text) !important; transition: background .15s; }
.dn-icon i { color: inherit !important; }
.dn-icon:hover { background: color-mix(in srgb, var(--c-main) 9%, transparent); color: var(--c-main) !important; }
.dn-count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; line-height: 1; border: 2px solid var(--c-card_bg); }
.dn-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; border: 0; display: grid; place-items: center; font-weight: 700; font-size: .95rem;
  background: color-mix(in srgb, var(--c-main) 16%, var(--c-card_bg)); color: var(--c-main) !important; cursor: pointer; }
.dn-avatar-lg { width: 42px; height: 42px; flex-basis: 42px; font-size: 1.05rem; cursor: default; }
.dn-menu { min-width: 224px; padding: 6px !important; margin-top: 12px !important; border-radius: 14px !important; box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .4) !important; }
.dn-menu .dn-item { display: flex !important; align-items: center; gap: 10px; padding: 9px 12px !important; border-radius: 9px; font-size: .92rem; color: var(--c-card_text) !important; }
.dn-menu .dn-item i { width: 18px; text-align: center; color: var(--c-muted) !important; }
.dn-menu .dn-item:hover, .dn-menu .dn-item.is-active { background: color-mix(in srgb, var(--c-main) 10%, transparent) !important; color: var(--c-main) !important; }
.dn-menu .dn-item:hover i, .dn-menu .dn-item.is-active i { color: var(--c-main) !important; }
.dn-menu .dn-danger, .dn-menu .dn-danger i { color: var(--c-danger) !important; }
.dn-acc-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--c-card_border); }
.dn-acc-head b { display: block; color: var(--c-card_title) !important; font-weight: 600; }
.dn-acc-head small { color: var(--c-muted) !important; font-size: .8rem; }
.dn-btn, .dn-btn-ghost { height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: var(--btn-r);
  font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.dn-btn { background: var(--c-btn_bg); color: var(--c-btn_text) !important; }
.dn-btn:hover { background: var(--c-btn_hover); }
.dn-btn-ghost { color: var(--c-nav_text) !important; }
.dn-btn-ghost:hover { color: var(--c-main) !important; }
.dn-burger { display: none; }
.dn-drawer { max-width: 320px; }
.dn-drawer .offcanvas-header { border-bottom: 1px solid var(--c-card_border); }
.dn-search-m { margin: 0 0 12px; flex: none; }
.dn-item-m { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--c-card_text) !important; font-size: .98rem; }
.dn-item-m i { width: 20px; text-align: center; color: var(--c-muted) !important; }
.dn-item-m.is-active, .dn-item-m:hover { background: color-mix(in srgb, var(--c-main) 10%, transparent); color: var(--c-main) !important; }
.dn-item-m.is-active i { color: var(--c-main) !important; }
@media (max-width: 1139px) { .dn-links, .dn > .dn-search { display: none; } .dn-burger { display: grid; } .dn-right { margin-left: auto; border-left: 0; } }
@media (max-width: 575px) { .dn-wrap { padding: 8px 10px 0; margin-bottom: 14px; } .dn { padding: 6px 6px 6px 12px; } .dn-brand img { height: min(var(--logo-h, 40px), 36px); max-width: 140px; } .dn-right .dn-btn-ghost { display: none; } .dn-right .dn-btn { padding: 0 12px; } }

/* ============================== หน้าแรก ============================== */
.hm { padding-bottom: 56px; }
.hm-hero { position: relative; border-radius: var(--hero-r); overflow: hidden; background: var(--c-card_bg); isolation: isolate; }
.hm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.hm-track::-webkit-scrollbar { display: none; }
.hm-slide { flex: 0 0 100%; aspect-ratio: 4 / 1; scroll-snap-align: start; }
.hm-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s; }
.hm-arrow i { color: #1c1a2e !important; font-size: .9rem; }
.hm-hero:hover .hm-arrow, .hm-arrow:focus-visible { opacity: 1; }
.hm-arrow.is-prev { left: 14px; } .hm-arrow.is-next { right: 14px; }
.hm-dots { position: absolute; left: 22px; bottom: 12px; z-index: 2; display: flex; gap: 6px; }
.hm-dots button { position: relative; width: 22px; height: 20px; padding: 8px 0; border: 0; background: none; transition: width .3s; }
.hm-dots button::before { content: ""; display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .5); }
.hm-dots button i { position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 4px; background: #fff; transform: scaleX(0); transform-origin: left; }
.hm-dots button.is-on { width: 46px; }
.hm-dots button.is-on i { transform: scaleX(1); }
.hm-dots button.is-run i { animation: hmFill 5s linear forwards; }
@keyframes hmFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hm .card.hm-info { margin-top: 16px; flex-direction: row; align-items: center; gap: 22px; padding: 12px 14px 12px 14px; border-radius: var(--card-r); }
.hm-ann { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.hm-ann-ic { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c-main) 12%, transparent); }
.hm-ann-ic i { color: var(--c-main) !important; }
.hm-ann p { margin: 0; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-card_text) !important; }
.hm-stats { display: flex; margin: 0 0 0 auto; padding: 0; list-style: none; }
.hm-stats li { padding: 2px 20px; border-left: 1px solid var(--c-card_border); line-height: 1.2; white-space: nowrap; }
.hm-stats li b { display: block; font-size: 1.12rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--c-card_title) !important; }
.hm-stats li span { font-size: .78rem; color: var(--c-muted) !important; }

.hm-sec { margin-top: 44px; }
.hm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hm-head h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -.01em; }
.hm-sub { color: var(--c-muted) !important; font-size: .9rem; }
.hm .hm-more { font-size: .9rem; font-weight: 600; color: var(--c-main) !important; text-decoration: none; white-space: nowrap; }
.hm .hm-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.hm-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.hm .hm-cat { display: block; text-decoration: none !important; }
.hm-cat-img { display: block; aspect-ratio: 1640 / 500; border-radius: var(--media-r); overflow: hidden; background: var(--c-card_bg); }
.hm-cat-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.hm-cat:hover .hm-cat-img img { transform: scale(1.03); }
.hm-cat-cap { display: flex; align-items: baseline; gap: 10px; padding: 10px 2px 0; min-width: 0; }
.hm-cat-cap b { flex: 0 0 auto; font-weight: 600; color: var(--c-heading) !important; }
.hm-cat-cap small { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-muted) !important; }
.hm-cat:hover .hm-cat-cap b { color: var(--c-main) !important; }

.hm-prods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.hm .card.hm-prod, .card.hm-prod { display: flex; flex-direction: column; padding: 8px; border-radius: var(--card-r); text-decoration: none !important; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.card.hm-prod:hover { transform: translateY(-3px); }
.hm-prod-img { display: block; aspect-ratio: 1 / 1; border-radius: calc(var(--card-r) - 6px); overflow: hidden; background: color-mix(in srgb, var(--c-text) 6%, transparent); }
.hm-prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-prod-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 10px 6px 4px; }
.card .hm-prod-name { font-weight: 500; font-size: .95rem; line-height: 1.38; min-height: 2.76em; color: var(--c-card_title) !important;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-prod-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.card .hm-price { font-size: 1.12rem; font-weight: 700; color: var(--c-price) !important; font-variant-numeric: tabular-nums; }
.card .hm-price small { font-size: .68em; font-weight: 500; color: inherit !important; }
.card .hm-stock { font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c-ok) 14%, transparent); color: var(--c-ok) !important; white-space: nowrap; }
.card .hm-stock.is-out { background: color-mix(in srgb, var(--c-danger) 13%, transparent); color: var(--c-danger) !important; }

.hm-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.hm-split.is-single { grid-template-columns: minmax(0, 1fr); }
.hm-svcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hm .card.hm-svc { flex-direction: row; align-items: center; gap: 12px; padding: 10px; border-radius: var(--card-r); text-decoration: none !important; }
.hm-svc img { width: 64px; height: 64px; flex: 0 0 64px; border-radius: calc(var(--card-r) - 4px); object-fit: cover; }
.hm-svc span { min-width: 0; }
.card.hm-svc b { display: block; font-weight: 600; color: var(--c-card_title) !important; }
.card.hm-svc small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-muted) !important; }
.hm-live { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--c-muted) !important; }
.hm-live span { width: 7px; height: 7px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ok) 22%, transparent); }
.hm .card.hm-feed { display: block; list-style: none; margin: 0; padding: 4px 16px; border-radius: var(--card-r); }
.hm-feed li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--c-card_border); }
.hm-feed li:last-child { border-bottom: 0; }
.hm-feed img, .hm-feed-ph { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; object-fit: cover; }
.hm-feed-ph { display: grid; place-items: center; background: color-mix(in srgb, var(--c-main) 12%, transparent); }
.hm-feed-ph i { color: var(--c-main) !important; }
.hm-feed-t { flex: 1; min-width: 0; }
.card .hm-feed-t b { display: block; font-weight: 500; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-card_title) !important; }
.card .hm-feed-t small { display: flex; gap: 10px; font-size: .78rem; color: var(--c-muted) !important; }
.card .hm-feed-t small span { color: inherit !important; }
.card .hm-feed-p { font-weight: 600; font-size: .9rem; white-space: nowrap; color: var(--c-card_title) !important; font-variant-numeric: tabular-nums; }
.hm .hm-empty { padding: 28px; text-align: center; border-radius: var(--card-r); color: var(--c-muted) !important; }

@media (max-width: 1199px) { .hm-prods { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .hm-prods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-split { grid-template-columns: minmax(0, 1fr); }
  .hm .card.hm-info { flex-direction: column; align-items: stretch; gap: 12px; }
  .hm-stats { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
  .hm-stats li { padding: 2px 8px; text-align: center; }
  .hm-stats li:first-child { border-left: 0; }
}
@media (max-width: 767px) { .hm-cats { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
@media (max-width: 575px) {
  .hm-hero { border-radius: calc(var(--hero-r) * .6); }
  .hm-dots { left: 12px; bottom: 4px; }
  .hm-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hm-svcs { grid-template-columns: minmax(0, 1fr); }
  .hm-sec { margin-top: 34px; }
  .hm-stats li b { font-size: 1rem; }
  .hm-stats li span { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) { .hm-cat-img img, .card.hm-prod { transition: none; } }

/* ============================== หน้าแรก v3 (hx-*) ============================== */
/* ===================== ส่วนประกอบหน้าแรก (hx-*) ===================== */
.hx { overflow-x: clip; }
.hx .card.hx-ticker, .hx .card.hx-stat, .hx .card.hx-buy { flex-direction: row; }
.theme-minimal .hx .card.hx-stat { flex-direction: column; }
.hx { padding-bottom: 3rem; }
.hx-sec { margin-top: 3.2rem; }
.hx-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.hx-head h2 { margin: 0; font-weight: 700; font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
.hx-head .hx-kicker { display: block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--c-main) !important; font-weight: 600; margin-bottom: .2rem; }
.hx-more { white-space: nowrap; }

.hx-hero { position: relative; margin-top: 1.4rem; }
.hx-hero h1 { font-weight: 800; line-height: 1.12; font-size: clamp(2rem, 4.6vw, 3.6rem); margin: .2rem 0 .8rem; }
.hx-hero h1 .hx-grad { background: linear-gradient(90deg, var(--c-main), var(--c-grad2, var(--c-sub))); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.hx-hero .hx-lead { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--c-muted) !important; max-width: 560px; }
.hx-badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; padding: .35rem .8rem; border-radius: 99px;
  background: color-mix(in srgb, var(--c-main) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c-main) 40%, transparent); color: var(--c-text) !important; }
.hx-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 0 0 var(--c-ok); animation: hxPing 1.8s infinite; }
@keyframes hxPing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c-ok) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.hx-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hx-cta .btn { padding: .75rem 1.4rem; font-weight: 600; border-radius: var(--r-sm); }

.hx-slider { position: relative; overflow: hidden; border-radius: var(--r); }
.hx-slider .carousel-item img { width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; display: block; }
.hx-slider .carousel-indicators [data-bs-target] { width: 26px; height: 4px; border-radius: 4px; background-color: #fff; background-clip: padding-box; box-sizing: content-box; }

.hx-ticker { overflow: hidden; white-space: nowrap; display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; border-radius: var(--r-sm); margin-top: 1.4rem; }
.hx-ticker .lbl { flex: 0 0 auto; font-weight: 700; color: var(--c-main) !important; }
.hx-ticker .track { display: inline-block; padding-left: 100%; animation: hxTick 22s linear infinite; }
@keyframes hxTick { to { transform: translateX(-100%); } }

.hx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.hx-stat { padding: 1.2rem 1.3rem; border-radius: var(--r); display: flex; align-items: center; gap: 1rem; }
.hx-stat .ic { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem;
  background: color-mix(in srgb, var(--c-main) 18%, transparent); color: var(--c-main) !important; }
.hx-stat .ic i { color: var(--c-main) !important; }
.hx-stat .num { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.hx-stat .lbl { font-size: .88rem; color: var(--c-muted) !important; }

.hx-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .9rem; }
.hx-q { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; text-align: center; padding: 1.2rem .6rem;
  border-radius: var(--r); text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s; }
.hx-q i { font-size: 1.6rem; color: var(--c-main) !important; transition: transform .2s; }
.hx-q span { font-weight: 600; color: var(--c-card_text) !important; }
.hx-q:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: var(--c-main) !important; }
.hx-q:hover i { transform: scale(1.15); }

.hx-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.hx-cat { position: relative; display: block; overflow: hidden; border-radius: var(--r); aspect-ratio: 1640 / 500; text-decoration: none !important; }
.hx-cat img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.hx-cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.82)); }
.hx-cat .cap { position: absolute; left: 1rem; right: 1rem; bottom: .85rem; z-index: 2; }
.hx-cat .cap b { display: block; font-size: 1.1rem; color: #fff !important; }
.hx-cat .cap small { color: rgba(255,255,255,.8) !important; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hx-cat:hover img { transform: scale(1.07); }

.hx-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.hx-prod { border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.hx-prod:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.hx-prod .im { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: rgba(255,255,255,.03); }
.hx-prod .im img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hx-prod:hover .im img { transform: scale(1.06); }
.hx-prod .stock { position: absolute; top: .6rem; left: .6rem; font-size: .75rem; padding: .2rem .55rem; border-radius: 99px; background: rgba(0,0,0,.65); color: #fff !important; }
.hx-prod .stock.out { background: var(--c-danger); }
.hx-prod .bd { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.hx-prod .nm { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; color: var(--c-card_title) !important; }
.hx-prod .pr { font-size: 1.25rem; font-weight: 800; color: var(--c-price) !important; }
.hx-prod .btn { margin-top: auto; border-radius: var(--r-sm); font-weight: 600; }

.hx-feed { display: flex; gap: .8rem; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.hx-feed .rail { display: flex; gap: .8rem; animation: hxFeed 40s linear infinite; }
.hx-feed:hover .rail { animation-play-state: paused; }
@keyframes hxFeed { to { transform: translateX(-50%); } }
.hx-buy { flex: 0 0 auto; display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem .6rem .6rem; border-radius: var(--r-sm); min-width: 250px; }
.hx-buy img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; }
.hx-buy b { display: block; font-size: .9rem; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-buy small { color: var(--c-muted) !important; }

.hx-empty { padding: 2rem; text-align: center; border-radius: var(--r); color: var(--c-muted) !important; }

@media (max-width: 991px) { .hx-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .hx-stat { padding: .9rem; } .hx-stat .num { font-size: 1.3rem; } .hx-stat .ic { width: 42px; height: 42px; flex-basis: 42px; } .hx-sec { margin-top: 2.4rem; } }
@media (prefers-reduced-motion: reduce) { .hx-ticker .track, .hx-feed .rail, .hx-badge .dot { animation: none; } }

@media (min-width:1200px){.hx-cta-end .hx-cta{justify-content:flex-end}}
/* v4: hero ข้อความด้านบน + แบนเนอร์เต็มกว้าง 2000x500 (ใช้ได้ทุกธีม) */
.hx { --r: var(--card-r, 16px); --r-sm: var(--btn-r, 12px); --glow: 0 14px 34px -16px color-mix(in srgb, var(--c-main) 55%, transparent); }
.hx-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.4rem; }
.hx-hero-top .hx-cta { margin-top: 0; justify-content: flex-end; flex: 0 0 auto; }
.hx-hero-txt { min-width: 0; }
.hx-hero h1 { margin-bottom: .5rem; }
.hx-hero::before { content: ""; position: absolute; width: 520px; height: 520px; left: -160px; top: -220px; z-index: -1; filter: blur(80px); opacity: .35; background: radial-gradient(circle, var(--c-main), transparent 65%); pointer-events: none; }
.hx-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: 20px; z-index: -1; filter: blur(90px); opacity: .28; background: radial-gradient(circle, var(--c-sub), transparent 65%); pointer-events: none; }
.hx-slider { border-radius: var(--hero-r, 20px); box-shadow: 0 30px 60px -34px color-mix(in srgb, var(--c-main) 70%, transparent); border: 1px solid var(--c-card_border); }
.hx-slider .carousel-indicators { justify-content: flex-start; margin-left: 22px; margin-bottom: .7rem; }
.hx-cat { border-radius: var(--media-r, 14px); }
.hx-cat::after { background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.75)); }
@media (max-width: 991px) { .hx-hero-top { flex-direction: column; align-items: flex-start; } .hx-hero-top .hx-cta { justify-content: flex-start; } }
@media (max-width: 767px) { .hx-cats { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575px) { .hx-prods { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .hx-slider { border-radius: 12px; } .hx-slider .carousel-indicators { margin-left: 12px; margin-bottom: .2rem; } .hx-hero::before, .hx-hero::after { display: none; } }

/* ============================== ป๊อปอัปโปรโมชั่น ============================== */
.pm-modal .modal-dialog { max-width: min(460px, 92vw); margin-left: auto; margin-right: auto; }
.pm-modal .modal-content { border: 0 !important; border-radius: calc(var(--card-r) + 4px) !important; overflow: hidden; padding: 0 !important; }
.pm-stage { position: relative; background: var(--c-modal_bg); }
.pm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pm-track::-webkit-scrollbar { display: none; }
.pm-slide { flex: 0 0 100%; scroll-snap-align: start; display: block; }
.pm-slide img { width: 100%; max-height: 74vh; object-fit: contain; display: block; margin: 0 auto; }
.pm-x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); }
.pm-x i { color: #fff !important; }
.pm-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.pm-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .55); transition: width .25s, background .25s; }
.pm-dots button.is-on { width: 22px; background: #fff; }
.pm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.pm-foot .pm-hide { border: 0; background: none; padding: 6px 4px; font-size: .9rem; color: var(--c-muted) !important; text-decoration: underline; text-underline-offset: 3px; }
.pm-foot .pm-hide:hover { color: var(--c-modal_text) !important; }
.pm-foot .pm-close { min-width: 96px; }

/* ==========================================================================
   1) LUMEN — พื้นขาว ม่วง เรียบ สะอาด
   ========================================================================== */
.theme-lumen { --card-r: 16px; --hero-r: 22px; --media-r: 16px; --btn-r: 12px; --input-r: 12px; --nav-r: 18px; }
.theme-lumen .card { box-shadow: 0 1px 2px rgba(23, 21, 43, .04), 0 8px 22px -16px rgba(23, 21, 43, .18) !important; }
.theme-lumen .card.hm-prod:hover { box-shadow: 0 2px 4px rgba(23, 21, 43, .04), 0 18px 34px -18px rgba(76, 52, 200, .35) !important; }
.theme-lumen .dn { box-shadow: 0 1px 2px rgba(23, 21, 43, .04), 0 10px 30px -20px rgba(23, 21, 43, .3); }

/* ==========================================================================
   2) MIDNIGHT — กรมท่า กระจก ขอบบาง ไล่สีปุ่ม
   ========================================================================== */
.theme-midnight { --card-r: 14px; --hero-r: 18px; --media-r: 12px; --btn-r: 10px; --input-r: 10px; --nav-r: 16px; }
body.theme-midnight { background-image: radial-gradient(1200px 520px at 50% -180px, color-mix(in srgb, var(--c-main) 22%, transparent), transparent 70%) !important; background-attachment: fixed !important; }
body.theme-midnight.use-bg { background-image: none; }
.theme-midnight .card { box-shadow: none !important; }
.theme-midnight .card.hm-prod:hover, .theme-midnight .card.hm-svc:hover { border-color: color-mix(in srgb, var(--c-main) 55%, transparent) !important; }
.theme-midnight .btn.bg-main, .theme-midnight .dn-btn { background: linear-gradient(135deg, var(--c-btn_bg), var(--c-grad2, var(--c-sub))) !important; border: 0 !important; }
.theme-midnight .dn { box-shadow: 0 12px 40px -22px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04); }
.theme-midnight .hm-hero { box-shadow: 0 0 0 1px var(--c-card_border), 0 30px 60px -36px color-mix(in srgb, var(--c-main) 60%, transparent); }
.theme-midnight .hm-stats li b { color: var(--c-price) !important; }

/* ==========================================================================
   3) ทองดำ — ดำ ทอง พรีเมียม
   ========================================================================== */
.theme-gold { --card-r: 12px; --hero-r: 16px; --media-r: 10px; --btn-r: 8px; --input-r: 8px; --nav-r: 14px; --gold: linear-gradient(135deg, #f6e08f 0%, #d4af37 45%, #a8801f 100%); }
body.theme-gold { background-image: radial-gradient(900px 420px at 50% -160px, rgba(212, 175, 55, .14), transparent 70%) !important; background-attachment: fixed !important; }
.theme-gold .card { box-shadow: 0 1px 0 rgba(212, 175, 55, .08) inset, 0 18px 40px -28px rgba(0, 0, 0, .9) !important; }
.theme-gold .card.hm-prod:hover, .theme-gold .hx-prod:hover { border-color: rgba(212, 175, 55, .55) !important; }
.theme-gold .btn.bg-main, .theme-gold .btn-primary, .theme-gold .dn-btn, .theme-gold .swal2-confirm { background: var(--gold) !important; border: 0 !important; color: #1a1406 !important; font-weight: 600; }
.theme-gold .btn.bg-main *, .theme-gold .dn-btn * { color: #1a1406 !important; }
.theme-gold .btn.bg-main:hover, .theme-gold .dn-btn:hover { filter: brightness(1.08); }
.theme-gold .dn { border-color: rgba(212, 175, 55, .28); box-shadow: 0 10px 34px -22px rgba(0, 0, 0, .9); }
.theme-gold .dn-avatar { background: var(--gold); color: #1a1406 !important; }
.theme-gold .hx-hero h1 .hx-grad, .theme-gold .hm-hero h1 .hx-grad { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.theme-gold .hx-slider, .theme-gold .hm-hero { border-color: rgba(212, 175, 55, .35) !important; box-shadow: 0 30px 60px -38px rgba(212, 175, 55, .45); }
.theme-gold .hx-head h2, .theme-gold .hm-head h2 { letter-spacing: .01em; font-weight: 600; }
.theme-gold .card .hx-prod-row .pill, .theme-gold .hm-stats li b { background: var(--gold); color: #1a1406 !important; }
.theme-gold .hm-stats li b { background: none; color: var(--c-price) !important; }
.theme-gold .am-link.is-active { background: rgba(212, 175, 55, .14); }
.theme-gold .ad .card.ad-card { border-left-color: #d4af37 !important; }

/* ==========================================================================
   4) PASTEL — ชมพูมิ้นต์ มุมโค้งมาก ปุ่มแคปซูล
   ========================================================================== */
.theme-pastel { --card-r: 24px; --hero-r: 28px; --media-r: 22px; --btn-r: 999px; --input-r: 16px; --nav-r: 999px; }
body.theme-pastel { background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--c-main) 16%, transparent) 1px, transparent 0) !important; background-size: 22px 22px !important; background-attachment: fixed !important; }
.theme-pastel .card { box-shadow: 0 12px 30px -22px color-mix(in srgb, var(--c-main) 60%, transparent) !important; }
.theme-pastel .card.hm-prod:hover { box-shadow: 0 22px 40px -24px color-mix(in srgb, var(--c-main) 75%, transparent) !important; }
.theme-pastel .dn { padding-left: 20px; }
.theme-pastel .dn-link { border-radius: 999px; }
.theme-pastel .dn-link.is-active { background: color-mix(in srgb, var(--c-main) 12%, transparent); }
.theme-pastel .hm-ann-ic { border-radius: 50%; background: color-mix(in srgb, var(--c-sub) 20%, transparent); }
.theme-pastel .hm-ann-ic i { color: var(--c-sub) !important; }
.theme-pastel .hm-feed img, .theme-pastel .hm-feed-ph { border-radius: 50%; }
.theme-pastel .card .hm-stock { background: color-mix(in srgb, var(--c-sub) 18%, transparent); color: color-mix(in srgb, var(--c-sub) 70%, #000) !important; }
@media (max-width: 1139px) { .theme-pastel .dn { border-radius: 24px; } }
.offcanvas:focus-visible, .modal:focus-visible, .hm-track:focus-visible { outline: none; }
@media (max-width: 575px) {
  .hx-cat { aspect-ratio: auto; overflow: visible; border-radius: 0; }
  .hx-cat img { aspect-ratio: 1640 / 500; height: auto; border-radius: 12px; }
  .hx-cat::after { display: none; }
  .hx-cat .cap { position: static; padding: .5rem .2rem 0; }
  .hx-cat .cap b { color: var(--c-heading) !important; font-size: 1rem; }
  .hx-cat .cap small { color: var(--c-muted) !important; }
  .hx-cat:hover img { transform: none; }
}
/* v6: ขายล่าสุดใต้ประกาศ + หมวดหมู่ (ซ้าย) / บริการ (ขวา) */
.hx-sec-tight { margin-top: 1.6rem; }
.hx-sec-tight .hx-head { margin-bottom: .8rem; }
.hx-sec-tight .hx-head h2 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
.hx-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.hx-duo .hx-cats { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 991px) { .hx-duo { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; } }

/* ==========================================================================
   ธีมโลกอนาคต (f_*) — มีเอฟเฟกต์ขยับได้ · ใช้ได้เต็มที่ในโหมดหลักของธีม
   (สลับไปอีกโหมดด้วยปุ่มมืด/สว่าง จะเหลือแค่สี ไม่มีเอฟเฟกต์พื้นหลัง)
   ========================================================================== */
@property --fx-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes fx-spin { to { --fx-a: 360deg; } }
@keyframes fx-flow { to { background-position: 300% 0; } }

/* ---------- 6) CYBER GRID — นีออนฟ้า-ชมพู พื้นกริดวิ่ง เส้นสแกน ---------- */
.theme-f_cyber { --card-r: 6px; --hero-r: 8px; --media-r: 4px; --btn-r: 4px; --input-r: 4px; --nav-r: 8px; --cy: #00e1ff; --mg: #ff2bd6; }
html:not([data-mode="light"]):has(body.theme-f_cyber) { background: radial-gradient(1400px 520px at 50% 108%, rgba(0, 225, 255, .22), transparent 62%), radial-gradient(900px 520px at 88% -12%, rgba(255, 43, 214, .16), transparent 60%), radial-gradient(800px 480px at 5% 0%, rgba(0, 225, 255, .10), transparent 60%), #04050d fixed !important; }
html:not([data-mode="light"]) body.theme-f_cyber { background: transparent !important; }
html:not([data-mode="light"]):has(body.theme-f_cyber)::before { content: ''; position: fixed; left: -100%; right: -100%; bottom: 0; height: 150vh; z-index: -1; pointer-events: none; will-change: transform;
  background-image: linear-gradient(rgba(0, 225, 255, .75) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(0, 225, 255, .6) 1.5px, transparent 1.5px); background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.75) 45%, transparent 95%); mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.75) 45%, transparent 95%); filter: drop-shadow(0 0 4px rgba(0, 225, 255, .8));
  transform-origin: 50% 100%; transform: perspective(420px) rotateX(72deg) translateY(0); animation: fx-grid 2.2s linear infinite; }
@keyframes fx-grid { to { transform: perspective(420px) rotateX(72deg) translateY(64px); } }
html:not([data-mode="light"]) body.theme-f_cyber::after { content: ''; position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
html:not([data-mode="light"]) body.theme-f_cyber::before { content: ''; position: fixed; left: 0; right: 0; top: 0; height: 120px; z-index: 2001; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 225, 255, .06), transparent); animation: fx-sweep 7s linear infinite; }
@keyframes fx-sweep { from { transform: translateY(-140px); } to { transform: translateY(110vh); } }
html:not([data-mode="light"]) .theme-f_cyber .dn { position: relative; background: rgba(5, 9, 22, .72) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 225, 255, .28) !important; box-shadow: 0 0 34px -12px rgba(0, 225, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .02); }
html:not([data-mode="light"]) .theme-f_cyber .dn::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; pointer-events: none; overflow: hidden;
  background: linear-gradient(90deg, transparent, var(--cy), var(--mg), transparent) no-repeat; background-size: 40% 100%; animation: fx-line 3.6s linear infinite; }
@keyframes fx-line { from { background-position: -60% 0; } to { background-position: 160% 0; } }
/* การ์ด: มุมแบบ HUD + เรืองแสงตอนชี้ */
html:not([data-mode="light"]) .theme-f_cyber .card, html:not([data-mode="light"]) .theme-f_cyber .sc { border-color: rgba(0, 225, 255, .16) !important; background-color: rgba(8, 12, 28, .82) !important;
  background-image: linear-gradient(var(--cy), var(--cy)), linear-gradient(var(--cy), var(--cy)), linear-gradient(var(--mg), var(--mg)), linear-gradient(var(--mg), var(--mg)) !important;
  background-size: 16px 2px, 2px 16px, 16px 2px, 2px 16px !important; background-position: 0 0, 0 0, 100% 100%, 100% 100% !important; background-repeat: no-repeat !important;
  transition: transform .25s, box-shadow .25s, border-color .25s; }
html:not([data-mode="light"]) .theme-f_cyber .sc:not(.is-out):hover, html:not([data-mode="light"]) .theme-f_cyber .card.hm-prod:hover { transform: translateY(-4px); border-color: rgba(0, 225, 255, .6) !important; box-shadow: 0 0 0 1px rgba(0, 225, 255, .35), 0 0 32px -6px rgba(0, 225, 255, .55), 0 0 60px -20px rgba(255, 43, 214, .45) !important; }
html:not([data-mode="light"]) .theme-f_cyber .sc-img::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 28%; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 225, 255, .38) 55%, rgba(255, 255, 255, .6) 60%, transparent 62%); transform: translateY(-100%); }
html:not([data-mode="light"]) .theme-f_cyber .sc:not(.is-out):hover .sc-img::after { opacity: 1; animation: fx-scan 1.3s linear infinite; }
@keyframes fx-scan { to { transform: translateY(380%); } }
html:not([data-mode="light"]) .theme-f_cyber .sc .sc-btn { background: transparent; border: 1px solid rgba(0, 225, 255, .45); color: var(--cy) !important; border-radius: 4px; }
html:not([data-mode="light"]) .theme-f_cyber a.sc-btn:hover { background: var(--cy) !important; color: #001018 !important; box-shadow: 0 0 18px rgba(0, 225, 255, .7); }
html:not([data-mode="light"]) .theme-f_cyber .sc .sc-price b { color: var(--cy) !important; text-shadow: 0 0 12px rgba(0, 225, 255, .55); }
/* ปุ่ม: ตัดมุม + เรืองแสง */
html:not([data-mode="light"]) .theme-f_cyber .btn.bg-main, html:not([data-mode="light"]) .theme-f_cyber .btn-primary, html:not([data-mode="light"]) .theme-f_cyber .dn-btn, html:not([data-mode="light"]) .theme-f_cyber .swal2-confirm {
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); border: 0 !important; border-radius: 0 !important;
  background: linear-gradient(90deg, var(--cy), #4f8cff) !important; color: #001018 !important; font-weight: 700; letter-spacing: .03em; filter: drop-shadow(0 0 10px rgba(0, 225, 255, .45)); transition: filter .2s, transform .2s; }
html:not([data-mode="light"]) .theme-f_cyber .btn.bg-main *, html:not([data-mode="light"]) .theme-f_cyber .dn-btn * { color: #001018 !important; }
html:not([data-mode="light"]) .theme-f_cyber .btn.bg-main:hover, html:not([data-mode="light"]) .theme-f_cyber .btn-primary:hover, html:not([data-mode="light"]) .theme-f_cyber .dn-btn:hover { filter: drop-shadow(0 0 16px rgba(0, 225, 255, .9)) brightness(1.08); transform: translateY(-1px); }
/* หัวข้อ: สีเหลื่อมแบบจอ + กะพริบ glitch นานๆ ครั้ง */
html:not([data-mode="light"]) .theme-f_cyber .hx-head h2, html:not([data-mode="light"]) .theme-f_cyber .hm-head h2, html:not([data-mode="light"]) .theme-f_cyber .hx-hero h1 { text-shadow: -1.5px 0 rgba(255, 43, 214, .65), 1.5px 0 rgba(0, 225, 255, .65); letter-spacing: .01em; }
html:not([data-mode="light"]) .theme-f_cyber .hx-hero h1 { animation: fx-glitch 6s steps(1) infinite; }
@keyframes fx-glitch { 0%, 91%, 100% { transform: none; text-shadow: -1.5px 0 rgba(255,43,214,.65), 1.5px 0 rgba(0,225,255,.65); }
  92% { transform: translateX(2px) skewX(-6deg); text-shadow: -4px 0 #ff2bd6, 4px 0 #00e1ff; } 93% { transform: translateX(-3px); text-shadow: 3px 0 #ff2bd6, -3px 0 #00e1ff; } 94% { transform: none; } 95% { transform: translateX(1px) skewX(4deg); } }
html:not([data-mode="light"]) .theme-f_cyber .hx-hero h1 .hx-grad { background: linear-gradient(90deg, var(--cy), #8fdcff 40%, var(--mg)); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
html:not([data-mode="light"]) .theme-f_cyber .hx-kicker::after { content: '_'; margin-left: 2px; color: var(--cy); animation: fx-blink 1s steps(1) infinite; }
@keyframes fx-blink { 50% { opacity: 0; } }
html:not([data-mode="light"]) .theme-f_cyber .hx-slider, html:not([data-mode="light"]) .theme-f_cyber .hm-hero { border: 1px solid rgba(0, 225, 255, .35) !important; box-shadow: 0 0 0 4px rgba(0, 225, 255, .06), 0 0 50px -18px rgba(0, 225, 255, .6) !important; }
html:not([data-mode="light"]) .theme-f_cyber .form-control:focus, html:not([data-mode="light"]) .theme-f_cyber .form-select:focus { box-shadow: 0 0 0 1px var(--cy), 0 0 16px -2px rgba(0, 225, 255, .6) !important; }
html:not([data-mode="light"]) .theme-f_cyber footer.site-foot { position: relative; border-top: 0 !important; }
html:not([data-mode="light"]) .theme-f_cyber footer.site-foot::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--cy), var(--mg), transparent); }

/* ---------- 7) HOLOGRAM — กระจกฝ้า แสงสีรุ้งลอย ขอบประกายรุ้งหมุน ---------- */
.theme-f_holo { --card-r: 20px; --hero-r: 26px; --media-r: 16px; --btn-r: 14px; --input-r: 14px; --nav-r: 22px; --iri: conic-gradient(from var(--fx-a), #8b7bff, #4fd1ff, #7dffd2, #ffd27d, #ff7ad9, #8b7bff); }
html:not([data-mode="light"]):has(body.theme-f_holo) { background: linear-gradient(180deg, #07081a, #0a0b22 60%, #080919) fixed !important; }
html:not([data-mode="light"]) body.theme-f_holo { background: transparent !important; }
html:not([data-mode="light"]):has(body.theme-f_holo)::before { content: ''; position: fixed; inset: -25%; z-index: -1; pointer-events: none; will-change: transform;
  background: radial-gradient(30% 30% at 22% 28%, rgba(139, 123, 255, .75), transparent 70%), radial-gradient(26% 26% at 78% 22%, rgba(79, 209, 255, .6), transparent 70%), radial-gradient(28% 28% at 62% 78%, rgba(255, 122, 217, .5), transparent 70%), radial-gradient(22% 22% at 30% 80%, rgba(125, 255, 210, .35), transparent 70%);
  animation: fx-orbs 26s ease-in-out infinite alternate; }
@keyframes fx-orbs { 0% { transform: translate(0, 0) rotate(0deg) scale(1); } 50% { transform: translate(4%, -3%) rotate(12deg) scale(1.08); } 100% { transform: translate(-4%, 3%) rotate(-10deg) scale(.96); } }
html:not([data-mode="light"]) body.theme-f_holo::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
html:not([data-mode="light"]) .theme-f_holo .dn { background: rgba(255, 255, 255, .06) !important; -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255, 255, 255, .14) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 50px -30px rgba(0, 0, 0, .9); }
html:not([data-mode="light"]) .theme-f_holo .card, html:not([data-mode="light"]) .theme-f_holo .sc { background: linear-gradient(140deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03)) !important; -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .13) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 24px 50px -32px rgba(0, 0, 0, .9) !important; }
html:not([data-mode="light"]) .theme-f_holo .sc:not(.fx-border)::before { content: ''; position: absolute; inset: -1px; z-index: 5; border-radius: inherit; padding: 1.5px; pointer-events: none; background: var(--iri);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .28; transition: opacity .35s; animation: fx-spin 5s linear infinite; }
html:not([data-mode="light"]) .theme-f_holo .sc:not(.is-out):hover::before { opacity: 1; }
html:not([data-mode="light"]) .theme-f_holo .sc:not(.is-out):hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 30px 60px -30px rgba(139, 123, 255, .65) !important; }
html:not([data-mode="light"]) .theme-f_holo .sc-img::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity .3s;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, .35) 42%, rgba(139, 123, 255, .35) 48%, rgba(79, 209, 255, .35) 54%, rgba(255, 122, 217, .3) 60%, transparent 75%); background-size: 250% 100%; background-position: 120% 0; }
html:not([data-mode="light"]) .theme-f_holo .sc:not(.is-out):hover .sc-img::after { opacity: 1; animation: fx-holo 1.6s ease-in-out infinite; }
@keyframes fx-holo { from { background-position: 130% 0; } to { background-position: -30% 0; } }
html:not([data-mode="light"]) .theme-f_holo .btn.bg-main, html:not([data-mode="light"]) .theme-f_holo .btn-primary, html:not([data-mode="light"]) .theme-f_holo .dn-btn, html:not([data-mode="light"]) .theme-f_holo .swal2-confirm, html:not([data-mode="light"]) .theme-f_holo a.sc-btn:hover {
  background: linear-gradient(100deg, #8b7bff, #4fd1ff, #ff7ad9, #8b7bff) !important; background-size: 300% 100% !important; animation: fx-flow 8s linear infinite; border: 0 !important; color: #fff !important; box-shadow: 0 12px 30px -14px rgba(139, 123, 255, .9); }
html:not([data-mode="light"]) .theme-f_holo .btn.bg-main *, html:not([data-mode="light"]) .theme-f_holo .dn-btn * { color: #fff !important; }
html:not([data-mode="light"]) .theme-f_holo .hx-hero h1 .hx-grad, html:not([data-mode="light"]) .theme-f_holo .hm-hero h1 .hx-grad { background: linear-gradient(100deg, #b9adff, #7fe3ff, #ffd27d, #ff9fe2, #b9adff); background-size: 300% 100%; animation: fx-flow 10s linear infinite; -webkit-background-clip: text; background-clip: text; color: transparent !important; }
html:not([data-mode="light"]) .theme-f_holo .hx-slider, html:not([data-mode="light"]) .theme-f_holo .hm-hero { position: relative; border: 0 !important; box-shadow: 0 30px 70px -40px rgba(139, 123, 255, .8) !important; }
html:not([data-mode="light"]) .theme-f_holo .hx-slider::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 3; background: var(--iri);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: fx-spin 6s linear infinite; }
html:not([data-mode="light"]) .theme-f_holo .sc .sc-price b { background: linear-gradient(90deg, #a8f0ff, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
html:not([data-mode="light"]) .theme-f_holo .form-control, html:not([data-mode="light"]) .theme-f_holo .form-select { background-color: rgba(255, 255, 255, .05) !important; }

/* ---------- 8) STARFIELD — อวกาศ ดาวระยิบ ดาวตก ดาวเคราะห์ ขอบการ์ดมีแสงวิ่ง ---------- */
.theme-f_space { --card-r: 16px; --hero-r: 22px; --media-r: 12px; --btn-r: 12px; --input-r: 12px; --nav-r: 18px; }
html:not([data-mode="light"]):has(body.theme-f_space) { background: radial-gradient(900px 520px at 82% 6%, rgba(192, 132, 252, .20), transparent 62%), radial-gradient(1000px 640px at 8% 96%, rgba(91, 140, 255, .18), transparent 62%), radial-gradient(600px 400px at 50% 50%, rgba(60, 80, 180, .08), transparent 70%), #02030a fixed !important; }
html:not([data-mode="light"]) body.theme-f_space { background: transparent !important; }
html:not([data-mode="light"]):has(body.theme-f_space)::before, html:not([data-mode="light"]) body.theme-f_space::before { content: ''; position: fixed; left: 0; right: 0; top: 0; height: calc(100vh + 600px); z-index: -1; pointer-events: none; will-change: transform; }
html:not([data-mode="light"]):has(body.theme-f_space)::before { background-size: 320px 300px; animation: fx-drift 160s linear infinite;
  background-image: radial-gradient(1.6px 1.6px at 20px 30px, #fff 50%, transparent 56%), radial-gradient(1.4px 1.4px at 140px 80px, rgba(255,255,255,.85) 50%, transparent 56%), radial-gradient(2px 2px at 260px 40px, #cfe0ff 50%, transparent 58%), radial-gradient(1.4px 1.4px at 80px 170px, rgba(255,255,255,.8) 50%, transparent 56%), radial-gradient(1.8px 1.8px at 200px 220px, #fff 50%, transparent 58%), radial-gradient(1.3px 1.3px at 300px 260px, rgba(255,255,255,.75) 50%, transparent 56%), radial-gradient(1.5px 1.5px at 40px 270px, rgba(220,210,255,.9) 50%, transparent 56%), radial-gradient(1.2px 1.2px at 110px 120px, rgba(255,255,255,.6) 50%, transparent 56%), radial-gradient(1.2px 1.2px at 230px 150px, rgba(255,255,255,.6) 50%, transparent 56%); }
html:not([data-mode="light"]) body.theme-f_space::before { background-size: 600px 600px; animation: fx-drift 90s linear infinite, fx-twinkle 3.2s ease-in-out infinite alternate;
  background-image: radial-gradient(2px 2px at 60px 120px, #fff 50%, transparent 56%), radial-gradient(2.4px 2.4px at 420px 60px, #dbe6ff 50%, transparent 56%), radial-gradient(1.8px 1.8px at 300px 380px, #fff 50%, transparent 56%), radial-gradient(2.2px 2.2px at 520px 480px, #f1dcff 50%, transparent 56%), radial-gradient(1.8px 1.8px at 150px 520px, #fff 50%, transparent 56%); }
@keyframes fx-drift { to { transform: translate3d(0, -600px, 0); } }
@keyframes fx-twinkle { from { opacity: .45; } to { opacity: 1; } }
html:not([data-mode="light"]) body.theme-f_space::after { content: ''; position: fixed; left: 8vw; top: 10vh; width: 160px; height: 2px; z-index: -1; pointer-events: none; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(200, 220, 255, .9) 80%, #fff); filter: drop-shadow(0 0 6px #9fc0ff); animation: fx-shoot 11s ease-in 2s infinite; }
@keyframes fx-shoot { 0% { opacity: 0; transform: translate(0, 0) rotate(24deg); } 1% { opacity: 1; } 9% { opacity: 0; transform: translate(62vw, 28vw) rotate(24deg); } 100% { opacity: 0; transform: translate(62vw, 28vw) rotate(24deg); } }
html:not([data-mode="light"]):has(body.theme-f_space)::after { content: ''; position: fixed; right: -90px; bottom: -110px; width: 420px; height: 420px; z-index: -1; pointer-events: none; opacity: .55; animation: fx-float 14s ease-in-out infinite alternate;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3CradialGradient id='p' cx='.35' cy='.3' r='.75'%3E%3Cstop offset='0' stop-color='%23a9c2ff'/%3E%3Cstop offset='.45' stop-color='%234a5fd0'/%3E%3Cstop offset='1' stop-color='%23121640'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cellipse cx='100' cy='104' rx='96' ry='22' fill='none' stroke='%23c4b5fd' stroke-opacity='.35' stroke-width='3' transform='rotate(-18 100 100)'/%3E%3Ccircle cx='100' cy='100' r='56' fill='url(%23p)'/%3E%3Cpath d='M30 125 A96 22 -18 0 0 170 80' fill='none' stroke='%23e0d4ff' stroke-opacity='.55' stroke-width='3' transform='rotate(-4 100 100)'/%3E%3C/svg%3E") no-repeat center / contain; }
@keyframes fx-float { to { transform: translate(-14px, -20px) rotate(6deg); } }
html:not([data-mode="light"]) .theme-f_space .dn { background: rgba(8, 11, 26, .7) !important; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(143, 179, 255, .18) !important; }
html:not([data-mode="light"]) .theme-f_space .card, html:not([data-mode="light"]) .theme-f_space .sc { background: linear-gradient(180deg, rgba(16, 22, 48, .82), rgba(8, 11, 26, .86)) !important; border: 1px solid rgba(143, 179, 255, .14) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 50px -34px rgba(0, 0, 0, .95) !important; }
html:not([data-mode="light"]) .theme-f_space .sc:not(.fx-border)::before, html:not([data-mode="light"]) .theme-f_space .hx-slider::after { content: ''; position: absolute; inset: -1px; z-index: 5; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--fx-a), transparent 0 72%, rgba(143, 179, 255, .2) 80%, #8fb3ff 90%, #fff 94%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; animation: fx-spin 3.2s linear infinite; }
html:not([data-mode="light"]) .theme-f_space .sc:not(.is-out):hover::before, html:not([data-mode="light"]) .theme-f_space .hx-slider::after { opacity: 1; }
html:not([data-mode="light"]) .theme-f_space .hx-slider { position: relative; }
html:not([data-mode="light"]) .theme-f_space .sc:not(.is-out):hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(143, 179, 255, .25), 0 26px 60px -30px rgba(91, 140, 255, .7) !important; }
html:not([data-mode="light"]) .theme-f_space .btn.bg-main, html:not([data-mode="light"]) .theme-f_space .btn-primary, html:not([data-mode="light"]) .theme-f_space .dn-btn, html:not([data-mode="light"]) .theme-f_space .swal2-confirm { background: linear-gradient(120deg, #5b8cff, #8b6dff 60%, #c084fc) !important; border: 0 !important; color: #fff !important; box-shadow: 0 10px 26px -12px rgba(91, 140, 255, .9); }
html:not([data-mode="light"]) .theme-f_space .hx-cta .btn:first-child, html:not([data-mode="light"]) .theme-f_space .dn-btn { animation: fx-pulse 2.6s ease-out infinite; }
@keyframes fx-pulse { 0% { box-shadow: 0 0 0 0 rgba(143, 179, 255, .55), 0 10px 26px -12px rgba(91, 140, 255, .9); } 70%, 100% { box-shadow: 0 0 0 14px rgba(143, 179, 255, 0), 0 10px 26px -12px rgba(91, 140, 255, .9); } }
html:not([data-mode="light"]) .theme-f_space .hx-hero h1 .hx-grad, html:not([data-mode="light"]) .theme-f_space .hm-hero h1 .hx-grad { background: linear-gradient(90deg, #dbe6ff, #8fb3ff 45%, #d8b4fe); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
html:not([data-mode="light"]) .theme-f_space .hx-kicker::before { content: '✦'; margin-right: 6px; color: #c4b5fd; }
html:not([data-mode="light"]) .theme-f_space .sc .sc-price b { color: #a9c2ff !important; }

/* ---------- 9) LIQUID CHROME — สว่าง โครเมียม กระจกขาว พื้นไล่สีพาสเทลไหล ---------- */
.theme-f_chrome { --card-r: 20px; --hero-r: 26px; --media-r: 16px; --btn-r: 14px; --input-r: 14px; --nav-r: 22px; --chrome: linear-gradient(135deg, #ffffff, #b8bfcc 22%, #f4f6fa 40%, #8e97a8 62%, #ffffff 80%, #c9cfda); }
html:not([data-mode="dark"]):has(body.theme-f_chrome) { background: #eceef3 fixed !important; }
html:not([data-mode="dark"]) body.theme-f_chrome { background: transparent !important; }
html:not([data-mode="dark"]):has(body.theme-f_chrome)::before { content: ''; position: fixed; inset: -30%; z-index: -1; pointer-events: none; will-change: transform;
  background: radial-gradient(26% 26% at 24% 26%, #d6e0ff, transparent 72%), radial-gradient(24% 24% at 78% 24%, #ffdcee, transparent 72%), radial-gradient(28% 28% at 58% 78%, #d4fbef, transparent 72%), radial-gradient(22% 22% at 22% 78%, #ece2ff, transparent 72%);
  animation: fx-orbs 30s ease-in-out infinite alternate; }
html:not([data-mode="dark"]) body.theme-f_chrome::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(20, 22, 28, .09) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
html:not([data-mode="dark"]) .theme-f_chrome .dn { background: rgba(255, 255, 255, .62) !important; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid rgba(255, 255, 255, .9) !important; box-shadow: 0 0 0 1px rgba(20, 22, 40, .06), 0 16px 40px -28px rgba(20, 22, 40, .45); }
html:not([data-mode="dark"]) .theme-f_chrome .card, html:not([data-mode="dark"]) .theme-f_chrome .sc { background: rgba(255, 255, 255, .7) !important; -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .95) !important; box-shadow: 0 0 0 1px rgba(20, 22, 40, .06), inset 0 1px 0 #fff, 0 22px 44px -30px rgba(20, 22, 40, .4) !important; }
html:not([data-mode="dark"]) .theme-f_chrome .sc:not(.fx-border)::before, html:not([data-mode="dark"]) .theme-f_chrome .hx-slider::after { content: ''; position: absolute; inset: -1px; z-index: 5; border-radius: inherit; padding: 1.5px; pointer-events: none; background: var(--chrome); background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; animation: fx-chrome 4s ease-in-out infinite alternate; }
@keyframes fx-chrome { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
html:not([data-mode="dark"]) .theme-f_chrome .sc:not(.is-out):hover::before, html:not([data-mode="dark"]) .theme-f_chrome .hx-slider::after { opacity: 1; }
html:not([data-mode="dark"]) .theme-f_chrome .hx-slider { position: relative; }
html:not([data-mode="dark"]) .theme-f_chrome .sc:not(.is-out):hover { transform: translateY(-5px); box-shadow: 0 0 0 1px rgba(20, 22, 40, .05), inset 0 1px 0 #fff, 0 34px 60px -32px rgba(20, 22, 40, .55) !important; }
html:not([data-mode="dark"]) .theme-f_chrome .sc-img::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 66%); background-size: 260% 100%; background-position: 130% 0; }
html:not([data-mode="dark"]) .theme-f_chrome .sc:not(.is-out):hover .sc-img::after { opacity: 1; animation: fx-holo 1.4s ease-in-out infinite; }
html:not([data-mode="dark"]) .theme-f_chrome .btn.bg-main, html:not([data-mode="dark"]) .theme-f_chrome .btn-primary, html:not([data-mode="dark"]) .theme-f_chrome .dn-btn, html:not([data-mode="dark"]) .theme-f_chrome .swal2-confirm, html:not([data-mode="dark"]) .theme-f_chrome .sc .sc-btn {
  background-image: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .32) 50%, transparent 65%), linear-gradient(180deg, #30333d, #0d0f14) !important; background-size: 260% 100%, 100% 100% !important; background-position: 140% 0, 0 0 !important;
  border: 0 !important; color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 24px -12px rgba(13, 15, 20, .7); transition: background-position .8s ease, transform .2s; }
html:not([data-mode="dark"]) .theme-f_chrome .btn.bg-main *, html:not([data-mode="dark"]) .theme-f_chrome .dn-btn *, html:not([data-mode="dark"]) .theme-f_chrome .sc .sc-btn * { color: #fff !important; }
html:not([data-mode="dark"]) .theme-f_chrome .btn.bg-main:hover, html:not([data-mode="dark"]) .theme-f_chrome .btn-primary:hover, html:not([data-mode="dark"]) .theme-f_chrome .dn-btn:hover, html:not([data-mode="dark"]) .theme-f_chrome a.sc-btn:hover { background-position: -40% 0, 0 0 !important; transform: translateY(-1px); }
html:not([data-mode="dark"]) .theme-f_chrome .hx-hero h1 .hx-grad, html:not([data-mode="dark"]) .theme-f_chrome .hm-hero h1 .hx-grad { background: linear-gradient(180deg, #2a2e38 0%, #8a93a6 48%, #14161c 52%, #4b5160 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
html:not([data-mode="dark"]) .theme-f_chrome .hx-head h2, html:not([data-mode="dark"]) .theme-f_chrome .hm-head h2 { font-weight: 700; letter-spacing: -.02em; }
html:not([data-mode="dark"]) .theme-f_chrome .sc .sc-price b { color: #14161c !important; }

/* ทุกธีมโลกอนาคต: มือถือลดเอฟเฟกต์หนัก + เคารพการตั้งค่าลดการเคลื่อนไหว */
@media (max-width: 767px) {
  .theme-f_holo .card, .theme-f_holo .sc, .theme-f_chrome .card, .theme-f_chrome .sc { -webkit-backdrop-filter: none; backdrop-filter: none; }
  html:has(body.theme-f_space)::after { width: 240px; height: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body[class*="theme-f_"])::before, html:has(body[class*="theme-f_"])::after, body[class*="theme-f_"]::before, body[class*="theme-f_"]::after,
  [class*="theme-f_"] .dn::after, [class*="theme-f_"] .sc::before, [class*="theme-f_"] .hx-slider::after, [class*="theme-f_"] .hx-hero h1, [class*="theme-f_"] .btn, [class*="theme-f_"] .dn-btn { animation: none !important; }
}

/* ============================== หลังบ้าน: เมนูซ้าย ============================== */
.am { display: flex; align-items: flex-start; gap: 20px; max-width: 1680px; margin: 0 auto; padding: 0 16px 48px; }
.am-side { position: sticky; top: 84px; flex: 0 0 264px; width: 264px; max-height: calc(100vh - 100px); display: flex; flex-direction: column;
  background: var(--c-card_bg); border: 1px solid var(--c-card_border); border-radius: var(--card-r, 16px); transition: width .2s, flex-basis .2s; z-index: 1035; }
.am-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 12px 10px 16px; }
.am-side-title { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--c-card_title) !important; white-space: nowrap; }
.am-side-title i { color: var(--c-main) !important; }
.am-collapse { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--c-card_border); background: var(--c-card_bg); display: grid; place-items: center; flex: 0 0 30px; }
.am-collapse i { color: var(--c-main) !important; font-size: .8rem; transition: transform .2s; }
.am-find { position: relative; margin: 0 12px 8px; display: block; }
.am-find i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: .8rem; color: var(--c-muted) !important; }
.am-find input { width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--c-input_border); background: var(--c-input_bg); color: var(--c-input_text); padding: 0 10px 0 32px; font-size: .88rem; outline: none; }
.am-find input:focus { border-color: var(--c-main); }
.am-nav { flex: 1; overflow-y: auto; padding: 4px 8px 8px; scrollbar-width: thin; }
.am-group { border-bottom: 1px solid var(--c-card_border); padding: 4px 0; }
.am-group:last-child { border-bottom: 0; }
.am-group-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 10px; border: 0; background: none; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--c-card_title) !important; text-align: left; }
.am-group-btn > i:first-child { width: 20px; text-align: center; color: var(--c-muted) !important; }
.am-group-btn span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit !important; }
.am-group-btn:hover { background: color-mix(in srgb, var(--c-main) 7%, transparent); }
.am-chev { font-size: .7rem; color: var(--c-muted) !important; transition: transform .2s; }
.am-group.is-open .am-chev { transform: rotate(180deg); }
.am-items { display: none; padding: 2px 0 6px; }
.am-group.is-open .am-items { display: block; }
.am-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 1px 0; border-radius: 10px; text-decoration: none !important; font-size: .9rem; color: var(--c-card_text) !important; }
.am-link em { font-style: normal; width: 18px; text-align: right; font-size: .72rem; color: var(--c-muted) !important; font-variant-numeric: tabular-nums; }
.am-link i { width: 18px; text-align: center; color: var(--c-muted) !important; }
.am-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit !important; }
.am-link:hover { background: color-mix(in srgb, var(--c-main) 7%, transparent); color: var(--c-main) !important; }
.am-link.is-active { background: color-mix(in srgb, var(--c-main) 13%, transparent); color: var(--c-main) !important; font-weight: 600; }
.am-link.is-active i, .am-link.is-active em { color: var(--c-main) !important; }
.am-back { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 12px 12px; padding: 9px; border-radius: 10px; border: 1px solid var(--c-card_border); text-decoration: none !important; font-size: .88rem; color: var(--c-card_text) !important; }
.am-back:hover { border-color: var(--c-main); color: var(--c-main) !important; }
.am-main { flex: 1; min-width: 0; }
.am-bar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; margin-bottom: 16px; border-radius: var(--card-r, 16px); border: 1px solid var(--c-card_border);
  background: linear-gradient(100deg, color-mix(in srgb, var(--c-main) 12%, var(--c-card_bg)), var(--c-card_bg) 60%); }
.am-bar h1 { margin: 0; font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.am-bar h1 i { color: var(--c-main) !important; font-size: 1.05rem; }
.am-time { font-size: .8rem; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--c-card_border); background: var(--c-card_bg); color: var(--c-muted) !important; white-space: nowrap; }
.am-burger { display: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--c-card_border); background: var(--c-card_bg); }
.am-burger i { color: var(--c-card_title) !important; }
.am-content > .container, .am-content > .container-sm, .am-content > .container-fluid { max-width: none; margin-top: 0 !important; padding-left: 0; padding-right: 0; }
.am-content > div > .container-sm { max-width: none; }
.am-shade { display: none; }
/* ย่อเมนูเหลือไอคอน */
.am.is-mini .am-side { flex-basis: 68px; width: 68px; }
.am.is-mini .am-side-title span, .am.is-mini .am-find, .am.is-mini .am-group-btn span, .am.is-mini .am-chev, .am.is-mini .am-link span, .am.is-mini .am-link em, .am.is-mini .am-back span { display: none; }
.am.is-mini .am-side-head { justify-content: center; padding: 14px 6px 10px; }
.am.is-mini .am-side-title { display: none; }
.am.is-mini .am-collapse i { transform: rotate(180deg); }
.am.is-mini .am-items { display: block; }
.am.is-mini .am-group-btn { display: none; }
.am.is-mini .am-link { justify-content: center; padding: 10px 0; }
@media (max-width: 991px) {
  .am { display: block; padding: 0 12px 40px; }
  .am-side { position: fixed; top: 0; left: 0; bottom: 0; max-height: none; height: 100%; width: 280px; border-radius: 0 16px 16px 0; transform: translateX(-105%); transition: transform .25s; z-index: 1050; }
  .am.is-open .am-side { transform: none; }
  .am.is-open .am-shade { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1045; }
  .am-collapse { display: none; }
  .am-burger { display: grid; place-items: center; }
  .am.is-mini .am-side { width: 280px; }
  .am.is-mini .am-side-title span, .am.is-mini .am-find, .am.is-mini .am-group-btn span, .am.is-mini .am-chev, .am.is-mini .am-link span, .am.is-mini .am-link em, .am.is-mini .am-back span { display: revert; }
  .am.is-mini .am-group-btn { display: flex; }
  .am-bar h1 { font-size: 1.05rem; }
  .am-time { display: none; }
}

/* ============================== หลังบ้าน: แดชบอร์ด ============================== */
.ad-compare { display: inline-block; font-size: .82rem; padding: 5px 12px; margin-bottom: 14px; border-radius: 10px; border: 1px solid var(--c-card_border); background: var(--c-card_bg); color: var(--c-muted) !important; }
.ad-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ad .card.ad-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 14px; border-radius: 14px; border-left: 4px solid var(--ac) !important; }
.ad-top { display: flex; justify-content: space-between; gap: 10px; }
.card .ad-label { font-size: .82rem; color: var(--c-muted) !important; }
.card .ad-value { font-size: 1.45rem; font-weight: 700; line-height: 1.25; color: var(--c-card_title) !important; font-variant-numeric: tabular-nums; }
.card .ad-sub { font-size: .78rem; color: var(--c-muted) !important; }
.ad-ic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--ac) 14%, transparent); }
.ad-ic i { color: var(--ac) !important; font-size: 1.15rem; }
.card .ad-delta { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.card .ad-delta.is-up { background: color-mix(in srgb, #16a34a 13%, transparent); color: #16a34a !important; }
.card .ad-delta.is-down { background: color-mix(in srgb, #e11d48 12%, transparent); color: #e11d48 !important; }
.card .ad-delta.is-flat { background: color-mix(in srgb, var(--c-text) 7%, transparent); color: var(--c-muted) !important; }
.card .ad-delta i { color: inherit !important; }
.card .ad-more, .ad .ad-more { margin-top: auto; font-size: .82rem; font-weight: 600; text-decoration: none !important; color: var(--c-card_title) !important; display: inline-flex; align-items: center; gap: 6px; }
.ad .ad-more i { font-size: .65rem; color: inherit !important; }
.ad .ad-more:hover { color: var(--c-main) !important; }
.ad-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.ad .card.ad-panel { padding: 16px 18px; border-radius: 14px; }
.ad-panel-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ad-panel-h b { color: var(--c-card_title) !important; }
.ad-chart { position: relative; height: 300px; }
.ad-list { list-style: none; margin: 0; padding: 0; }
.ad-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--c-card_border); }
.ad-list li:last-child { border-bottom: 0; }
.ad-av { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: color-mix(in srgb, var(--c-main) 14%, transparent); color: var(--c-main) !important; }
.ad-li-t { flex: 1; min-width: 0; }
.card .ad-li-t b { display: block; font-size: .9rem; font-weight: 600; color: var(--c-card_title) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .ad-li-t small, .card .ad-li-v small { display: block; font-size: .74rem; color: var(--c-muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .ad-li-v { text-align: right; font-weight: 700; color: #16a34a !important; font-variant-numeric: tabular-nums; }
@media (max-width: 1399px) { .ad-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) { .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575px) { .ad-grid { grid-template-columns: minmax(0, 1fr); } .card .ad-value { font-size: 1.25rem; } }

/* v8: การ์ดสินค้าหน้าแรก (แบบเดียวกับหน้าหมวดหมู่) */
.hx-prod .bd { gap: .6rem; padding: .9rem 1rem 1rem; }
.hx .hx-prod .nm { text-align: center; font-weight: 700; min-height: 0; -webkit-line-clamp: 2; }
.hx-prod-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .hx-prod-row .stk { font-size: .88rem; font-weight: 600; color: var(--c-card_text) !important; white-space: nowrap; }
.card .hx-prod-row .stk.is-out { color: var(--c-danger) !important; }
.card .hx-prod-row .pill { font-size: .85rem; font-weight: 700; padding: 2px 14px; border-radius: 99px; background: var(--c-main); color: var(--c-btn_text) !important; white-space: nowrap; }
.hx .hx-prod .btn.hx-btn-buy, .hx .hx-prod .btn.hx-btn-out { margin-top: .1rem; width: 100%; padding: .45rem .5rem; font-size: .92rem; font-weight: 500; background: transparent !important; box-shadow: none !important; transform: none !important; }
.hx .hx-prod .btn.hx-btn-buy { border: 1px solid var(--c-main) !important; color: var(--c-main) !important; }
.hx .hx-prod .btn.hx-btn-buy:hover { background: var(--c-main) !important; color: var(--c-btn_text) !important; }
.hx .hx-prod .btn.hx-btn-out { border: 1px solid var(--c-danger) !important; color: var(--c-danger) !important; cursor: not-allowed; transition: background .15s, color .15s; }
.hx .hx-prod.is-out:hover .btn.hx-btn-out, .hx .hx-prod .btn.hx-btn-out:hover { background: var(--c-danger) !important; color: #fff !important; }
.hx-prod.is-out > .im img, .hx-prod.is-out > .bd { opacity: .5; }
.hx-prod .im { position: relative; overflow: hidden; }
.card .hx-sold { position: absolute; left: -12%; right: -12%; top: 50%; transform: translateY(-50%) rotate(-12deg); padding: .45rem 0; text-align: center;
  background: var(--c-danger); color: #fff !important; font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45); pointer-events: none; }
.hx-prod.is-out > .im img { filter: grayscale(.35); }
.hx-prod.is-out:hover { transform: none; box-shadow: none; }
.hx-prod.is-out:hover .im img { transform: none; }

/* v8: ส่วนท้ายเว็บแบบกระชับ */
footer.site-foot { padding: 18px 0 12px; margin-top: 24px; border-top: 1px solid var(--c-card_border); }
.site-foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-foot-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.site-foot-brand img { height: 40px; width: auto; flex: 0 0 auto; }
footer.site-foot .site-foot-brand p { margin: 0; font-size: .88rem; color: var(--c-footer_text) !important; }
.site-foot-links { display: flex; align-items: center; gap: 18px; font-size: .9rem; }
footer.site-foot .site-foot-links span { color: var(--c-footer_text) !important; opacity: .75; }
footer.site-foot a { color: var(--c-footer_text) !important; text-decoration: none; }
footer.site-foot a:hover { color: var(--c-main) !important; }
footer.site-foot a i { color: inherit !important; }
.site-foot-bottom { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--c-card_border); font-size: .78rem; }
footer.site-foot .site-foot-bottom span, footer.site-foot .site-foot-bottom i { color: var(--c-footer_text) !important; opacity: .8; }
footer.site-foot .site-foot-bottom a { color: var(--c-link) !important; }
@media (max-width: 767px) { .site-foot-in, .site-foot-bottom { flex-direction: column; align-items: center; text-align: center; } .site-foot-brand { flex-direction: column; gap: 8px; } }
@media (max-width: 575px) { .hx-prod .bd { padding: .7rem .7rem .8rem; } .hx-prod-row { flex-wrap: wrap; gap: 4px 6px; } .card .hx-prod-row .stk { font-size: .78rem; } .card .hx-prod-row .pill { padding: 2px 10px; font-size: .78rem; } .hx .hx-prod .btn.hx-btn-buy, .hx .hx-prod .btn.hx-btn-out { font-size: .82rem; padding: .4rem .3rem; } }

/* ปุ่มเปิด/ปิดเสียงมุมจอ */
.snd-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 1040; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--c-card_border);
  background: var(--c-card_bg); box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .45); display: grid; place-items: center; }
.snd-toggle i { color: var(--c-main) !important; }
.snd-toggle.is-muted i { color: var(--c-muted) !important; }
.snd-toggle[hidden] { display: none; }

/* ============================== หลังบ้าน: หน้าเดิม (ปรับให้เข้าชุด) ============================== */
.am-content > .container-sm, .am-content > .container, .am-content > div.container-fluid {
  background: var(--c-card_bg) !important; border: 1px solid var(--c-card_border) !important; border-radius: var(--card-r, 16px) !important;
  box-shadow: none !important; padding: 20px 22px !important; margin: 0 0 16px !important; }
.am-content center { text-align: inherit; }
.am-content hr { margin: 12px 0 16px; }
.am-content .am-lhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.am-content .am-lhead h2 { margin: 0; font-size: 1.08rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.am-content .am-lhead h2 i { color: var(--c-main) !important; font-size: .95rem; }
.am-content .am-lhead .btn { width: auto !important; flex: 0 0 auto; margin: 0 !important; padding: .5rem 1.1rem; border-radius: 10px; font-weight: 600; }
.am-content h1, .am-content h2, .am-content h3 { font-size: 1.08rem; font-weight: 700; }
.am-content .am-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.am-content .am-subnav .btn { border-radius: 10px; font-size: .86rem; padding: .45rem .9rem; }
.am-content .am-subnav .btn b { font-weight: 600; }
/* ตาราง */
.am-content table { width: 100% !important; font-size: .9rem; border-collapse: collapse; }
.am-content table th { font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: 10px 12px !important; white-space: nowrap;
  background: var(--c-table_head_bg) !important; color: var(--c-table_head_text) !important; border-bottom: 1px solid var(--c-table_border) !important; }
.am-content table td { padding: 10px 12px !important; vertical-align: middle; border-bottom: 1px solid var(--c-table_border) !important; }
.am-content table tbody tr:hover td { background: color-mix(in srgb, var(--c-main) 4%, transparent) !important; }
.am-content table td img { width: 44px !important; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--c-card_border); background: var(--c-input_bg); }
.am-content table td .btn { width: auto !important; min-width: 0; margin: 2px; padding: .32rem .7rem; font-size: .8rem; border-radius: 8px; border: 0; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.am-content table td .btn i { font-size: .75rem; color: inherit !important; }
.am-content table td .btn-warning { background: color-mix(in srgb, #f59e0b 16%, transparent) !important; color: #b45309 !important; }
.am-content table td .btn-danger { background: color-mix(in srgb, var(--c-danger) 13%, transparent) !important; color: var(--c-danger) !important; }
.am-content table td .btn-success { background: color-mix(in srgb, var(--c-ok) 15%, transparent) !important; color: var(--c-ok) !important; }
.am-content table td .btn-primary, .am-content table td .btn-info { background: color-mix(in srgb, var(--c-main) 13%, transparent) !important; color: var(--c-main) !important; }
.am-content table td .btn-secondary, .am-content table td .btn-dark { background: color-mix(in srgb, var(--c-text) 8%, transparent) !important; color: var(--c-text) !important; }
.am-content table td .btn:hover { filter: brightness(.95); }
html[data-mode="dark"] .am-content table td .btn-warning { color: #fbbf24 !important; }
.am-content td.am-actions { white-space: nowrap; text-align: right; }
/* DataTables */
.am-content .dataTables_wrapper { font-size: .86rem; }
.am-content .dataTables_wrapper .dataTables_length, .am-content .dataTables_wrapper .dataTables_filter { margin-bottom: 12px; }
.am-content .dataTables_wrapper .dataTables_filter input, .am-content .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--c-input_border) !important; background: var(--c-input_bg) !important; color: var(--c-input_text) !important; border-radius: 8px; padding: 5px 10px; margin-left: 6px; outline: none; }
.am-content .dataTables_wrapper .dataTables_length select { padding-right: 24px; }
.am-content .dataTables_wrapper .dataTables_info { color: var(--c-muted) !important; padding-top: 14px; }
.am-content .dataTables_wrapper .dataTables_paginate { padding-top: 10px; }
.am-content .dataTables_wrapper .dataTables_paginate .paginate_button { border: 1px solid transparent !important; border-radius: 8px !important; padding: 4px 10px !important; margin: 0 2px; background: none !important; color: var(--c-text) !important; }
.am-content .dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: color-mix(in srgb, var(--c-main) 10%, transparent) !important; color: var(--c-main) !important; }
.am-content .dataTables_wrapper .dataTables_paginate .paginate_button.current, .am-content .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background: var(--c-main) !important; color: var(--c-btn_text) !important; }
.am-content .dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity: .45; }
.am-content table.dataTable thead th { background-image: none; }
.am-content table.dataTable.no-footer { border-bottom: 0 !important; }
/* การ์ดเมนูรวม */
.am-content .count-only { padding: 18px !important; text-align: left; border: 1px solid var(--c-card_border) !important; border-radius: 14px !important; box-shadow: none !important; transition: border-color .15s, transform .15s; height: 100%; }
.am-content .count-only:hover { border-color: var(--c-main) !important; transform: translateY(-2px); }
.am-content .count-only a { display: flex !important; align-items: center; gap: 14px; }
.am-content .count-only center { display: contents; }
.am-content .count-only img { height: 46px !important; width: 46px; object-fit: contain; margin: 0 !important; flex: 0 0 46px; }
.am-content .count-only h2 { font-size: 1rem; margin: 0 0 2px !important; color: var(--c-card_title) !important; }
.am-content .count-only small { font-size: .8rem; color: var(--c-muted) !important; }
.am-content .count-only .am-tile-txt { display: flex; flex-direction: column; min-width: 0; }
.am-content .row.justify-content-center:has(.count-only) { justify-content: flex-start !important; --bs-gutter-y: 14px; }
.am-content .row:has(.count-only) > [class*="col-lg-3"] { flex: 0 0 auto; width: 33.333%; }
@media (max-width: 991px) { .am-content .row:has(.count-only) > [class*="col-lg-3"] { width: 100%; } }
/* ฟอร์มในหน้าเดิม */
.am-content .form-control, .am-content .form-select { border-radius: 10px; }
.am-content .modal-content { border-radius: 16px; border: 1px solid var(--c-card_border); background: var(--c-card_bg) !important; }
.am-content .modal-header, .am-content .modal-footer { border-color: var(--c-card_border) !important; }
.am-content .modal-title { font-size: 1.05rem; font-weight: 700; }
.am-content .am-subnav { margin: 0 0 14px; }
.am-content .am-subnav .btn i { font-size: .8rem; margin-right: 2px; }
.am-content .am-addbtn { width: auto !important; padding: .5rem 1.1rem; border-radius: 10px; font-weight: 600; }
.am-content table + center, .am-content .table-responsive > center { display: block; }
.am-content .table-responsive h2 { font-size: 1rem; margin: 4px 0 12px; text-align: left; }
.am-content .col-lg-6.m-auto, .am-content .col-lg-6.mx-auto { margin-left: 0 !important; margin-right: 0 !important; max-width: 620px; }
.am-content center:has(> .col-lg-6) { text-align: left; }
.am-content center > .col-lg-6 { margin-left: 0; max-width: 620px; }

/* ============================== ป้ายข้างจอ ============================== */
.sb-ad { display: none; }
@media (min-width: 1560px) {
  .sb-ad { display: flex; flex-direction: column; position: fixed; top: 50%; transform: translateY(-50%); z-index: 1020;
    width: clamp(110px, calc((100vw - 1296px) / 2 - 40px), 150px); transition: opacity .25s, transform .25s; }
  .sb-left { left: 0; }
  .sb-right { right: 0; }
  .sb-ad a, .sb-ad > img { display: block; }
  /* ล็อกขนาดป้าย 1:3 (แนวตั้งยาว) ไม่ว่ารูปจะขนาดไหน — รูปที่สัดส่วนไม่ตรงจะถูกครอปให้เต็มกรอบ */
  .sb-ad img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 3; max-height: calc(100vh - 170px); object-fit: cover; object-position: center; background: var(--c-card_bg); }
  .sb-left img { border-radius: 0 10px 0 0; }
  .sb-right img { border-radius: 10px 0 0 0; }
  .sb-x { width: 100%; height: 26px; display: grid; place-items: center; padding: 0; background: var(--c-card_bg);
    border: 1px solid color-mix(in srgb, var(--c-danger) 45%, transparent); border-top: 0; }
  .sb-left .sb-x { border-left: 0; border-radius: 0 0 10px 0; }
  .sb-right .sb-x { border-right: 0; border-radius: 0 0 0 10px; }
  .sb-x i { color: var(--c-danger) !important; font-size: .8rem; }
  .sb-x:hover { background: color-mix(in srgb, var(--c-danger) 10%, var(--c-card_bg)); }
  .sb-left.is-out { opacity: 0; transform: translate(-100%, -50%); }
  .sb-right.is-out { opacity: 0; transform: translate(100%, -50%); }
}

/* ปุ่มย้อนกลับ/ปุ่มลิงก์แบบเดิมในหน้าเว็บ (เคยเป็นสีดำ) */
button.btn.nav-link.underline-active, a.btn.nav-link.underline-active {
  background: var(--c-card_bg) !important; color: var(--c-btn2_text) !important; border: 1px solid var(--c-btn2_border) !important;
  box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  border-radius: 10px; padding: .45rem .95rem !important; font-size: .88rem; line-height: 1.3; }
button.btn.nav-link.underline-active *, a.btn.nav-link.underline-active * { color: inherit !important; font-weight: 600; }
button.btn.nav-link.underline-active:hover, a.btn.nav-link.underline-active:hover { border-color: var(--c-main) !important; color: var(--c-main) !important; }
button.btn.nav-link.underline-active::after, a.btn.nav-link.underline-active::after { display: none; }

/* ============================== การ์ดสินค้า (เลือกดีไซน์/เอฟเฟกต์ได้ในหลังบ้าน) ============================== */
.sc { --sc-r: var(--card-r, 16px); --sc-pad: 8px; position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%;
  background: var(--c-card_bg); border: 1px solid var(--c-card_border); border-radius: var(--sc-r); padding: var(--sc-pad); isolation: isolate;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s; }
.sc a { text-decoration: none !important; color: inherit; }
.sc-img { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: calc(var(--sc-r) - var(--sc-pad)); background: color-mix(in srgb, var(--c-text) 6%, transparent); }
.sc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s; }
.sc-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 10px 4px 4px; }
.sc .sc-name { font-weight: 600; font-size: .95rem; line-height: 1.35; color: var(--c-card_title) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.sc .sc-price b { font-size: 1.05rem; font-weight: 700; color: var(--c-danger) !important; font-variant-numeric: tabular-nums; }
.sc .sc-price s { font-size: .8rem; color: var(--c-muted) !important; }
.sc .sc-pct { font-style: normal; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--c-danger); color: #fff !important; align-self: center; }
.sc .sc-lbl { display: none; font-size: .8rem; color: var(--c-muted) !important; }
.sc-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.sc .sc-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px; font-weight: 600; font-size: .92rem;
  background: color-mix(in srgb, var(--c-main) 13%, transparent); color: var(--c-main) !important; transition: background .2s, color .2s, transform .2s, box-shadow .2s; }
.sc .sc-btn i { color: inherit !important; font-size: .82rem; }
.sc .sc-btn .sc-ic { order: 2; }
.sc .sc-arr { display: none; }
a.sc-btn:hover { background: var(--c-main) !important; color: var(--c-btn_text) !important; }
.sc .sc-stock { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .78rem; color: var(--c-muted) !important; }
.sc .sc-stock b { color: inherit !important; font-weight: 600; }
.sc .sc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-ok); flex: 0 0 6px; }
.sc .sc-ready { display: none; }
.sc-chip { display: none; position: absolute; top: 8px; left: 8px; z-index: 2; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700;
  background: rgba(15, 12, 30, .78); color: #fff !important; backdrop-filter: blur(4px); }
.sc-chip i { font-size: .62rem; color: inherit !important; }
.sc-ovname { display: none; }
/* ป้าย HOT (เลือกสินค้าได้ในหลังบ้าน): ป้ายเอียง + เปลวไฟขยับ */
.sc-hot { position: absolute; top: 12px; left: 20px; z-index: 3; display: inline-flex; align-items: center; height: 26px; padding: 0 12px 0 22px; pointer-events: none;
  border-radius: 9px; border: 2px solid #fff; transform: rotate(-10deg); transform-origin: left center;
  background: linear-gradient(180deg, #ff6a3d 0%, #ff2d2d 55%, #e0141f 100%);
  box-shadow: 0 6px 14px -6px rgba(224, 20, 31, .9), inset 0 1px 0 rgba(255, 255, 255, .45); animation: sc-hot-pop 2.4s ease-in-out infinite; }
.sc-hot b { position: relative; z-index: 2; font-family: inherit; font-style: italic; font-weight: 900; font-size: .82rem; letter-spacing: .04em; line-height: 1; color: #fff !important;
  text-shadow: 0 1px 0 #a80d16, 1px 2px 0 rgba(120, 6, 12, .55); }
.sc-hot-fire { position: absolute; left: -15px; bottom: -3px; width: 30px; height: 36px; z-index: 1; overflow: visible; filter: drop-shadow(0 0 6px rgba(255, 140, 0, .75)); }
.sc-hot-fire path { transform-box: fill-box; transform-origin: 50% 100%; }
.sc-hot-fire .f1 { fill: #ff3b1f; animation: sc-fl 0.9s ease-in-out infinite alternate; }
.sc-hot-fire .f2 { fill: #ff9a1f; animation: sc-fl 0.7s ease-in-out -.3s infinite alternate-reverse; }
.sc-hot-fire .f3 { fill: #ffe066; animation: sc-fl 0.55s ease-in-out -.1s infinite alternate; }
.sc-hot-sp { position: absolute; left: -2px; bottom: 18px; width: 4px; height: 4px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 6px #ff9a1f; opacity: 0; animation: sc-ember 1.6s ease-out infinite; }
.sc-hot-sp + .sc-hot-sp { left: -10px; width: 3px; height: 3px; animation-delay: .8s; animation-duration: 1.9s; }
@keyframes sc-fl { 0% { transform: scale(1, 1) skewX(0deg); } 35% { transform: scale(.94, 1.08) skewX(-4deg); } 70% { transform: scale(1.04, .94) skewX(3deg); } 100% { transform: scale(.97, 1.12) skewX(-2deg); } }
@keyframes sc-ember { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-6px, -22px) scale(.3); opacity: 0; } }
@keyframes sc-hot-pop { 0%, 100% { transform: rotate(-10deg) scale(1); } 50% { transform: rotate(-8deg) scale(1.06); } }
.sc.has-hot .sc-chip { left: auto; right: 8px; }
.sc.is-out .sc-hot { filter: grayscale(1); opacity: .75; animation: none; }
.sc.is-out .sc-hot * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .sc-hot, .sc-hot * { animation: none !important; } }
/* สินค้าหมด */
.sc-sold { position: absolute; left: -15%; right: -15%; top: 50%; z-index: 3; transform: translateY(-50%) rotate(-12deg); padding: .4rem 0; text-align: center;
  background: var(--c-danger); color: #fff !important; font-weight: 700; letter-spacing: .03em; box-shadow: 0 6px 18px -6px rgba(0,0,0,.45); }
.sc.is-out .sc-img img { filter: grayscale(.5); opacity: .55; }
.sc.is-out .sc-body > *:not(.sc-foot), .sc.is-out .sc-stock { opacity: .55; }
.sc.is-out .sc-btn { background: color-mix(in srgb, var(--c-danger) 12%, transparent) !important; color: var(--c-danger) !important; cursor: not-allowed; }
.sc.is-out .sc-dot { background: var(--c-danger); }
.sc.is-out:hover .sc-btn { background: var(--c-danger) !important; color: #fff !important; }

/* V.1 คลาสสิก */
.sc-v1 .sc-name { font-weight: 500; color: var(--c-card_text) !important; }
.sc-v1 .sc-price { justify-content: center; }
/* V.2 มินิมอล: รูปเต็มขอบ ไม่มีปุ่ม */
.sc-v2 { --sc-pad: 0px; overflow: hidden; }
.sc-v2 .sc-img { border-radius: 0; }
.sc-v2 .sc-body { padding: 10px 12px 12px; gap: 6px; }
.sc-v2 .sc-btn { display: none; }
.sc-v2 .sc-stock { justify-content: flex-start; }
/* V.3 ปุ่มทึบ */
.sc-v3 .sc-price b { font-size: 1.2rem; }
.sc-v3 .sc-btn { background: color-mix(in srgb, var(--c-text) 12%, transparent); color: var(--c-card_title) !important; border-radius: 8px; }
.sc-v3 .sc-btn .sc-ic { display: none; }
/* V.4 รูปจางล่าง + ปุ่มคู่คงเหลือ */
.sc-v4 .sc-img { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.sc-v4 .sc-body { margin-top: -14px; position: relative; }
.sc-v4 .sc-foot { flex-direction: row; align-items: center; justify-content: space-between; }
.sc-v4 .sc-btn { background: linear-gradient(135deg, color-mix(in srgb, var(--c-main) 70%, #fff), var(--c-main)); color: var(--c-btn_text) !important; padding: 0 18px; border-radius: 12px; box-shadow: 0 8px 18px -8px var(--c-main); }
.sc-v4 .sc-btn .sc-ic { display: none; }
.sc-v4 .sc-stock { flex-direction: column; gap: 0; align-items: flex-end; text-align: right; line-height: 1.25; color: var(--c-main) !important; }
.sc-v4 .sc-stock .sc-dot { display: none; }
/* V.5 ราคาเด่น */
.sc-v5 .sc-name { font-weight: 500; color: var(--c-card_text) !important; }
.sc-v5 .sc-price { justify-content: center; align-items: baseline; }
.sc-v5 .sc-lbl { display: inline; }
.sc-v5 .sc-price b { font-size: 1.3rem; }
.sc-v5 .sc-btn { background: linear-gradient(180deg, color-mix(in srgb, var(--c-main) 75%, #fff), var(--c-main)); color: var(--c-btn_text) !important; border-radius: 99px; }
.sc-v5 .sc-btn .sc-ic { display: none; }
/* V.6 แบนเนอร์ */
.sc-v6 { --sc-pad: 0px; overflow: hidden; }
.sc-v6 .sc-img { border-radius: 0; }
.sc-v6 .sc-body { padding: 12px 14px 14px; }
.sc-v6 .sc-price b { font-size: 1.35rem; }
.sc-v6 .sc-foot { flex-direction: column-reverse; gap: 10px; margin-top: 0; }
.sc-v6 .sc-stock { justify-content: flex-start; }
.sc-v6 .sc-ready { display: inline; }
.sc-v6 .sc-btn { background: linear-gradient(90deg, color-mix(in srgb, var(--c-main) 80%, #fff), var(--c-main)); color: var(--c-btn_text) !important; border-radius: 99px; min-height: 42px; }
.sc-v6 .sc-btn .sc-ic { order: 0; }
.sc-v6 .sc-arr { display: inline; font-size: .7rem !important; }
.sc-v6 .sc-body { gap: 6px; }
.sc-v6 .sc-foot { margin-top: auto; }
/* V.7 ชื่อบนรูป */
.sc-v7 .sc-chip { display: inline-flex; }
.sc-v7 .sc-ovname { display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 30px 12px 10px; font-weight: 700; font-size: .95rem; line-height: 1.3;
  background: linear-gradient(transparent, rgba(10, 8, 20, .82)); color: #fff !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-v7 .sc-body > .sc-name { display: none; }
.sc-v7 .sc-price b { font-size: 1.25rem; }
.sc-v7 .sc-pct { display: none; }
.sc-v7 .sc-foot { flex-direction: row-reverse; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--c-main) 22%, transparent); background: color-mix(in srgb, var(--c-main) 6%, transparent); }
.sc-v7 .sc-stock { flex: 1; justify-content: flex-start; padding: 0 12px; }
.sc-v7 .sc-btn { width: 44px; min-height: 40px; padding: 0; border-radius: 0; background: var(--c-main); color: var(--c-btn_text) !important; }
.sc-v7 .sc-btn span { display: none; }
.sc-v7 .sc-btn .sc-ic::before { content: "\f290"; }
/* V.8 ปุ่มตะกร้า */
.sc-v8 .sc-chip { display: inline-flex; left: auto; right: 8px; background: var(--c-danger); }
.sc-v8 .sc-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n n" "p b" "s b"; column-gap: 10px; row-gap: 4px; }
.sc-v8 .sc-name { grid-area: n; margin-bottom: 2px; }
.sc-v8 .sc-price { grid-area: p; flex-direction: column; align-items: flex-start; gap: 0; }
.sc-v8 .sc-price b { font-size: 1.2rem; }
.sc-v8 .sc-pct { display: none; }
.sc-v8 .sc-foot { display: contents; }
.sc-v8 .sc-btn { grid-area: b; align-self: center; width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; }
.sc-v8 .sc-btn span, .sc-v8 .sc-btn .sc-arr { display: none; }
.sc-v8 .sc-stock { grid-area: s; justify-content: flex-start; }

/* เอฟเฟกต์ */
.sc.fx-lift:not(.is-out):hover { transform: translateY(-6px); box-shadow: 0 22px 40px -22px color-mix(in srgb, var(--c-main) 70%, rgba(0,0,0,.6)); }
.sc.fx-glow:not(.is-out):hover { border-color: var(--c-main); box-shadow: 0 0 0 1px var(--c-main), 0 0 32px -6px color-mix(in srgb, var(--c-main) 75%, transparent); }
.sc.fx-zoom:not(.is-out):hover .sc-img img { transform: scale(1.09); }
.sc.fx-shine { overflow: hidden; }
.sc.fx-shine::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: 4; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); opacity: 0; }
.sc.fx-shine:not(.is-out):hover::after { animation: sc-shine .8s ease forwards; }
.sc.fx-shine:not(.is-out):hover { transform: translateY(-3px); }
.sc.fx-border { border-color: transparent; }
.sc.fx-border::before { content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--sc-a, 0deg), var(--c-main), transparent 30%, color-mix(in srgb, var(--c-main) 40%, #fff) 50%, transparent 70%, var(--c-main));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: sc-spin 4s linear infinite; }
.sc.fx-border.is-out::before { animation: none; opacity: .4; }
.sc.fx-tilt { transform-style: preserve-3d; transition: transform .15s ease-out, box-shadow .25s; will-change: transform; }
.sc.fx-tilt::after { content: ''; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.28), transparent 55%); }
.sc.fx-tilt.is-tilt::after { opacity: 1; }
.sc.fx-tilt.is-tilt { box-shadow: 0 24px 40px -24px rgba(0,0,0,.5); }
.sc.fx-float:not(.is-out) { animation: sc-float 4s ease-in-out infinite; }
.hx-prods > :nth-child(2n) .sc.fx-float, .hm-prods > :nth-child(2n).sc.fx-float, .sc-grid > :nth-child(2n) .sc.fx-float { animation-delay: -2s; }
.sc.fx-float:not(.is-out):hover { animation-play-state: paused; }
@property --sc-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes sc-spin { to { --sc-a: 360deg; } }
@keyframes sc-shine { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
@keyframes sc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .sc, .sc::before, .sc::after, .sc-img img { animation: none !important; transition: none !important; } .sc.fx-tilt { transform: none !important; } }
@media (max-width: 575px) { .sc-body { padding: 8px 2px 2px; gap: 6px; } .sc .sc-name { font-size: .86rem; } .sc .sc-btn { min-height: 36px; font-size: .84rem; } .sc-v4 .sc-foot { flex-direction: column; align-items: stretch; } .sc-v4 .sc-stock { align-items: center; } }
.sc.is-out .sc-ic, .sc.is-out .sc-arr { display: none !important; }
.sc-v4 .sc-stock { white-space: nowrap; }

/* ไอคอนชุดใหม่ (assets/icon/x) */
.hx-head-t { display: flex; align-items: center; gap: 12px; }
.hx-head-ic { width: 46px; height: 46px; flex: 0 0 46px; filter: drop-shadow(0 8px 14px rgba(40, 20, 90, .18)); }
.am-bar h1 .am-hico, .am-hico { width: 34px !important; height: 34px !important; flex: 0 0 34px; margin-right: 10px; vertical-align: middle; filter: drop-shadow(0 6px 10px rgba(40, 20, 90, .18)); }
img.hx-ic { filter: drop-shadow(0 4px 8px rgba(40, 20, 90, .16)); }

/* ==========================================================================
   5) คริสต์มาส — คืนหิมะตก ไฟประดับ หมวกซานต้า ต้นสน (พื้นหลังขยับได้)
   ========================================================================== */
.theme-xmas { --card-r: 16px; --hero-r: 22px; --media-r: 14px; --btn-r: 12px; --input-r: 12px; --nav-r: 18px;
  --xm-red: #d6283a; --xm-green: #1f8a4c; --xm-gold: #f2c14e; --xm-scene-op: .45; }
html[data-mode="light"] body.theme-xmas { --xm-scene-op: 1; }
/* ท้องฟ้ากลางคืน (ใส่ที่ <html> เพื่อให้ชั้นหิมะ/ฉากอยู่ด้านหน้าพื้น) */
html:has(body.theme-xmas) { background: radial-gradient(1200px 600px at 85% -10%, rgba(242, 193, 78, .14), transparent 60%), radial-gradient(900px 500px at 10% 0%, rgba(52, 209, 122, .12), transparent 60%), linear-gradient(180deg, #06150f 0%, #0a2318 55%, #0d2a1d 100%) fixed !important; }
html[data-mode="light"]:has(body.theme-xmas) { background: radial-gradient(1200px 600px at 85% -10%, rgba(242, 193, 78, .22), transparent 60%), linear-gradient(180deg, #e4efea 0%, #f4f9f6 60%, #eaf3ee 100%) fixed !important; }
html:has(body.theme-xmas) body.theme-xmas { background: transparent !important; }
html:has(body.theme-xmas.use-bg) { background: var(--c-page_bg) !important; }
/* หิมะ 2 ชั้น (ใกล้-ไกล) ตกไม่หยุด + ฉากต้นสน/บ้านด้านล่าง */
body.theme-xmas::before, html:has(body.theme-xmas)::before { content: ''; position: fixed; left: 0; right: 0; top: -400px; height: calc(100vh + 400px); z-index: -1; pointer-events: none; will-change: transform; }
html:has(body.theme-xmas)::before { background-image: radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.9) 50%, transparent 52%), radial-gradient(1.6px 1.6px at 120px 80px, rgba(255,255,255,0.7) 50%, transparent 52%), radial-gradient(2.2px 2.2px at 60px 150px, rgba(255,255,255,0.8) 50%, transparent 52%), radial-gradient(1.4px 1.4px at 170px 190px, rgba(255,255,255,0.6) 50%, transparent 52%), radial-gradient(2px 2px at 90px 250px, rgba(255,255,255,0.9) 50%, transparent 52%), radial-gradient(1.6px 1.6px at 10px 330px, rgba(255,255,255,0.7) 50%, transparent 52%), radial-gradient(2.4px 2.4px at 150px 360px, rgba(255,255,255,0.8) 50%, transparent 52%), radial-gradient(1.2px 1.2px at 50px 60px, rgba(255,255,255,0.5) 50%, transparent 52%), radial-gradient(1.8px 1.8px at 190px 120px, rgba(255,255,255,0.75) 50%, transparent 52%), radial-gradient(1.3px 1.3px at 110px 300px, rgba(255,255,255,0.6) 50%, transparent 52%); background-size: 200px 400px; opacity: .55; animation: xm-fall 26s linear infinite; }
body.theme-xmas::before { background-image: radial-gradient(4px 4px at 40px 60px, rgba(255,255,255,0.95) 50%, transparent 54%), radial-gradient(3.4px 3.4px at 260px 140px, rgba(255,255,255,0.85) 50%, transparent 54%), radial-gradient(4.6px 4.6px at 150px 300px, rgba(255,255,255,0.9) 50%, transparent 54%), radial-gradient(3px 3px at 330px 30px, rgba(255,255,255,0.8) 50%, transparent 54%), radial-gradient(3.6px 3.6px at 90px 360px, rgba(255,255,255,0.85) 50%, transparent 54%), radial-gradient(5px 5px at 220px 250px, rgba(255,255,255,0.9) 50%, transparent 54%); background-size: 400px 400px; opacity: .8; animation: xm-fall 14s linear infinite; }
html[data-mode="light"] body.theme-xmas::before, html[data-mode="light"]:has(body.theme-xmas)::before { filter: brightness(.72) sepia(.2) hue-rotate(160deg) saturate(2); }
body.theme-xmas::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 150px; z-index: -1; pointer-events: none; opacity: var(--xm-scene-op);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 180' preserveAspectRatio='xMidYMax slice'%3E %3Cpath d='M0 150 C200 110 360 130 520 140 C700 152 820 108 1000 118 C1180 128 1300 104 1440 120 V180 H0Z' fill='%23cfe0ea'/%3E %3Cpath d='M70 90 L42.1 154.8 H97.9Z M70 109.8 L35.404 174.6 H104.596Z' fill='%230f3d27'/%3E%3Crect x='66.4' y='172.8' width='7.2' height='7.2' fill='%233b2a1f'/%3E%3Cpath d='M70 90 L57.724000000000004 120.6 Q70 117.0 82.276 120.6Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M150 50 L109.7 143.6 H190.3Z M150 78.6 L100.028 172.2 H199.97199999999998Z' fill='%230c3321'/%3E%3Crect x='144.8' y='169.6' width='10.4' height='10.4' fill='%233b2a1f'/%3E%3Cpath d='M150 50 L132.268 94.2 Q150 89.0 167.732 94.2Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M230 110 L208.3 160.4 H251.7Z M230 125.4 L203.092 175.8 H256.908Z' fill='%23124a2f'/%3E%3Crect x='227.2' y='174.4' width='5.6000000000000005' height='5.6000000000000005' fill='%233b2a1f'/%3E%3Cpath d='M230 110 L220.452 133.8 Q230 131.0 239.548 133.8Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M480 70 L445.9 149.2 H514.1Z M480 94.2 L437.716 173.4 H522.284Z' fill='%230c3321'/%3E%3Crect x='475.6' y='171.2' width='8.8' height='8.8' fill='%233b2a1f'/%3E%3Cpath d='M480 70 L464.996 107.39999999999999 Q480 103.0 495.004 107.39999999999999Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M560 100 L535.2 157.6 H584.8Z M560 117.6 L529.248 175.2 H590.752Z' fill='%23124a2f'/%3E%3Crect x='556.8' y='173.6' width='6.4' height='6.4' fill='%233b2a1f'/%3E%3Cpath d='M560 100 L549.088 127.19999999999999 Q560 124.0 570.912 127.19999999999999Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M900 60 L862.8 146.4 H937.2Z M900 86.39999999999999 L853.872 172.8 H946.128Z' fill='%230f3d27'/%3E%3Crect x='895.2' y='170.4' width='9.6' height='9.6' fill='%233b2a1f'/%3E%3Cpath d='M900 60 L883.632 100.8 Q900 96.0 916.368 100.8Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M980 95 L953.65 156.2 H1006.35Z M980 113.7 L947.326 174.9 H1012.674Z' fill='%23124a2f'/%3E%3Crect x='976.6' y='173.2' width='6.8' height='6.8' fill='%233b2a1f'/%3E%3Cpath d='M980 95 L968.406 123.9 Q980 120.5 991.594 123.9Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M1250 40 L1206.6 140.8 H1293.4Z M1250 70.8 L1196.184 171.6 H1303.816Z' fill='%230c3321'/%3E%3Crect x='1244.4' y='168.8' width='11.200000000000001' height='11.200000000000001' fill='%233b2a1f'/%3E%3Cpath d='M1250 40 L1230.904 87.6 Q1250 82.0 1269.096 87.6Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M1330 85 L1300.55 153.4 H1359.45Z M1330 105.89999999999999 L1293.482 174.3 H1366.518Z' fill='%230f3d27'/%3E%3Crect x='1326.2' y='172.4' width='7.6000000000000005' height='7.6000000000000005' fill='%233b2a1f'/%3E%3Cpath d='M1330 85 L1317.042 117.3 Q1330 113.5 1342.958 117.3Z' fill='%23fff' opacity='.85'/%3E%3Cpath d='M1400 110 L1378.3 160.4 H1421.7Z M1400 125.4 L1373.092 175.8 H1426.908Z' fill='%23124a2f'/%3E%3Crect x='1397.2' y='174.4' width='5.6000000000000005' height='5.6000000000000005' fill='%233b2a1f'/%3E%3Cpath d='M1400 110 L1390.452 133.8 Q1400 131.0 1409.548 133.8Z' fill='%23fff' opacity='.85'/%3E %3Cg transform='translate(680 112)'%3E%3Crect x='0' y='22' width='70' height='46' fill='%235a3a2a'/%3E%3Cpath d='M-8 26 L35 -6 L78 26Z' fill='%237a2f2f'/%3E%3Cpath d='M-8 26 L35 -6 L78 26 L72 30 L35 3 L-2 30Z' fill='%23fff'/%3E%3Crect x='12' y='34' width='16' height='14' fill='%23ffd36b'/%3E%3Crect x='42' y='40' width='14' height='28' fill='%233a241a'/%3E%3Crect x='50' y='-2' width='9' height='16' fill='%234a2f22'/%3E%3C/g%3E %3Cpath d='M0 162 C240 142 420 168 640 160 C860 152 1040 172 1240 158 C1340 152 1400 156 1440 160 V180 H0Z' fill='%23f4f8fb'/%3E%3C/svg%3E") center bottom / cover no-repeat; }
@keyframes xm-fall { to { transform: translate3d(0, 400px, 0); } }

/* แถบเมนู: หิมะเกาะด้านบน + ไฟประดับกะพริบด้านล่าง + ลูกบอลห้อย */
.theme-xmas .dn { position: relative; border-color: color-mix(in srgb, var(--xm-gold) 30%, var(--c-card_border)) !important; }
.theme-xmas .dn::before { content: ''; position: absolute; left: 10px; right: 10px; top: -5px; height: 15px; pointer-events: none; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18' width='120' height='18' preserveAspectRatio='none'%3E %3Cpath d='M0 0 H120 V7 C114 7 112 11 106 10 C100 9 100 5 93 6 C87 7 88 15 82 15 C76 15 77 8 70 7 C62 6 60 10 52 9 C45 8 46 4 38 5 C31 6 33 13 26 13 C20 13 20 7 13 7 C7 7 5 10 0 9Z' fill='%23ffffff'/%3E %3Cpath d='M0 9 C5 10 7 7 13 7 C20 7 20 13 26 13 C33 13 31 6 38 5' stroke='%23dbe8f2' stroke-width='1.2' fill='none'/%3E%3C/svg%3E") 0 0 / 120px 15px repeat-x; border-radius: 10px 10px 0 0; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.theme-xmas .dn-wrap::before { content: ''; position: absolute; left: 50%; bottom: -26px; width: min(1296px, calc(100% - 32px)); height: 34px; transform: translateX(-50%); pointer-events: none; z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 34' width='160' height='34'%3E %3Cpath d='M0 8 Q40 18 80 8 T160 8' stroke='%2320372b' stroke-width='2' fill='none'/%3E%3Cg%3E%3Crect x='13' y='7' width='6' height='5' rx='1' fill='%232d3b33'/%3E%3Cellipse cx='16' cy='18' rx='9' ry='11' fill='%23ff3b4e' opacity='.28'%3E%3Canimate attributeName='opacity' values='.35;.08;.35' dur='1.8s' begin='0.00s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='16' cy='17' rx='4.2' ry='6' fill='%23ff3b4e'%3E%3Canimate attributeName='opacity' values='1;.45;1' dur='1.8s' begin='0.00s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='14.6' cy='15' rx='1.2' ry='2' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3Cg%3E%3Crect x='45' y='11' width='6' height='5' rx='1' fill='%232d3b33'/%3E%3Cellipse cx='48' cy='22' rx='9' ry='11' fill='%23ffd34d' opacity='.28'%3E%3Canimate attributeName='opacity' values='.35;.08;.35' dur='1.8s' begin='0.32s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='48' cy='21' rx='4.2' ry='6' fill='%23ffd34d'%3E%3Canimate attributeName='opacity' values='1;.45;1' dur='1.8s' begin='0.32s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='46.6' cy='19' rx='1.2' ry='2' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3Cg%3E%3Crect x='77' y='7' width='6' height='5' rx='1' fill='%232d3b33'/%3E%3Cellipse cx='80' cy='18' rx='9' ry='11' fill='%2334d17a' opacity='.28'%3E%3Canimate attributeName='opacity' values='.35;.08;.35' dur='1.8s' begin='0.64s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='80' cy='17' rx='4.2' ry='6' fill='%2334d17a'%3E%3Canimate attributeName='opacity' values='1;.45;1' dur='1.8s' begin='0.64s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='78.6' cy='15' rx='1.2' ry='2' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3Cg%3E%3Crect x='109' y='11' width='6' height='5' rx='1' fill='%232d3b33'/%3E%3Cellipse cx='112' cy='22' rx='9' ry='11' fill='%234fa8ff' opacity='.28'%3E%3Canimate attributeName='opacity' values='.35;.08;.35' dur='1.8s' begin='0.96s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='112' cy='21' rx='4.2' ry='6' fill='%234fa8ff'%3E%3Canimate attributeName='opacity' values='1;.45;1' dur='1.8s' begin='0.96s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='110.6' cy='19' rx='1.2' ry='2' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3Cg%3E%3Crect x='141' y='7' width='6' height='5' rx='1' fill='%232d3b33'/%3E%3Cellipse cx='144' cy='18' rx='9' ry='11' fill='%23ff7ad9' opacity='.28'%3E%3Canimate attributeName='opacity' values='.35;.08;.35' dur='1.8s' begin='1.28s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='144' cy='17' rx='4.2' ry='6' fill='%23ff7ad9'%3E%3Canimate attributeName='opacity' values='1;.45;1' dur='1.8s' begin='1.28s' repeatCount='indefinite'/%3E%3C/ellipse%3E%3Cellipse cx='142.6' cy='15' rx='1.2' ry='2' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 160px 34px repeat-x; }
.theme-xmas .dn-wrap::after { content: ''; position: absolute; right: max(40px, calc(50% - 600px)); bottom: -96px; width: 110px; height: 88px; pointer-events: none; z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 96'%3E %3Cpath d='M20 0 V44 M62 0 V24 M100 0 V58' stroke='%23c9b27a' stroke-width='1.4'/%3E %3Crect x='15' y='42' width='10' height='7' rx='1.5' fill='%23e2c46b'/%3E%3Ccircle cx='20' cy='62' r='14' fill='%23d6283a'/%3E%3Cpath d='M8 58 Q20 64 32 58' stroke='%23f2c14e' stroke-width='2.5' fill='none'/%3E%3Ccircle cx='15' cy='56' r='3.5' fill='%23fff' opacity='.55'/%3E %3Crect x='57' y='22' width='10' height='7' rx='1.5' fill='%23e2c46b'/%3E%3Ccircle cx='62' cy='40' r='12' fill='%23f2c14e'/%3E%3Cpath d='M51 40 H73' stroke='%23c81d30' stroke-width='2.5'/%3E%3Ccircle cx='58' cy='35' r='3' fill='%23fff' opacity='.6'/%3E %3Crect x='95' y='56' width='10' height='7' rx='1.5' fill='%23e2c46b'/%3E%3Ccircle cx='100' cy='76' r='15' fill='%231f8a4c'/%3E%3Cpath d='M86 72 Q100 80 114 72 M87 80 Q100 88 113 80' stroke='%23f2c14e' stroke-width='2' fill='none'/%3E%3Ccircle cx='95' cy='70' r='3.5' fill='%23fff' opacity='.5'/%3E%3C/svg%3E") center top / contain no-repeat; transform-origin: 50% 0; animation: xm-swing 4.5s ease-in-out infinite; }
@keyframes xm-swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.theme-xmas .dn-wrap { margin-bottom: 34px; }
/* หมวกซานต้าบนโลโก้ */
.theme-xmas .dn-brand { position: relative; }
.theme-xmas .dn-brand::after { content: ''; position: absolute; left: -16px; top: -20px; width: 46px; height: 39px; transform: rotate(-22deg); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 60'%3E %3Cpath d='M10 44 C12 26 24 8 44 6 C56 5 64 14 62 30 L56 30 C55 22 50 18 44 20 C34 24 32 36 34 44Z' fill='%23c81d30'/%3E %3Cpath d='M44 6 C56 5 64 14 62 30 L58 30 C58 18 52 12 44 12Z' fill='%23e43a4c'/%3E %3Cpath d='M14 40 C18 26 26 16 38 12' stroke='%23ff6b78' stroke-width='3' fill='none' stroke-linecap='round' opacity='.6'/%3E %3Crect x='4' y='40' width='40' height='14' rx='7' fill='%23fff'/%3E%3Crect x='4' y='47' width='40' height='7' rx='3.5' fill='%23e3ecf3'/%3E %3Ccircle cx='60' cy='32' r='8' fill='%23fff'/%3E%3Ccircle cx='62' cy='34' r='4' fill='%23e3ecf3'/%3E%3C/svg%3E") center / contain no-repeat; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }

/* หัวข้อ: ตัวอักษรภาษาอังกฤษแบบคริสต์มาส + ใบฮอลลี่ */
.theme-xmas .hx-kicker, .theme-xmas .hx-head .hx-kicker { font-family: 'Mountains of Christmas', var(--theme-font) !important; font-weight: 700; font-size: 1.05rem !important; letter-spacing: .08em !important; color: var(--xm-gold) !important; text-transform: none !important; }
html[data-mode="light"] .theme-xmas .hx-kicker { color: var(--xm-red) !important; }
.theme-xmas .hx-head h2 { position: relative; }
.theme-xmas .hx-head h2::after { content: ''; display: inline-block; width: 40px; height: 25px; margin-left: 8px; vertical-align: -3px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 50'%3E %3Cpath d='M38 30 C30 22 18 20 4 24 C8 27 8 30 6 33 C10 33 12 35 12 39 C16 37 19 38 21 41 C23 37 27 36 30 37 C30 34 33 31 38 30Z' fill='%231f8a4c'/%3E %3Cpath d='M38 30 C24 30 14 27 6 25' stroke='%230f5c30' stroke-width='1.6' fill='none'/%3E %3Cpath d='M42 30 C50 22 62 20 76 24 C72 27 72 30 74 33 C70 33 68 35 68 39 C64 37 61 38 59 41 C57 37 53 36 50 37 C50 34 47 31 42 30Z' fill='%2327a35b'/%3E %3Cpath d='M42 30 C56 30 66 27 74 25' stroke='%230f5c30' stroke-width='1.6' fill='none'/%3E %3Ccircle cx='34' cy='30' r='6' fill='%23d6283a'/%3E%3Ccircle cx='46' cy='30' r='6' fill='%23e8384a'/%3E%3Ccircle cx='40' cy='22' r='6' fill='%23c81d30'/%3E %3Ccircle cx='32' cy='28' r='1.8' fill='%23fff' opacity='.8'/%3E%3Ccircle cx='44' cy='28' r='1.8' fill='%23fff' opacity='.8'/%3E%3Ccircle cx='38' cy='20' r='1.8' fill='%23fff' opacity='.8'/%3E%3C/svg%3E") center / contain no-repeat; }
.theme-xmas .hx-hero h1 .hx-grad, .theme-xmas .hm-hero h1 .hx-grad { background: linear-gradient(90deg, #ff5a6a, var(--xm-gold) 50%, #46d48a); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.theme-xmas .hx-slider, .theme-xmas .hm-hero { border: 2px solid color-mix(in srgb, var(--xm-gold) 45%, transparent) !important; box-shadow: 0 0 0 5px color-mix(in srgb, var(--xm-red) 22%, transparent), 0 30px 60px -36px rgba(0,0,0,.6) !important; }

/* การ์ด: หิมะเกาะขอบบน */
.theme-xmas .card { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18' width='120' height='18' preserveAspectRatio='none'%3E %3Cpath d='M0 0 H120 V7 C114 7 112 11 106 10 C100 9 100 5 93 6 C87 7 88 15 82 15 C76 15 77 8 70 7 C62 6 60 10 52 9 C45 8 46 4 38 5 C31 6 33 13 26 13 C20 13 20 7 13 7 C7 7 5 10 0 9Z' fill='%23ffffff'/%3E %3Cpath d='M0 9 C5 10 7 7 13 7 C20 7 20 13 26 13 C33 13 31 6 38 5' stroke='%23dbe8f2' stroke-width='1.2' fill='none'/%3E%3C/svg%3E") !important; background-repeat: repeat-x !important; background-size: 150px 9px !important; background-position: 0 -1px !important;
  border-color: color-mix(in srgb, var(--xm-gold) 18%, var(--c-card_border)) !important; }
.theme-xmas .sc, .theme-xmas .hx-stat { box-shadow: 0 18px 36px -24px rgba(0,0,0,.55); }

/* ปุ่มหลัก: แดงลายลูกกวาด */
.theme-xmas .btn-primary, .theme-xmas .hx-cta .btn:first-child, .theme-xmas .btn-main {
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.14) 0 10px, transparent 10px 20px) !important; background-size: 28px 28px; transition: background-position .6s; }
.theme-xmas .btn-primary:hover, .theme-xmas .hx-cta .btn:first-child:hover { animation: xm-candy .8s linear infinite; }
@keyframes xm-candy { to { background-position: 28px 0; } }
.theme-xmas .hx-head-ic, .theme-xmas .am-hico { filter: drop-shadow(0 6px 12px rgba(214, 40, 58, .35)); }

/* ท้ายเว็บ: เส้นลายลูกกวาด */
.theme-xmas footer.site-foot { border-top: 0 !important; position: relative; }
.theme-xmas footer.site-foot::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 6px;
  background: repeating-linear-gradient(-45deg, var(--xm-red) 0 12px, #fff 12px 24px, var(--xm-green) 24px 36px, #fff 36px 48px); opacity: .85; }
.theme-xmas footer.site-foot { margin-bottom: 90px; }

/* หน้าตัวอย่างธีมในหลังบ้าน */
.st-theme[data-v="xmas"] .st-mock { background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 55%), radial-gradient(1.5px 1.5px at 70% 20%, #fff 50%, transparent 55%), radial-gradient(2px 2px at 45% 70%, #fff 50%, transparent 55%), radial-gradient(1.5px 1.5px at 85% 60%, #fff 50%, transparent 55%), radial-gradient(1.5px 1.5px at 10% 80%, #fff 50%, transparent 55%) !important; }
.st-theme[data-v="xmas"] .st-mock .n { box-shadow: inset 0 3px 0 #fff; }

@media (max-width: 767px) { .theme-xmas .dn-wrap::after { display: none; } body.theme-xmas::after { height: 90px; } .theme-xmas .hx-head h2::after { width: 30px; height: 19px; } }
@media (prefers-reduced-motion: reduce) { body.theme-xmas::before, html:has(body.theme-xmas)::before, .theme-xmas .dn-wrap::after { animation: none !important; } }

/* ปุ่มสลับโหมดมืด/สว่าง */
.dn-mode i { transition: transform .35s ease, opacity .25s; }
.dn-mode .dn-mode-light { display: none; }
html[data-mode="dark"] .dn-mode .dn-mode-dark { display: none; }
html[data-mode="dark"] .dn-mode .dn-mode-light { display: inline-block; color: #fbbf24 !important; }
.dn-mode:active i { transform: rotate(-30deg) scale(.85); }
html.mode-anim, html.mode-anim *, html.mode-anim *::before, html.mode-anim *::after { transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important; }

/* === ช่องรูป + ปุ่มอัปโหลด (สำรอง: ใช้ได้แม้ menu_manage.php ยังเป็นรุ่นเก่า) === */
/* ช่องลิงก์รูป + ปุ่มอัปโหลด (ฝังในหน้า ไม่ต้องรอแคช themes.css) */
.iu { position: relative; display: flex !important; align-items: center; gap: 10px; padding: 5px; border: 1px solid var(--c-input_border, #dcdbe6); border-radius: 14px;
  background: var(--c-input_bg, #fff); transition: border-color .2s, box-shadow .2s; width: 100%; }
.iu:hover { border-color: color-mix(in srgb, var(--c-main, #7c5cff) 45%, var(--c-input_border, #dcdbe6)); }
.iu:focus-within { border-color: var(--c-main, #7c5cff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-main, #7c5cff) 14%, transparent); }
.iu > input.form-control { flex: 1 1 auto; min-width: 0; width: auto !important; height: 38px; margin: 0 !important; padding: 0 2px; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; font-size: .9rem; }
.iu-thumb { position: relative; flex: 0 0 40px; width: 40px !important; height: 40px !important; border-radius: 10px; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: repeating-conic-gradient(rgba(127,127,127,.14) 0 25%, transparent 0 50%) 50% / 10px 10px; border: 1px dashed rgba(127,127,127,.4); text-decoration: none; }
.iu-thumb.has-img { border-style: solid; border-color: rgba(127,127,127,.2); }
.iu-thumb img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover; }
.iu-thumb.is-def { border-style: dashed; } .iu-thumb.is-def img { opacity: .55; }
.iu-thumb i { font-size: .95rem; color: var(--c-muted, #9a98aa) !important; }
.iu-thumb.is-bad { border-color: var(--c-danger, #e11d48); background: color-mix(in srgb, var(--c-danger, #e11d48) 8%, transparent); }
.iu-thumb.is-bad i { color: var(--c-danger, #e11d48) !important; }
.iu-thumb.has-img:hover::after { content: '\f065'; font-family: 'Font Awesome 6 Pro', 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: .8rem; }
.iu-btn { flex: 0 0 auto; display: inline-flex !important; align-items: center; gap: 8px; height: 38px; margin: 0 !important; padding: 0 16px; border: 0 !important; border-radius: 10px; font-size: .86rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-main, #7c5cff) 78%, #fff), var(--c-main, #7c5cff)) !important; color: var(--c-btn_text, #fff) !important;
  box-shadow: 0 6px 16px -8px var(--c-main, #7c5cff), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s, box-shadow .2s, filter .2s; }
.iu-btn i, .iu-btn span { color: inherit !important; }
.iu-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.iu.is-busy .iu-btn { pointer-events: none; filter: saturate(.7); }
.iu.is-busy .iu-btn i::before { content: "\f110"; display: inline-block; animation: iu-spin .8s linear infinite; }
.iu.is-done { border-color: var(--c-ok, #16a34a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-ok, #16a34a) 14%, transparent); }
.iu-bar { position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; transition: opacity .2s; }
.iu-bar i { display: block; height: 100%; width: 0; background: var(--c-main, #7c5cff); transition: width .2s; }
.iu.is-busy .iu-bar { opacity: 1; }
.iu-drop { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; border-radius: inherit; font-size: .9rem; font-weight: 600; pointer-events: none;
  border: 2px dashed var(--c-main, #7c5cff); background: color-mix(in srgb, var(--c-main, #7c5cff) 10%, var(--c-input_bg, #fff)); color: var(--c-main, #7c5cff) !important; }
.iu-drop i { color: inherit !important; margin-right: 6px; }
.iu.is-drop .iu-drop { display: grid; }
.iu-sm { padding: 4px; gap: 8px; border-radius: 12px; }
.iu-sm .iu-thumb { flex-basis: 32px; width: 32px !important; height: 32px !important; border-radius: 8px; }
.iu-sm > input.form-control { height: 32px; font-size: .84rem; }
.iu-sm .iu-btn { height: 32px; padding: 0 12px; font-size: .8rem; border-radius: 8px; }
@media (max-width: 575px) { .iu-btn span { display: none; } .iu-btn { padding: 0 12px; } }
@keyframes iu-spin { to { transform: rotate(360deg); } }
/* คำแนะนำขนาดรูป */
.iu-hint { margin-top: 6px; font-size: .78rem; line-height: 1.5; color: var(--c-muted, #8a88a0) !important; }
.iu-hint > i { color: var(--c-main, #7c5cff) !important; margin-right: 3px; }
.iu-hint b { color: var(--c-text, #333) !important; font-weight: 600; }
.iu-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; padding: 6px 10px; border-radius: 10px; color: #b45309 !important;
  background: color-mix(in srgb, #f59e0b 12%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.iu-warn[hidden] { display: none; }
.iu-warn i, .iu-warn b { color: inherit !important; }
.iu-warn button { margin-left: auto; border: 0; border-radius: 8px; padding: 3px 10px; font-size: .76rem; font-weight: 600; background: #f59e0b; color: #fff; cursor: pointer; }
/* หน้าต่างจัดรูป */
html.iu-cm-lock { overflow: hidden; }
.iu-cm { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 6, 24, .62); backdrop-filter: blur(4px); }
.iu-cm.is-open { display: flex; animation: iu-fade .18s ease; }
.iu-cm-box { width: min(920px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px; border-radius: 20px; background: var(--c-card_bg, #fff); color: var(--c-text, #222);
  border: 1px solid var(--c-card_border, #e6e4f0); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); animation: iu-pop .22s cubic-bezier(.2,.9,.3,1.2); }
.iu-cm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.iu-cm-head b { display: block; font-size: 1.05rem; }
.iu-cm-head small { display: block; margin-top: 2px; font-size: .8rem; color: var(--c-muted, #8a88a0) !important; }
.iu-cm-x { flex: 0 0 34px; height: 34px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--c-text, #222) 7%, transparent); color: inherit; cursor: pointer; }
.iu-cm-x i { color: inherit !important; }
.iu-cm-stage { position: relative; margin: 0 auto; overflow: hidden; border-radius: 12px; cursor: grab; touch-action: none; user-select: none;
  background: repeating-conic-gradient(rgba(127,127,127,.16) 0 25%, transparent 0 50%) 50% / 18px 18px; box-shadow: 0 0 0 2px var(--c-main, #7c5cff), 0 0 0 6px color-mix(in srgb, var(--c-main, #7c5cff) 18%, transparent); }
.iu-cm-stage.is-drag { cursor: grabbing; }
.iu-cm-bg { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(2px) brightness(.88); transform: scale(1.05); transition: opacity .2s; }
.iu-cm-img { position: absolute; left: 0; top: 0; max-width: none !important; transform-origin: 0 0; pointer-events: none; }
.iu-cm-grid { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.35) 0, rgba(255,255,255,.35) calc(33.33% + .5px), transparent 0, transparent calc(66.66% - .5px), rgba(255,255,255,.35) 0, rgba(255,255,255,.35) calc(66.66% + .5px), transparent 0),
    linear-gradient(transparent calc(33.33% - .5px), rgba(255,255,255,.35) 0, rgba(255,255,255,.35) calc(33.33% + .5px), transparent 0, transparent calc(66.66% - .5px), rgba(255,255,255,.35) 0, rgba(255,255,255,.35) calc(66.66% + .5px), transparent 0);
  opacity: 0; transition: opacity .2s; }
.iu-cm-stage:hover .iu-cm-grid, .iu-cm-stage.is-drag .iu-cm-grid { opacity: 1; }
.iu-cm-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.iu-cm-mode { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: color-mix(in srgb, var(--c-text, #222) 6%, transparent); }
.iu-cm-mode button { border: 0; border-radius: 9px; padding: 7px 14px; font-size: .85rem; font-weight: 600; background: transparent; color: var(--c-muted, #8a88a0); cursor: pointer; }
.iu-cm-mode button i { color: inherit !important; margin-right: 4px; }
.iu-cm-mode button.on { background: var(--c-card_bg, #fff); color: var(--c-main, #7c5cff); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.iu-cm-zoom { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; max-width: 340px; margin: 0; }
.iu-cm-zoom i { color: var(--c-muted, #8a88a0) !important; font-size: .85rem; }
.iu-cm-zoom input { flex: 1; accent-color: var(--c-main, #7c5cff); }
.iu-cm-note { margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: .82rem; color: #15803d !important; background: color-mix(in srgb, #16a34a 10%, transparent); }
.iu-cm-note.is-warn { color: #b45309 !important; background: color-mix(in srgb, #f59e0b 12%, transparent); }
.iu-cm-note i { color: inherit !important; margin-right: 4px; }
.iu-cm-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.iu-cm-foot button { border: 0; border-radius: 12px; padding: 10px 20px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.iu-cm-cancel { background: color-mix(in srgb, var(--c-text, #222) 7%, transparent); color: var(--c-text, #222); }
.iu-cm-ok { background: linear-gradient(135deg, color-mix(in srgb, var(--c-main, #7c5cff) 78%, #fff), var(--c-main, #7c5cff)); color: var(--c-btn_text, #fff); box-shadow: 0 8px 18px -8px var(--c-main, #7c5cff); }
.iu-cm-ok i { color: inherit !important; margin-right: 4px; }
@keyframes iu-fade { from { opacity: 0; } }
@keyframes iu-pop { from { transform: translateY(12px) scale(.97); opacity: 0; } }
@media (max-width: 575px) { .iu-cm-box { padding: 14px; } .iu-cm-tools { flex-direction: column; align-items: stretch; } .iu-cm-zoom { max-width: none; } }
/* กล่องตัวอย่างรูป (ป๊อปอัปโปรโมชั่น / ป้ายข้างจอ): รูปไม่ล้นกล่อง */
.pm-prev, .sb-prev { position: relative; }
.pm-prev > img, .sb-prev > img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; }
