/* ==========================================
   POPUPER (MODAL SYSTEM) STYLES
   ========================================== */

/* Оверлей матового стекла */
.popuper-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 8, 10, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.popuper-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Контейнер модалки */
.popuper-container {
  position: relative;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  
  /*  Смешиваем акцент с прозрачностью */
  border: 1px solid color-mix(in srgb, var(--accent-color) 40%, transparent);
  box-shadow: 0 0 25px color-mix(in srgb, var(--accent-color) 35%, transparent);

  border-radius: 24px;
  overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}


.popuper-overlay.is-open .popuper-container {
  transform: scale(1) translateY(0);
}

/* Кнопка закрытия */
.popuper-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.popuper-close:hover {
  background: var(--accent-color);
  box-shadow: var(--accent-button-shadow);
  border-color: var(--accent-color);
  transform: rotate(90deg);
}

/* Сетка контента внутри модалки */
.popuper-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 40px;
}

.popuper-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  min-height: 320px;
}

.popuper-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popuper-details {
  display: flex;
  flex-direction: column;
}

.popuper-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.popuper-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

.popuper-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.popuper-description {
  font-size: 0.95rem;
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* Форма / Кнопка заказа */
.popuper-actions {
  margin-top: auto;
  display: flex;
  gap: 16px;
}

.popuper-btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.popuper-btn-primary {
  background: var(--accent-color);
  box-shadow: var(--accent-button-shadow);
  color: #222;
  border: 1px solid var(--accent-color);
}

.popuper-btn-primary:hover,
.popuper-btn-primary:focus-visible {
  background: var(--accent-color);
  box-shadow: var(--accent-button-shadow-hover);
  transform: translateY(-2px);
}

/* Адаптив */
@media (max-width: 768px) {
  .popuper-body {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    gap: 20px;
  }

  .popuper-media {
    height: 240px;
    min-height: auto;
  }
}

/* Champagne atmosphere, created on open and disposed on close. */
.popuper-container { isolation: isolate; background: var(--bg-color-2, #1b1b1b); }
.popuper-atmosphere { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .65; background: radial-gradient(ellipse at 25% 30%, color-mix(in srgb, var(--accent-color) 8%, transparent), transparent 70%); }
.popuper-container #popuper-content, .popuper-container .mode-background-2 { background: transparent !important; }
.popuper-custom-doc { position: relative; }
.product-detail { display: grid; grid-template-columns: .8fr 1fr; align-items: center; gap: 25px; padding: 64px 36px 36px; }
.product-detail-visual { background: radial-gradient(ellipse, rgba(255,255,255,.055), transparent 68%); }
.product-detail-visual img { display: block; width: 100%; height: 410px; object-fit: contain; }
.product-detail-producer { font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-color); margin-bottom: 14px; }
.product-detail-title { font-family: var(--font-title); font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 400; line-height: 1.05; margin-bottom: 16px; }
.product-detail-style { color: var(--accent-color); font-size: .78rem; line-height: 1.6; }
.product-detail-description { font-size: .86rem; line-height: 1.85; color: var(--text-color-2); margin: 22px 0; }
.product-detail-facts { border-top: 1px solid rgba(255,255,255,.12); margin: 0 0 24px; }
.product-detail-facts > div { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.product-detail-facts dt { font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-color-2); margin-bottom: 5px; }
.product-detail-facts dd { font-size: .78rem; overflow-wrap: anywhere; }
.product-detail-contact { font-family: inherit; border-radius: 50px; padding: 14px 22px; font-size: .72rem; gap: 20px; }
@media(max-width: 640px) {
  .product-detail { grid-template-columns: 1fr; gap: 12px; padding: 48px 24px 28px; }
  .product-detail-visual img { height: 260px; }
}
