/* =========================
   CATALOG PAGE ONLY
========================= */

.catalog-page {
  background: #fff;
  color: #000;
}

/* ✅ Fix “invisible navbar” on white pages (override hero/transparent styles) */
.catalog-page .navbar {
  background: #fff;
}

.catalog-page .navbar .nav-link,
.catalog-page .navbar .nav-link:visited {
  color: #000;
}

.catalog-page .navbar .nav-link:hover {
  color: var(--nobilis-accent);
}

/* Keep your gold accent feel */
.catalog-page .navbar .logo-letter {
  color: var(--nobilis-accent);
}

/* Give room for fixed navbar */
.catalog {
  padding-top: 110px;
  padding-bottom: 90px;
}

/* ===== Toolbar (center title perfectly under logo) ===== */
.catalog-toolbar {
  max-width: 1440px;
  margin: 0 auto 22px;
  padding: 0 56px;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}

/* left/right blocks keep their natural width */
.catalog-toolbar-left,
.catalog-toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ✅ real center, independent from left/right widths */
.catalog-toolbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: min(620px, 78vw);
}

.catalog-toolbar-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
  color: #111;
  padding: 11px 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.catalog-toolbar-btn:hover {
  border-color: rgba(0,0,0,0.32);
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.catalog-toolbar-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.filter-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--nobilis-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.filter-active-badge[hidden] {
  display: none;
}

.catalog-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--nobilis-accent);
  margin-bottom: 10px;
}

.catalog-h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.catalog-count {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
}



/* ===== Layout ===== */
.catalog-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 56px;

  display: flex;
  gap: 34px;
  align-items: start;
}

/* ===== Sidebar ===== */
.catalog-sidebar {
  flex-shrink: 0;
  width: 280px;
  border-right: 1px solid rgba(0,0,0,0.08);
  padding-right: 18px;
  position: sticky;
  top: 110px;
  align-self: start;
}

/* ===== Content ===== */
.catalog-content {
  flex: 1;
  min-width: 0;
}

/* ===== Desktop sidebar slide animation ===== */
@media (min-width: 861px) {
  .catalog-sidebar {
    overflow: hidden;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                padding-right 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .catalog-sidebar.is-hidden {
    width: 0;
    opacity: 0;
    padding-right: 0;
    pointer-events: none;
  }
}

.filter-group {
  padding: 18px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.filter-title {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.85);
  margin-bottom: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 7px 0;
  cursor: pointer;

  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.65);
}

.filter-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--nobilis-accent);
}

.catalog-clear {
  width: 100%;
  margin-top: 18px;
  padding: 12px 14px;

  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  color: #000;

  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.catalog-clear:hover {
  border-color: rgba(0,0,0,0.26);
  background: rgba(0,0,0,0.02);
  transform: translateY(-2px);
}

/* ✅ Hide ONLY the filter content wrapper when collapsed (button stays visible) */
.catalog-sidebar.is-hidden .catalog-sidebar-inner {
  display: none;
}

/* ===== Grid ===== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 26px;
}

/* ===== Card ===== */
.catalog-card {
  display: block;
  text-decoration: none;
  color: #000;

  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.catalog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0,0,0,0.16);
  box-shadow: 0 18px 46px rgba(0,0,0,0.08);
}

.catalog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
}

.catalog-card-brand {
  font-size: 11px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
}

.catalog-fav {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(0,0,0,0.5);
  transition: color 0.2s ease;
}

.catalog-fav:hover {
  color: rgba(0,0,0,0.85);
}

.catalog-fav svg {
  width: 18px;
  height: 18px;
}

.catalog-card-media {
  padding: 10px 14px 0;
}

.catalog-card-media img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #fafafa;
  display: block;
}

.catalog-card-footer {
  padding: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.catalog-card-name {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.92);
}

.catalog-card-price {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #b11d1d;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .catalog-toolbar,
  .catalog-layout { padding: 0 24px; }
}

@media (max-width: 860px) {
  .catalog-toolbar {
    padding: 14px 18px;
    min-height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Title: static, left-aligned, takes remaining space */
  .catalog-toolbar-title {
    position: static;
    transform: none;
    width: auto;
    flex: 1;
    text-align: left;
  }

  .catalog-layout { padding: 0 18px; }

  /* Sidebar: left-slide panel — top/height overridden by JS to start below toolbar */
  .catalog-sidebar {
    position: fixed !important;
    top: 0; /* JS sets this to toolbar bottom */
    left: 0;
    width: 300px;
    max-width: 88vw;
    height: 100dvh; /* JS sets this to remaining viewport */
    z-index: 500;
    background: #fff;
    padding: 24px 24px 48px;
    overflow-y: auto;
    border: none;
    border-right: 1px solid rgba(0,0,0,0.08);
    box-shadow: 4px 0 32px rgba(0,0,0,0.14);
    transform: translateX(0);
    transition: transform 0.32s ease, box-shadow 0.32s ease;
  }

  .catalog-sidebar.is-hidden {
    transform: translateX(-100%);
    box-shadow: none;
  }

  /* Always show filter content inside the overlay */
  .catalog-sidebar.is-hidden .catalog-sidebar-inner {
    display: block;
  }

  /* Backdrop — top overridden by JS to match sidebar */
  .catalog-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.42);
    z-index: 499;
    display: none;
  }

  .catalog-sidebar-backdrop.is-visible {
    display: block;
  }

  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-card-media img { height: 200px; }
}

@media (max-width: 560px) {
  /* Keep 2 columns on small phones */
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-card-media img { height: 170px; }
}

@media (max-width: 480px) {
  .catalog {
    padding-top: 90px;
    padding-bottom: 56px;
  }

  .catalog-toolbar {
    padding: 0 12px;
    min-height: 72px;
  }

  .catalog-layout {
    padding: 0 12px;
  }

  .catalog-card-media img {
    height: 220px;
  }
}

/* Keep non-Collections active links black on the white catalog navbar */
.catalog-page .navbar .nav-left > a.nav-link.nav-link-active,
.catalog-page .navbar .nav-left > a.nav-link.nav-link-active:visited {
  color: #000 !important;
}

.catalog-page .navbar .nav-left > a.nav-link.nav-link-active:hover {
  color: #c9a24d !important;
}

/* filters-hidden no longer needed — auto-fill handles column count naturally */

/* ===== Empty State ===== */
.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
}

.catalog-empty-title {
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.catalog-empty-sub {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
  margin: 0 0 28px;
}

.catalog-empty-btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #fff;
  color: #000;
  padding: 12px 28px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.catalog-empty-btn:hover {
  border-color: rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.02);
  transform: translateY(-2px);
}

/* ✅ No prices anywhere on catalog page */
.catalog-page .catalog-card-price,
.catalog-page .price,
.catalog-page [data-price],
.catalog-page .product-price {
  display: none !important;
}