

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

main.main {
  flex-grow: 1;
}


footer.footer {

}


body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; 
}

.category-card__title a::first-letter {
  text-transform: uppercase;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  background-color: #000;
  /*line-height: 1.6;*/
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;

}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  border: 0 !important;
}

.button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 0.6em 1.2em;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  background-color: #ff4d4d;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.button:hover,
.button:focus {
  background-color: #cc3a3a;
  box-shadow: 0 0 8px rgba(204, 58, 58, 0.6);
  outline: none;
}

.header {


 padding: 1rem 0;
  box-shadow: 0 -2px 4px white;
}

.header__container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
/*  flex-wrap: wrap;*/
  gap: 1rem;
}

.header__logo {
 /* font-size: 1.9rem;*/
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.05em;
  user-select: none;
  transition: opacity 0.3s ease;
  text-align: center;
}

.header__logo:hover,
.header__logo:focus {
  opacity: 0.85;
  outline: none;
}

.header__logo img {
  width: 248px;
  /*height: 126px;*/
} 

.header__nav {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav__item {}

.nav__link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.3em 0.5em;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.nav__link:hover,
.nav__link:focus {
  background-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.header__search {
  display: flex;
  /*align-items: center;*/
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  /*max-width: 280px;
  width: 100%;*/
  flex-grow: 1;
}

.search__input {
  flex-grow: 1;
  border: none;
  padding: 0.6em 1em;
  font-size: 1rem;
  color: #222;
}

.search__input::placeholder {
  color: #555;
}

.search__input:focus {
  outline: none;
  background-color: #fbfbfb;
}

.search__button {
  background-color: #b1b1b1;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  padding: 0 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search__button:hover,
.search__button:focus {
  background-color: #919191;
  outline: none;
}

.filters {

  padding-top: 10px;
}

.filters__container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  margin-bottom: 20px;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}


.filters__button:hover,
.filters__button:focus {
  background-color: #cc3a3a;
  box-shadow: 0 0 8px rgba(204, 58, 58, 0.6);
  outline: none;
}

.categories {

}

.categories__container {
  width: 100%;
  max-width: 1650px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

.categories__title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
  /*text-align: center;*/
}

.categories__list {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
}




.category-list__item {
  flex: 1 1 320px;   
  max-width: 100%;   
  max-height: none;  
  background-color: #1a1a1a;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0.5rem; 

}




.category-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  user-select: none;
  outline-offset: 3px;
}

.category-card__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.category-card__title {


white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font-weight: 700;
  font-size: 16px;
  color: white;
  text-align: center;
  user-select: none;
}

.footer {
  background-color: #222;
  color: #fff;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  user-select: none;
}

.footer__container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}


@media (max-width: 1024px) {
  .category-list__item {
   /* max-width: 45%;*/
   max-width: 32%;
    flex: 1 1 100%;
  }
}

@media (max-width: 600px) {
  .header__container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .header__nav {
    order: 3;
  }

  .nav__list {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .header__search {
    order: 2;
    max-width: 100%;
    width: 100%;
  }

  .search__input {
    width: 100%;
  }

  .category-list__item {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .filters__container {
    justify-content: center;
  }
}


@media (max-width: 768px) {
  .category-list__item {
    flex: 1 1 100%; 
    max-width: 100%;
  }
}


@media (max-width: 950px) {
  .category-list__item {
    flex: 1 1 100%;  
    max-width: 49%;
  }
}



@media (max-width: 650px) {
  .category-list__item {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

svg {
  vertical-align: bottom;
}


.category-list__item.category-card {
  margin-bottom: 10px;
}


