/*  СБРОС СТИЛЕЙ  */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  color: #222;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/*  ОБЩЕЕ  */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

section {
  margin: 40px 0;
}

h1, h2, h3 {
  margin: 0 0 12px;
}

/*  HEADER  */
.header {
  border-bottom: 1px solid #ddd;
}

.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.header__actions {
  display: flex;
  gap: 10px;
}

.header__logo-img {
  height: 24px;
}

/*  НАВИГАЦИЯ  */
.nav {
  padding: 10px 0;
}

.nav__list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav__link {
  padding: 6px 8px;
  border-radius: 4px;
}

.nav__link:hover {
  background: #f2f2f2;
}

/*  КАТЕГОРИИ */
.categories {
  padding-bottom: 16px;
}

.categories__list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #666;
}

/*  HERO  */
.hero {
  background: #2c2a4a;
  color: #fff;
  padding: 24px 0;
}

.hero__content {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hero__left {
  flex: 1;
  min-width: 260px;
}

.hero__right {
  flex: 1;
  min-width: 260px;
}

.hero__title {
  font-size: 32px;
  line-height: 1.2;
}

.hero__text {
  margin-top: 16px;
  color: #ddd;
}

/* КНОПКИ  */
.button {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 4px;
  background: #fff;
  color: #2c2a4a;
}

.button:hover {
  background: #eee;
}

/*  FEATURES  */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}



.feature-card {
  border: 1px solid #ddd;
  padding: 16px;
  width: 250px;
}

/*  PRODUCTS  */
.products__grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.product-card {
  border: 1px solid #ddd;
  padding: 12px;
  width: 250px;
}

.product-card__price {
  color: #666;
}

/*  NEWSLETTER  */
.newsletter {
  background: #f5f5f5;
  padding: 24px 0;
}

.newsletter__form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter__input {
  padding: 8px;
  border: 1px solid #ccc;
}

/*  ABOUT  */
.about__grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/*  FOOTER  */
.footer {
  background: #2c2a4a;
  color: #fff;
  padding: 24px 0;
}

.footer__top {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__link {
  color: #ddd;
}

.footer__link:hover {
  color: #fff;
}

.footer__bottom {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/*  АДАПТИВНОСТЬ (Desktop First)  */

/* Планшеты (меньше 992px) */
@media (max-width: 991px) {
  .nav__list {
    gap: 10px;
  }
}

/* Мобильные (меньше 768px) — меню становится вертикальным */
@media (max-width: 767px) {
  .nav__list {
    flex-direction: column;
    align-items: center;
  }
}

/*  MASONRY (колонки)  */
.masonry-grid__container {
  column-count: 3;
  column-gap: 24px;
}

.masonry-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Адаптив для Masonry */
@media (max-width: 991px) {
  .masonry-grid__container {
    column-count: 2;
  }
}

@media (max-width: 767px) {
  .masonry-grid__container {
    column-count: 1;
  }
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  padding: 12px 10px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle__line {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active .menu-toggle__line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active .menu-toggle__line:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .menu-toggle__line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: #2c5530;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: scale(1.1);
}

.scroll-top:active {
  transform: scale(0.95);
}

