/* ==============================
   ЗАГАЛЬНІ СТИЛІ
============================== */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #333;
}

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

h1, h2, h3 {
  margin: 0;
}

img {
  max-width: 100%;
  border-radius: 8px;
}

/* ==============================
   ХЕДЕР
============================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background-color: #111;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.header .nav a {
  margin: 0 12px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.header .nav a:hover,
.header .nav a.active {
  background-color: #ff7a50;
  color: #fff;
}

.cart-icon {
  position: relative;
  width: 32px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
}

.cart-icon span {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #ff7a50;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
}

/* ==============================
   ГЕРО-СЕКЦІЇ
============================== */
.hero, .page-hero {
  background-color: #fff;
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 40px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==============================
   КАРТОЧКИ ТОВАРІВ
============================== */
.products-section {
  max-width: 1200px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.product-card, .sale-card {
  background-color: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.product-card:hover, .sale-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-card h3, .sale-card h3 {
  margin: 12px 0;
}

.price {
  font-weight: 600;
  margin-bottom: 12px;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-weight: 400;
  margin-left: 6px;
}

/* ==============================
   КНОПКИ "У КОШИК"
============================== */
.btn-add {
  background-color: #ff7a50;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-add:hover {
  background-color: #ff5a30;
  transform: translateY(-2px) scale(1.05);
}

.btn-add:active {
  background-color: #e03b20;
  transform: scale(0.98);
}

/* ==============================
   МОДАЛЬНИЙ КОШИК
============================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal.show {
  display: flex;
}

.cart-modal-content {
  background-color: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal.show .cart-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==============================
   FAQ
============================== */
.faq-section {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid #afadad;
  border-radius: 12px;
   margin-bottom: 20px;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 30px;
}

.faq-item {
  background-color: #fff;
  padding: 18px 24px;
  margin-bottom: 15px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.faq-item h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #333;
}

.faq-item p {
  display: none;
  margin-top: 10px;
  color: #555;
}

.faq-item.open p {
  display: block;
}
/* ==============================
   ФОРМА КОНТАКТІВ ТА CHECKOUT
============================== */
.contact-section, .checkout-section {
  max-width: 600px;
  margin: 50px auto;
  padding: 0 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button, .checkout-section button {
  width: 100%;
  padding: 14px 0;
  background-color: #ff7a50;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover, .checkout-section button:hover {
  background-color: #ff5a30;
  transform: scale(1.02);
}

/* ==============================
   КНОПКИ ФІЛЬТРІВ І ПОШУКУ
============================== */
.filter-btn, .search-btn {
  background-color: #111;       /* темний фон */
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.filter-btn:hover, .search-btn:hover {
  background-color: #ff7a50;   /* при наведенні світліший колір */
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.filter-btn:active, .search-btn:active {
  background-color: #e03b20;
  transform: scale(0.98);
}
.filters-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 30px 20px;
}

#search-input, #category-filter, #price-filter {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-width: 180px;
  outline: none;
}

#search-input:focus, #category-filter:focus, #price-filter:focus {
  border-color: #ff7a50;
  box-shadow: 0 0 8px rgba(255, 122, 80, 0.4);
}

#search-input {
  flex: 1 1 250px; /* пошук займає більше місця */
}

#category-filter, #price-filter {
  cursor: pointer;
  background-color: #fff;
}

#category-filter:hover, #price-filter:hover {
  border-color: #ff7a50;
  transform: translateY(-2px) scale(1.02);
}

/* М’яка анімація для всіх фільтрів */
#search-input, #category-filter, #price-filter {
  transition: all 0.25s ease;
}
/* ==============================
   ЛЕГКА ПОЛОСА ПІД БОДІ
============================== */
.body-divider {
  width: 100%;
  height: 1px;
  background-color: #b36a6a; /* світло-сіра смужка */
  margin: 40px 0 0 0;
}

/* ==============================
   ФУТЕР
============================== */
.footer {
  display: flex;
  justify-content: space-around;
  background-color: #111;
  color: #fff;
  padding: 30px 20px;
  flex-wrap: wrap;
  position: relative;
}

.footer-block {
  margin: 10px;
}

.footer-block h3 {
  margin-bottom: 12px;
}

.footer-block a {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  transition: color 0.3s ease;
}

.footer-block a:hover {
  color: #ff7a50;
}

/* ==============================
   КОПІРАЙТ
============================== */
.footer-copyright {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: #aaa;
}


/* ==============================
   TOAST ПОВІДОМЛЕННЯ
============================== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #ff7a50;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 3000;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================
   СЕКЦІЯ АКЦІЙ
============================== */
.sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
  gap: 20px;
  padding: 30px;
}


.sale-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,.1);
  transition: transform .3s;
}

.sale-card:hover {
  transform: translateY(-5px);
}

.sale-content {
  padding: 15px;
}

.sale-badge {
  background: #ff4d4d;
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 10px;
}

.footer-divider {
  height: 1px;
  background: #ddd;
  margin-bottom: 10px;
}

.cart-btn {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #e78300, #b85717);
  color: #fff;
  font-size: 14px;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.cart {
  background: #fff;
  width: 380px;
  border-radius: 16px;
  padding: 20px;
}

.cart-header {
  display: flex;
  justify-content: space-between;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
}

.order-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg,#00c853,#009624);
  color: #fff;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Стилізація для інпутів та textarea всередині форми */
.checkout-form input,
.checkout-form textarea {
  padding: 10px 15px;
  border: 2px solid #ccc; 
  border-radius: 8px; 
  transition: all 0.3s ease; 
  font-size: 16px;
  outline: none; 
}

/* Анімація при фокусі (коли клікають на поле) */
.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: #4CAF50; 
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5); 
}

.cart-header-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #ff4d4d;
  transition: transform 0.2s ease, color 0.2s ease;
}
.cart-header-actions button:hover {
   color: #ff1a1a; 
  transform: scale(1.2);
}
.cart-header-actions button:active {
  transform: scale(0.9); 
  color: #ff6666; 
}

.cart-item-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #ff4d4d;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* Ефект при наведенні */
.cart-item-actions button:hover {
  color: #ff1a1a; 
  transform: scale(1.2);
}

/* Ефект при кліку */
.cart-item-actions button:active {
  transform: scale(0.9); 
  color: #ff6666; 
}
