.space-bg-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}

.space-bg-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 22%, rgba(88, 120, 255, 0.12), transparent 28%),
    radial-gradient(circle at 78% 34%, rgba(129, 85, 255, 0.08), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1.5px),
    radial-gradient(circle at 12% 68%, rgba(255, 255, 255, 0.06) 0 1px, transparent 1.5px),
    radial-gradient(circle at 87% 78%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1.5px),
    linear-gradient(180deg, #050816 0%, #020410 100%);
  background-size: auto, auto, 220px 220px, 280px 280px, 340px 340px, auto;
}

.space-bg-content {
  position: relative;
  z-index: 1;
}

/* Space Background - Auction Pages */
.space-bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.space-bg-wrapper .starfield-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}


/* ========================================
   MAKE EVERYTHING TRANSPARENT ON SPACE PAGES
   so the starfield shows through
   ======================================== */

body.space-page {
  background: transparent !important;
}

/* All shopify sections: position them above the space bg */
body.space-page .shopify-section {
  position: relative;
  z-index: 1;
}

/* Nuke backgrounds on ALL main-content sections and their children.
   Header and footer groups are excluded and keep their colors. */
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group),
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) data-island,
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="bg-scheme"],
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="color-scheme"] {
  background-color: transparent !important;
  --color-background: transparent;
  --scheme-background: transparent;
}

/* Also catch the collection banner section wrapper bg */
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) .section-collection-banner,
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="section-collection"] {
  background-color: transparent !important;
}

/* Card surfaces (Shapes theme product cards) — Kick-inspired dark purple */
body.space-page .card__surface {
  background: #200a25 !important;
  border: 1px solid #553052;
  border-radius: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.space-page .card__surface:hover {
  border-color: #b972ff;
  box-shadow: 0 0 24px rgba(185, 114, 255, 0.2);
}

/* Product card image containers — rounded to match Kick */
body.space-page [class*="card__image"]:not(.auction-catalog-card__image),
body.space-page [class*="card__media"]:not(.auction-catalog-card__media-link) {
  border-radius: 12px;
  overflow: hidden;
  background: #361641;
}

/* Generic product card/tile selectors */
body.space-page .product-tile,
body.space-page .product-card,
body.space-page [class*="product-tile"],
body.space-page [class*="product-card"] {
  background: #200a25;
  border: 1px solid #553052;
  border-radius: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.space-page .product-tile:hover,
body.space-page .product-card:hover,
body.space-page [class*="product-tile"]:hover,
body.space-page [class*="product-card"]:hover {
  border-color: #b972ff;
  box-shadow: 0 0 20px rgba(185, 114, 255, 0.15);
}

/* ========================================
   TEXT READABILITY ON DARK BACKGROUND
   ======================================== */

body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) {
  color: #ffffff;
}

body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) a {
  color: #e0e0ff;
}

/* Headings — white, no glow (Kick style) */
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) h1,
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) h2,
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) h3 {
  color: #ffffff;
}

/* Price text — white (Kick style) */
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) .price,
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="price"] {
  color: #ffffff !important;
}

/* Product titles in cards */
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="card__text"],
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="card__title"] {
  color: #ffffff !important;
}

/* Filter and sort buttons */
body.space-page [class*="filter"],
body.space-page [class*="sort"] {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Override any text-scheme-text utility in main content */
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="text-scheme-text"] {
  color: #ffffff !important;
}

/* Override border colors that reference scheme */
body.space-page .shopify-section:not(.shopify-section-group-header-group):not(.shopify-section-group-footer-group) [class*="border-scheme"] {
  border-color: rgba(255, 255, 255, 0.1) !important;
}


/* ========================================
   COLLECTION PAGE: SIDEBAR + GRID LAYOUT
   ======================================== */

/* Two-column layout: sidebar (filters) + main (product grid) */
.space-collection-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Sidebar: hidden on mobile, shown on desktop */
.space-collection-layout__sidebar {
  display: none;
}

@media (min-width: 990px) {
  .space-collection-layout__sidebar {
    display: block;
    flex: 0 0 240px;
    width: 240px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-bottom: 24px;
  }
  .space-collection-layout__main {
    flex: 1;
    min-width: 0;
  }
}

/* ========================================
   FILTER SIDEBAR STYLES
   ======================================== */

/* --- Base container (JS adds warp + border layers) --- */
.space-filter-sidebar,
.space-filter-sidebar__sort-section {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* --- Header --- */
.space-filter-sidebar__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.space-filter-sidebar__title {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.01em;
  margin: 0;
  text-shadow: 0px 2px 12px rgba(0, 0, 0, 0.4);
}

.space-filter-sidebar__clear {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.space-filter-sidebar__clear:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* --- Filter form + groups --- */
.space-filter-sidebar__form {
  position: relative;
  z-index: 1;
}

.space-filter-sidebar__groups {
  position: relative;
  z-index: 1;
}

.space-filter-sidebar__group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 2px;
  margin-bottom: 2px;
}

.space-filter-sidebar__group:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* --- Group toggle (accordion header) --- */
.space-filter-sidebar__group-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  gap: 4px;
  text-shadow: 0px 1px 8px rgba(0, 0, 0, 0.3);
  transition: opacity 0.15s;
}

.space-filter-sidebar__group-toggle:hover {
  opacity: 0.8;
}

.space-filter-sidebar__active-count {
  color: rgba(165, 180, 252, 0.9);
  font-size: 12px;
}

.space-filter-sidebar__chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
  opacity: 0.4;
}

.space-filter-sidebar__chevron--open {
  transform: rotate(180deg);
}

/* --- Checkbox / radio list --- */
.space-filter-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 2px 0 6px;
}

.space-filter-sidebar__list-item {
  margin: 0;
  padding: 0;
}

.space-filter-sidebar__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.space-filter-sidebar__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.15s;
}

.space-filter-sidebar__label:hover {
  color: #ffffff;
}

.space-filter-sidebar__label--disabled {
  opacity: 0.25;
  text-decoration: line-through;
  pointer-events: none;
}

/* --- Custom checkbox — liquid glass micro element --- */
.space-filter-sidebar__check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 4px;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(4px) saturate(140%);
  -webkit-backdrop-filter: blur(4px) saturate(140%);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.2) inset,
    0 0.5px 1px rgba(255, 255, 255, 0.1) inset;
  transition: all 0.15s ease;
}

.space-filter-sidebar__checkbox:checked + .space-filter-sidebar__label .space-filter-sidebar__check-box {
  background: rgba(165, 180, 252, 0.25);
  box-shadow:
    0 0 0 0.5px rgba(165, 180, 252, 0.5) inset,
    0 0.5px 2px rgba(165, 180, 252, 0.3) inset,
    0 4px 12px rgba(165, 180, 252, 0.15);
}

.space-filter-sidebar__checkbox:checked + .space-filter-sidebar__label .space-filter-sidebar__check-box::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Radio variant */
.space-filter-sidebar__checkbox[type="radio"] + .space-filter-sidebar__label .space-filter-sidebar__check-box {
  border-radius: 50%;
}

.space-filter-sidebar__checkbox[type="radio"]:checked + .space-filter-sidebar__label .space-filter-sidebar__check-box::after {
  border: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a5b4fc;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.space-filter-sidebar__label-text {
  flex: 1;
}

.space-filter-sidebar__count {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

/* --- Price range inputs — glass inputs --- */
.space-filter-sidebar__price-range {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 10px;
}

.space-filter-sidebar__price-field {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 4px;
}

.space-filter-sidebar__currency {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3);
}

.space-filter-sidebar__price-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(4px) saturate(140%);
  -webkit-backdrop-filter: blur(4px) saturate(140%);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  padding: 7px 8px;
  font-size: 12px;
  outline: none;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.12) inset,
    0 0.5px 1px rgba(255, 255, 255, 0.06) inset;
  transition: box-shadow 0.15s ease;
  -moz-appearance: textfield;
}

.space-filter-sidebar__price-input::-webkit-inner-spin-button,
.space-filter-sidebar__price-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.space-filter-sidebar__price-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.space-filter-sidebar__price-input:focus {
  box-shadow:
    0 0 0 1px rgba(165, 180, 252, 0.4) inset,
    0 0.5px 2px rgba(165, 180, 252, 0.2) inset,
    0 4px 16px rgba(165, 180, 252, 0.1);
}

.space-filter-sidebar__price-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

/* --- Swatch grid --- */
.space-filter-sidebar__swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px 0 10px;
}

.space-filter-sidebar__swatch-label {
  display: block;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1.5px transparent;
  transition: box-shadow 0.15s ease;
}

.space-filter-sidebar__checkbox:checked + .space-filter-sidebar__swatch-label {
  box-shadow: 0 0 0 1.5px rgba(165, 180, 252, 0.6);
}

.space-filter-sidebar__swatch-label--disabled {
  opacity: 0.2;
  pointer-events: none;
}

.space-filter-sidebar__swatch-color {
  display: block;
  width: 100%;
  padding-top: 100%;
  background-size: cover;
  border-radius: 4px;
}

/* --- Apply button --- */
.space-filter-sidebar__apply {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 100px;
  color: #ffffff;
  font: 500 16px/1 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  text-shadow: 0px 2px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease-in-out;
}

.space-filter-sidebar__apply:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.space-filter-sidebar__apply:active {
  transform: scale(0.96);
}

/* --- Sort section (below filters) --- */
.space-filter-sidebar__sort-section {
  margin-top: 10px;
  padding: 8px 16px;
}

/* Scrollbar styling for sidebar */
.space-collection-layout__sidebar::-webkit-scrollbar {
  width: 4px;
}

.space-collection-layout__sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.space-collection-layout__sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.space-collection-layout__sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}
