/* Shop mode — a shop's OWN site (App\Support\ShopChrome, storefront/partials/shop-chrome/*; owner 2026-10-10:
   "ควรเป็นหน้าร้านของตัวเองเลย ไม่ต้องมีหัวเว็บของ tcg card play"). body.sf-shopmode: no site header / nav /
   footer / tab bar — a thin platform strip on top, the shop's hero + sticky tab bar as its header, the shop's
   footer. Colours follow the shop's (--shop-c from แต่งหน้าร้าน on <body>; the site's cyan when none). */

body.sf-shopmode { --shop-accent: var(--shop-c, var(--sf-action, #00f0ff)); }

/* the shop's background picture fixed to the screen (partials/shop-chrome/background: mode fixed) — its own layer, so
   scrolling stays on the compositor (never background-attachment: fixed) */
.sf-shopbg { position: fixed; inset: 0; z-index: -2; pointer-events: none; background-position: center, center; background-size: auto, cover; background-repeat: no-repeat; }

/* ---------- The platform strip ---------- */
.sf-shopstrip { position: relative; z-index: 31; background: #05000bf2; border-bottom: 1px solid #ffffff14; font-size: 12.5px; color: var(--v2-muted, #aaa0ba); }
.sf-shopstrip-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.sf-shopstrip-home { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.sf-shopstrip-home:hover { color: #fff; }
.sf-shopstrip-logo { flex: none; display: inline-flex; opacity: .85; }
.sf-shopstrip-logo img { display: block; height: 22px; width: auto; max-width: 110px; object-fit: contain; }
.sf-shopstrip-home:hover .sf-shopstrip-logo { opacity: 1; }
.sf-shopstrip-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-shopstrip-txt i { font-style: normal; margin: 0 7px; opacity: .5; }
.sf-shopstrip-txt em { font-style: normal; color: #cfc6dd; }
.sf-shopstrip-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.sf-shopstrip-acts .icon-button { width: 34px; height: 34px; }
.sf-shopstrip-acts .icon-button .icon { width: 18px; height: 18px; }
.sf-shopstrip-acts .account-button { min-height: 32px; padding: 4px 10px; font-size: 12.5px; }
.sf-shopstrip-acts .sf-chrome-ava { width: 24px; height: 24px; }
.sf-shopstrip-acts .sf-chrome-pop > :not(summary) { z-index: 40; }

/* ---------- The shop's header on item / cart pages (partials/shop-chrome/head) ---------- */
.sf-shophead { border-bottom: 1px solid #ffffff14; background: linear-gradient(180deg, color-mix(in srgb, var(--shop-accent) 7%, transparent), transparent); }
.sf-shophead-in { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 18px 0 12px; flex-wrap: wrap; }
.sf-shophead-id { display: inline-flex; align-items: center; gap: 14px; min-width: 0; color: #fff; text-decoration: none; }
.sf-shophead-logo { flex: none; display: grid; place-items: center; width: 60px; height: 60px; overflow: hidden; background: #fff;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); }
.sf-shophead-logo img { width: 100%; height: 100%; object-fit: contain; }
.sf-shophead-logo b { font: 800 24px/1 var(--v2-display, sans-serif); color: #1a0f2e; }
.sf-shophead-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sf-shophead-name b { font: 800 clamp(20px, 2.2vw, 26px)/1.15 var(--v2-display, sans-serif); overflow-wrap: anywhere; }
.sf-shophead-name small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #4ade80; }
.sf-shophead-name small .icon { width: 13px; height: 13px; }
.sf-shophead-id:hover b { color: var(--shop-accent); }
.sf-shophead-search { flex: 0 1 380px; }
.sf-shophead-nav { display: flex; overflow-x: auto; scrollbar-width: none; }
.sf-shophead-nav::-webkit-scrollbar { display: none; }

/* the owner's preview of แต่งหน้าร้าน (?preview=1, ShopLook draft) */
.sf-shop-previewbar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border: 1px dashed #ffcf00; background: #ffcf0014; color: #ffe27a; font-size: 13.5px; }
.sf-shop-previewbar .icon { flex: none; width: 18px; height: 18px; }
.sf-shop-previewbar b { color: #fff; }

/* the page starts right under the strip */
body.sf-shopmode main#main > .sf-shops-page { padding-top: 22px; }

/* ---------- The shop's footer ---------- */
.sf-shopfoot { margin-top: 56px; background: linear-gradient(180deg, #ffffff05, #00000040); border-top: 1px solid color-mix(in srgb, var(--shop-accent) 30%, transparent); color: var(--v2-muted, #aaa0ba); font-size: 14px; }
.sf-shopfoot-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr); gap: 28px 40px; padding: 36px 0 28px; }
.sf-shopfoot-id { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.sf-shopfoot-logo { flex: none; display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; background: #fff;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.sf-shopfoot-logo img { width: 100%; height: 100%; object-fit: contain; }
.sf-shopfoot-logo b { font: 800 22px/1 var(--v2-display, sans-serif); color: #1a0f2e; }
.sf-shopfoot-id > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sf-shopfoot-id b { font-size: 17px; overflow-wrap: anywhere; }
.sf-shopfoot-id small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #4ade80; }
.sf-shopfoot-id small .icon { width: 13px; height: 13px; }
.sf-shopfoot-shop p { margin: 12px 0 0; line-height: 1.6; max-width: 46ch; }
.sf-shopfoot-chat { margin-top: 14px; min-height: 40px; }
.sf-shopfoot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.sf-shopfoot-col h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; color: #fff; display: flex; align-items: center; gap: 8px; }
.sf-shopfoot-col h3::before { content: ''; width: 3px; height: 14px; background: var(--shop-accent); }
.sf-shopfoot-col a { color: inherit; text-decoration: none; }
.sf-shopfoot-col a:hover { color: #fff; }
.sf-shopfoot-platform p { margin: 0 0 2px; font-size: 13px; line-height: 1.55; }
.sf-shopfoot-site { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 12px; border: 1px solid #ffffff1f; font-size: 13px; }
.sf-shopfoot-site:hover { border-color: #ffffff40; }
.sf-shopfoot-sitelogo { display: inline-flex; }
.sf-shopfoot-sitelogo img { display: block; height: 20px; width: auto; max-width: 100px; object-fit: contain; }
.sf-shopfoot-site .icon { width: 14px; height: 14px; }
.sf-shopfoot-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 14px 0 18px; border-top: 1px solid #ffffff12; font-size: 12.5px; }
.sf-shopfoot-bottom .sf-legal-links { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; }
.sf-shopfoot-bottom .sf-legal-links a { color: inherit; }
.sf-shopfoot-bottom .sf-legal-links a:hover { color: #fff; }
.sf-shopfoot-bottom > :last-child:not(.sf-legal-links):not(span) { margin-left: auto; }

@media (max-width: 900px) {
  .sf-shopfoot-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sf-shopfoot-shop { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .sf-shopstrip-txt em, .sf-shopstrip-txt i { display: none; }
  /* the site moves the cart to its bottom tab bar and hides the account chip on phones — a shop has neither */
  .sf-shopstrip-acts.header-actions > .cart-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .sf-shopstrip-acts .account-button { display: inline-flex; }
  .sf-shopstrip-acts .account-button > span { display: none; }
  .sf-shopstrip .sf-chrome-notif .sf-chrome-panel { top: 50px; }
  body.sf-shopmode main#main > .sf-shops-page { padding-top: 14px; }
  .sf-shopfoot { margin-top: 40px; }
  .sf-shopfoot-in { gap: 22px 20px; padding: 26px 0 20px; }
}
@media (max-width: 420px) {
  .sf-shopstrip-txt { display: none; }
  .sf-shopfoot-in { grid-template-columns: minmax(0, 1fr); }
}
