/* ═══════════════════════════════════════════════════════
   CATALOG — Posh Fine Jewellery
   Editorial Lookbook Architecture
   ═══════════════════════════════════════════════════════ */

/* ── Layout Architecture ──────────────────────────────── */
.catalog-main {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: 1600px;
  margin: 0 auto;
  padding: 140px 48px 120px;
  gap: 80px;
  background: var(--bg-primary);
  min-height: 100vh;
}

/* ── Curator Sidebar (Sticky) ─────────────────────────── */
.catalog-curator {
  position: sticky;
  top: 140px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.curator-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.curator-label {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rose-gold);
}

.curator-title {
  font-family: var(--font-display);
  font-size: var(--t-4xl);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.curator-count {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Curator Navigation ───────────────────────────────── */
.curator-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.curator-link {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.4s ease;
  position: relative;
  padding-left: 0;
}

.curator-link:hover {
  color: var(--text-primary);
  padding-left: 12px;
}

.curator-link.active {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-style: italic;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--text-primary);
  padding-left: 24px;
}

.curator-link::before {
  content: '◆';
  position: absolute;
  left: 0;
  font-size: 10px;
  color: var(--rose-gold);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s ease;
}

.curator-link.active::before {
  opacity: 1;
  transform: translateX(0);
}

/* ── Staggered Grid ───────────────────────────────────── */
.catalog-gallery {
  width: 100%;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 80px 48px;
}

/* Push the second column down for the editorial stagger */
.catalog-item:nth-child(2n) {
  transform: translateY(120px);
}

/* ── Product Card ─────────────────────────────────────── */
.catalog-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

/* Clean white box with exquisite padding */
.catalog-img-wrapper {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
  transition: border-color 0.4s ease, box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-item:hover .catalog-img-wrapper {
  border-color: rgba(201, 149, 106, 0.2);
  box-shadow: 0 12px 40px rgba(44, 24, 16, 0.06);
}

.catalog-img-wrapper img,
.catalog-img-wrapper video {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  padding: 40px;
  display: block;
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.catalog-item:hover .catalog-img-wrapper img,
.catalog-item:hover .catalog-img-wrapper video {
  transform: scale(1.08);
}

/* Glassmorphic Hover CTA */
.catalog-hover-cta {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 20px);
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 32px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 0;
  white-space: nowrap;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  text-decoration: none;
}

.catalog-item:hover .catalog-hover-cta {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── Product Text ─────────────────────────────────────── */
.catalog-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.catalog-text h2 {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  font-weight: 400;
  color: var(--text-primary);
  margin: 0;
  transition: color 0.3s ease;
}

.catalog-item:hover .catalog-text h2 {
  color: var(--rose-gold);
}

.catalog-text p {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

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

.catalog-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--sp-6);
  border: 1px solid var(--divider);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.catalog-empty h3 {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}

.catalog-empty p {
  font-family: var(--font-body);
  font-size: var(--t-base);
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* ── Scroll Reveal ────────────────────────────────────── */
.catalog-item.reveal-on-scroll {
  opacity: 0;
  /* Instead of translateY for everything, let's keep the transform simple to not mess up the stagger */
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-item.reveal-on-scroll.is-revealed {
  opacity: 1;
}

/* ── Lightbox Modal ───────────────────────────────────── */
.catalog-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(25, 15, 10, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.catalog-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #FFFFFF;
  padding: 40px;
  border-radius: var(--r-sm);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.catalog-lightbox.active .lightbox-content img,
.catalog-lightbox.active .lightbox-content video {
  transform: scale(1);
}

.lightbox-content h3 {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  color: #FFFFFF;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: -48px;
  background: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 8px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ── Responsive Architecture ──────────────────────────── */
@media (max-width: 1024px) {
  .catalog-main {
    grid-template-columns: 220px 1fr;
    gap: 40px;
    padding: 120px 24px 80px;
  }
  
  .curator-title {
    font-size: var(--t-3xl);
  }
  
  .catalog-grid {
    gap: 60px 24px;
  }
}

@media (max-width: 768px) {
  /* Break the split screen on mobile */
  .catalog-main {
    display: flex;
    flex-direction: column;
    padding: 100px 12px 80px; /* Reduced side padding so grid is wider */
    gap: 40px;
  }

  .catalog-curator {
    position: relative;
    top: 0;
    gap: 32px;
    text-align: center;
    border-bottom: 1px solid var(--divider);
    padding-bottom: 32px;
  }

  .curator-header {
    align-items: center;
  }

  .curator-nav {
    display: none; /* User requested removal on mobile */
  }

  .curator-link {
    padding-left: 0 !important;
  }
  
  .curator-link.active {
    font-size: var(--t-base);
  }

  .curator-link::before {
    display: none;
  }

  .catalog-item:nth-child(2n) {
    transform: translateY(48px); /* Keep the staggered laptop design on mobile! */
  }

  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 8px; /* Extra vertical gap to accommodate the stagger */
    padding-bottom: 60px; /* Room for the final staggered item */
  }

  .catalog-img-wrapper {
    border-radius: 8px; /* Slightly softer corners for mobile */
  }

  .catalog-img-wrapper img {
    padding: 0; /* No padding so images maximize their box size */
  }
  
  .catalog-item-info {
    gap: 4px;
    padding: 8px 4px; /* Less padding so text fits */
  }
  
  .catalog-text h2 {
    font-size: 11px; /* Smaller as requested */
    line-height: 1.3;
  }
  
  .catalog-text p {
    font-size: 7.5px; /* Shrunk IGI text */
    letter-spacing: 0.15em;
  }
  
  .catalog-hover-cta {
    display: none; /* Hide permanent CTA to keep the tight grid clean */
  }
  
  .catalog-item {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  }
  
  .catalog-item:active {
    transform: scale(0.96);
    opacity: 0.85;
  }

  .catalog-item:nth-child(2n):active {
    transform: translateY(48px) scale(0.96);
  }
}
