/* ==== Cookie Banner ==== */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 300px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9em;
  z-index: 2000;
}
.cookie-banner span {
  flex: 1;
  margin-right: 8px;
}
.cookie-banner .cookie-link {
  color: #007BFF;
  text-decoration: underline;
  cursor: pointer;
}
.cookie-banner .cookie-link:hover {
  opacity: 0.8;
}
.cookie-banner button {
  background: #007BFF;
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

/* ==== Плавная анимация появления ==== */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Сброс стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #f4f7f6, #e8ecf1);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}

/* ========================= ШАПКА ========================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  z-index: 1000;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}
header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.logo a {
  text-decoration: none;
  font-size: 1.8em;
  font-weight: 600;
  color: #fff;
  transition: color 0.3s;
}
header.scrolled .logo a {
  color: #007BFF;
}

/* ========================= НАВИГАЦИЯ ========================= */
.main-nav {
  flex: 1; /* растягиваем меню на всё доступное пространство */
}
header nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
  justify-content: space-evenly; /* равномерное распределение */
  width: 100%;
}
header nav li a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  color: #fff;
  transition: color 0.3s, transform 0.3s;
}
header.scrolled nav li a {
  color: #007BFF;
}

/* ========================= КНОПКИ ПРОФИЛЯ (скрываем дублирование) ==== */
.header-buttons {
  display: none;
}

/* ========================= КОРЗИНА ========================= */
.header-right {
  display: flex;
  align-items: center;
  gap: 25px;
}
.cart-icon {
  font-size: 1.8em;
  color: #888;
  transition: color 0.3s;
}
.cart-count {
  font-size: 0.9em;
  background: transparent;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  margin-left: 4px;
  transition: background 0.3s, color 0.3s;
}
header.scrolled .cart-count {
  background: #007BFF;
  color: #fff;
}

/* ========================= ПОДПРЫГИВАЮЩАЯ АНИМАЦИЯ ДЛЯ КНОПОК В ШАПКЕ ========================= */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
header nav li a {
  display: inline-block; /* чтобы анимация работала */
}
header nav li a:hover {
  animation: bounce 0.4s;
}

/* ========================= HERO ========================= */
.hero-gif {
  position: relative;
  width: 100%;
  max-height: 800px;
  overflow: hidden;
}
.hero-gif img {
  width: 100%;
  height: auto;
  object-fit: cover;
  animation: fadeIn 1.2s ease-in-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.hero-overlay {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 20px 30px;
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  backdrop-filter: blur(5px);
  animation: slideDown 1s ease-out;
  transition: color 0.3s, transform 0.3s;
}
@keyframes slideDown {
  from {
    transform: translate(-50%, -70%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}
.hero-overlay h1,
.hero-overlay p {
  color: #fff;
  transition: color 0.3s, transform 0.3s;
}
.hero-overlay:hover h1,
.hero-overlay:hover p {
  color: #007BFF;
  transform: scale(1.05);
}
.hero-overlay h1 {
  font-size: 2.8em;
  margin-bottom: 15px;
  line-height: 1.2;
}
.hero-overlay p {
  font-size: 1.4em;
}

/* ========================= ОСНОВНОЙ КОНТЕЙНЕР ========================= */
.main-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 120px auto 40px;
  gap: 20px;
  padding: 0 20px;
}
.left-column {
  flex: 1 1 70%;
}
.right-column {
  flex: 1 1 28%;
}

/* ========================= СЛАЙДЕР ========================= */
.slider-container {
  position: relative;
  width: 100%;
}
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 700px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
  z-index: 1;
}
.slider-img.active {
  opacity: 1;
  z-index: 2;
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  font-size: 1.8em;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
  z-index: 100;
}
.slider-arrow-left {
  left: 15px;
}
.slider-arrow-right {
  right: 15px;
}
.slider-container:hover .slider-arrow {
  background: rgba(255,255,255,1);
}
.slider-arrow:hover {
  transform: translateY(-50%) scale(1.1);
}

/* ========================= ВЫБОР МОДИФИКАЦИИ ========================= */
.purchase-section {
  background: #007BFF;
  border-radius: 12px;
  padding: 40px 30px;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  animation: fadeInUp 1.2s ease-out;
}
@keyframes fadeInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.purchase-section h2 {
  font-size: 2em;
  text-align: center;
  margin-bottom: 30px;
}
.purchase-options {
  margin-bottom: 30px;
}
.option-group {
  margin-bottom: 20px;
}
.option-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

/* Цвет камеры */
#colorOptions {
  display: flex;
  gap: 10px;
}
.option-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-clip: content-box;
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  text-indent: -9999px;
}
.option-btn[data-color="black"] {
  background: #000;
}
.option-btn[data-color="white"] {
  background: #fff;
}
.option-btn:hover,
.option-btn.selected {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.7);
}

/* Размер карты памяти */
#memoryOptions {
  display: flex;
  gap: 12px;
}
.memory-btn {
  padding: 10px 20px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.memory-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}
.memory-btn.selected {
  background: #fff;
  color: #007BFF;
}

/* Итоговая цена */
.price-display {
  text-align: center;
  font-size: 1.8em;
  margin: 30px 0;
}

/* Стили для счётчика количества */
#quantitySelector {
  display: flex;
  gap: 20px;
  align-items: center;
}
.qty-btn {
  background: #fff;
  border: 2px solid #007BFF;
  color: #007BFF;
  font-size: 1.2em;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.qty-btn:hover {
  background: #e0efff;
  transform: scale(1.05);
}
#quantityValue {
  font-size: 1.4em;
  font-weight: 600;
  color: #fff;
}

/* Кнопки корзины */
.purchase-buttons #addToCartBtn,
.purchase-buttons #goToCartBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 40px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: background 0.3s ease, transform 0.2s ease;
  font-size: 1em;
}
#addToCartBtn {
  background: #fff url('../assets/carticon.png') no-repeat 15px center;
  background-size: 24px 24px;
  color: #007BFF;
}
#addToCartBtn:hover {
  background-color: #e0efff;
  transform: scale(1.05);
}
#goToCartBtn {
  width: 100%;
  background: #fff;
  color: #007BFF;
  margin-top: 10px;
}
#goToCartBtn:hover {
  background-color: #e0efff;
  transform: scale(1.05);
}

/* ========================= ОПИСАНИЕ ПРОДУКТА ========================= */
.camera-description {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}
.description-container {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  animation: fadeInUp 1.2s ease-out;
}
.description-container h2 {
  color: #007BFF;
  font-size: 1.8em;
  margin-bottom: 15px;
  text-align: center;
}
.description-container p {
  color: #555;
  font-size: 1em;
  line-height: 1.6;
  text-align: justify;
}

/* ========================= ВКЛАДКИ ========================= */
.tabs-block {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tab-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  animation: fadeInUp 1s ease both;
}
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f9f9f9;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1.2ем;
  font-weight: 600;
  color: #007BFF;
}
.tab-header:hover {
  background: #f0f0f0;
}
.tab-header .arrow {
  transition: transform 0.3s;
}
.tab-header.opened .arrow {
  transform: rotate(180deg);
}
.tab-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.tab-content.open {
  max-height: 800px;
  padding: 20px;
}
.char-table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.char-table th,
.char-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  font-size: 0.9em;
  background: #fff;
  color: #555;
}
.char-table th {
  background: #007BFF;
  color: #fff;
  font-weight: 600;
  text-align: left;
}
.faq-item {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-left: 4px solid #007BFF;
  background: #f0f8ff;
  border-radius: 4px;
  transition: background 0.2s;
}
.faq-item:hover {
  background: #e6f7ff;
}
.faq-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05em;
  color: #007BFF;
}
.faq-item p {
  margin: 0 0 8px;
  line-height: 1.5;
  color: #333;
}

/* ========================= О ПРОДУКТЕ ========================= */
.product-section {
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.product-section h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
  color: #007BFF;
}
.product-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  animation: fadeInUp 0.8s ease both;
}
.product-item.reverse {
  flex-direction: row-reverse;
}
.product-img,
.product-text {
  flex: 1 1 200px;
  min-width: 200px;
}
.product-img img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-img img:hover {
  transform: scale(1.03);
}
.product-text h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
  font-weight: 600;
  color: #007BFF;
  text-align: center;
}
.product-text p {
  font-size: 0.95em;
  line-height: 1.5;
  color: #555;
  text-align: justify;
}

/* ========================= КОНТАКТЫ ========================= */
#contact {
  max-width: 100%;
  padding: 40px 20px;
  text-align: center;
  background: #f9f9f9;
  border-top: 1px solid #ddd;
}
#contact h2 {
  font-size: 1.8em;
  margin-bottom: 15px;
  font-weight: 600;
  color: #007BFF;
}
#contact p {
  font-size: 1em;
  color: #555;
  margin-bottom: 5px;
}

/* ========================= FOOTER ========================= */
footer {
  text-align: center;
  padding: 15px 10px;
  font-size: 0.9em;
  color: #555;
  background: #f9f9f9;
  border-top: 1px solid #ddd;
  margin-top: 20px;
}

/* ========================= Responsive ========================= */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    margin-top: 100px;
  }
  header {
    padding: 15px 20px;
  }
  .left-column,
  .right-column {
    flex: 1 1 100%;
  }
  .slider-wrapper {
    height: 450px;
  }
  .hero-overlay h1 {
    font-size: 2em;
  }
  .hero-overlay p {
    font-size: 1.1em;
  }
}