/* ============================= */
/* INDEX PAGE */
/* ============================= */

.page-container {
  max-width: 1200px; /* или нужная ширина */
  margin: 0 auto; /* центрирование */
  width: 100%; /* адаптивность */
  box-sizing: border-box;
  padding: 0 20px; /* чтобы на маленьких экранах не прилипало к краям */
}
:root {
  --primary-color: #46a358;
  --basic-font-family: "Cera Pro", sans-serif;
  --bold-font-family: "Cera Pro", sans-serif;
  --black-font-family: "Cera Pro", sans-serif;
  --medium-font-family: "Cera Pro", sans-serif;
  --special-font-family: "Hanging Letters", sans-serif;
  --btn-scale-hover: 1.1; /* на сколько увеличивать */
  --btn-scale-time: 0.4s; /* длительность анимации */
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--btn-scale-time) ease;
}

/* hover-анимация */
.btn:hover {
  animation: btn-pop var(--btn-scale-time) ease;
}

@keyframes btn-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(var(--btn-scale-hover));
  }
  100% {
    transform: scale(1);
  }
}

.header {
  /* padding: 25px 0; */
  position: relative;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Лого */

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  color: var(--primary-color);
  font-weight: 700;
}

/* Меню */
.nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.menu {
  display: flex;
  gap: 40px;
  list-style: none;
}
.menu-item {
  position: relative;
}

.menu-link {
  text-decoration: none;
  color: #3d3d3d;
  font-size: 16px;
  font-family: var(--basic-font-family);
}
.menu-link:hover {
  border-bottom: 3px solid var(--primary-color);
}

/* ===== СТРІЛОЧКА ВНИЗ ===== */

.arrow-down {
  font-size: 12px;
  margin-left: 6px;
}

/* ===== ПЕРШИЙ РІВЕНЬ ===== */

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;

  background: #edf2ee;
  list-style: none;
  padding: 10px 0;
  margin: 0;

  display: none;
}

/* показ меню */
.has-dropdown:hover > .dropdown {
  display: block;
}
.dropdown li {
  position: relative;
  width: 100%;
}

/* пункти меню */
.dropdown li a {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px 20px;
  text-decoration: none;
  color: #3d3d3d;
  width: 100%;
  font-size: 15px;
  box-sizing: border-box;
  font-family: var(--basic-font-family);
}

/* hover */
.dropdown li a:hover {
  background: var(--primary-color);
  color: white;
}

/* ===== ДРУГИЙ РІВЕНЬ ===== */

.has-submenu {
  position: relative;
}

/* стрілочка вправо */
.arrow-right {
  font-size: 12px;
}

/* підменю */
.submenu {
  position: absolute;
  top: 0;
  left: 100%;
  left: 98%;

  min-width: 200px;
  padding: 10px 0;
  margin-top: 0;

  background: #edf2ee;
  list-style: none;
  z-index: 1000;

  display: none;
}
.submenu::before {
  content: "";
  position: absolute;
  top: 0;
  left: -20px; /* Создаем невидимую зону слева от подменю */
  width: 20px; /* Ширина мостика */
  height: 100%;
}

/* показ другого рівня */
.has-submenu:hover > .submenu {
  display: block;
}

/* hover другого рівня */
.submenu li a:hover {
  background: var(--primary-color);
  color: white;
}

/* Контейнер для иконок */
.header-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}
.icon-group {
  display: flex;
  align-items: center;
  /* РАССТОЯНИЕ МЕЖДУ ПОИСКОМ И КОРЗИНОЙ */
  gap: 30px;
}

/* Стили кнопок-иконок */
.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  position: relative;
  outline: none;
  border: none;
  background: none;
}
/* Анимация прыжка */
@keyframes icon-jump {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Применяем на hover к иконкам */
.action-btn:hover img {
  animation: icon-jump 0.5s ease;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 15px;

  padding: 8px 18px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
}
@keyframes login-jump {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1); /* увеличиваем на 10% */
  }
  100% {
    transform: scale(1);
  }
}

/* Применяем на hover к кнопке login */
.login-btn:hover {
  animation: login-jump 0.4s ease;
}

.first {
  margin-top: 30px;
}

.first-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  padding: 30px;
  gap: 100px;
}

/* Левая часть */

.first-content {
  max-width: 520px;
}

.first-subtitle {
  font-size: 14px;
  letter-spacing: 2px;
  color: #3d3d3d;
  font-family: var(--medium-font-family);
}

.first-title {
  font-size: 48px;
  font-family: var(--black-font-family);
  font-size: 60px;
  margin: 20px 0;
}

.accent {
  color: var(--primary-color);
}

.first-text {
  color: #727272;
  margin-bottom: 30px;
  font-family: var(--basic-font-family);
}

/* Кнопка */

.first-btn {
  display: inline-block;
  padding: 12px 28px;

  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
}
@keyframes shop_now-jump {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1); /* увеличиваем на 10% */
  }
  100% {
    transform: scale(1);
  }
}

/* Применяем на hover к кнопке login */
.login-btn:hover {
  animation: shop_now-jump 0.4s ease;
}

/* Правая часть */

.first-image {
  position: relative;
  width: 520px;
  height: 400px;
  display: flex;
  align-items: flex-end;
}
.first-image img {
  position: absolute;
  bottom: 0; /* Прижимаем к НИЗУ контейнера */
}

/* большая картинка */
.first-image img:first-child {
  right: 0;

  width: 500px;
  z-index: 1;
}
.first-image img:last-child {
  left: 0;

  width: 155px;
  padding: 15px;
  z-index: 2;
}

/* ============================= */
/* REGISTRATION PAGE */
/* ============================= */

/* Выровнять всю форму по центру страницы */
.form-container {
  display: flex;
  flex-direction: column; /* включаем flexbox */
  justify-content: center; /* центр по горизонтали */
  align-items: center; /* центр по вертикали */
  gap: 8px; /* чтобы занимала всю высоту экрана */
}

/* Центрируем элементы внутри формы */
form {
  display: flex;
  flex-direction: column;
  align-items: center; /* центрирует поля и кнопки по горизонтали */
  gap: 16px;
}

/* Центрируем заголовок внутри формы */
.title {
  text-align: center;
}
.hint {
  font: "Cera Pro", sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 14px;
  letter-spacing: 0;
  color: #3d3d3d;
  align-self: flex-start;
}
input,
button {
  border-radius: 5px;
}

input {
  display: block;
  width: 300px;
  height: 40px;

  border: 1px solid #eaeaea;

  padding: 8px 16px;
  font-size: 16px;
  box-sizing: border-box;
}
input::placeholder {
  color: #a5a5a5;
}

.submit-button {
  background-color: var(--primary-color);
  color: white;
  font-size: 16px;
  padding: 8px 16px;
  border: none;

  cursor: pointer;
  text-align: center;
  width: 300px;
  height: 45px;
}

.social-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}
.center-text {
  font-size: 13px;
  color: #3d3d3d;
  text-align: center;
}

.social-button {
  background-color: transparent;
  color: #727272;
  border: 1px solid #eaeaea;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  width: 300px;
  height: 40px;
  padding: 8px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 16px;
}

.google-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 10px;
  left: 69px;
}

.facebook-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 11px;
  left: 64px;
}

.footer {
  background-color: var(--primary-color);
}

/* ============================= */
/* second-container <!-- Друга секція (homework 7.1) -->*/
/* ============================= */

.second-container {
  display: flex; /* делим на 2 части */

  margin: 0 auto;

  margin-top: 40px;
}

/* Левая часть */
.sidebar {
  width: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #fbfbfb;
}

.category-style {
  font-family: var(--bold-font-family);
  margin-bottom: 10px;
  margin-left: 20px;
}

/* Ссылки категорий */
.categories-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-left: 20px;
}

.categories-links a {
  font-family: var(--basic-font-family);
  font-weight: normal;
  text-decoration: none;
  color: #3d3d3d;
  transition: color 0.2s;
}

.categories-links a:hover {
  color: var(--primary-color);
}
.sale-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px; /* отступы, чтобы контент не прилипал к краям */
  gap: 8px;
  background: linear-gradient(
    145.46deg,
    rgba(70, 163, 88, 0.3) -46.09%,
    rgba(70, 163, 88, 0) 103.28%
  );
}

.sale-banner img {
  width: 100%;
  height: auto;
  display: block;
  padding: 17px;
}
.sale-banner h2 {
  font-family: var(--special-font-family);
  color: var(--primary-color);
  font-weight: normal;
  font-size: 45px;
}

/* Правая часть */
.products-container {
  flex: 1; /* занимает всё оставшееся место */
  margin-left: 33px;
}

/* Верхняя панель */
.prodacts-top {
  display: flex;
  justify-content: space-between;

  margin-bottom: 37px;
}
.prodacts-top > div:first-child {
  display: flex;
  gap: 37px; /* расстояние между ссылками */
}
.prodacts-top > div:first-child a {
  font-family: var(--basic-font-family);
  color: #3d3d3d;
  transition: color 0.2s;
}
.prodacts-top > div:first-child a:hover {
  color: var(--primary-color);
}

.prodacts-top > div:last-child {
  display: flex;
  align-items: center;
}
.prodacts-top > div:last-child span {
  font-family: var(--basic-font-family);
  color: #3d3d3d;
  font-weight: normal;
}

.prodacts-top select {
  font-family: var(--basic-font-family);
  border: none; /* убираем рамку */
  color: #3d3d3d;
  padding: 5px 8px;
  font-size: 15px;
}
/* ============================= */
/* second-container <!-- Друга секція (homework 9.1) -->*/
/* ============================= */

/* Карточки */
.products {
  display: flex;
  flex-wrap: wrap; /* чтобы переносились на новую строку */
  font-family: var(--basic-font-family);
  font-size: 16px;
  background-color: #fbfbfb;
}

.card {
  width: 30%;
  margin: 10px;
  text-align: center;
  position: relative;
}
.card-image {
  position: relative;
}

.card-image img {
  width: 100%;
  display: block;
}
.price {
  color: var(--primary-color);
}
.card-action {
  position: absolute;

  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);

  display: flex;
  gap: 10px;

  opacity: 0;
  transition: 0.3s;

  background: #ffffff;
  padding: 8px 12px;
}
.card:hover {
  border-top: 2px solid var(--primary-color); /* только верхняя линия зелёная */
}
.card:hover .card-action {
  opacity: 1;
}

.card-sale {
  position: absolute;
  top: 10px;
  left: 10px;

  background: var(--primary-color);
  color: #ffffff;

  padding: 4px 8px;
  font-size: 12px;
}

.pagination-wrapper {
  max-width: 1040px; /* ширина, совпадающая с карточками */
  margin: 20px auto 0; /* центрируем блок */
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.pagination {
  margin-top: 30px;
  display: flex;

  justify-content: flex-end;
  gap: 9px;
}

.pagination button:hover {
  background: var(--primary-color);
  color: white;
  cursor: pointer;
}

.third-section {
  padding: 80px 0;
}

/* TOP BLOCKS */

.top-blocks {
  display: flex;
  gap: 28px;
  margin-bottom: 138px;
}

.promo-block {
  display: flex;
  align-items: center;
  background: #fbfbfb;
  padding: 20px;
  flex: 1;
}

.promo-block img {
  width: 287px;
}

.promo-text {
  margin-left: 20px;
}

.promo-text h3 {
  font-size: 18px;
  margin-bottom: 10px;
  font-family: var(--bold-font-family);
}

.promo-text p {
  font-size: 14px;
  margin-bottom: 15px;
  color: #727272;
  font-family: var(--basic-font-family);
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: #ffffff;
  font-family: var(--basic-font-family);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
}

/* BLOG */

.blog-title {
  text-align: center;
  margin-bottom: 40px;
}

.blog-title h2 {
  font-size: 30px;
  margin-bottom: 15px;
  color: #3d3d3d;
  font-family: var(--bold-font-family);
}

.blog-title p {
  color: #727272;
  font-family: var(--basic-font-family);
  size: 14px;
}

/* BLOG CARDS */

.blog-cards {
  display: flex;
  gap: 44px;
}

.blog-card {
  background: #fbfbfb;
  flex: 1;
}

.blog-card img {
  width: 100%;
}

.blog-info {
  padding: 4px;
}

.blog-info span {
  color: var(--primary-color);
  font-family: var(--basic-font-family);
  font-size: 14px;
}

.blog-info h4 {
  margin: 10px 0;
  font-size: 20px;
  font-family: var(--bold-font-family);
  color: #3d3d3d;
}

.blog-info p {
  font-family: var(--basic-font-family);
  font-size: 14px;
  color: #727272;
  margin-bottom: 9px;
}

.blog-info a {
  text-decoration: none;
  color: #3d3d3d;
  font-family: var(--basic-font-family);
  transition: 0.3s;
}

/* hover только меняет цвет */
.read-more:hover {
  color: var(--primary-color);
}
.read-more:hover {
  color: var(--primary-color);
}

/* Homework 11.1 */

.footer-top {
  margin: 30px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Выравнивание по верху */
  padding: 24px;
  gap: 30px;
  background-color: #fbfbfb;
  max-width: 1200px; /* Лучше использовать max-width для адаптивности */
}

.features {
  display: flex;
  gap: 30px;
  flex: 1;
}

.feature {
  max-width: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.feature-img-box {
  height: 100px; /* Фиксированная высота для зоны картинки */
  display: flex;
  align-items: flex-end; /* Картинки «встанут» на одну линию снизу */
  margin-bottom: 15px;
}

.feature-img {
  width: 90px;
  height: 95px;
  object-fit: contain;
  display: block;
  margin-bottom: 15px;
}

.feature h3 {
  margin: 10px 0 5px;
  font-family: var(--bold-font-family);
  font-size: 17px;
  color: #3d3d3d;
}

.feature p {
  font-family: var(--basic-font-family);
  font-size: 14px;
  color: #727272;
}

.newsletter {
  max-width: 354px;
  width: 100%;
  text-align: left;
}

.newsletter h3 {
  font-family: var(--bold-font-family);
  font-size: 18px;
  color: #3d3d3d;
  margin-bottom: 10px;
}

.subscribe-form {
  display: flex;
  flex-direction: row;

  margin: 12px 0 25px;
  width: 100%;
  max-width: 354px;
  box-shadow: 0px 0px 20px 0px #0000000f;

  border-radius: 6px;
  overflow: hidden;
}

.subscribe-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 15px;
  border: none;
  color: 0px 0px 20px 0px #0000000f;
  outline: none;
  font-family: var(--basic-font-family);
}
.subscribe-form input::placeholder {
  font-family: var(--basic-font-family);
  color: #acacac;

  font-size: 14px;
}

.subscribe-form button {
  height: 40px;

  padding: 0 25px;
  border: none;

  background: var(--primary-color);
  font-family: var(--bold-font-family);
  font-size: 18px;
  color: #ffffff;
  margin: 0;
  cursor: pointer;
}
.newsletter p {
  font-family: var(--basic-font-family);
  color: #727272;
}

/* Зелений контейнер */

.footer-info {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 25px 40px;
  background: linear-gradient(90deg, #edf6ef 0%, #52c368 100%);

  border-radius: 6px;
}
.footer-info a {
  color: #3d3d3d;
  font-family: var(--basic-font-family);
  text-decoration: none; /* убираем подчёркивание */
  font-size: 14px;
  line-height: 22px;
}
.footer-info a:hover {
  text-decoration: underline;
}

/* Каждый блок */
.footer-info > div {
  display: flex;
  align-items: center;
  gap: 12px;

  font-size: 14px;
  color: #3d3d3d;
  max-width: 220px;
}

/* Отступ слева между блоками */
.footer-info > div:not(:first-child) {
  padding-left: 30px;
}
.phone img {
  transition: transform 0.3s ease;
}

/* анимация при наведении */
.phone:hover img {
  animation: phone-shake 0.8s ease;
}

@keyframes phone-shake {
  0% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-15deg);
  }
  50% {
    transform: rotate(10deg);
  }
  80% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0);
  }
}
.email:hover img {
  animation: mail-jump 0.6s ease;
}

@keyframes mail-jump {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(-5px);
    opacity: 0.7;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
.address:hover img {
  animation: address-jump 0.6s ease;
}

@keyframes address-jump {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}
/* Логотип */
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #46a358;
}

/* Иконки */
.footer-info img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Low footer */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  padding: 40px 40px 30px;
  background: #fbfbfb;
  border-bottom: 1px solid #eaeaea;

  padding-bottom: 20px;
}

.footer-col {
  flex: 1;
  max-width: 200px;
}

.footer-col h4 {
  font-size: 18px;

  color: #3d3d3d;
  font-family: var(--bold-font-family);

  margin-bottom: 8px;
  margin-top: 0;
}

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

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  font-family: var(--basic-font-family);
  text-decoration: none;
  font-size: 14px;
  color: #727272;
  line-height: 1.6;

  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--primary-color);
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.social-icons a {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #46a35833;
  border-radius: 4px;

  transition: 0.3s;
}

.social-icons a:hover {
  border-color: var(--primary-color);
}

.social-icons img {
  width: 16px;
  height: 16px;
}

.payment-title {
  margin-top: 30px;
  margin-bottom: 10px;
}

.payments img {
  max-width: 100%;
}

.footer-bottom {
  display: block;

  margin-top: 6x;
  text-align: center;
  padding: 40px 40px 30px;
  box-sizing: border-box;
}

.footer-bottom p {
  font-family: var(--basic-font-family);
  font-size: 14px;
  color: #3d3d3d;
  margin: 0;
}
