:root {

  --page-gap: 20px;
  --card-gap: 12px;

  --font: 'Instrument Sans', sans-serif;
}

body {

  margin: 0;
  font-family: var(--font);

  color: white;
}

/* WRAPPER */

.binder-wrapper {

  width: 100%;
}

/* HEADER */

.binder-header {

  display: flex;
  flex-direction: column;

  gap: 12px;
}

/* PANELS */

.header-panel,
.navigation-group,
.search-group,
.binder-filters {

  border-radius: 12px;

  border: none;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.008)
    );
  
}

/* =================================
   CARD FILTERS
================================= */

.binder-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
}

.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-title {
  margin-right: 4px;
  color: rgba(225,240,210,0.68);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.filter-toggle {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.filter-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.filter-toggle span {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 700;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.filter-toggle span::before {
  content: "✓";
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: transparent;
  font-size: 10px;
  font-weight: 900;
}

.filter-toggle input:checked + span {
  border-color: rgba(198,255,135,0.42);
  background: rgba(198,255,135,0.07);
  color: white;
}

.filter-toggle input:checked + span::before {
  border-color: #caef7d;
  background: #caef7d;
  color: #1b2220;
}

.filter-toggle input:focus-visible + span {
  outline: 2px solid #caef7d;
  outline-offset: 2px;
}

.binder-stack-switch {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.binder-stack-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.binder-stack-switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  box-sizing: border-box;
  transition: border-color .18s ease, background .18s ease;
}

.binder-stack-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  transition: transform .18s ease, background .18s ease;
}

.binder-stack-switch input:checked + .binder-stack-switch-track {
  border-color: #caef7d;
  background: rgba(198,255,135,0.22);
}

.binder-stack-switch input:checked + .binder-stack-switch-track::after {
  transform: translateX(18px);
  background: #caef7d;
}

.binder-stack-switch input:focus-visible + .binder-stack-switch-track {
  outline: 2px solid #caef7d;
  outline-offset: 2px;
}

.binder-stack-switch-label {
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  font-weight: 700;
}

.binder-toggle-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

/* =================================
   SIZE PANEL
================================= */

.header-panel {

  padding: 22px;
}

.selection-title {

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 3px;

  color: rgba(225,240,210,0.68);

  margin-bottom: 16px;
}

/* SIZE OPTIONS */

.size-options {

  --active-index: 0;

  position: relative;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 0;

  padding: 6px;

  overflow: hidden;

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 13px;

  background: rgba(60, 101, 78, 0.78);
}

.size-options[data-active-layout="4x3"] {
  --active-index: 1;
}

.size-options[data-active-layout="4x4"] {
  --active-index: 2;
}

.size-options::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 9px;
  background: rgba(23, 61, 43, 0.62);
  transform: translateX(calc(var(--active-index) * 100%));
  transition: transform 220ms ease;
  z-index: 0;
}

.size-btn {

  position: relative;
  z-index: 1;

  min-height: 72px;

  border-radius: 9px;

  border: 0;

  background: transparent;

  transition:
    color .2s ease,
    opacity .2s ease;

  cursor: pointer;

  overflow: hidden;
}

.size-btn:hover {

  background: rgba(255,255,255,0.025);
}

.size-btn.active {

  background: transparent;
  box-shadow: none;
}

.size-btn-inner {

  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 12px;

  padding: 8px 10px;
}

/* ICON */

.size-icon {

  width: 38px;
  height: 38px;

  border-radius: 0;

  border: 0;

  background: transparent;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.size-icon svg {

  width: 34px;
  height: 34px;
}

.size-icon rect {

  fill: rgba(255,255,255,0.78);
}

.size-btn.active rect {

  fill: rgba(255,255,255,0.86);
}

/* TEXT */

.size-text {

  display: flex;
  flex-direction: column;

  justify-content: center;
}

.size-text strong {

  font-size: 1rem;
  line-height: 1;

  font-weight: 800;

  margin-bottom: 5px;
}

.size-text span {

  font-size: 0.78rem;

  color: rgba(255,255,255,0.58);
}

/* =================================
   PAGINATION
================================= */

.navigation-group {

  display: grid;

  grid-template-columns:
    minmax(140px, 1fr)
    auto
    minmax(140px, 1fr);

  align-items: center;

  column-gap: 56px;

  padding: 18px 22px;

  border-radius: 28px;

  border: 1px solid rgba(255,255,255,0.08);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.008)
    );

  
}

.nav-btn {

  height: 62px;

  padding: 0 34px;

  border-radius: 20px;

  border: 1px solid rgba(255,255,255,0.08);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.008)
    );

  color: white;

  font-size: 14px;
  font-weight: 800;

  letter-spacing: 0.5px;

  cursor: pointer;

  transition:
    border-color .2s ease,
    background .2s ease,
    transform .2s ease;

  justify-self: start;
}

.nav-btn:last-child {

  justify-self: end;
}

.nav-btn:hover {

  border-color: rgba(198,255,135,0.18);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.012)
    );
}

.page-indicator {

  display: flex;
  align-items: center;

  gap: 16px;

  white-space: nowrap;

  font-size: 18px;
  font-weight: 700;

  color: white;
}

.page-indicator input {

  width: 74px;
  height: 62px;

  border-radius: 20px;

  border: 1px solid rgba(255,255,255,0.08);

  background:
    radial-gradient(
      circle at top left,
      rgba(198,255,135,0.08),
      transparent 70%
    ),
    rgba(255,255,255,0.03);

  color: white;

  text-align: center;

  font-size: 20px;
  font-weight: 800;

  outline: none;

  box-shadow:
    inset 0 0 28px rgba(198,255,135,0.04);
}

#pageTotal {

  color: rgba(255,255,255,0.92);
}

/* =================================
   SEARCH
================================= */

.search-group {

  display: flex;
  align-items: center;

  gap: 12px;

  padding: 0;

  border-radius: 28px;

  border: none;

  background: transparent;

  
}

.search-wrapper {

  flex: 1;

  min-width: 0;

  min-height: 78px;
  padding: 0 22px 0 26px;

  border-radius: 28px;

  border: 1px solid rgba(255,255,255,0.08);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.008)
    );

  display: flex;
  align-items: center;

  gap: 16px;
}

.search-icon {

  width: 30px;
  height: 30px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {

  width: 100%;
  height: 100%;

  stroke: rgba(255,255,255,0.92);

  fill: none;

  stroke-width: 2.2;

  stroke-linecap: round;

  stroke-linejoin: round;
}

#binderSearch {

  flex: 1;

  height: 100%;

  border: none;
  outline: none;

  background: transparent;

  color: white;

  font-size: 18px;
  font-weight: 500;

  font-family: var(--font);
padding-left: 8px;
}

#binderSearch::placeholder {

  color: rgba(255,255,255,0.48);
}

/* CONTROLS */

.search-controls {

  display: flex;
  align-items: center;

  gap: 8px;

  opacity: 1;

  transition:
    opacity .18s ease,
    transform .18s ease;
}

.search-controls.hidden {

  opacity: 0;

  pointer-events: none;

  transform: translateX(6px);
}

.search-controls button,
.search-clear {

  width: 34px;
  height: 34px;

  border-radius: 50%;

  border: 1px solid rgba(255,255,255,0.08);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.012)
    );

  color: white;

  font-size: 13px;
  font-weight: 700;

  cursor: pointer;

  transition:
    border-color .18s ease,
    background .18s ease;
}

.search-clear {

  flex: 0 0 44px;

  width: 44px;
  height: 44px;

  font-size: 15px;

  opacity: 1;

  transition:
    opacity .18s ease,
    transform .18s ease,
    flex-basis .18s ease,
    width .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.search-clear.hidden {

  flex-basis: 0;

  width: 0;

  opacity: 0;

  pointer-events: none;

  transform: scale(.86);

  border-width: 0;
}

.search-controls button:hover,
.search-clear:hover {

  border-color: rgba(198,255,135,0.18);

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.05),
      rgba(255,255,255,0.018)
    );
}

#searchCount {

  min-width: 54px;

  text-align: center;

  color: rgba(255,255,255,0.82);

  font-size: 13px;
  font-weight: 700;
}

/* MOBILE */

@media (max-width: 800px) {

  .search-group {

    gap: 10px;
  }

  .search-wrapper {

    min-height: 68px;
    padding: 0 18px;
    gap: 12px;
  }

  .search-icon {

    visibility: hidden
  }

 #binderSearch {
  flex: 1;
  min-width: 0;
  box-sizing: border-box; 
  width: 100%;
  background: transparent; /* Remove background icon logic */
  font-size: 16px;
  padding: 0 10px; /* Simplified padding since the icon is outside in the flexbox */
}

  .search-controls {

    gap: 6px;
  }

  .search-controls button,
  .search-clear {

    width: 30px;
    height: 30px;

    font-size: 11px;
  }

  .search-clear {

    flex-basis: 38px;

    width: 38px;
    height: 38px;
  }

  #searchCount {

    min-width: 46px;

    font-size: 12px;
  }
}

/* =================================
   BINDER
================================= */

.binder-viewport {

  position: relative;

  display: flex;

  justify-content: center;

  align-items: flex-start;

  padding: 10px 84px 24px;
gap: 2px;
  min-height: calc(100vh - 260px);
}

.binder-side-nav {

  position: absolute;

  top: 50%;

  z-index: 120;

  width: 46px;
  height: 112px;

  border: 0;
  border-radius: 12px;

  background: rgba(5,12,9,0.18);

  color: white;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  transform: translateY(-50%);

  transition:
    background .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

.binder-side-nav svg {

  width: 18px;
  height: 34px;

  fill: none;
  stroke: rgba(255,255,255,0.78);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition: stroke .18s ease, transform .18s ease;
}

.binder-side-nav:hover {

  background: rgba(5,12,9,0.34);

  transform: translateY(-50%) scale(1.04);
}

.binder-side-nav:hover svg {

  stroke: #caef7d;
}

.binder-side-nav:focus-visible {

  outline: 2px solid #caef7d;
  outline-offset: 3px;
}

.binder-side-nav-prev {

  left: 20px;
}

.binder-side-nav-next {

  right: 20px;
}

.book-container {

  display: flex;

  flex-direction: column;

  gap: var(--page-gap);

  width: 100%;

  max-width: 1600px;
}

.book-container.is-page-changing {
  pointer-events: none;
}

.book-container .page {
  opacity: 1;
  transform: translateZ(0);
  transition: transform .16s ease;
}

.book-container.is-page-changing .page {
  opacity: 1;
}

.binder-loading {

  width: 100%;

  min-height: 220px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(225,240,210,0.72);

  font-size: 12px;
  font-weight: 800;

  letter-spacing: 2.4px;

  text-transform: uppercase;
}

.page {

  display: flex;

  gap: var(--page-gap);

  justify-content: center;

  align-items: flex-start;
}

.page-face {

  background: #1b2220;

  border-radius: 18px;

  padding: 16px;

  display: grid;

  gap: var(--card-gap);

  flex: 1;
}

.page-face.empty {

  background: transparent;

  box-shadow: none;

  pointer-events: none;
}

.grid-3x3 {

  grid-template-columns: repeat(3, 1fr);
}

.grid-4x3 {

  grid-template-columns: repeat(4, 1fr);
}

.grid-4x4 {

  grid-template-columns: repeat(4, 1fr);
}

/* =================================
   CARDS
================================= */

.card-slot {

  position: relative;

  aspect-ratio: 5 / 7;

  overflow: hidden;

  border-radius: 8px;

  cursor: pointer;

  touch-action: manipulation;

  -webkit-tap-highlight-color: transparent;

  background: #111a16;

  transform: translateZ(0);

  contain: layout paint;

  backface-visibility: hidden;

  transition:
    transform .16s ease,
    box-shadow .16s ease,
    outline-color .16s ease;
}


.card-slot img.base {

  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;

  opacity: 1;

  background: #111a16;

  transform: translateZ(0);
  backface-visibility: hidden;
  transition: none;
}

.card-slot.image-ready img.base {

  opacity: 1;
}

.variant-stack-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 12;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(5, 12, 9, 0.88);
  color: #caef7d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.card-meta-labels {
  position: absolute;
  left: 50%;
  bottom: 7px;
  z-index: 12;
  max-width: calc(100% - 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translateX(-50%);
  pointer-events: none;
}

.card-meta-labels:not(.has-variant-label) {
  left: auto;
  right: 7px;
  transform: none;
  align-items: flex-end;
}

.card-price-label,
.card-variant-label {
  padding: 5px 7px 6px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
}

.card-price-label {
  background: rgba(5, 36, 22, 0.92);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.card-variant-label {
  max-width: 100%;
  background: rgba(255, 255, 255, 0.9);
  color: #173622;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SEARCH HIGHLIGHT */

.card-slot.search-match {

  outline: 4px solid #ffd84d;

  outline-offset: -4px;

  transform: scale(1.035);

  box-shadow:
    0 0 0 3px rgba(255,216,77,0.85),
    0 0 30px rgba(255,216,77,0.6);

  z-index: 20;
}

.card-slot.active-match {

  outline: 5px solid #ffffff;

  outline-offset: -5px;

  transform: scale(1.06);

  box-shadow:
    0 0 0 4px rgba(255,255,255,0.95),
    0 0 42px rgba(255,235,120,0.95);

  z-index: 100;
}

.card-slot.summary-target-match {
  outline: 5px solid #caef7d;
  outline-offset: -5px;
  transform: scale(1.065);
  box-shadow:
    0 0 0 4px rgba(202,239,125,0.9),
    0 0 44px rgba(202,239,125,0.88);
  z-index: 120;
}


/* REVERSE HOLO */

.reverse-holo::after {

  content: "";

  position: absolute;

  inset: 0;

  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(255,255,255,0.3) 0%,
      transparent 2%
    ),
    linear-gradient(
      115deg,
      rgba(255,255,255,0) 25%,
      rgba(255,255,255,0.15) 45%,
      rgba(255,255,255,0.5) 50%,
      rgba(255,255,255,0.15) 55%,
      rgba(255,255,255,0) 75%
    );

  z-index: 10;

  pointer-events: none;

  opacity: 0;
}

.reverse-holo.image-ready::after {

  opacity: 1;
}

/* --------------------------------
   LIGHTBOX
-------------------------------- */

#lightbox {

  position: fixed !important;

  inset: 0;

  width: 100vw;
  max-width: none;

  height: 100vh;
  max-height: none;

  margin: 0;
  padding: 24px;

  border: 0;
  outline: 0;

  display: none;

  justify-content: center;
  align-items: center;

  background: rgba(5, 12, 9, 0.72);

  z-index: 2147483647 !important;

  box-sizing: border-box;
}

#lightbox[open] {

  display: flex !important;
}

#lightbox::backdrop {

  background: rgba(5, 12, 9, 0.72);
}

body.lightbox-open {
  overflow: hidden;
  touch-action: none;
}

/* PREVENT PAGE SCROLL WHEN OPEN */

body.lightbox-open {

  overflow: hidden;

  height: 100vh;

  touch-action: none;
}

.lightbox-content {

  position: relative;

  display: inline-block;

  max-width: min(90vw, 520px);

  max-height: min(86vh, 760px);
}

.lightbox-content img {

  display: block;

  width: auto;
  height: auto;

  max-width: min(90vw, 520px);
  max-height: min(86vh, 760px);

  border-radius: 22px;

  object-fit: contain;

  transform: translateZ(0);

  will-change: transform;
}

.close-btn {

  position: absolute;

  top: 20px;
  right: 30px;

  font-size: 2rem;

  color: white;

  cursor: pointer;

  z-index: 100001;
}

.lightbox-cta {

  position: absolute;

  top: -40px;
  right: -40px;

  width: 110px;
  height: 110px;

  border: 0 !important;
  border-radius: 50%;
  outline: 0 !important;

  background: #f3d9f9;

  color: #007b40;

  display: flex;

  align-items: center;
  justify-content: center;

  text-align: center;
  line-height: 1.05;

  font-size: 0.72rem;

  font-weight: 800;

  text-transform: uppercase;

  text-decoration: none;

  box-shadow: none !important;
  filter: none !important;
  -webkit-tap-highlight-color: transparent;

  transform: rotate(8deg);

  transition: transform .2s ease;

  z-index: 100002;
}

.lightbox-cta,
.lightbox-cta:visited,
.lightbox-cta:hover,
.lightbox-cta:focus,
.lightbox-cta:focus-visible,
.lightbox-cta:active {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

.lightbox-cta[hidden] {
  display: none !important;
}

.lightbox-cta::after {
  content: none !important;
  display: none !important;
}

.lightbox-cta::before {
  content: "";

  position: absolute;

  width: 92%;
  height: 92%;

  border-radius: 50%;

  border: 1.5px solid #007b40;

  outline: 0 !important;
  box-shadow: none !important;
  filter: none !important;

  pointer-events: none;
}

/* =================================
   DESKTOP HEADER LAYOUT
================================= */

@media (min-width: 801px) {

  .header-panel,
  .navigation-group {

    background: transparent;

    border: none;

    box-shadow: none;

    backdrop-filter: none;

    padding-left: 0;
    padding-right: 0;
  }

  /* keep search bar container */
  .search-group {

    grid-area: search;

    margin: 0 22px;

    padding: 0;

    border-radius: 28px;

    border: none;

    background: transparent;

    backdrop-filter: none;

    box-shadow: none;
  }

  .binder-header {

    display: grid;

    grid-template-columns:
      auto
      1fr;

    grid-template-areas:
      "sizes nav"
      "filters filters"
      "search search";

    column-gap: 24px;

    row-gap: 10px;

    align-items: center;
  }

  .binder-filters {
    grid-area: filters;
    margin: 0 22px;
  }

  /* ================================
     LEFT SIDE (BINDER SIZE)
  ================================= */

  .header-panel {

    grid-area: sizes;

    padding: 8px 25px 10px;

    width: fit-content;
  }

  .selection-title {

    margin-bottom: 8px;

    font-size: 10px;

    letter-spacing: 2px;
  }

  .size-options {

    display: flex;

    gap: 8px;

    width: auto;
  }

  .size-btn {

    flex: 0 0 auto;

    width: 156px;

    min-height: 68px;

    border-radius: 16px;
  }

  .size-btn-inner {

    min-height: 68px;
    height: auto;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 10px;

    padding: 6px 12px;

    box-sizing: border-box;
  }

  .size-icon {

    width: 42px;
    height: 42px;
    min-width: 42px;

    border-radius: 10px;

    flex-shrink: 0;
  }

  .size-icon svg {

    width: 19px;
    height: 19px;
  }

  .size-text {

    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .size-text strong {

    margin-bottom: 2px;

    font-size: 1rem;
    line-height: 1;

    white-space: nowrap;
  }

  .size-text span {

    font-size: 0.68rem;
    line-height: 1.1;

    white-space: nowrap;
  }

  /* ================================
     RIGHT SIDE (PAGINATION)
  ================================= */

  .navigation-group {

    grid-area: nav;

    justify-self: end;

    width: auto;

    padding: 10px 12px;

    display: grid;

    grid-template-columns:
      auto
      auto
      auto;

    align-items: center;

    column-gap: 16px;
  }

  .nav-btn {

    height: 46px;

    padding: 0 16px;

    border-radius: 14px;

    font-size: 11px;
  }

  .page-indicator {

    gap: 10px;

    font-size: 13px;
  }

  .page-indicator input {

    width: 52px;
    height: 46px;

    border-radius: 14px;

    font-size: 15px;
  }

  /* ================================
     SEARCH
  ================================= */

.search-wrapper {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translateY(-50%);
}

  #binderSearch {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  padding: 0 0 0 44px !important;
}

  .search-controls button,
  .search-clear {

    width: 28px;
    height: 28px;

    font-size: 10px;
  }

  .search-clear {

    flex-basis: 36px;

    width: 36px;
    height: 36px;
  }

  #searchCount {

    min-width: 42px;

    font-size: 11px;
  }

  /* ================================
     DESKTOP FIT-TO-SCREEN BINDER
  ================================= */

  .binder-viewport {

    min-height: 0;

    height: var(--desktop-fit-height, calc(100vh - 96px));

    align-items: flex-start;

    padding: 2px 20px 8px;

    overflow: hidden;

    box-sizing: border-box;
  }

  .book-container {

    height: 100%;

    justify-content: flex-start;
  }

  .page {

    height: 100%;

    max-height: 100%;

    align-items: flex-start;
  }

  .page-face {

    flex: 0 0 var(--desktop-face-width, auto);

    width: var(--desktop-face-width, auto);

    height: var(--desktop-face-height, auto);

    max-width: calc((100vw - 80px - var(--page-gap)) / 2);

    max-height: 100%;

    box-sizing: border-box;

    grid-auto-rows: minmax(0, 1fr);
  }

  .grid-3x3 {

    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .grid-4x3 {

    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  .grid-4x4 {

    grid-template-rows: repeat(4, minmax(0, 1fr));
  }

  .card-slot {

    width: 100%;

    height: 100%;

    aspect-ratio: auto;
  }

}
/* =================================
   MOBILE
================================= */

@media (max-width: 800px) {

  /* ================================
     REMOVE OUTER SHELLS
  ================================= */

  .header-panel,
  .navigation-group {

    background: transparent;

    border: none;

    box-shadow: none;

    backdrop-filter: none;

    padding-left: 0;
    padding-right: 0;
  }

  /* keep search in its mobile position */

  .search-group {

    order: 3;

    margin: 0 16px;

    padding: 0;

    gap: 10px;

    border-radius: 22px;

    border: none;

    background: transparent;
  }

  /* ================================
     MOBILE ORDER
  ================================= */

  .binder-header {

    display: flex;

    flex-direction: column;
    gap: 2px;
  }

  .header-panel {

    order: 1;

    padding: 4px 12px 8px;
  }

  .search-group {

    order: 3;
  }

  .navigation-group {

    order: 4;
  }

  .binder-filters {
    order: 2;
    margin: 0 12px 8px;
    padding: 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .filter-group {
    gap: 7px;
  }

  .filter-title {
    width: 100%;
    margin: 0 0 2px;
  }

  .filter-toggle span {
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
  }

  .binder-stack-switch {
    align-self: flex-start;
  }

  /* ================================
     SIZE SELECTOR
  ================================= */

  .header-panel {

    padding: 4px 12px 8px;
  }

  .selection-title {

    margin-bottom: 8px;

    font-size: 10px;
    letter-spacing: 2.4px;
  }

  .size-options {

    display: flex;

    gap: 8px;
  }

  .size-btn {

    flex: 1;

    min-height: 76px;

    border-radius: 14px;
  }

  .size-btn-inner {

    min-height: 76px;
    height: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 6px 8px;

    box-sizing: border-box;
  }

  .size-icon {

    width: 36px;
    height: 36px;
    min-width: 36px;

    border-radius: 10px;

    flex-shrink: 0;
  }

  .size-icon svg {

    width: 17px;
    height: 17px;
  }

  .size-text {

    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .size-text strong {

    margin-bottom: 2px;

    font-size: 0.95rem;
    line-height: 1;

    white-space: nowrap;
  }

  .size-text span {

    font-size: 0.64rem;
    line-height: 1.1;

    white-space: nowrap;
  }

  /* ================================
     SEARCH
  ================================= */

  .search-wrapper {

  min-height: 66px;
  padding: 0 16px;
  display: flex;

  align-items: center;

  gap: 14px;
}

  .search-icon {

    width: 22px;
    height: 22px;

    min-width: 22px;

    flex: 0 0 20px;

    display: flex;

    align-items: center;

    justify-content: center;
  }

  .search-icon svg {

    width: 100%;
    height: 100%;
  }

  #binderSearch {

    flex: 1;
    min-width: 0;
box-sizing: border-box; 
width: 100%;
background-position: 15px center; background-repeat: no-repeat;
    font-size: 16px;
    padding: 0;
  }

  .search-controls {

    gap: 6px;
  }

  .search-controls button,
  .search-clear {

    width: 30px;
    height: 30px;

    font-size: 11px;
  }

  .search-clear {

    flex-basis: 38px;

    width: 38px;
    height: 38px;
  }

  #searchCount {

    min-width: 46px;

    font-size: 12px;
  }

  /* ================================
     PAGINATION
  ================================= */

  .navigation-group {

    display: grid;

    grid-template-columns:
      minmax(0,1fr)
      auto
      minmax(0,1fr);

    align-items: center;

    column-gap: 10px;

    padding: 20px 16px;
  }

  .nav-btn {

    height: 54px;

    padding: 0 18px;

    font-size: 12px;

    border-radius: 18px;
  }

  .page-indicator {

    gap: 10px;

    font-size: 15px;
  }

  .page-indicator input {

    width: 58px;
    height: 54px;

    font-size: 18px;

    border-radius: 18px;
  }

  /* ================================
     BINDER
  ================================= */

  .binder-viewport {

    padding:
      8px
      6px
      24px;
  }

  .binder-side-nav {

    display: none;
  }

  .page {

    flex-direction: column;

    gap: 12px;
  }

  .page-face {

    padding: 10px;

    border-radius: 14px;
  }

  /* ================================
     LIGHTBOX
  ================================= */

  #lightbox {

    align-items: center;

    justify-content: center;

    padding: 18px;

    box-sizing: border-box;
  }

  #lightbox[open] {

    display: flex !important;
  }

  .lightbox-content {

    max-width: 84vw;

    max-height: 78vh;
  }

  .lightbox-content img {

    max-width: 84vw;
    max-height: 78vh;
  }

  .lightbox-cta {

    width: 86px;
    height: 86px;

    font-size: 9.5px;

    top: -24px;
    right: -16px;
  }
}

/* Bottom pagination for Pokemon binders */
.binder-wrapper > .navigation-group {
  max-width: min(100%, 760px);
  margin: 28px auto 0;
  padding: 0 clamp(12px, 3vw, 24px);
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.binder-wrapper > .navigation-group .nav-btn {
  width: fit-content;
  min-width: 96px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.binder-wrapper > .navigation-group .nav-btn:hover {
  border-color: rgba(198,255,135,0.22);
  background: rgba(255, 255, 255, 0.075);
}

.binder-wrapper > .navigation-group .page-indicator {
  min-width: 156px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.binder-wrapper > .navigation-group .page-indicator input,
.binder-wrapper > .navigation-group #pageTotal {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.page-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.page-dots span.active {
  width: 24px;
  background: #ffd51f;
}

.page-text {
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .binder-viewport {
    min-height: 0;
    padding-bottom: 8px;
  }

  .binder-wrapper > .navigation-group {
    max-width: min(100%, 360px);
    margin-top: 8px;
    padding: 0 8px;
    grid-template-columns: auto auto auto;
    justify-content: center;
    gap: 14px;
  }

  .binder-wrapper > .navigation-group .nav-btn {
    min-width: 74px;
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .binder-wrapper > .navigation-group .page-indicator {
    min-width: 108px;
    gap: 10px;
  }

  .page-text {
    font-size: 12px;
  }
}

/* Pokemon binder price badge placement */
.card-meta-labels,
.card-meta-labels:not(.has-variant-label) {
  inset: 0;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  max-width: none;
  display: block;
  transform: none;
  pointer-events: none;
}

.card-price-label {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 8px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.card-variant-label {
  position: absolute;
  left: 50%;
  bottom: 7px;
  max-width: calc(100% - 14px);
  transform: translateX(-50%);
}

/* Segmented binder size selector */
.binder-wrapper .size-options {
  --active-index: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 13px;
  background: rgba(60, 101, 78, 0.78);
  box-sizing: border-box;
}

.binder-wrapper .size-options[data-active-layout="4x3"] {
  --active-index: 1;
}

.binder-wrapper .size-options[data-active-layout="4x4"] {
  --active-index: 2;
}

.binder-wrapper .size-options::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 9px;
  background: rgba(23, 61, 43, 0.62);
  transform: translateX(calc(var(--active-index) * 100%));
  transition: transform 220ms ease;
  z-index: 0;
}

.binder-wrapper .size-btn,
.binder-wrapper .size-btn.active {
  position: relative;
  z-index: 1;
  width: auto;
  min-height: 72px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}

.binder-wrapper .size-btn:hover {
  background: rgba(255,255,255,0.025);
}

.binder-wrapper .size-btn-inner {
  min-height: 72px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 10px;
  box-sizing: border-box;
}

.binder-wrapper .size-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.binder-wrapper .size-icon svg {
  width: 34px;
  height: 34px;
}

.binder-wrapper .size-icon rect,
.binder-wrapper .size-btn.active rect {
  fill: rgba(255,255,255,0.82);
}

.binder-wrapper .size-text {
  align-items: flex-start;
}

.binder-wrapper .size-text strong {
  margin-bottom: 5px;
  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
}

.binder-wrapper .size-text span {
  font-size: 0.78rem;
  line-height: 1.1;
  color: rgba(255,255,255,0.58);
}

@media (max-width: 640px) {
  .binder-wrapper .size-btn,
  .binder-wrapper .size-btn.active {
    min-height: 64px;
  }

  .binder-wrapper .size-btn-inner {
    min-height: 64px;
    gap: 8px;
    padding: 7px 6px;
  }

  .binder-wrapper .size-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .binder-wrapper .size-icon svg {
    width: 29px;
    height: 29px;
  }

  .binder-wrapper .size-text strong {
    font-size: 0.9rem;
  }

  .binder-wrapper .size-text span {
    font-size: 0.7rem;
  }
}

@media (min-width: 801px) {
  .binder-wrapper .size-options {
    width: 486px;
  }
}

/* Search row with tucked-away customize panel */
.binder-wrapper .search-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.binder-wrapper .search-wrapper {
  min-height: 58px;
  border-radius: 12px;
}

.binder-customize-btn {
  min-width: 172px;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f1edda;
  color: #102919;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition:
    background .18s ease,
    transform .18s ease;
}

.binder-customize-btn:hover {
  background: #fff9e5;
}

.binder-customize-btn:active {
  transform: translateY(1px);
}

.binder-customize-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.binder-wrapper .binder-filters {
  overflow: hidden;
  transition:
    max-height 220ms ease,
    opacity 180ms ease,
    margin 220ms ease,
    padding 220ms ease;
}

.binder-wrapper .binder-filters.is-collapsed {
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
}

.binder-wrapper .binder-filters:not(.is-collapsed) {
  max-height: 220px;
  opacity: 1;
}

@media (min-width: 801px) {
  .binder-wrapper .binder-header {
    grid-template-areas:
      "sizes nav"
      "search search"
      "filters filters";
  }

  .binder-wrapper .search-group {
    width: auto;
    max-width: none;
    margin: 0 22px;
  }
}

@media (max-width: 800px) {
  .binder-wrapper .search-group {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .binder-customize-btn {
    min-width: 140px;
    min-height: 52px;
    padding: 0 16px;
    font-size: 14px;
  }

  .binder-wrapper .binder-filters {
    order: 4;
    margin: 0 16px 8px;
  }

  .binder-wrapper .navigation-group {
    order: 5;
  }
}

@media (max-width: 520px) {
  .binder-wrapper .search-group {
    gap: 6px;
    margin-left: 12px;
    margin-right: 12px;
  }

  .binder-wrapper .search-wrapper {
    min-height: 48px;
    padding: 0 12px;
  }

  .binder-customize-btn {
    min-width: 112px;
    min-height: 48px;
    padding: 0 12px;
    gap: 7px;
    font-size: 13px;
  }

  .binder-customize-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Text-only binder size selector */
.binder-wrapper .size-options {
  min-height: 54px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(241, 237, 218, 0.14);
}

.binder-wrapper .size-options::before {
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 3);
  border-radius: 999px;
  background: rgba(241, 237, 218, 0.92);
}

.binder-wrapper .size-btn,
.binder-wrapper .size-btn.active {
  min-height: 44px;
  border-radius: 999px;
}

.binder-wrapper .size-btn:hover {
  background: rgba(255,255,255,0.04);
}

.binder-wrapper .size-btn-inner {
  min-height: 44px;
  padding: 6px 10px;
  gap: 0;
}

.binder-wrapper .size-icon {
  display: none;
}

.binder-wrapper .size-text {
  align-items: center;
  text-align: center;
}

.binder-wrapper .size-text strong {
  margin-bottom: 3px;
  color: rgba(255,255,255,0.86);
  font-size: 0.98rem;
}

.binder-wrapper .size-text span {
  color: rgba(255,255,255,0.52);
  font-size: 0.72rem;
}

.binder-wrapper .size-btn.active .size-text strong {
  color: #102919;
}

.binder-wrapper .size-btn.active .size-text span {
  color: rgba(16, 41, 25, 0.62);
}

@media (max-width: 640px) {
  .binder-wrapper .size-options {
    min-height: 50px;
  }

  .binder-wrapper .size-btn,
  .binder-wrapper .size-btn.active,
  .binder-wrapper .size-btn-inner {
    min-height: 40px;
  }

  .binder-wrapper .size-text strong {
    font-size: 0.86rem;
  }

  .binder-wrapper .size-text span {
    font-size: 0.62rem;
  }
}

/* Unified binder control radius */
.binder-wrapper {
  --binder-control-radius: 16px;
}

.binder-wrapper .size-options,
.binder-wrapper .size-options::before,
.binder-wrapper .size-btn,
.binder-wrapper .size-btn.active,
.binder-wrapper .search-wrapper,
.binder-customize-btn,
.binder-wrapper .binder-filters,
.binder-wrapper .filter-toggle span {
  border-radius: var(--binder-control-radius);
}

.binder-wrapper .binder-stack-switch-track {
  border-radius: var(--binder-control-radius);
}

.binder-wrapper .binder-stack-switch-track::after {
  border-radius: calc(var(--binder-control-radius) - 6px);
}

/* Binder header spacing and customize layout */
.binder-wrapper {
  --binder-beige: #fff9e8;
  --binder-beige-hover: #fffdf3;
}

.binder-wrapper .binder-header {
  gap: 22px;
}

.binder-wrapper .header-panel {
  padding-bottom: 0;
}

.binder-wrapper .size-options {
  min-height: 62px;
  padding: 6px;
  background: rgba(255, 249, 232, 0.13);
}

.binder-wrapper .size-options::before {
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  background: var(--binder-beige);
}

.binder-wrapper .size-btn,
.binder-wrapper .size-btn.active,
.binder-wrapper .size-btn-inner {
  min-height: 50px;
}

.binder-wrapper .size-btn-inner {
  padding-top: 8px;
  padding-bottom: 8px;
}

.binder-customize-btn {
  background: var(--binder-beige);
}

.binder-customize-btn:hover {
  background: var(--binder-beige-hover);
}

.binder-wrapper .filter-toggle span::before {
  border-radius: 999px;
}

.binder-wrapper .filter-toggle input:checked + span {
  border-color: rgba(255, 249, 232, 0.7);
  background: rgba(255, 249, 232, 0.13);
  color: #fff;
}

.binder-wrapper .filter-toggle input:checked + span::before {
  border-color: var(--binder-beige);
  background: var(--binder-beige);
  color: #102919;
}

.binder-wrapper .filter-toggle input:focus-visible + span {
  outline-color: var(--binder-beige);
}

.binder-wrapper .binder-stack-switch input:checked + .binder-stack-switch-track {
  border-color: var(--binder-beige);
  background: rgba(255, 249, 232, 0.2);
}

.binder-wrapper .binder-stack-switch input:checked + .binder-stack-switch-track::after {
  background: var(--binder-beige);
}

.binder-wrapper .binder-stack-switch input:focus-visible + .binder-stack-switch-track {
  outline-color: var(--binder-beige);
}

.binder-wrapper .search-group {
  grid-template-columns: minmax(0, 1fr) auto;
  width: auto;
  max-width: none;
  margin: 0 22px;
}

.binder-wrapper .search-wrapper {
  width: 100%;
}

.binder-wrapper .binder-viewport {
  margin-top: 6px;
}

@media (min-width: 801px) {
  .binder-wrapper .binder-header {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "sizes customize"
      "search search"
      "filters filters";
    row-gap: 24px;
  }

  .binder-wrapper .header-panel {
    width: fit-content;
  }

  .binder-customize-btn {
    grid-area: customize;
    justify-self: end;
    align-self: end;
    margin: 0 22px 0 0;
  }

  .binder-wrapper .search-group {
    grid-area: search;
  }

  .binder-wrapper .binder-filters {
    grid-area: filters;
    margin: 0 22px 4px;
  }
}

@media (max-width: 800px) {
  .binder-wrapper .binder-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 18px;
    column-gap: 10px;
  }

  .binder-wrapper .header-panel {
    order: 1;
    min-width: 0;
    padding-right: 0;
  }

  .binder-customize-btn {
    order: 2;
    align-self: end;
    min-width: 54px;
    width: 54px;
    min-height: 50px;
    padding: 0;
  }

  .binder-customize-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .binder-customize-btn svg {
    width: 21px;
    height: 21px;
  }

  .binder-wrapper .search-group {
    order: 3;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 16px;
  }

  .binder-wrapper .binder-filters {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .binder-wrapper .size-options {
    min-height: 56px;
  }

  .binder-wrapper .size-btn,
  .binder-wrapper .size-btn.active,
  .binder-wrapper .size-btn-inner {
    min-height: 44px;
  }
}

/* Search containment and softer controls */
.binder-wrapper {
  --binder-control-radius: 24px;
}

.binder-wrapper .search-group {
  grid-template-columns: minmax(0, 1fr);
}

.binder-wrapper .search-wrapper {
  overflow: hidden;
  gap: 10px;
  padding-right: 14px;
}

.binder-wrapper #binderSearch {
  min-width: 0;
}

.binder-wrapper .search-controls {
  flex: 0 0 auto;
  gap: 6px;
}

.binder-wrapper .search-controls button,
.binder-wrapper .search-clear {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

.binder-wrapper .search-clear.hidden {
  flex-basis: 0;
  width: 0;
}

.binder-wrapper > .navigation-group .nav-btn {
  border-radius: var(--binder-control-radius);
}

@media (max-width: 800px) {
  .binder-wrapper .search-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .binder-wrapper .search-wrapper {
    min-height: 56px;
    padding-left: 18px;
    padding-right: 10px;
  }

  .binder-wrapper .search-controls {
    gap: 5px;
  }

  .binder-wrapper .search-controls button,
  .binder-wrapper .search-clear {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 520px) {
  .binder-wrapper .search-wrapper {
    min-height: 54px;
    padding-left: 16px;
    padding-right: 8px;
  }

  .binder-wrapper .search-controls button,
  .binder-wrapper .search-clear {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }
}

/* Final Pokémon binder control layout */
.binder-wrapper {
  --binder-control-radius: 999px;
  --binder-control-edge: 22px;
  --binder-header-gap: 20px;
}

.binder-wrapper .binder-header {
  gap: var(--binder-header-gap);
}

.binder-wrapper .size-options,
.binder-wrapper .size-options::before,
.binder-wrapper .size-btn,
.binder-wrapper .size-btn.active,
.binder-wrapper .size-btn-inner,
.binder-wrapper .search-wrapper,
.binder-customize-btn,
.binder-wrapper .filter-toggle span,
.binder-wrapper .binder-stack-switch-track,
.binder-wrapper .navigation-group .nav-btn {
  border-radius: var(--binder-control-radius);
}

.binder-wrapper .binder-filters {
  border-radius: 40px;
}

.binder-wrapper .binder-filters.is-collapsed {
  display: none;
}

.binder-wrapper .binder-filters:not(.is-collapsed) {
  display: flex;
  max-height: none;
  opacity: 1;
}

.binder-wrapper .filter-toggle span {
  min-height: 44px;
  padding: 0 18px;
}

.binder-wrapper .filter-toggle span::before {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.binder-wrapper .binder-stack-switch-track {
  width: 50px;
  height: 30px;
}

.binder-wrapper .binder-stack-switch-track::after {
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
}

.binder-wrapper .binder-stack-switch input:checked + .binder-stack-switch-track::after {
  transform: translateX(20px);
}

.binder-wrapper .search-wrapper {
  min-height: 74px;
  padding-left: 28px;
  padding-right: 18px;
}

.binder-customize-btn {
  min-height: 66px;
  border-radius: var(--binder-control-radius);
}

@media (min-width: 801px) {
  .binder-wrapper .binder-header {
    grid-template-columns: minmax(0, 680px) minmax(160px, 1fr);
    grid-template-areas:
      "sizes customize"
      "filters filters"
      "search search";
    column-gap: 22px;
    row-gap: 22px;
    align-items: end;
  }

  .binder-wrapper .header-panel {
    grid-area: sizes;
    width: 100%;
    min-width: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .binder-customize-btn {
    grid-area: customize;
    justify-self: end;
    align-self: end;
    margin: 0 var(--binder-control-edge) 0 0;
  }

  .binder-wrapper .binder-filters {
    grid-area: filters;
    margin: 0 var(--binder-control-edge);
  }

  .binder-wrapper .search-group {
    grid-area: search;
    margin: 0 var(--binder-control-edge);
  }
}

@media (max-width: 800px) {
  .binder-wrapper {
    --binder-control-edge: 20px;
    --binder-header-gap: 18px;
  }

  .binder-wrapper .binder-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    column-gap: 14px;
    row-gap: 18px;
    align-items: end;
  }

  .binder-wrapper .header-panel {
    order: 1;
    min-width: 0;
    padding: 0;
  }

  .binder-wrapper .selection-title {
    margin-bottom: 12px;
  }

  .binder-customize-btn {
    order: 2;
    width: 72px;
    min-width: 72px;
    min-height: 72px;
    padding: 0;
    margin: 0;
  }

  .binder-wrapper .binder-filters {
    order: 3;
    grid-column: 1 / -1;
    margin: 0;
  }

  .binder-wrapper .search-group {
    order: 4;
    grid-column: 1 / -1;
    margin: 0;
  }

  .binder-wrapper .search-wrapper {
    min-height: 72px;
    padding-left: 24px;
    padding-right: 12px;
  }

  .binder-wrapper .binder-viewport {
    margin-top: 4px;
  }
}

@media (max-width: 560px) {
  .binder-wrapper {
    --binder-header-gap: 16px;
  }

  .binder-wrapper .binder-header {
    grid-template-columns: minmax(0, 1fr) 62px;
    column-gap: 12px;
  }

  .binder-customize-btn {
    width: 62px;
    min-width: 62px;
    min-height: 62px;
  }

  .binder-customize-btn svg {
    width: 22px;
    height: 22px;
  }

  .binder-wrapper .size-options {
    min-height: 62px;
    padding: 6px;
  }

  .binder-wrapper .size-btn,
  .binder-wrapper .size-btn.active,
  .binder-wrapper .size-btn-inner {
    min-height: 50px;
  }

  .binder-wrapper .size-text strong {
    font-size: 0.92rem;
  }

  .binder-wrapper .size-text span {
    font-size: 0.67rem;
  }

  .binder-wrapper .search-wrapper {
    min-height: 64px;
    padding-left: 20px;
    padding-right: 10px;
  }

  .binder-wrapper .binder-filters {
    padding: 20px;
  }

  .binder-wrapper .filter-group {
    gap: 12px;
  }

  .binder-wrapper .filter-title {
    flex-basis: 100%;
  }

  .binder-wrapper .filter-toggle span {
    min-height: 42px;
    padding: 0 14px;
  }
}

/* Final responsive polish: customize controls on desktop and mobile */
.binder-wrapper {
  --binder-control-edge: clamp(16px, 2.2vw, 24px);
}

.binder-wrapper .binder-header,
.binder-wrapper .search-group,
.binder-wrapper .search-wrapper,
.binder-wrapper .binder-filters,
.binder-wrapper .header-panel {
  box-sizing: border-box;
}

.binder-wrapper .filter-title {
  text-transform: uppercase;
}

@media (min-width: 801px) {
  .binder-wrapper .binder-header {
    width: calc(100% - (var(--binder-control-edge) * 2));
    margin: 0 var(--binder-control-edge);
    grid-template-columns: minmax(430px, 680px) minmax(172px, 1fr);
    grid-template-areas:
      "sizes customize"
      "filters filters"
      "search search";
    column-gap: 28px;
    row-gap: 24px;
    align-items: end;
  }

  .binder-customize-btn {
    grid-area: customize;
    display: inline-flex;
    justify-self: end;
    align-self: end;
    margin: 0;
  }

  .binder-wrapper .header-panel {
    grid-area: sizes;
    width: 100%;
    max-width: 680px;
  }

  .binder-wrapper .binder-filters {
    grid-area: filters;
    width: 100%;
    max-width: 100%;
    margin: 0;
    justify-self: stretch;
  }

  .binder-wrapper .binder-filters:not(.is-collapsed) {
    display: flex;
    max-height: 220px;
    padding: 18px 22px;
    border-width: 1px;
    opacity: 1;
    pointer-events: auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .binder-wrapper .binder-filters.is-collapsed {
    display: none;
  }

  .binder-wrapper .filter-group {
    justify-content: flex-start;
    flex: 0 1 auto;
    gap: 8px;
  }

  .binder-wrapper .filter-title {
    flex-basis: auto;
    margin-right: 10px;
    font-size: 9px;
    letter-spacing: 1.8px;
    white-space: nowrap;
  }

  .binder-wrapper .filter-toggle span {
    min-height: 38px;
    padding: 0 13px;
  }

  .binder-wrapper .binder-stack-switch {
    margin-left: 0;
  }

  .binder-wrapper .binder-stack-switch-label {
    white-space: nowrap;
  }

  .binder-wrapper .binder-toggle-stack {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .binder-wrapper .search-group {
    grid-area: search;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

@media (max-width: 800px) {
  .binder-wrapper {
    --binder-control-edge: 20px;
  }

  .binder-wrapper .binder-header {
    grid-template-columns: minmax(0, 1fr) 62px;
    column-gap: 12px;
    row-gap: 18px;
    margin: 0 var(--binder-control-edge);
    align-items: end;
  }

  .binder-wrapper .header-panel {
    width: 100%;
  }

  .binder-customize-btn {
    width: 62px;
    min-width: 62px;
    min-height: 62px;
    height: 62px;
    align-self: end;
  }

  .binder-wrapper .search-group {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .binder-wrapper .search-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .binder-wrapper .binder-filters,
  .binder-wrapper .binder-filters:not(.is-collapsed) {
    width: 100%;
    margin: 0;
    padding: 22px 18px;
    text-align: center;
    align-items: center;
    justify-content: center;
  }

  .binder-wrapper .filter-group {
    width: 100%;
    justify-content: center;
  }

  .binder-wrapper .filter-title {
    flex-basis: 100%;
    margin: 0 0 2px;
    text-align: center;
  }

  .binder-wrapper .binder-stack-switch {
    width: 100%;
    margin: 4px 0 0;
    justify-content: center;
  }

  .binder-wrapper .binder-toggle-stack {
    width: 100%;
    align-items: center;
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .binder-wrapper {
    --binder-control-edge: 16px;
  }

  .binder-wrapper .binder-header {
    grid-template-columns: minmax(0, 1fr) 58px;
    column-gap: 10px;
  }

  .binder-customize-btn {
    width: 58px;
    min-width: 58px;
    min-height: 58px;
    height: 58px;
  }

  .binder-wrapper .size-options {
    min-height: 58px;
  }
}

@media (min-width: 801px) {
  .binder-wrapper .binder-filters {
    flex-wrap: wrap;
  }

  .binder-wrapper .binder-stack-switch {
    gap: 7px;
  }

  .binder-wrapper .binder-stack-switch-track {
    width: 42px;
    height: 26px;
  }

  .binder-wrapper .binder-stack-switch-track::after {
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
  }

  .binder-wrapper .binder-stack-switch input:checked + .binder-stack-switch-track::after {
    transform: translateX(16px);
  }

  .binder-wrapper .binder-stack-switch-label {
    font-size: 11px;
  }
}

/* Final compact control pass */
.binder-wrapper {
  --binder-header-gap: 14px;
}

.binder-wrapper .binder-header {
  gap: var(--binder-header-gap);
}

.binder-wrapper .selection-title {
  margin-bottom: 8px;
}

.binder-wrapper .size-options {
  min-height: 50px;
  padding: 5px;
}

.binder-wrapper .size-options::before {
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 3);
}

.binder-wrapper .size-btn,
.binder-wrapper .size-btn.active,
.binder-wrapper .size-btn-inner {
  min-height: 40px;
}

.binder-wrapper .size-btn-inner {
  padding: 4px 10px;
}

.binder-wrapper .size-text strong {
  margin-bottom: 1px;
  font-size: 0.9rem;
}

.binder-wrapper .size-text span {
  font-size: 0.66rem;
}

.binder-customize-btn {
  min-height: 52px;
  height: 52px;
  padding: 0 22px;
}

.binder-wrapper .search-wrapper {
  min-height: 56px;
  padding-left: 22px;
  padding-right: 12px;
}

.binder-wrapper .search-icon {
  width: 24px;
  height: 24px;
}

.binder-wrapper #binderSearch {
  font-size: 16px;
}

.binder-wrapper .card-price-label {
  border: 2px solid #d8f74d;
  background: #eef0ff;
  color: #12351f;
  box-shadow: 0 2px 10px rgba(216, 247, 77, 0.26);
}

@media (min-width: 801px) {
  .binder-wrapper .binder-header {
    row-gap: 14px;
  }

  .binder-customize-btn {
    min-height: 52px;
    height: 52px;
  }
}

@media (max-width: 800px) {
  .binder-wrapper {
    --binder-header-gap: 12px;
  }

  .binder-wrapper .binder-header {
    row-gap: 12px;
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .binder-customize-btn {
    width: 52px;
    min-width: 52px;
    min-height: 52px;
    height: 52px;
    padding: 0;
  }

  .binder-wrapper .search-wrapper {
    min-height: 54px;
  }
}

@media (max-width: 520px) {
  .binder-wrapper .binder-header {
    grid-template-columns: minmax(0, 1fr) 50px;
  }

  .binder-wrapper .size-options {
    min-height: 50px;
  }

  .binder-wrapper .size-btn,
  .binder-wrapper .size-btn.active,
  .binder-wrapper .size-btn-inner {
    min-height: 40px;
  }

  .binder-customize-btn {
    width: 50px;
    min-width: 50px;
    min-height: 50px;
    height: 50px;
  }
}

/* Include Cards language row + future Cameos option */
.binder-wrapper .filter-group {
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

.binder-wrapper .filter-title {
  flex-basis: auto;
  margin: 0;
  text-align: left;
}

.binder-wrapper .filter-language-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.binder-wrapper .filter-toggle-coming-soon {
  position: relative;
  cursor: not-allowed;
}

.binder-wrapper .filter-toggle-coming-soon input {
  pointer-events: none;
}

.binder-wrapper .filter-toggle-coming-soon span {
  opacity: 0.68;
}

.binder-wrapper .filter-toggle-coming-soon::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  content: "Coming soon";
  padding: 6px 10px;
  border: 1px solid rgba(255, 236, 152, 0.6);
  border-radius: 999px;
  background: #102b1b;
  color: #fff8df;
  font-family: 'Instrument Sans', Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.binder-wrapper .filter-toggle-coming-soon:hover::after,
.binder-wrapper .filter-toggle-coming-soon:focus-within::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 800px) {
  .binder-wrapper .filter-group {
    align-items: flex-start;
  }

  .binder-wrapper .filter-title {
    text-align: left;
  }

  .binder-wrapper .filter-language-row {
    justify-content: flex-start;
  }
}
