/* style.css */
:root {
  --bg: #ccdaa5;
  --card-bg: rgba(255,255,255,0.85);
  --text: #222;
}

/* базовые стили */
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 20px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}

.left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px; /* фиксируем ширину левой колонки */
}

.right {
  flex: 0 0 360px;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* главная картинка упаковки */
.left img#mainPack {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: block;
  margin-bottom: 12px;
}

/* карусель */
.carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  padding-bottom: 8px;
  width: 100%;          /* фиксируем ширину карусели по левой колонке */
  max-width: 600px;
  justify-content: flex-start;
}

/* каждая картинка в карусели */
.carousel img {
  flex: 0 0 90px;        /* фиксированный размер картинки */
  height: 80px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 6px;
  border: 3px solid rgba(255,255,255,0.6);
  scroll-snap-align: start;
  transition: transform 0.2s;
}

.carousel img:hover {
  transform: scale(1.03);
}

/* скроллбар */
.carousel::-webkit-scrollbar {
  height: 8px;
}
.carousel::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}
.carousel::-webkit-scrollbar-track {
  background: transparent;
}

/* заголовки */
.title { margin-top: 0; font-size: 2rem; }

/* modal */
.modal {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
}
.modal.hidden { display: none; }
.modal .modal-content { max-width: 90%; max-height: 90%; border-radius: 8px; }
.modal .close {
  position: absolute;
  top: 20px; right: 30px;
  color: #fff; font-size: 36px;
  cursor: pointer;
}
.modal .prev, .modal .next {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  color: #fff; font-size: 48px;
  padding: 12px; cursor: pointer;
  user-select: none;
}
.modal .prev { left: 30px; }
.modal .next { right: 30px; }

/* language switcher */
.lang-switcher {
  position: fixed; right: 20px; top: 20px; z-index: 2000;
}

.hidden { display: none; }
