

  const tabs = {
    kitchens: 'kitchenBlock',
    tables: 'tableBlock',
    sofas: 'sofaBlock',
    custom: 'customBlock'
  };

.catalog-block {
  display: none;
}

  document.querySelectorAll('a[href^="#"]').forEach(link => {
    link.addEventListener('click', function(e) {
      e.preventDefault();
      const targetId = this.getAttribute('href').substring(1);
      Object.values(tabs).forEach(id => {
        const el = document.getElementById(id);
        if (el) el.style.display = 'none';
      });
      const toShow = document.getElementById(tabs[targetId]);
      if (toShow) toShow.style.display = 'block';
      toShow.scrollIntoView({ behavior: 'smooth' });
    });
  });




