* {
  box-sizing: border-box;
}

:root {
  --font-family: "Montserrat", sans-serif;
}

body {
  margin: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #fafafa;
  color: #212121;
  line-height: 1.5;
}


#categories ul {
  display: flex;
  flex-direction: column; 
  gap: 8px;   
  padding-left: 0;        
  list-style-type: none;
  width: 360px;  
  padding-left: 16px;
}

#categories {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#categories li {
  list-style-type: none;
}

.item {
  width: 392px;
  background: #f6f6fe;
  border-radius: 8px;
}

li > h2 {
  margin: 0;
  margin-bottom: 16px;
  margin-top: 16px;
  padding-left: 16px;
}

h2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#categories ul > li {
  padding-left: 16px;
  padding-right: 16px;
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px; 
}

.item {
  padding-bottom: 16px;
}

#categories li.item:nth-child(1) {
  height: 264px;
}

#categories li.item:nth-child(2) {
  height: 216px;
}

#categories li.item:nth-child(3) {
  height: 312px;
}

#categories li.item ul li {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #2e2f42;
  display: flex;
  text-align: left;
  align-items: center;

}


.gallery {
  list-style: none;
  padding: 0;
  margin: 0 auto;

  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  row-gap: 48px;
  justify-content: center;
}

.gallery-item {
  flex: 0 0 360px;  
  width: 360px;     
  height: 300px;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}




input {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
  padding-left: 16px;
}

input::placeholder {
font-weight: 400;
font-size: 16px;
line-height: 150%;
letter-spacing: 0.04em;
color: #2e2f42;
}

h1, span {
font-weight: 600;
font-size: 24px;
line-height: 133%;
letter-spacing: 0.04em;
color: #2e2f42;
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
button {
  border-radius: 8px;
  padding: 8px 16px;
  width: 86px;
  height: 40px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #fff;
  background: #4e75ff;
  display: flex;
  justify-content: center;
  align-items: center;
}

form > input {
  border: 1px solid #808080;
  border-radius: 4px;
  width: 360px;
  height: 40px;
}

label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #2e2f42;
}

.widget {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

}

p, .color {
font-family: var(--font-family);
font-weight: 400;
font-size: 16px;
line-height: 150%;
letter-spacing: 0.04em;
color: #2e2f42;
}

.change-color {
  border-radius: 8px;
  padding: 8px 16px;
  width: 148px;
  height: 40px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.04em;
  color: #fff;
}