/* Discovery feed, with scoped home hero/featured responsive repairs below. */
body.home-page .highlight-heading-actions {display:flex;align-items:center;justify-content:flex-end;gap:18px;flex-wrap:wrap;}
body.home-page .highlight-profile-store {position:relative;display:inline-flex;align-items:center;gap:0;min-height:42px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;text-decoration:none;color:#f0f8ff;font-size:13px;font-weight:600;transition:transform .18s,filter .18s;}
body.home-page .highlight-profile-store {margin-left:24px;overflow:visible;}
body.home-page .highlight-profile-store>span {padding:7px 12px 7px 48px;line-height:18px;border-radius:2px;background:linear-gradient(110deg,#15638e,#2a9bd1);}
body.home-page .highlight-profile-store > svg:last-child {display:none;}
body.home-page .highlight-profile-store .profile-store-card-art {position:absolute;left:-24px;top:-1px;width:68px;height:44px;z-index:1;flex-shrink:0;filter:drop-shadow(0 3px 4px #05152755);transition:transform .22s;}
body.home-page .highlight-profile-store:hover {transform:translateY(-1px);filter:brightness(1.12);box-shadow:none;}
body.home-page .highlight-profile-store:hover .profile-store-card-art {transform:rotate(-4deg);}
body.home-page .highlight-profile-store:focus-visible {outline:2px solid #a5d9ff;outline-offset:4px;}
@media(max-width:640px){body.home-page .highlight-heading-actions {gap:8px;}body.home-page .highlight-profile-store {font-size:11px;margin-left:18px;}body.home-page .highlight-profile-store>span {padding-left:38px;}body.home-page .highlight-profile-store .profile-store-card-art {left:-18px;top:3px;width:52px;height:35px;}}
@media(prefers-reduced-motion:reduce){body.home-page .highlight-profile-store,body.home-page .highlight-profile-store .profile-store-card-art {transition:none;}}
#catalog-game-preview .olaf-steam-taste-stack { display:grid; gap:24px; }
#catalog-game-preview .discovery-load-more { display:grid; justify-items:center; gap:8px; padding:20px 8px; }
#catalog-game-preview [data-discovery-progress] { color:#95abc5; font-size:13px; margin:0; }
#catalog-game-preview [data-discovery-more] { min-height:44px; }
#catalog-game-preview [data-discovery-more][hidden] { display:none !important; }
#catalog-game-preview .catalog-mobile-eyebrow { display:none; }
#catalog-game-preview .catalog-mobile-tags { margin-top:12px; }
#catalog-game-preview .catalog-product-tags,
body.home-page #product-grid .product-card .tags { display:flex; flex-wrap:wrap; align-content:flex-start; gap:6px; min-width:0; height:auto; max-height:none; overflow:visible; }
#catalog-game-preview .catalog-product-tags .tag,
body.home-page #product-grid .product-card .tags .tag { display:inline-block; max-width:100%; padding:2px 7px; border:1px solid rgba(100,116,139,.22); border-radius:999px; background:rgba(30,41,59,.4); color:#a2afc2; font-size:10px; font-weight:400; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
#catalog-game-preview .catalog-product-tags .catalog-category-tag,
body.home-page #product-grid .product-card .tags .catalog-category-tag { background:var(--category-tag-bg,#183e68); border-color:var(--category-tag-border,#437fbc); color:var(--category-tag-text,#a8d8ff); font-weight:700; }
.catalog-category-tag[data-tag-category="steam-key"] { --category-tag-bg:#153c65; --category-tag-border:#448bcc; --category-tag-text:#b7e0ff; }
.catalog-category-tag[data-tag-category="steam-account"] { --category-tag-bg:#103e36; --category-tag-border:#3a947a; --category-tag-text:#a3f3d5; }
.catalog-category-tag[data-tag-category="offline"] { --category-tag-bg:#382451; --category-tag-border:#9165bb; --category-tag-text:#ead0ff; }
.catalog-category-tag[data-tag-category="bundle"] { --category-tag-bg:#473519; --category-tag-border:#a88038; --category-tag-text:#ffe0a1; }
#catalog-game-preview .olaf-steam-taste-row {
  padding:22px !important; border:1px solid rgba(111,139,224,.18) !important; border-radius:20px !important;
  background:radial-gradient(ellipse at top right,rgba(87,65,171,.12),transparent 55%),linear-gradient(125deg,#101b30,#080e1d 75%) !important;
  box-shadow:0 12px 32px rgba(0,0,0,.16),inset 0 1px 0 rgba(170,195,255,.035) !important;
  content-visibility:auto; contain-intrinsic-size:auto 440px;
}
#catalog-game-preview .olaf-steam-taste-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:24px; }
#catalog-game-preview .olaf-steam-taste-head > div:first-child { flex:1; min-width:0; }
#catalog-game-preview .olaf-steam-taste-head h3 { overflow-wrap:anywhere; }
#catalog-game-preview .olaf-steam-taste-head h3 { margin:0 0 6px; font-size:clamp(22px,2vw,28px); font-weight:800; color:#f2f6ff; line-height:1.35; }
#catalog-game-preview .olaf-steam-taste-head p { margin:0; color:#91a1ad; font-size:13px; }
#catalog-game-preview .olaf-steam-taste-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
#catalog-game-preview .olaf-steam-taste-actions { flex:0 1 auto; max-width:60%; }
#catalog-game-preview .olaf-steam-taste-actions a,
#catalog-game-preview .olaf-steam-taste-actions button {
  position:static; width:auto; height:auto; min-height:30px; padding:5px 11px; transform:none; opacity:1;
  border:1px solid rgba(118,153,233,.24) !important; border-radius:9px !important; background:rgba(33,52,90,.35) !important;
  color:#e1e8ee; font-size:11px; white-space:nowrap; text-decoration:none;
}
#catalog-game-preview .catalog-discovery-favorite { display:inline-flex; align-items:center; gap:6px; }
#catalog-game-preview .catalog-discovery-favorite::after { content:'รายการโปรด'; }
#catalog-game-preview .catalog-discovery-favorite.is-favorite { color:#8ed1ff; border-color:#72b8e8 !important; }
#catalog-game-preview .olaf-steam-taste-actions svg { width:14px; height:14px; }
#catalog-game-preview .olaf-steam-taste-actions a:hover,
#catalog-game-preview .olaf-steam-taste-actions button:hover { background:rgba(60,92,157,.4) !important; border-color:rgba(125,171,255,.5) !important; }
#catalog-game-preview .olaf-steam-taste-gallery {
  display:grid !important; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) !important;
  grid-auto-flow:row; grid-auto-columns:auto; gap:14px; min-width:0; min-height:0;
  overflow:visible !important; margin:0 !important; padding:0 !important;
}
#catalog-game-preview .olaf-steam-taste-main,
#catalog-game-preview .olaf-steam-taste-shots a { position:relative; border:0 !important; border-radius:10px !important; overflow:hidden; min-width:0; max-width:100%; min-height:0; width:100%; height:auto; display:block !important; }
#catalog-game-preview .olaf-steam-taste-main { aspect-ratio:2 / 1; align-self:start; }
#catalog-game-preview .olaf-steam-taste-main img,
#catalog-game-preview .olaf-steam-taste-shots img { position:absolute; inset:0; width:100%; max-width:100%; height:100%; object-fit:cover !important; display:block; }
#catalog-game-preview .olaf-steam-taste-shots { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; grid-template-rows:repeat(2,minmax(0,1fr)); gap:12px; min-width:0; max-width:100%; min-height:0; }
#catalog-game-preview .olaf-steam-taste-shots a { aspect-ratio:auto; }
#catalog-game-preview .catalog-shot-empty { display:grid; place-items:center; text-align:center; padding:10px; border-radius:10px; background:#111d32; color:#7d919f; font-size:11px; }
#catalog-game-preview .olaf-steam-taste-foot { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:14px; margin-top:16px; min-height:44px; }
#catalog-game-preview .olaf-steam-taste-foot > span { font-size:12px; }
/* Reset legacy price padding/min-width. Keep each price as a single, fitted unit. */
#catalog-game-preview .olaf-steam-price { display:inline-flex; flex:0 0 auto; flex-wrap:nowrap; align-items:stretch; justify-content:flex-end; gap:0; width:max-content; min-width:0; max-width:100%; margin:0; padding:0; overflow:hidden; border:0; border-radius:0 !important; background:#0a151e !important; white-space:nowrap; }
#catalog-game-preview .olaf-steam-discount { display:grid; place-items:center; min-width:0 !important; padding:5px 8px !important; border-radius:0 !important; font-size:14px !important; font-weight:600; line-height:1.2; color:#172304 !important; background:#a4d037 !important; }
#catalog-game-preview .olaf-steam-price-stack { display:flex; flex-direction:column; flex-wrap:nowrap; align-items:flex-end; justify-content:center; min-width:0; gap:3px; padding:5px 8px; background:transparent; }
#catalog-game-preview .olaf-steam-price-stack strong { font-size:15px; font-weight:600; line-height:1.2; color:#dce8f0; }
#catalog-game-preview .olaf-steam-price-stack del { font-size:10px; line-height:1.2; color:#91a0b8; }
#catalog-game-preview .catalog-genre-shelf { padding:18px; border:1px solid rgba(111,139,224,.14); border-radius:18px; background:linear-gradient(115deg,rgba(20,36,65,.95),rgba(11,18,35,.95)); content-visibility:auto; contain-intrinsic-size:auto 320px; }
#catalog-game-preview .catalog-genre-shelf header { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; margin-bottom:12px; }
#catalog-game-preview .catalog-genre-shelf h3 { margin:0; font-size:18px; font-weight:800; color:#8fc7ff; }
#catalog-game-preview .catalog-genre-shelf p { margin:0; color:#9badba; font-size:12px; }
#catalog-game-preview .catalog-genre-grid { display:grid; gap:14px; grid-template-columns:repeat(2,minmax(0,1fr)); }
#catalog-game-preview .catalog-genre-grid.is-compact { grid-template-columns:repeat(4,minmax(0,1fr)); }
#catalog-game-preview .catalog-genre-game { min-width:0; display:flex; flex-direction:column; overflow:hidden; border-radius:12px; background:rgba(20,32,55,.7); color:#dce8f0; text-decoration:none; }
#catalog-game-preview .catalog-genre-image-link { display:block; min-width:0; }
#catalog-game-preview .catalog-genre-image-link { position:relative; overflow:hidden; }
@media(hover:hover) and (pointer:fine) {
  #catalog-game-preview .catalog-genre-game { transition:transform 220ms ease,box-shadow 220ms ease; }
  #catalog-game-preview .catalog-genre-game img { transition:transform 400ms ease; }
  #catalog-game-preview .catalog-genre-game:hover,#catalog-game-preview .catalog-genre-game:focus-within { transform:translateY(-4px); box-shadow:0 14px 28px rgba(0,0,0,.3),0 0 0 1px rgba(113,171,255,.28); }
  #catalog-game-preview .catalog-genre-game:hover img { transform:scale(1.035); }
  #catalog-game-preview .catalog-genre-image-link::after { content:''; position:absolute; inset:0; background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.15) 50%,transparent 70%); transform:translateX(-130%); pointer-events:none; }
  #catalog-game-preview .catalog-genre-game:hover .catalog-genre-image-link::after { animation:catalog-card-sheen 700ms ease-out; }
}
@keyframes catalog-card-sheen { to { transform:translateX(130%); } }
@media(prefers-reduced-motion:reduce) {
  #catalog-game-preview .catalog-genre-game,#catalog-game-preview .catalog-genre-game img { transition:none !important; transform:none !important; }
  #catalog-game-preview .catalog-genre-image-link::after { animation:none !important; }
}
#catalog-game-preview .catalog-genre-game img { display:block; width:100%; aspect-ratio:2.1 / 1; object-fit:cover; height:auto; }
#catalog-game-preview .catalog-genre-game-foot > strong a { color:inherit; text-decoration:none; }
#catalog-game-preview .catalog-genre-game-foot { display:grid; grid-auto-flow:row; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto 1fr; width:100%; min-width:0; box-sizing:border-box; flex:1; align-items:end; gap:10px; padding:12px; }
#catalog-game-preview .catalog-genre-game-foot > .catalog-product-tags { grid-column:1; grid-row:2; width:100%; box-sizing:border-box; }
#catalog-game-preview .catalog-genre-game-foot > .olaf-steam-price { grid-column:1; grid-row:3; }
#catalog-game-preview .catalog-genre-game-foot > strong { grid-column:1; grid-row:1; display:block; width:100%; font-size:16px; font-weight:750; line-height:1.5; color:#edf3ff; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#catalog-game-preview .catalog-genre-game-foot > .olaf-steam-price { justify-self:end; }
#catalog-game-preview a:focus-visible,#catalog-game-preview button:focus-visible { outline:2px solid #8ed1ff; outline-offset:3px; }
@media(max-width:980px) {
  #catalog-game-preview .olaf-steam-taste-head { flex-direction:column; gap:12px; margin-bottom:16px; }
  #catalog-game-preview .olaf-steam-taste-actions { justify-content:flex-start; }
  #catalog-game-preview .olaf-steam-taste-actions { max-width:100%; }
}
@media(prefers-reduced-motion:reduce) {
  #catalog-game-preview img,#catalog-game-preview button { transition:none !important; transform:none !important; }
}
@media(max-width:640px) {
  #catalog-game-preview { min-width:0; max-width:100%; }
  #catalog-game-preview .olaf-steam-taste-stack { min-width:0; gap:18px; }
  #catalog-game-preview .olaf-steam-taste-row { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; min-width:0; height:auto; padding:0 0 14px !important; contain-intrinsic-size:auto 540px; background:linear-gradient(145deg,#102636,#091827) !important; }
  #catalog-game-preview .olaf-steam-taste-head { display:contents; }
  #catalog-game-preview .olaf-steam-taste-head > div:first-child { grid-row:2; width:auto; min-width:0; margin:0 14px; }
  #catalog-game-preview .catalog-mobile-eyebrow { display:block; margin-bottom:6px; color:#70b9e5; font-size:9px; font-weight:700; letter-spacing:1.4px; }
  #catalog-game-preview .olaf-steam-taste-head h3 { font-size:20px; white-space:normal; overflow:visible; text-overflow:clip; -webkit-line-clamp:unset; }
  #catalog-game-preview .olaf-steam-taste-head p { white-space:normal; overflow-wrap:anywhere; }
  #catalog-game-preview .olaf-steam-taste-actions { grid-row:6; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:auto; margin:0 14px; flex:none; gap:8px; }
  #catalog-game-preview .olaf-steam-taste-gallery { display:contents !important; }
  #catalog-game-preview .olaf-steam-taste-main { grid-row:1; aspect-ratio:16 / 9; border-radius:0 !important; }
  #catalog-game-preview .olaf-steam-taste-main::after { content:''; position:absolute; inset:65% 0 0; background:linear-gradient(transparent,#102332); pointer-events:none; }
  #catalog-game-preview .olaf-steam-taste-main img { object-fit:cover !important; object-position:center !important; background:#080f20; }
  #catalog-game-preview .olaf-steam-taste-shots { grid-row:3; grid-template-columns:repeat(4,minmax(0,1fr)) !important; grid-template-rows:auto; margin:4px 14px 0; gap:4px; }
  #catalog-game-preview .olaf-steam-taste-shots a,#catalog-game-preview .catalog-shot-empty { aspect-ratio:16 / 9; border-radius:3px !important; }
  #catalog-game-preview .catalog-shot-empty { min-width:0; padding:3px; font-size:8px; overflow-wrap:anywhere; }
  #catalog-game-preview .catalog-mobile-tags { grid-row:4; display:flex; flex-wrap:wrap; gap:5px; margin:0 14px; min-width:0; }
  #catalog-game-preview .catalog-mobile-tags:empty { display:none; }
  #catalog-game-preview .catalog-mobile-tags span { max-width:100%; padding:2px 6px; border-radius:3px; background:#203c4e; color:#b7cddd; font-size:10px; overflow-wrap:anywhere; }
  #catalog-game-preview .olaf-steam-taste-foot { grid-row:5; justify-content:space-between; gap:10px; margin:0 14px; }
  #catalog-game-preview .olaf-steam-taste-foot > span { min-width:0; white-space:normal; overflow-wrap:anywhere; }
  #catalog-game-preview .catalog-genre-grid,#catalog-game-preview .catalog-genre-grid.is-compact { grid-template-columns:minmax(0,1fr); gap:12px; }
  #catalog-game-preview .catalog-genre-shelf { min-width:0; padding:12px; }
  #catalog-game-preview .catalog-genre-shelf header { min-width:0; overflow-wrap:anywhere; }
  #catalog-game-preview .catalog-genre-game img { aspect-ratio:16 / 9; object-fit:cover; background:#080f20; }
  #catalog-game-preview .catalog-genre-game-foot { padding:9px 7px; gap:8px; }
  #catalog-game-preview .catalog-genre-game-foot > strong { font-size:14px; white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip; -webkit-line-clamp:unset; align-self:start; }
  #catalog-game-preview .catalog-genre-game-foot .olaf-steam-discount { font-size:13px !important; padding:6px !important; }
  #catalog-game-preview .catalog-genre-game-foot .olaf-steam-price-stack { padding:6px; }
  #catalog-game-preview .catalog-genre-game-foot .olaf-steam-price-stack strong { font-size:14px; }
  #catalog-game-preview .olaf-steam-taste-actions a,#catalog-game-preview .olaf-steam-taste-actions button { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; min-width:0; min-height:44px; padding:8px 6px; box-sizing:border-box; white-space:normal; overflow-wrap:anywhere; text-align:center; line-height:1.4; }
  #catalog-game-preview .olaf-steam-taste-actions svg { flex-shrink:0; }
}
body.home-page .catalog-layout > .side-panel { grid-template-columns:minmax(0,1fr) !important; }
#catalog-tag-categories { display:flex; flex-direction:column; gap:6px; max-height:560px; overflow:auto; }
#catalog-tag-categories a { display:flex; justify-content:space-between; gap:10px; padding:9px 10px; border-radius:8px; color:#c9dbef; background:#111e32; text-decoration:none; }
#catalog-tag-categories a span { min-width:0; overflow-wrap:anywhere; }
#catalog-tag-categories a strong { flex-shrink:0; color:#88c8ff; }
#catalog-tag-categories a[aria-current],#catalog-tag-categories a:hover { background:#24476d; color:#fff; }
.catalog-tag-panel { background:linear-gradient(140deg,rgba(29,46,76,.55),rgba(10,19,35,.5)) !important; border:1px solid rgba(129,161,214,.2) !important; backdrop-filter:blur(18px); box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 12px 28px rgba(0,0,0,.16); }
.catalog-tag-panel summary { display:flex; justify-content:space-between; align-items:center; gap:8px; cursor:pointer; font-weight:700; list-style:none; }
.catalog-tag-panel summary::-webkit-details-marker { display:none; }
.catalog-tag-panel { overflow:hidden; box-sizing:border-box; }
.tag-panel-chevron { flex-shrink:0; padding:3px; border-radius:50%; background:rgba(100,160,220,.1); transition:transform 220ms ease; }
.catalog-tag-panel[open] .tag-panel-chevron,#open-tag-panel[aria-expanded="true"] .tag-panel-chevron { transform:rotate(180deg); }
@media(prefers-reduced-motion:reduce) { .tag-panel-chevron { transition:none; } }
.catalog-tag-panel #catalog-tag-categories a { background:rgba(43,64,94,.27); border:1px solid rgba(134,164,207,.1); }
.catalog-tag-panel #catalog-tag-categories a[aria-current] { background:rgba(65,121,181,.35); }
#open-tag-panel { display:none; }
#catalog-products-heading { scroll-margin-top:90px; }
@media(max-width:640px) {
  body.home-page .filter-dropdown-wrap { display:flex; width:100%; gap:8px; }
  #open-tag-panel,#open-filter-btn { display:flex; flex:1; min-width:0; align-items:center; justify-content:center; min-height:42px; padding:6px 8px !important; gap:5px; font-size:12px; border-radius:10px; }
  body.home-page .catalog-layout > .side-panel { display:none; }
  body.home-page .catalog-layout > .side-panel.is-tag-open { display:grid; }
  #catalog-tag-categories { max-height:320px; }
  body.home-page #catalog { margin-bottom:0 !important; padding-bottom:0 !important; }
  body.home-page #catalog-game-preview { margin-top:16px !important; padding-top:0 !important; }
  body.home-page #pagination-controls { margin-top:16px; margin-bottom:4px; }
}
.catalog-tag-selection { color:#a8d8ff; overflow-wrap:anywhere; }
body.home-page .olaf-steam-tags a,body.home-page .olaf-preview-tags a { display:inline-block; padding:3px 7px; border-radius:999px; background:#20364c; color:#c8d9e9; font-size:11px; text-decoration:none; }
#catalog-game-preview a.tag,body.home-page .product-card a.tag { text-decoration:none; cursor:pointer; }
#catalog-game-preview a.tag:hover,body.home-page .product-card a.tag:hover { filter:brightness(1.3); }
#catalog-game-preview a.tag:focus-visible,#catalog-tag-categories a:focus-visible { outline:2px solid #8fc7ff; outline-offset:2px; }
@media(max-width:360px) {
  #catalog-game-preview .catalog-genre-grid,#catalog-game-preview .catalog-genre-grid.is-compact { grid-template-columns:minmax(0,1fr); }
}
/* Four featured products fill both tablet rows without changing phone cards. */
@media(min-width:641px) {
  body.home-page #featured-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(min-width:1181px) {
  body.home-page #featured-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(min-width:641px) and (max-width:1180px) and (orientation:portrait) {
  body.home-page .hero-deal { width:min(100%,520px); max-width:520px; justify-self:end; margin-left:auto; margin-right:0; }
}
