/* ==========================================================================
   POPUP GALERIE CATÉGORIES — meubles.html
   ========================================================================== */

.catalog-card {
  cursor: pointer;
  outline-offset: 4px;
}

.catalog-card:focus-visible {
  outline: 2px solid var(--brass, #c9a463);
}

.catalog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 36, 32, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.catalog-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.catalog-modal {
  background: #fbf8f3;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.catalog-overlay.is-visible .catalog-modal {
  transform: translateY(0) scale(1);
}

.catalog-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(32, 32, 28, 0.08);
  flex-shrink: 0;
}

.catalog-modal-header h3 {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--forest-deep, #16332c);
  margin: 0;
}

.catalog-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(32, 32, 28, 0.06);
  color: var(--forest-deep, #16332c);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.catalog-modal-close:hover {
  background: rgba(32, 32, 28, 0.12);
}

.catalog-modal-body {
  padding: 24px 26px 28px;
  overflow-y: auto;
}

.catalog-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.catalog-modal-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #e5ded2;
  transition: transform 0.3s ease;
}

.catalog-modal-grid img:hover {
  transform: scale(1.03);
}

@media (max-width: 700px) {
  .catalog-modal-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  .catalog-modal-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .catalog-modal-header { padding: 18px 20px; }
  .catalog-modal-body { padding: 18px 20px 22px; }
  .catalog-modal-header h3 { font-size: 1.2rem; }
}