/* Сброс */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #fff;
  color: #222;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

/* Логотип */
.logo {
  font-size: 24px;
  font-weight: bold;
}

/* Навигация */
.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  transition: 0.2s;
}

.nav a:hover {
  text-decoration: underline;
}

/* Корзина и бургер */
.cart-and-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-icon {
  font-size: 18px;
  text-decoration: none;
  color: #222;
}

.burger {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* ——— Адаптация под планшеты и телефоны ——— */
@media (max-width: 768px) {
  .nav {
    display: none; /* потом можно добавить выпадающее меню */
  }

  .burger {
    display: block;
  }

  .logo {
    font-size: 20px;
  }

  .cart-icon {
    font-size: 16px;
  }

  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 18px;
  }

  .burger {
    font-size: 22px;
  }

  .cart-icon {
    font-size: 14px;
  }
}
/* -------------------------- */
/* HERO-СЕКЦИЯ (вступительный блок)
/* -------------------------- */
/* HERO — ОБЁРТКА */
.hero {
  padding: 60px 0;
  background: #f8f8f8;
}

/* FLEX-КОНТЕЙНЕР */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Для мобилок */
  gap: 40px;
}

/* ЛЕВАЯ ЧАСТЬ — ТЕКСТ */
.hero-text {
  flex: 1 1 50%;
  max-width: 500px;
  margin-bottom: 20px;
}

.hero-text h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.hero-text p {
  font-size: 18px;
  margin-bottom: 25px;
  line-height: 1.5;
}

.hero-button {
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  background-color: #222;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s;
  display: inline-block;
}

.hero-button:hover {
  background-color: #444;
}

/* Кнопка формы "Оформить заказ" */
.hero-button.full-width {
  width: 100%;
  margin-top: 20px;
}


/* ПРАВАЯ ЧАСТЬ — КАРТИНКА */
.hero-image {
  flex: 1 1 45%;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* ——— АДАПТИВ ДЛЯ МОБИЛОК ——— */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .hero-button {
    font-size: 15px;
    padding: 10px 24px;
  }
}


/* -------------------------- */
/* СЕКЦИЯ С ТОВАРАМИ */
/* -------------------------- */

.product-list {
  padding: 60px 0;
  background-color: #fff;
}

.product-list h2 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.product-card {
  background-color: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s ease;
}

.image-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4; /* для вертикальных фото */
  overflow: hidden;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* чтобы не обрезало вертикальные фото */
  border-radius: 8px;
}


.product-card h3 {
  font-size: 18px;
  margin: 10px 0;
}

.price {
  font-weight: bold;
  font-size: 16px;
  color: #222;
  margin-bottom: 15px;
}

.product-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s;
}

.btn.small {
  background-color: transparent;
  border: 1px solid #999;
  color: #222;
}

.btn.small:hover {
  background-color: #eee;
}

.btn.add-to-cart {
  background-color: #222;
  color: #fff;
}

.btn.add-to-cart:hover {
  background-color: #444;
}

/* -------------------------- */
/* СТИЛИ ДЛЯ POP-UP КОРЗИНЫ */
/* -------------------------- */

/* Фон pop-up окна */
.cart-popup {
  display: none; /* Скрыто по умолчанию */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
}

/* Контент внутри pop-up */
.cart-popup-content {
  background-color: #fff;
  width: 90%;
  max-width: 500px;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

/* Кнопка закрытия pop-up */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* Список товаров в корзине */
#cart-items-list {
  list-style-type: none;
  padding: 0;
  margin-bottom: 20px;
}

#cart-items-list li {
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
}

#cart-total {
  font-size: 18px;
  font-weight: bold;
  text-align: right;
  margin-bottom: 20px;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background-color: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.checkout-btn:hover {
  background-color: #444;
}
/* -------------------------- */
/* ФОРМА ЗАКАЗА */
/* -------------------------- */
.order-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.order-form label {
  font-weight: 500;
  font-size: 15px;
}

.order-form input {
  padding: 10px 14px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.submit-btn {
  background-color: #008000;
  color: #fff;
  font-weight: bold;
  transition: background 0.3s;
}

.submit-btn:hover {
  background-color: #006600;
}
.error-message {
  color: red;
  font-size: 13px;
  margin-top: -10px;
}

input.error {
  border-color: red;
}

.about-section {
  background-color: #f8f8f8;
  padding: 60px 0;
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1 1 50%;
  max-width: 500px;
}

.about-text h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.about-image {
  flex: 1 1 45%;
  text-align: center;
}

.about-image img {
  max-width: 60%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Мобилки */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    max-width: 100%;
  }
}
.contact-section {
  background: #f9f9f9;
  padding: 60px 0;
}

.contact-content {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.contact-info {
  flex: 1 1 40%;
}

.contact-info h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 10px;
  font-size: 16px;
}

.contact-info a {
  color: #222;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-form {
  flex: 1 1 55%;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.contact-form h3 {
  margin-bottom: 15px;
  font-size: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.contact-form input[type="tel"] {
  /* такие же стили, как для других инпутов */
  padding: 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  margin-bottom: 15px;
}

.contact-form button {
  width: 100%;
}

@media (max-width: 768px) {
  .contact-content {
    flex-direction: column;
  }

  .contact-info,
  .contact-form {
    width: 100%;
  }
}

.about-section {
  background-color: #f9f9f9;
  padding: 60px 0;
}

.contact-section {
  background-color: #ffffff;
  padding: 60px 0;
}

.site-footer {
  background-color: #222;
  color: #fff;
  padding: 40px 0;
  font-size: 14px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-logo {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.footer-right a,
.footer-socials a {
  color: #fff;
  text-decoration: underline;
}

.footer-right p {
  margin-bottom: 8px;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.footer-links {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-link {
  color: #ccc;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
  color: #fff;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .footer-links {
    align-items: center;
  }
}
.footer-socials img {
  width: 32px;
  height: 32px;
  transition: transform 0.3s ease;
}

.footer-socials img:hover {
  transform: scale(1.1);
}

/* Центрирование в мобильной версии */
@media (max-width: 768px) {
  .site-footer {
    text-align: center;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    text-align: center;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }
}
