   /* Контейнер з товарами */
#productList {
  display: grid;
  gap: 15px;
  margin-bottom: 40px;
  grid-template-columns: repeat(6, 1fr); /* 6 карток у ряд на великих екранах */
  justify-content: center;
}

/* Картка товару */
.product {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.product h4 {
  font-size: 14px;
  margin-bottom: 10px;
  color: #222;
}

.product button {
  background: linear-gradient(90deg, #2b7cff, #476eff);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.1s;
}

.product button:hover {
  background: linear-gradient(90deg, #476eff, #2b7cff);
  transform: scale(1.05);
}

/* 📱 Адаптивність */
@media (max-width: 1199px) {
  #productList {
    grid-template-columns: repeat(3, 1fr); /* середні екрани — 3 в ряд */
  }
}

@media (max-width: 767px) {
  #productList {
    grid-template-columns: 1fr; /* смартфони — 1 картка */
  }
  .product {
    padding: 15px;
  }
}



   /* === ФОРМА ЗАМОВЛЕННЯ === */
form {
  max-width: 500px;
  margin: 40px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  animation: fadeInUp 0.6s ease both;
  position: relative;
  overflow: hidden;
}

/* Анімаційний фон */
form::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, rgba(43,124,255,0.15), rgba(255,255,255,0.2));
  transform: rotate(25deg);
  animation: shine 6s infinite linear;
  z-index: 0;
  opacity: 0.5;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(25deg); }
  50% { transform: translateX(100%) rotate(25deg); }
  100% { transform: translateX(-100%) rotate(25deg); }
}

/* Поля вводу */
input,
textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 18px;
  border: 1px solid #d0d7e2;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  z-index: 1;
  background-color: #fafbff;
}

input:focus,
textarea:focus {
  border-color: #2b7cff;
  box-shadow: 0 0 8px rgba(43, 124, 255, 0.3);
  background-color: #fff;
  transform: scale(1.02);
  outline: none;
}

/* Кнопка */
form button[type="submit"] {
  width: 100%;
  background: linear-gradient(90deg, #2b7cff, #476eff);
  border: none;
  color: white;
  padding: 14px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

form button[type="submit"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.25);
  transition: left 0.4s ease;
}

form button[type="submit"]:hover::before {
  left: 100%;
}

form button[type="submit"]:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(43, 124, 255, 0.3);
}

/* Результат (повідомлення після відправки) */
#result {
  text-align: center;
  margin-top: 20px;
  font-weight: bold;
  color: #2b7cff;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

/* Анімації появи */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* === КОШИК === */
#cartList {
  list-style: none;
  padding: 0;
  margin: 20px auto;
  max-width: 500px;
  background: #fff9e6;
  border-radius: 20px;
  box-shadow: 0 6px 15px rgba(255, 204, 0, 0.3);
  overflow: hidden;
  position: relative;
  animation: cartPop 0.8s ease both;
}

/* Заголовок кошика */
h2 {
  text-align: center;
  color: #333;
  font-size: 1.8em;
  margin-top: 30px;
  margin-bottom: 15px;
  position: relative;
  animation: floatTitle 3s ease-in-out infinite;
}

/* Анімація заголовка — ніби він підстрибує */
@keyframes floatTitle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Товари у кошику */
#cartList li {
  background: linear-gradient(90deg, #fffbe0, #fff2b8);
  padding: 15px 20px;
  border-bottom: 2px dashed #ffd000;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
}

#cartList li:hover {
  background: #fff3a6;
  transform: scale(1.03) rotate(-1deg);
}

/* Кнопка "Видалити" */
.remove-btn {
  background: #ff5959;
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  line-height: 28px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(255, 89, 89, 0.4);
}

.remove-btn:hover {
  background: #ff2e2e;
  transform: rotate(20deg) scale(1.2);
}

/* Анімація появи кошика */
@keyframes cartPop {
  0% {
    opacity: 0;
    transform: scale(0.7) rotate(-5deg);
  }
  80% {
    transform: scale(1.05) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* Якщо кошик порожній */
#cartList:empty::after {
  content: "😅 Ваша корзина пуста... выбери проволоку !";
  display: block;
  text-align: center;
  color: #777;
  font-style: italic;
  padding: 20px;
  animation: bounceEmpty 1.2s ease-in-out infinite;
}

@keyframes bounceEmpty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Ефект при додаванні товару */
.added {
  animation: popItem 0.5s ease;
}

@keyframes popItem {
  0% { transform: scale(0.7) rotate(-10deg); opacity: 0; }
  50% { transform: scale(1.1) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

/* === Анімація вибуху емодзі при додаванні товару === */
.emoji-burst {
  position: relative;
  display: inline-block;
  pointer-events: none;
}

.emoji-burst span {
  position: absolute;
  top: -10px;
  font-size: 22px;
  opacity: 0;
  animation: emojiUp 1s ease-out forwards;
}

@keyframes emojiUp {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 1;
  }
  50% {
    transform: translateY(-30px) scale(1.2) rotate(10deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-60px) scale(0.8) rotate(-10deg);
    opacity: 0;
  }
}

/* Кнопки при натисканні "стрибають" */
button:active {
  transform: scale(0.95);
  transition: transform 0.1s;
}
