/* ---------- Сброс и базовые настройки ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #faf3eb;
  color: #3e2c1b;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Шапка ---------- */
header {
  background: linear-gradient(135deg, #3a1f0e 0%, #5c3a21 100%);
  color: #f5deb3;
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #d4a373;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}
.logo span {
  color: #d4a373;
}

nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
}
nav a {
  font-size: 18px;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
  transition: 0.3s;
}
nav a:hover {
  border-bottom-color: #d4a373;
  color: #ffe6b0;
  transform: translateY(-2px);
}

/* ГЕРОЙ-БАННЕР */
.hero {
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}
.hero-overlay {
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  padding: 60px 0;
  text-align: center;
  color: #fff;
}
.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero {
  display: inline-block;
  background: #d4a373;
  color: #3e2c1b;
  padding: 14px 40px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 18px;
  transition: 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.btn-hero:hover {
  background: #e8c49a;
  transform: scale(1.05);
}

/* ---------- БЛОК "О НАС" ---------- */
.about {
  background-size: cover;
  background-position: center;
  padding: 100px 0;
  position: relative;
  min-height: 60vh;
}
.about-text {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  color: #3e2c1b;
  text-align: center;
}
.about-overlay {
  background: rgba(60, 40, 20, 0.7);
  padding: 50px 20px;
  border-radius: 16px;
  text-align: center;
  color: #fff;
}
.about h2 {
  font-size: 32px;
  margin-bottom: 20px;
}
.about p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.8;
}
.btn-about {
  display: inline-block;
  background: #d4a373;
  color: #3e2c1b;
  padding: 12px 32px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 16px;
  transition: 0.2s;
}
.btn-about:hover {
  background: #e8c49a;
  transform: scale(1.05);
}

/* КАТЕГОРИИ ТОВАРОВ */
.categories {
  padding: 100px 0;
  background: #faf3eb;
  position: relative;
  min-height: 60vh;
}
.categories h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #3e2c1b;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}
.category-card {
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transition: 0.2s;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}
.category-icon {
  font-size: 48px;
  margin-bottom: 10px;
}
.category-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.category-card p {
  font-size: 14px;
  opacity: 0.9;
}

/* ---------- БЛОК ПРЕИМУЩЕСТВ ---------- */
.advantages {
  background-size: cover;
  background-position: center;
  padding: 100px 0;
  position: relative;
  min-height: 60vh;
}
.advantages-overlay {
  background: rgba(255, 245, 235, 0.85);
  padding: 40px 0;
  border-radius: 16px;
}
.advantages h2 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 40px;
  color: #3e2c1b;
}
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}
.advantage-item {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.7);
  border-radius: 16px;
}
.advantage-item img {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
}
.advantage-item h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.advantage-item p {
  font-size: 15px;
  color: #5c4a3a;
}

/* ---------- КАРУСЕЛЬ НОВИНОК ---------- */
.catalog {
  padding: 90px 0;
  overflow: hidden;
  position: relative;
  min-height: 90vh;
}
.catalog h2 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 30px;
  color: #4a3320;
}
.catalog h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #b68b6b;
  margin: 8px auto 0;
  border-radius: 4px;
}

.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollCarousel linear infinite;
  will-change: transform;
}

@keyframes scrollCarousel {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.carousel-wrapper:hover .carousel-track {
  animation-play-state: paused;
}

.carousel-item {
  flex: 0 0 130px;
  height: 400px;
  background: #fffaf5;
  border-radius: 16px;
  padding: 14px 12px 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1px solid #e6d4c4;
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.carousel-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Ссылка с изображением и названием */
.carousel-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.carousel-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  background: #d8c0a8;
}

.carousel-item h4 {
  font-size: 16px;
  margin: 10px 0 4px;
  color: #3e2c1b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* Кнопка "Заказать" */
.carousel-btn {
  display: block;
  background: #6a075d;
  color: #eadfdf;
  padding: 8px 0;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s;
  text-align: center;
  margin-top: 8px;
  text-decoration: none;
  width: 100%;
  flex-shrink: 0;
}
.carousel-btn:hover {
  background: #9f178d;
  transform: scale(1.02);
}

/* Кнопка "Ещё товары" под каруселью */
.catalog-more {
  text-align: center;
  margin-top: 40px;
}

.btn-more {
  display: inline-block;
  background: #d4a373;
  color: #3e2c1b;
  padding: 14px 50px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 18px;
  transition: 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-decoration: none;
}
.btn-more:hover {
  background: #e8c49a;
  transform: scale(1.05);
}

/* ---------- FAQ (Аккордеон) ---------- */
.faq-section {
  padding: 80px 0;
  background: #faf3eb;
  position: relative;
}
.faq-section h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  color: #3e2c1b;
}
.faq-section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: #b68b6b;
  margin: 8px auto 0;
  border-radius: 4px;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1px solid #e6d4c4;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: #d4a373;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 600;
  color: #3e2c1b;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(212, 163, 115, 0.08);
}

.faq-arrow {
  font-size: 16px;
  transition: transform 0.3s;
  color: #b68b6b;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 24px;
  background: #fcf8f3;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 16px 24px 24px;
}

.faq-answer p {
  font-size: 16px;
  line-height: 1.7;
  color: #5c4a3a;
  margin: 0;
}

/* ---- ФУТЕР ---- */
footer {
  background-size: cover;
  background-position: center;
  padding: 30px 0;
  color: #f5deb3;
  position: relative;
  margin-top: 0;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(30, 20, 10, 0.7);
  z-index: 0;
}

footer .container {
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.copy {
  font-size: 16px;
  opacity: 0.9;
}

.footer-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 30px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: #f5deb3;
}

.footer-contact-item img {
  width: 24px;
  height: 24px;
}

.footer-contact-icon {
  font-size: 22px;
  line-height: 1;
}

.footer-social {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.footer-social .social-link {
  display: inline-block;
  width: 44px;
  height: 44px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.footer-social .social-link img {
  width: 24px;
  height: 24px;
}

.footer-social .social-link:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}
/* ---- РАЗДЕЛИТЕЛИ МЕЖДУ СЕКЦИЯМИ ---- */
.about::before,
.categories::before,
.advantages::before,
.catalog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(to right, transparent, #d4a373, transparent);
  opacity: 0.5;
}
.hero::before {
  display: none;
}

/* Кнопка "Наверх" */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #d4a373;
  color: #3e2c1b;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 999;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-top-btn:hover {
  background: #e8c49a;
  transform: scale(1.05);
}
.scroll-top-btn:active {
  transform: scale(0.95);
}

/* АДАПТИВ */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero p {
    font-size: 17px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .categories-grid {
    grid-template-columns: 1fr 1fr;
  }
  .carousel-item {
    flex: 0 0 100px;
    height: 300px;
  }
  .carousel-item img {
    height: 200px;
  }
  .carousel-item h4 {
    font-size: 13px;
  }
  .carousel-btn {
    font-size: 12px;
    padding: 6px 0;
  }
  .btn-more {
    padding: 12px 30px;
    font-size: 16px;
  }
  footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  footer nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}





/* ---- МОДАЛКА ДЛЯ ВВОДА ПАРОЛЯ АДМИНА ---- */
.admin-password-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
}
.admin-password-content {
  background: #faf3eb;
  margin: 200px auto;
  padding: 30px 30px 40px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.admin-password-close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 28px;
  cursor: pointer;
  color: #3e2c1b;
  transition: 0.2s;
}
.admin-password-close:hover {
  color: #d4a373;
}
.admin-password-content h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #3e2c1b;
}
.admin-password-input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.admin-password-input-group input {
  flex: 1 1 180px;
  padding: 10px 16px;
  border-radius: 30px;
  border: 1px solid #d4c0b0;
  font-size: 16px;
  outline: none;
}
.admin-password-input-group input:focus {
  border-color: #b68b6b;
}
.admin-password-input-group button {
  padding: 10px 24px;
  background: #6a075d;
  color: #eadfdf;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}
.admin-password-input-group button:hover {
  background: #9f178d;
  transform: scale(1.02);
}
.admin-password-error {
  color: #b22222;
  margin-top: 12px;
  font-size: 15px;
}
/* Кнопка выхода в админке */
.logout-btn {
  background: none;
  border: none;
  color: #f5deb3;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
  transition: 0.3s;
  font-family: inherit;
}
.logout-btn:hover {
  border-bottom-color: #d4a373;
  color: #ffe6b0;
  transform: translateY(-2px);
}