/* SyphexTCG public theme: shop, checkout, order confirmation, privacy.
   Brand: navy header with the logo, brand blue for selection/links, logo yellow for actions.
   Classes are prefixed sx- so they never collide with Bootstrap on the checkout page. */
:root {
  color-scheme: dark;
  /* Palette taken from the logo: outline navy, letter yellow, "TCG" sky blue */
  --sx-navy: #0d1a3f;          /* logo-outline navy: page background, text on yellow */
  --sx-header: #081230;        /* deeper navy: header band */
  --sx-blue: #3fb3f0;          /* logo sky blue, lifted for text/borders on navy: selection, links, focus */
  --sx-blue-solid: #0991d5;    /* logo sky blue as a fill (steppers) */
  --sx-yellow: #ffc909;        /* logo yellow: actions only */
  --sx-yellow-hover: #ffd640;
  --sx-bg: #0d1a3f;
  --sx-surface: #142650;       /* cards and panels */
  --sx-ink: #f3f6ff;
  --sx-muted: #9fb0d6;
  --sx-line: #22386e;
  --sx-soft: #1b3060;
  --sx-ok: #5fe0a0; --sx-ok-bg: rgba(46, 204, 113, .15);
  --sx-warn: #ff8a6b; --sx-warn-bg: rgba(255, 122, 89, .16);   /* coral "N left": urgent, but not mistaken for the yellow buttons */
  --sx-info: #6cc8ff; --sx-info-bg: rgba(9, 145, 213, .22);
  --sx-off: #8b9ac0; --sx-off-bg: rgba(255, 255, 255, .07);
  --sx-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 32px rgba(2, 8, 28, .4);
  --sx-scrim: rgba(2, 8, 24, .6);
  --sx-radius: 18px;
  --sx-font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --sx-display: "Lilita One", "Arial Rounded MT Bold", "Plus Jakarta Sans", system-ui, sans-serif;  /* chunky rounded, echoes the logo */
}


/* Navy "playmat": faint dot grid with a soft blue glow at the top */
.sx-page { background-color: var(--sx-bg);
  background-image: radial-gradient(1200px 500px at 50% -120px, rgba(9, 145, 213, .24), transparent 70%),
    radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1.2px);
  background-size: auto, 22px 22px; background-attachment: scroll;
  color: var(--sx-ink); font-family: var(--sx-font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; margin: 0; min-height: 100vh; }
.sx-page *, .sx-page *::before, .sx-page *::after { box-sizing: border-box; }
.sx-page button { font: inherit; color: inherit; cursor: pointer; }
.sx-page :focus-visible { outline: 3px solid var(--sx-blue); outline-offset: 2px; }
.sx-wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sx-wrap.narrow { max-width: 760px; }
.sx-hide { display: none !important; }

/* Header */
.sx-header { background: var(--sx-header); border-bottom: 1px solid var(--sx-line); color: #fff; position: sticky; top: 0; z-index: 30; }
.sx-header .sx-wrap { padding-top: 10px; padding-bottom: 10px; display: grid; gap: 8px; }
.sx-header.has-tabs { border-bottom: 0; }
.sx-header.has-tabs .sx-wrap { padding-bottom: 0; }
.sx-header-row { display: flex; align-items: center; gap: 16px; }
.sx-logo { display: block; flex: none; line-height: 0; margin-left: -4px; }
.sx-logo img { display: block; height: 52px; width: auto; }
.sx-logo-text { font-weight: 800; font-size: 22px; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.sx-logo-text b { color: var(--sx-yellow); }
.sx-search { flex: 1; min-width: 0; max-width: 440px; margin-left: auto; position: relative; }
.sx-search input {
  width: 100%; height: 42px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .09);
  color: #fff; font: inherit; padding: 0 40px 0 40px; outline: none;
}
.sx-search input::placeholder { color: rgba(255, 255, 255, .62); }
.sx-search input:focus { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .35); }
.sx-search input::-webkit-search-cancel-button { display: none; }
.sx-search .sx-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: rgba(255, 255, 255, .7); pointer-events: none; }
.sx-search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; display: none; align-items: center; justify-content: center; }
.sx-search-clear svg { width: 12px; height: 12px; fill: currentColor; }
.sx-header-link { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sx-header-link:hover { color: #fff; }
.sx-header-link svg { width: 16px; height: 16px; fill: currentColor; }
.sx-header-row .sx-push { margin-left: auto; }
.sx-cart-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px 0 16px; border-radius: 999px; border: 0;
  background: var(--sx-yellow); color: var(--sx-navy); font-weight: 700; white-space: nowrap; flex: none;
}
.sx-cart-btn:hover { background: var(--sx-yellow-hover); }
.sx-cart-btn svg { width: 18px; height: 18px; fill: currentColor; }
.sx-cart-count { min-width: 28px; height: 28px; border-radius: 999px; background: var(--sx-header); color: var(--sx-yellow); display: inline-grid; place-items: center; font-size: 13px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.sx-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.sx-tabs::-webkit-scrollbar { display: none; }
.sx-tab { border: 0; background: transparent; color: rgba(255, 255, 255, .72); padding: 10px 16px 12px; border-radius: 12px 12px 0 0; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.sx-tab .n { font-size: 12px; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.sx-tab:hover { color: #fff; }
.sx-tab[aria-selected="true"] { background: var(--sx-bg); color: var(--sx-ink); }
.sx-tab[aria-selected="true"] .n { background: var(--sx-soft); color: var(--sx-muted); }

/* Service line */
.sx-service .sx-wrap { padding-top: 18px; padding-bottom: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--sx-muted); font-size: 14px; }
.sx-service span { display: inline-flex; align-items: center; gap: 8px; }
.sx-service svg { width: 18px; height: 18px; fill: var(--sx-blue); flex: none; }
.sx-service b { color: var(--sx-ink); font-weight: 700; }
.sx-service .right { margin-left: auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sx-toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--sx-muted); font-size: 14px; cursor: pointer; }
.sx-toggle input { width: 18px; height: 18px; accent-color: var(--sx-blue); margin: 0; }
.sx-updated { font-size: 12.5px; }

/* Buttons and pills */
.sx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.sx-btn-primary { background: var(--sx-yellow); color: var(--sx-navy); }
.sx-btn-primary:hover { background: var(--sx-yellow-hover); color: var(--sx-navy); }
.sx-btn-dark { background: var(--sx-blue-solid); color: #fff; }
.sx-btn-dark:hover { background: #0ba3ef; color: #fff; }
.sx-btn-ghost { background: var(--sx-surface); color: var(--sx-ink); border: 1px solid var(--sx-line); }
.sx-btn-ghost:hover { border-color: var(--sx-ink); color: var(--sx-ink); }
.sx-btn svg { width: 18px; height: 18px; fill: currentColor; }
.sx-btn[disabled] { background: var(--sx-off-bg); color: var(--sx-off); cursor: not-allowed; }
.sx-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.sx-pill.ok { color: var(--sx-ok); background: var(--sx-ok-bg); }
.sx-pill.warn { color: var(--sx-warn); background: var(--sx-warn-bg); }
.sx-pill.info { color: var(--sx-info); background: var(--sx-info-bg); }
.sx-pill.off { color: var(--sx-off); background: var(--sx-off-bg); }

/* Shop list: 1 column on phones, 2 on tablets, 3 on desktop.
   Each set is drawn like a trading card: name bar with "from" price (where HP sits), framed art window,
   formats as attack lines, set-info footer. Hover/focus catches a holo foil sheen on the frame. */
.sx-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 18px; padding-bottom: 72px; align-items: start; }
@media (min-width: 700px) { .sx-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .sx-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }

.sx-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; isolation: isolate;
  padding: 10px; border-radius: 20px;
  background: linear-gradient(170deg, #1c3468 0%, var(--sx-surface) 38%, #0f1f47 100%);
  border: 1.5px solid rgba(255, 201, 9, .36);                   /* logo-yellow card frame */
  box-shadow: var(--sx-shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
/* Holo foil: a moving rainbow sheen clipped to the frame edge */
.sx-card::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: 20px; padding: 1.5px; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, #ffc909, #fff3b0 20%, #3fb3f0 42%, #ffffff 58%, #0991d5 74%, #ffc909 90%) 0 0 / 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .25s ease;
}
.sx-card:hover, .sx-card:focus-within { transform: translateY(-3px); border-color: transparent; box-shadow: 0 18px 40px rgba(2, 8, 28, .55), inset 0 1px 0 rgba(255, 255, 255, .08); }
.sx-card:hover::before, .sx-card:focus-within::before { opacity: 1; animation: sx-foil 3.2s linear infinite; }
@keyframes sx-foil { to { background-position: 300% 0; } }
.sx-card.is-soldout { border-color: var(--sx-line); }
.sx-card.is-soldout .sx-photo img { filter: grayscale(.55); opacity: .8; }

.sx-namebar { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 4px 6px 10px; }
.sx-namebar h3 {
  margin: 0; min-width: 0; font-family: var(--sx-display); font-weight: 400; font-size: 21px; line-height: 1.15;
  letter-spacing: .01em; color: #fff; text-wrap: balance; overflow-wrap: anywhere;
}
.sx-from { flex: none; font-size: 12.5px; color: var(--sx-muted); white-space: nowrap; }
.sx-from b { font-family: var(--sx-display); font-weight: 400; font-size: 19px; color: var(--sx-yellow); letter-spacing: .01em; margin-left: 2px; }
.sx-from.is-out { font-weight: 700; color: var(--sx-off); }

.sx-photo {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  background: #ffffff; border-radius: 12px; border: 3px solid var(--sx-yellow);   /* the card's art window */
  display: grid; place-items: center;
}
/* Pinned to the box edges so the whole photo always scales down to fit (a height:100% grid child would overflow and get clipped) */
.sx-photo img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; display: block; }
.sx-photo svg { width: 22%; height: 38%; fill: #b8bfd8; }

.sx-info { min-width: 0; padding: 4px 6px 0; }
.sx-formats { list-style: none; margin: 0; padding: 0; display: grid; }
.sx-format { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--sx-line); }
.sx-format:first-child { border-top: 0; }
.sx-f-name { font-weight: 700; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.sx-f-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12.5px; color: var(--sx-muted); }
.sx-f-buy { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 12px; }
.sx-price { color: #fff; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
.sx-price.off { color: var(--sx-off); text-decoration: line-through; font-weight: 600; font-size: 15px; }
.sx-add { height: 38px; min-width: 88px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--sx-yellow); color: var(--sx-navy); font-weight: 800; font-size: 14px; box-shadow: 0 2px 0 #c49a00; }
.sx-add:hover { background: var(--sx-yellow-hover); }
.sx-add:active { transform: translateY(1px); box-shadow: 0 1px 0 #c49a00; }
.sx-add[disabled] { background: var(--sx-off-bg); color: var(--sx-off); cursor: not-allowed; box-shadow: none; }
.sx-stepper { display: inline-flex; align-items: center; height: 38px; min-width: 88px; border-radius: 999px; background: var(--sx-blue-solid); color: #fff; box-shadow: 0 2px 0 #066a9e; }
.sx-stepper button { width: 34px; height: 38px; border: 0; background: transparent; color: inherit; font-size: 18px; border-radius: 999px; padding: 0; }
.sx-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.sx-stepper .qty { min-width: 18px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
/* A quantity selector shows the Add button until something is in the cart, then the stepper. */
.quantity-selector.is-empty .sx-stepper { display: none; }
.quantity-selector:not(.is-empty) .sx-add { display: none; }

.sx-setline {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; padding: 9px 6px 2px; border-top: 1px dashed rgba(255, 201, 9, .25);
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sx-muted);
}
.sx-setline .hot { color: var(--sx-info); }
.sx-empty { grid-column: 1 / -1; text-align: center; color: var(--sx-muted); padding: 48px 0; }

@media (prefers-reduced-motion: reduce) {
  .sx-card, .sx-card:hover, .sx-card:focus-within { transform: none; transition: none; }
  .sx-card:hover::before, .sx-card:focus-within::before { animation: none; }
}

/* Content card (checkout sections, confirmation, privacy) */
.sx-panel { border: 1px solid var(--sx-line); background: var(--sx-surface); border-radius: var(--sx-radius); box-shadow: var(--sx-shadow); padding: 24px; }
.sx-panel + .sx-panel { margin-top: 16px; }
.sx-title { font-family: var(--sx-display); font-weight: 400; font-size: clamp(28px, 4vw, 36px); letter-spacing: .01em; margin: 28px 0 16px; line-height: 1.15; }
.sx-panel h2, .sx-h2 { font-size: 18px; font-weight: 800; letter-spacing: -.015em; margin: 0 0 14px; }
.sx-muted { color: var(--sx-muted); }

/* Cart drawer */
.sx-scrim { position: fixed; inset: 0; background: var(--sx-scrim); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sx-scrim.open { opacity: 1; pointer-events: auto; }
.sx-drawer {
  position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--sx-surface); border-left: 1px solid var(--sx-line); box-shadow: var(--sx-shadow);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s ease; visibility: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sx-drawer.open { transform: none; visibility: visible; }
.sx-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; }
.sx-drawer-head h2 { margin: 0; font-family: var(--sx-display); font-weight: 400; font-size: 24px; letter-spacing: .01em; }
.sx-drawer-head h2 span { color: var(--sx-muted); font-weight: 600; font-size: 15px; margin-left: 6px; }
.sx-close { width: 38px; height: 38px; border-radius: 999px; border: 0; background: var(--sx-soft); display: grid; place-items: center; padding: 0; }
.sx-close svg { width: 16px; height: 16px; fill: var(--sx-ink); }
.sx-lines { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 0 20px; }
.sx-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--sx-line); align-items: center; }
.sx-line .t { font-weight: 700; font-size: 14.5px; min-width: 0; overflow-wrap: anywhere; }
.sx-line .s { color: var(--sx-muted); font-size: 12.5px; }
.sx-line .p { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sx-line .row { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.sx-remove { border: 0; background: none; color: var(--sx-muted); font-size: 13px; padding: 0; text-decoration: underline; }
.sx-cart-empty { text-align: center; color: var(--sx-muted); padding: 40px 0; }
.sx-summary { padding: 16px 20px 20px; display: grid; gap: 10px; border-top: 1px solid var(--sx-line); }
.sx-sumrow { display: flex; justify-content: space-between; color: var(--sx-muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.sx-sumrow.total { color: var(--sx-ink); font-weight: 800; font-size: 19px; }
.sx-sumrow.total span span { color: var(--sx-yellow); }
.sx-note { margin: 0; text-align: center; color: var(--sx-muted); font-size: 12.5px; }

.sx-toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px);
  background: var(--sx-header); color: #fff; border: 1px solid var(--sx-line); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; box-shadow: var(--sx-shadow); max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis;
}
.sx-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.sx-footer { color: var(--sx-muted); font-size: 13px; }
.sx-footer .sx-wrap { padding-top: 8px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sx-footer a { color: var(--sx-muted); }
.sx-footer a:hover { color: var(--sx-ink); }

@media (max-width: 640px) {
  .sx-header-row { flex-wrap: wrap; gap: 10px 12px; }
  .sx-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .sx-cart-btn, .sx-header-row .sx-push { margin-left: auto; }
  .sx-cart-btn .label { display: none; }
  .sx-logo img { height: 44px; }
  .sx-service .right { margin-left: 0; }
  .sx-drawer { top: auto; width: 100%; max-height: 88%; border-radius: 22px 22px 0 0; transform: translateY(100%); }
  .sx-drawer.open { transform: none; }
  .sx-panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .sx-drawer, .sx-scrim, .sx-toast { transition: none; } }
