:root{
  --wood:#C78843;
  --ink:#222;
  --card:#fff;
  --muted:#888;
}

/* ---------- LAYOUT WRAPPER (page with sidebar) ---------- */
.catalog-layout{
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 16px 60px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

/* full-bleed on mobile; sidebar becomes drawer */
@media (max-width: 991px){
  .catalog-layout{
    grid-template-columns: 1fr;
  }
}

/* ---------- SIDEBAR ---------- */
.sidebar{
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  position: sticky;
  top: 100px;
  height: max-content;
  z-index: 30;
}

/* Off-canvas behavior on mobile */
@media (max-width: 991px){
  .sidebar{
    position: fixed;
    top: 0; left: -310px;
    width: 290px;
    height: 100vh;
    overflow-y: auto;
    border-radius: 0 14px 14px 0;
    padding: 22px 18px;
    transition: left .35s ease;
  }
  .sidebar.open{ left: 0; }
}

/* Sidebar header (mobile) */
.sidebar-head{
  margin-bottom: 10px;
}
.sidebar-title-main{
  color: var(--wood);
  font-weight: 800;
  font-size: 1.1rem;
}
.sidebar-close{
  background: none; border: 0; font-size: 22px; color: var(--ink); cursor: pointer;
}

/* Backdrop for off-canvas */
.sidebar-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  z-index: 25;
}
.sidebar-backdrop.show{ display: block; }

/* Mobile toggle button */
.sidebar-toggle{
  margin-bottom: 12px;
  background: var(--wood);
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  border: 0; border-radius: 10px;
}

/* Search */
.search-box input{
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  outline: none;
}
.search-box input:focus{
  border-color: var(--wood);
}

/* Section title */
.sidebar-title{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 8px;
}

/* Colour filter */
.filter-option{
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink);
  margin-bottom: 6px;
}

/* Category button */
.cat-button{
  width: 100%;
  background: none;
  border: 0;
  color: var(--wood);
  font-weight: 800;
  font-size: 15px;
  padding: 10px 2px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.cat-arrow{ transition: transform .25s ease; }
.cat-arrow.rot{ transform: rotate(90deg); }

/* Subcategory list */
.subcat-list{
  max-height: 0; overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
  padding-left: 10px;
}
.subcat-list.open{
  max-height: 350px;
  opacity: 1;
  transform: translateY(0);
}
.subcat-list a{
  display: block; padding: 6px 0;
  color: #444; text-decoration: none; font-size: 14px;
}
.subcat-list a:hover{ color: var(--wood); }
.subcat-list a.active{
  color: var(--wood); font-weight: 700;
}

/* ---------- MAIN COLUMN (content area) ---------- */
.catalog-main{
  min-width: 0; /* prevent overflow */
}
