/* ThaiPlayers Steam Deals — Design A (three featured cards + full list). Scoped to .tsd-root.
   The brand primary colour and heading font follow the ACTIVE Elementor Kit when the page has it
   (body.elementor-kit-{id} defines --e-global-*), with ThaiPlayers values (#883476 / #C547AA) as fallback;
   text/surface colours are fixed because the plugin's surfaces are always dark. Body text inherits the site font;
   headings use the Kit's primary typography. This plugin loads no font files (Elementor does, once the page runs
   the normal template lifecycle). Override any --tsd-* token from the theme if the brand changes. */
.tsd-root{
  --tsd-primary:var(--e-global-color-primary,#883476);   /* buttons, active controls */
  --tsd-primary-hover:#9b3d87;
  --tsd-accent:#c547aa;                                    /* headings, featured border, active category border */
  --tsd-accent-text:#e07fd0;                               /* small accent text/links on dark surfaces (≥7:1) */
  --tsd-bg:#000;
  --tsd-surface:#141414;
  --tsd-surface-2:#1d1d1d;
  --tsd-line:#2e2e2e;
  --tsd-text:#fff;                                         /* fixed: card surfaces are always dark */
  --tsd-muted:#b2b2b2;
  --tsd-discount:#5ee4a8;
  --tsd-discount-bg:#0f2a1f;
  --tsd-warning:#f5b84a;
  --tsd-focus:#fff;
  --tsd-font-heading:var(--e-global-typography-primary-font-family,"IBM Plex Sans Thai"),"IBM Plex Sans Thai",Sarabun,"Noto Sans Thai",sans-serif;
  --tsd-weight-heading:var(--e-global-typography-primary-font-weight,600);
  background:var(--tsd-bg);color:var(--tsd-text);font-family:inherit;font-size:15px;line-height:1.65;color-scheme:dark}
.tsd-root *,.tsd-root *::before,.tsd-root *::after{box-sizing:border-box}
.tsd-root a{color:inherit;text-decoration:none}
.tsd-root button,.tsd-root input,.tsd-root select{font:inherit}
.tsd-root a:focus-visible,.tsd-root button:focus-visible,.tsd-root input:focus-visible,.tsd-root select:focus-visible,.tsd-root summary:focus-visible{outline:3px solid var(--tsd-focus);outline-offset:3px}
.tsd-root button,.tsd-root input:not([type=checkbox]),.tsd-root select{min-height:44px}
.tsd-mock{background:#ffe1a1;color:#372907;text-align:center;padding:9px 16px;font-weight:600;font-size:13px;line-height:1.5}
.tsd-wrap{max-width:1296px;margin:0 auto;padding:8px 28px 1px}
.tsd-root h1,.tsd-root h2,.tsd-root h3,.tsd-root h4{font-family:var(--tsd-font-heading);font-weight:var(--tsd-weight-heading);letter-spacing:normal;text-transform:none}
.tsd-root h1{font-size:34px;line-height:1.35;margin:28px 0 8px;color:var(--tsd-accent)}
.tsd-root h2{font-size:23px;line-height:1.4;margin:30px 0 16px;color:var(--tsd-accent)}
.tsd-root p{margin:5px 0 14px}
.tsd-lead{color:var(--tsd-muted);max-width:720px}
.tsd-lead a{color:var(--tsd-accent-text);text-decoration:underline}
.tsd-top{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap}
.tsd-search-form{display:flex;gap:8px}
.tsd-search{background:var(--tsd-surface);border:1px solid #555;border-radius:10px;padding:10px 12px;color:var(--tsd-text);width:310px;max-width:100%;font-size:16px}
.tsd-zone{font-size:13px;color:var(--tsd-muted);margin:14px 0 20px}
.tsd-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.tsd-card{background:var(--tsd-surface);border:1px solid var(--tsd-line);border-radius:12px;overflow:hidden;min-width:0;display:flex;flex-direction:column}
.tsd-card--featured{border:2px solid var(--tsd-accent)}
.tsd-art{display:block;position:relative;aspect-ratio:460/215;background:var(--tsd-surface-2)}
.tsd-art img{width:100%;height:100%;object-fit:cover;display:block}
.tsd-art-fallback{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:40px;font-weight:800;color:#5a5a5a;letter-spacing:2px;background:linear-gradient(135deg,#1a1a1a,#262626)}
.tsd-chip{position:absolute;top:12px;left:12px;background:#000000d9;border:1px solid #555;color:#fff;font-size:12px;border-radius:6px;padding:4px 9px}
.tsd-card--featured .tsd-chip{background:var(--tsd-primary);color:#fff;border:0;font-weight:700}
.tsd-body{padding:16px 18px 18px;display:flex;flex-direction:column;flex:1}
.tsd-root .tsd-name{font-size:18px;font-weight:var(--tsd-weight-heading);line-height:1.4;margin:0;color:var(--tsd-text);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.tsd-root .tsd-name a{color:var(--tsd-text)}
.tsd-name a{display:inline-block;min-height:24px;padding:2px 0}.tsd-name a:hover{text-decoration:underline}
.tsd-meta{margin:4px 0 10px}
.tsd-edition,.tsd-genre{font-size:12px;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tsd-edition{color:var(--tsd-text)}
.tsd-genre{color:var(--tsd-muted)}
.tsd-price{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:4px 0 12px;min-height:44px}
.tsd-off{background:var(--tsd-discount-bg);color:var(--tsd-discount);border:1px solid #1f5a41;font-weight:700;border-radius:6px;padding:3px 8px;font-size:16px}
.tsd-amount{font-size:24px;font-weight:700;color:var(--tsd-text)}
.tsd-price del{color:var(--tsd-muted);font-size:13px;margin-left:8px}
.tsd-price--muted{gap:8px}
.tsd-amount-sm{font-size:19px;font-weight:700;color:var(--tsd-text)}
.tsd-note{font-size:13px;color:var(--tsd-muted)}
.tsd-time{border-top:1px solid var(--tsd-line);padding-top:10px;color:var(--tsd-text);font-size:13px}
.tsd-left{display:inline;color:var(--tsd-warning);font-size:13px;margin-left:6px}
.tsd-checked{font-size:12px;color:var(--tsd-muted);margin:2px 0 12px}
.tsd-foot{margin-top:auto}
.tsd-root .tsd-cta{display:block;border:1px solid var(--tsd-primary);background:var(--tsd-primary);color:#fff;border-radius:8px;padding:10px;text-align:center;min-height:44px;font-weight:600}
.tsd-root .tsd-cta:hover{background:var(--tsd-primary-hover);border-color:var(--tsd-primary-hover)}
.tsd-root .tsd-news{display:block;color:var(--tsd-accent-text);text-decoration:underline;margin:0 0 12px;font-size:13px;min-height:24px}
.tsd-news-title{display:block;color:var(--tsd-muted);text-decoration:none;font-size:12px}
.tsd-news-list{margin:0 0 12px;font-size:13px}.tsd-news-list summary{cursor:pointer;color:var(--tsd-accent-text);min-height:32px}.tsd-news-list ul{margin:6px 0 0;padding-left:18px}.tsd-news-list li .tsd-news{margin:0}
.tsd-card--expired .tsd-price,.tsd-card--expired .tsd-left{display:none}
.tsd-card--expired .tsd-time{color:var(--tsd-warning)}
.tsd-cats ul{display:flex;gap:9px;overflow-x:auto;list-style:none;margin:8px 0 20px;padding:0 0 8px;-webkit-overflow-scrolling:touch}
.tsd-root .tsd-cats a{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;padding:9px 14px;min-height:44px;background:var(--tsd-surface);color:var(--tsd-text);border:1px solid #444;border-radius:8px}
.tsd-root .tsd-cats a:hover{border-color:var(--tsd-accent)}
.tsd-root .tsd-cats a[aria-current=page]{background:var(--tsd-primary);border-color:var(--tsd-primary);color:#fff}
.tsd-cats a[aria-current=page] .tsd-count{color:#f3dcee}
.tsd-count{color:var(--tsd-muted);font-size:12px}
.tsd-catalog{display:grid;grid-template-columns:230px 1fr;gap:23px}
.tsd-aside{border:1px solid var(--tsd-line);border-radius:12px;padding:16px 18px;background:var(--tsd-surface);align-self:start}
.tsd-filters summary{font-weight:700;cursor:pointer;min-height:32px}
.tsd-filter-form label{display:block;margin:15px 0 5px}
.tsd-root select{width:100%;background:var(--tsd-surface-2);color:var(--tsd-text);border:1px solid #555;border-radius:7px;padding:8px}
.tsd-check{display:flex!important;align-items:center;gap:10px;min-height:44px}.tsd-check input{width:24px;height:24px;margin:0;accent-color:var(--tsd-primary)}
.tsd-root .tsd-apply{margin-top:18px;width:100%;background:var(--tsd-primary);color:#fff;border:1px solid var(--tsd-primary);border-radius:8px;padding:8px 14px;cursor:pointer;font-weight:600}
.tsd-root .tsd-apply:hover{background:var(--tsd-primary-hover)}
.tsd-root .tsd-reset{display:block;margin-top:10px;text-align:center;color:var(--tsd-muted);text-decoration:underline;padding:8px}
.tsd-head{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin-bottom:15px}
.tsd-head .tsd-count{font-size:14px;margin:0}
.tsd-sort select{width:auto;max-width:100%}
.tsd-catalog .tsd-grid{gap:14px}
.tsd-empty{grid-column:1/-1;padding:40px;text-align:center;color:var(--tsd-muted);border:1px dashed var(--tsd-line);border-radius:12px}
.tsd-pages{text-align:center;margin:24px 0;color:var(--tsd-muted);font-size:13px}
.tsd-root .tsd-pages a{color:var(--tsd-accent-text);text-decoration:underline}
.tsd-root .tsd-pages .tsd-more{display:inline-block;background:transparent;border:1px solid var(--tsd-accent);color:var(--tsd-text);padding:10px 24px;border-radius:8px;text-decoration:none;margin-bottom:10px;min-height:44px}
.tsd-root .tsd-pages .tsd-more:hover{background:var(--tsd-primary);border-color:var(--tsd-primary)}
.tsd-page-info{display:block}
.tsd-footer{margin:34px 0 0;padding:24px 0;border-top:1px solid var(--tsd-line);color:var(--tsd-muted);font-size:12px}
.tsd-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tsd-sr-focusable{position:absolute;left:-9999px}.tsd-sr-focusable:focus{position:static}
.tsd-embed{border-radius:14px;padding:14px;margin:18px 0}
.tsd-embed .tsd-mock{border-radius:8px;margin-bottom:12px}
.tsd-embed-more{margin:12px 0 0;text-align:right}.tsd-root .tsd-embed-more a{color:var(--tsd-accent-text);text-decoration:underline}
.tsd-zone--embed{margin:0 0 10px;font-size:12px}
.tsd-embed .tsd-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.tsd-embed--single{max-width:420px}
/* [tsd_home_deals] — Home block. Everything is scoped to .tsd-home-deals (no body/header/footer/a/button/.elementor-*
   selectors). Header row copies the Home section pattern measured on thaiplayers.com (22 ต.ค. 2569, "รีวิวเกม" +
   "รีวิวทั้งหมด"): flex row, wrap, centred vertically, space-between, gap 10px; H2 26px / 23px on mobile. */
.tsd-root.tsd-home-deals{border-radius:14px;padding:24px;margin:0}
.tsd-root.tsd-home-deals .tsd-home-head{margin:0 0 4px}
.tsd-root.tsd-home-deals .tsd-home-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px}
.tsd-root.tsd-home-deals .tsd-mock{border-radius:8px;margin:0 0 16px}
.tsd-root.tsd-home-deals .tsd-home-title{font-size:26px;line-height:1.35;margin:0;color:var(--tsd-accent)}
.tsd-root.tsd-home-deals .tsd-home-lead{color:var(--tsd-muted);margin:0 0 6px;max-width:760px}
.tsd-root.tsd-home-deals .tsd-zone--embed{margin:0 0 16px}
.tsd-root .tsd-home-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
@media (max-width:700px){.tsd-root .tsd-home-grid{grid-template-columns:minmax(0,520px);justify-content:center}}
/* Columns follow the space the block really gets (an Elementor column/sidebar can be narrow on desktop):
   3 equal columns from 680px of content width, otherwise 1 — never a 2+1 orphan row, never a carousel. */
@supports (container-type:inline-size){.tsd-root.tsd-home-deals{container-type:inline-size}.tsd-root .tsd-home-grid{grid-template-columns:minmax(0,520px);justify-content:center}@container (min-width:680px){.tsd-root .tsd-home-grid{grid-template-columns:repeat(3,minmax(0,1fr));justify-content:stretch}}}
/* "ดูดีลทั้งหมด" = the Home section buttons ("ข่าว/รีวิว/เกมแนะนำ/บทความทั้งหมด"), computed values read on the live site:
   bg #792F6B, text #FAF8FC, IBM Plex Sans Thai 15px/500, line-height 1.55em, padding 11px 16px, radius 4px, no border,
   45px tall, hover/focus keep the same colours, keyboard focus = 3px solid #FAF8FC outline. Set --tsd-section-btn-bg /
   --tsd-section-btn-text (e.g. on :root in the Kit's Custom CSS) if the Home buttons change. */
.tsd-root.tsd-home-deals .tsd-home-all{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;margin:0;padding:11px 16px;border:0;border-radius:4px;background:var(--tsd-section-btn-bg,#792f6b);color:var(--tsd-section-btn-text,#faf8fc);font-family:var(--tsd-font-heading);font-size:15px;font-weight:500;line-height:1.55em;text-decoration:none;white-space:nowrap;transition:.3s}
.tsd-root.tsd-home-deals .tsd-home-all:hover,.tsd-root.tsd-home-deals .tsd-home-all:focus,.tsd-root.tsd-home-deals .tsd-home-all:visited{background:var(--tsd-section-btn-bg,#792f6b);color:var(--tsd-section-btn-text,#faf8fc);text-decoration:none}
.tsd-root.tsd-home-deals .tsd-home-all:focus-visible{outline:3px solid var(--tsd-section-btn-text,#faf8fc);outline-offset:0}
@media (max-width:767px){.tsd-root.tsd-home-deals .tsd-home-title{font-size:23px}}
@media (max-width:600px){.tsd-root.tsd-home-deals{padding:16px}}
/* Row alignment: inside each grid row, titles, meta, price, time and the Steam button line up (subgrid);
   older browsers reserve fixed heights instead. */
@supports (grid-template-rows:subgrid){
  .tsd-grid>.tsd-card{display:grid;grid-template-rows:subgrid;grid-row:span 7;row-gap:0}
  .tsd-grid>.tsd-card>.tsd-body{display:contents}
  .tsd-grid>.tsd-card .tsd-body>*{margin-left:18px;margin-right:18px}
  .tsd-grid>.tsd-card>.tsd-art{grid-row:1}
  .tsd-grid>.tsd-card .tsd-name{grid-row:2;margin-top:16px;align-self:start}
  .tsd-grid>.tsd-card .tsd-meta{grid-row:3}
  .tsd-grid>.tsd-card .tsd-price{grid-row:4;align-self:start}
  .tsd-grid>.tsd-card .tsd-time{grid-row:5;align-self:start}
  .tsd-grid>.tsd-card .tsd-checked{grid-row:6;align-self:start}
  .tsd-grid>.tsd-card .tsd-foot{grid-row:7;align-self:end;margin-bottom:18px}
}
@supports not (grid-template-rows:subgrid){
  .tsd-root .tsd-name{min-height:2.8em}
  .tsd-meta{min-height:3.3em}
}
@media (max-width:1000px){.tsd-catalog .tsd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tsd-catalog{grid-template-columns:200px 1fr}}
@media (max-width:760px){.tsd-catalog{grid-template-columns:1fr}.tsd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tsd-wrap{padding:4px 16px 1px}.tsd-search{width:100%}.tsd-search-form{width:100%}.tsd-root h1{font-size:27px}.tsd-top{display:block}.tsd-featured .tsd-grid{grid-template-columns:1fr}.tsd-sort,.tsd-sort select{width:100%}.tsd-filters:not([open]){padding-bottom:0}}
@media (max-width:480px){.tsd-grid,.tsd-catalog .tsd-grid{grid-template-columns:1fr}.tsd-root h1{font-size:25px}.tsd-amount{font-size:23px}}
@media (prefers-reduced-motion:reduce){.tsd-root *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.tsd-root{background:#fff;color:#000}.tsd-aside,.tsd-cats,.tsd-pages,.tsd-search-form{display:none}.tsd-card{border-color:#999;break-inside:avoid}}
