/* ========== Full Catalog Page ========== */
.catalog-page {
  --dock-bg: rgba(12, 10, 9, 0.94);
}

/* Hero */
.cat-hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.cat-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(61, 11, 11, 0.5), transparent 55%),
    radial-gradient(ellipse 40% 50% at 85% 70%, rgba(212, 175, 55, 0.08), transparent),
    linear-gradient(180deg, #160e0c 0%, var(--bg) 100%);
}

.cat-hero-ornament {
  position: absolute;
  left: 50%;
  top: 18%;
  width: min(520px, 80vw);
  height: 180px;
  transform: translateX(-50%);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  pointer-events: none;
  opacity: 0.7;
}

.cat-hero-inner {
  position: relative;
  z-index: 1;
}

.cat-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  margin-bottom: 0.85rem;
  animation: fadeUp 0.85s var(--ease) both;
}

.cat-hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: var(--text-muted);
  max-width: 36ch;
  margin: 0 auto 1.5rem;
  animation: fadeUp 0.85s var(--ease) 0.1s both;
}

.cat-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  animation: fadeUp 0.85s var(--ease) 0.2s both;
}

.cat-hero-meta .sep {
  color: rgba(212, 175, 55, 0.35);
}

/* Sticky dock */
.cat-dock {
  position: sticky;
  top: var(--header-h);
  z-index: 80;
  background: var(--dock-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0 1.1rem;
  transition: box-shadow 0.3s;
}

.cat-dock.is-stuck {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.metal-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 0.9rem;
  border: 1px solid var(--border);
  width: fit-content;
  margin-inline: auto;
  background: var(--bg-card);
}

.metal-tab {
  padding: 0.55rem 1.35rem;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.metal-tab:last-child {
  border-right: none;
}

.metal-tab:hover {
  color: var(--gold);
}

.metal-tab.active {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #1a1208;
  font-weight: 600;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.cat-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.cat-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.cat-tab.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.2);
}

.cat-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.cat-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(320px, 100%);
  padding: 0.55rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--gold-dim);
}

.cat-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
  min-width: 0;
}

.cat-search input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.cat-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cat-sort select {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--text);
  cursor: pointer;
  outline: none;
  min-width: 160px;
}

.cat-sort select:focus,
.cat-search:focus-within {
  border-color: var(--gold);
}

.view-toggle {
  display: flex;
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.view-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.view-btn + .view-btn {
  border-left: 1px solid rgba(212, 175, 55, 0.28);
}

.view-btn:hover,
.view-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
}

/* Results */
.cat-results {
  padding: 2.25rem 0 4.5rem;
  min-height: 50vh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(61, 11, 11, 0.18), transparent 40%),
    var(--bg);
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.results-bar p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.results-bar strong {
  color: var(--gold);
  font-weight: 500;
}

.clear-filters {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Product grid */
.full-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

.full-catalog-grid[data-view="list"] {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.fc-card {
  position: relative;
  background: var(--bg-cream);
  border: 1px solid rgba(168, 137, 45, 0.45);
  color: #2a2218;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
  animation: cardIn 0.55s var(--ease) both;
  cursor: pointer;
}

.fc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.4);
  border-color: var(--gold-dim);
}

.fc-card.is-hidden {
  display: none;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fc-media {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #ebe2d4, #d9cdb8);
  overflow: hidden;
}

.fc-media img {
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease);
}

.fc-card:hover .fc-media img {
  transform: scale(1.05);
}

.fc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.28rem 0.55rem;
  background: rgba(12, 10, 9, 0.82);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 1;
}

.fc-badge.silver {
  border-color: #c0c0c0;
  color: #e8e8e8;
}

.fc-quick {
  position: absolute;
  inset: auto 12px 12px 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
  z-index: 2;
}

.fc-card:hover .fc-quick {
  opacity: 1;
  transform: translateY(0);
}

.fc-quick .btn {
  width: 100%;
  background: rgba(12, 10, 9, 0.9);
  color: var(--gold);
  border-color: var(--gold);
  padding: 0.65rem;
}

.fc-quick .btn:hover {
  background: var(--gold);
  color: #1a1208;
}

.fc-body {
  padding: 1.05rem 1rem 1.2rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fc-cat {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a7348;
}

.fc-body h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #3d2e14;
  font-weight: 500;
}

.fc-weight {
  font-size: 0.88rem;
  color: #6e5a38;
  margin-top: 0.15rem;
}

.fc-purity {
  font-size: 0.72rem;
  color: #9a8458;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* List view */
.full-catalog-grid[data-view="list"] .fc-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 140px;
}

.full-catalog-grid[data-view="list"] .fc-media {
  width: 180px;
  flex-shrink: 0;
  aspect-ratio: auto;
}

.full-catalog-grid[data-view="list"] .fc-body {
  text-align: left;
  justify-content: center;
  padding: 1.25rem 1.5rem;
}

.full-catalog-grid[data-view="list"] .fc-quick {
  inset: auto 16px 16px auto;
  width: auto;
  left: auto;
}

.full-catalog-grid[data-view="list"] .fc-quick .btn {
  width: auto;
  padding-inline: 1.2rem;
}

/* Empty */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* CTA band */
.cat-cta {
  border-top: 1px solid var(--border);
  background: linear-gradient(90deg, #1a0c0c, #120a08 40%, #1a100c);
  padding: 3rem 0;
}

.cat-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cat-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--gold-bright);
  margin-bottom: 0.4rem;
}

.cat-cta p:not(.section-eyebrow) {
  font-family: var(--font-serif);
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 42ch;
}

.cat-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Quick view modal */
.qv-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 6, 5, 0.82);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.qv-overlay.open {
  opacity: 1;
  visibility: visible;
}

.qv-overlay[hidden] {
  display: none !important;
}

.qv-modal {
  width: min(860px, 100%);
  max-height: min(90vh, 640px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.qv-overlay.open .qv-modal {
  transform: none;
}

.qv-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: rgba(12, 10, 9, 0.75);
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.qv-media {
  background: #ebe2d4;
  min-height: 280px;
}

.qv-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qv-body {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
}

.qv-metal {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.qv-body h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}

.qv-weight {
  font-size: 1.05rem;
  color: var(--text);
}

.qv-desc {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.5rem;
}

.qv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.qv-tags span {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Placeholder inside cards */
.fc-media .img-placeholder {
  min-height: 100%;
  aspect-ratio: 1;
}

@media (max-width: 1100px) {
  .full-catalog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .cat-dock {
    top: 4rem;
  }

  .full-catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .full-catalog-grid[data-view="list"] .fc-card {
    flex-direction: column;
  }

  .full-catalog-grid[data-view="list"] .fc-media {
    width: 100%;
    aspect-ratio: 1;
  }

  .full-catalog-grid[data-view="list"] .fc-body {
    text-align: center;
  }

  .qv-modal {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }

  .qv-media {
    aspect-ratio: 1;
    max-height: 280px;
  }

  .cat-cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cat-cta-actions {
    justify-content: center;
  }

  .fc-quick {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .full-catalog-grid {
    grid-template-columns: 1fr;
  }

  .metal-tabs {
    width: 100%;
  }

  .metal-tab {
    flex: 1;
    padding-inline: 0.5rem;
  }

  .cat-sort {
    width: 100%;
    justify-content: space-between;
  }

  .cat-sort select {
    flex: 1;
  }
}
