/* Catalogue — style habitat.fr */
.mh-catalog-page .page-header {
  display: none;
}

.mh-catalog-page-header {
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px 24px 20px;
  text-align: center;
}
@media (min-width: 992px) {
  .mh-catalog-page-header {
    padding: 40px 70px 28px;
  }
}

.mh-catalog-page-title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #111;
  text-transform: none;
}

.mh-catalog-wrap {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 16px 64px;
}
@media (min-width: 992px) {
  .mh-catalog-wrap {
    padding: 0 70px 80px;
  }
}

.mh-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

@media (max-width: 991px) {
  .mh-catalog-page-header {
    padding: 20px 16px 16px;
  }

  .mh-catalog-wrap {
    padding: 0 12px 48px;
  }

  .mh-catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mh-catalog-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
    scrollbar-width: none;
  }

  .mh-catalog-filters::-webkit-scrollbar {
    display: none;
  }

  .mh-filter-btn,
  .mh-filter-all-btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  .mh-catalog-meta {
    width: 100%;
    justify-content: space-between;
  }

  .mh-catalog-view {
    display: flex;
    flex-shrink: 0;
  }

  .mh-filter-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: auto;
    max-width: none;
    max-height: min(50vh, 360px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }

  .mh-filter-drawer {
    width: 100vw;
    max-width: 100vw;
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .mh-catalog-view-btn[data-cols='6'] {
    display: none;
  }
}

.mh-catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.mh-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #111;
  background: #fff;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease;
}
.mh-filter-btn:hover,
.mh-filter-btn.is-open,
.mh-filter-btn.has-value {
  border-bottom-color: #111;
}

.mh-filter-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.mh-filter-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-left: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111;
  background: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.mh-filter-all-btn:hover {
  text-decoration: underline;
}

.mh-catalog-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.mh-catalog-count {
  font-size: 0.8125rem;
  color: #111;
  white-space: nowrap;
}

.mh-catalog-view {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mh-catalog-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.mh-catalog-view-btn.is-active {
  background: #111;
  border-color: #111;
  color: #fff;
}
.mh-catalog-view-btn + .mh-catalog-view-btn {
  margin-left: -1px;
}

/* Dropdown panels */
.mh-filter-dropdown {
  position: relative;
}

.mh-filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  min-width: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.mh-filter-dropdown.is-open .mh-filter-panel {
  display: block;
}

.mh-filter-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  cursor: pointer;
}
.mh-filter-panel label:hover {
  background: #f5f5f5;
}

/* Drawer — Tous les filtres */
.mh-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.4);
}
.mh-filter-overlay.is-visible {
  display: block;
}

.mh-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 201;
  width: min(400px, 100vw);
  height: 100vh;
  padding: 24px;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.mh-filter-drawer.is-open {
  transform: translateX(0);
}

.mh-filter-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.mh-filter-drawer-head h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}
.mh-filter-drawer-close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.mh-filter-drawer .filter-group {
  margin-bottom: 24px;
}
.mh-filter-drawer .filter-group strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Grille produits */
.mh-catalog-grid.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 12px;
}
@media (min-width: 640px) {
  .mh-catalog-grid.products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 16px;
  }
}
@media (min-width: 1024px) {
  .mh-catalog-grid.products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 20px;
  }
}
.mh-catalog-grid.mh-catalog-grid--dense {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
  .mh-catalog-grid.mh-catalog-grid--dense {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1024px) {
  .mh-catalog-grid.mh-catalog-grid--dense {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px 14px;
  }
}

.catalog-load-more-count {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  color: #767676;
}

.mh-catalog-card--skeleton .mh-catalog-card-img-wrap {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: mh-catalog-shimmer 1.2s ease-in-out infinite;
  aspect-ratio: 4 / 5;
  min-height: 200px;
}

.mh-catalog-card--skeleton .mh-catalog-card-body span {
  display: block;
  height: 12px;
  margin-top: 10px;
  background: #eee;
  border-radius: 2px;
}

.mh-catalog-card--skeleton .mh-catalog-card-body span:last-child {
  width: 55%;
}

.mh-catalog-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: #444;
}

.mh-catalog-error p {
  margin-bottom: 16px;
}

@keyframes mh-catalog-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mh-catalog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mh-catalog-card-img-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 12px;
}

.mh-catalog-card-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.mh-catalog-card:hover .mh-catalog-card-img-wrap img {
  transform: scale(1.03);
}

.mh-catalog-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.mh-catalog-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
}

.mh-catalog-card-brand {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  line-height: 1.2;
}
.mh-catalog-card-brand:hover {
  text-decoration: underline;
}

.mh-catalog-badge-promo {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: #111;
  line-height: 1.2;
}

.mh-catalog-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.mh-catalog-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #111;
  cursor: pointer;
  opacity: 0.85;
}
.mh-catalog-icon-btn:hover {
  opacity: 1;
}
.mh-catalog-icon-btn.is-active {
  color: #1a6fd4;
}

.mh-catalog-card-desc {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
  color: #111;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mh-catalog-card-desc:hover {
  text-decoration: underline;
}

.mh-catalog-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin-top: 2px;
}

.mh-catalog-price-current {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111;
}

.mh-catalog-price-discount {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #c41e3a;
}

.mh-catalog-price-old {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #767676;
  text-decoration: line-through;
}

.mh-catalog-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.mh-catalog-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0;
  cursor: default;
}

.mh-catalog-layout .catalog-layout {
  display: block;
  max-width: none;
  padding: 0;
}

.mh-catalog-layout {
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
