/* =========================================
   1. БАЗОВЫЕ НАСТРОЙКИ
   ========================================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'IBM Plex Mono', monospace;
  cursor: none;
  color: #000;
}

#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  z-index: -2;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
}

/* =========================================
   2. ЛАЙАУТ (ДВА ОКНА)
   ========================================= */
.wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 20px;
  z-index: 10;
  max-height: 95vh;
}

.container {
  width: 450px;
  height: 500px;
  background: #fff;
  border: 1px dashed #000;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 15px 15px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* =========================================
   3. ЛЕВОЕ МЕНЮ И АККОРДЕОН
   ========================================= */
.links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  border-bottom: 1px dashed #000;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.links a { color: #000; text-decoration: none; }
.links a:hover { text-decoration: underline; }

.h1 { text-align: left; }
.h2 { text-align: center; }
.h3 { text-align: right; }

.top-image { width: 100%; margin-bottom: 10px; display: block; }

.section { margin-bottom: 5px; }

.header {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header::after {
  content: ""; display: block; width: 100%; height: 0.9px;
  background: #000; position: absolute; bottom: 0; left: 0; z-index: 1;
}

.toggle-indicator { position: relative; z-index: 2; padding-left: 10px; }

.content {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0; padding: 0; font-size: 13px;
}
.section.active .content { opacity: 1; padding: 10px 0; }

/* =========================================
   4. МАГАЗИН (ПРАВОЕ ОКНО)
   ========================================= */
.shop-header-line {
  display: flex; justify-content: space-between; margin-bottom: 15px;
  padding-bottom: 10px; border-bottom: 1px dashed #000;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding-bottom: 20px;
}

.product-card {
  cursor: pointer; opacity: 0.95; transition: opacity 0.2s;
  display: flex; flex-direction: column;
}
.product-card:hover { opacity: 1; }

/* --- ФИКС РАЗМЕРА 3D --- */
.media-container {
  width: 100%;
  aspect-ratio: 1 / 1; /* Квадрат */
  background: #f7f7f7;
  margin-bottom: 8px;
  position: relative; /* Чтобы держать absolute внутри */
  overflow: hidden;
  border: 1px solid transparent;
}

.product-card:hover .media-container { border: 1px dashed #000; }

/* Картинка */
.product-image {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Канвас (3D) жестко фиксируем */
.media-container canvas {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}

.product-info {
  display: flex; justify-content: space-between; font-size: 12px; line-height: 1.2;
}
.p-name { text-align: left; max-width: 65%; }
.p-price { text-align: right; font-weight: bold; }

/* =========================================
   5. КУРСОР
   ========================================= */
.pixel {
  position: fixed; width: 20px; height: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(3px);
  image-rendering: pixelated; pointer-events: none;
  z-index: 9999; animation: pixel-fade 0.4s ease-out forwards;
}
@keyframes pixel-fade {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* =========================================
   6. МОБИЛЬНАЯ ВЕРСИЯ
   ========================================= */
@media (max-width: 950px) {
  .wrapper {
    display: block; width: 90vw; height: 90vh;
    overflow-y: auto; flex-direction: column;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
  }
  .wrapper::-webkit-scrollbar { width: 0; height: 0; }
  .wrapper { -ms-overflow-style: none; scrollbar-width: none; }
  
  .container {
    width: 100%; height: auto; min-height: 450px; margin-bottom: 20px;
  }
}