/**
 * SYNC — Product Showcase & Multi-View Architecture
 * Supports Cinema Showcase, Grid View, and Sound Report Spec Table
 * with real photorealistic imagery and interactive zoom inspection.
 */

/* ========================================================
   VIEW MODE SELECTOR TOOLBAR
   ======================================================== */
.product-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 12px 18px;
  border-radius: 6px;
  background: rgba(14, 18, 25, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.view-mode-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-view-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #8c93a0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-view-mode:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-view-mode.active {
  color: #060709;
  background: #d8a760;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(216, 167, 96, 0.35);
}

.btn-view-mode.active i {
  color: #060709;
}

/* Category Filter Pills */
.showcase-category-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.btn-cat-pill {
  padding: 5px 12px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #8c93a0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cat-pill:hover,
.btn-cat-pill.active {
  color: #ffffff;
  border-color: #d8a760;
  background: rgba(216, 167, 96, 0.1);
}

/* ========================================================
   MODE 1: CINEMA MASTER SHOWCASE VIEW
   ======================================================== */
.cinema-showcase-container {
  background: #090c12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
  margin-bottom: 30px;
}

.showcase-stage-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 480px;
}

@media (max-width: 991px) {
  .showcase-stage-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Photo Stage with Interactive Zoom */
.showcase-photo-viewport {
  position: relative;
  background: radial-gradient(circle at center, #151a24 0%, #080a0f 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 380px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: crosshair;
}

@media (max-width: 991px) {
  .showcase-photo-viewport {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.showcase-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease-out, opacity 0.4s ease;
  will-change: transform;
}

/* Ambient Studio Light Rim */
.showcase-photo-viewport::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 75% 25%, rgba(216, 167, 96, 0.08) 0%, transparent 60%),
              linear-gradient(to top, rgba(9, 12, 18, 0.8) 0%, transparent 40%);
}

/* Zoom Hint Badge */
.showcase-zoom-hint {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #adb5bd;
  background: rgba(10, 12, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

/* Live VU Meter Overlay on Showcase */
.showcase-live-meter {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 12, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 5px 10px;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: #22c55e;
}

.meter-anim-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.meter-anim-bar {
  width: 2px;
  background: #22c55e;
  border-radius: 1px;
  animation: meterFlutter 1.2s infinite ease-in-out alternate;
}

.meter-anim-bar:nth-child(2) { animation-delay: 0.2s; height: 70%; }
.meter-anim-bar:nth-child(3) { animation-delay: 0.4s; height: 90%; }
.meter-anim-bar:nth-child(4) { animation-delay: 0.1s; height: 40%; }
.meter-anim-bar:nth-child(5) { animation-delay: 0.3s; height: 80%; }

@keyframes meterFlutter {
  0% { height: 25%; }
  50% { height: 100%; }
  100% { height: 45%; }
}

/* Right Specification Panel */
.showcase-info-panel {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 576px) {
  .showcase-info-panel {
    padding: 24px 20px;
  }
}

.showcase-cat-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #d8a760;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-title {
  font-family: var(--font-display, "Syncopate", sans-serif);
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.showcase-qty-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 3px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.showcase-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #9ca3af;
  margin-bottom: 22px;
}

/* Capabilities Chip List */
.showcase-caps-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.showcase-cap-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  color: #e5e7eb;
}

.showcase-cap-chip i {
  color: #d8a760;
}

/* Bottom Action Buttons */
.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Bottom Thumbnail Carousel Strip */
.showcase-filmstrip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(6, 8, 11, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #d8a760 rgba(255, 255, 255, 0.05);
}

.showcase-thumb-item {
  flex: 0 0 140px;
  height: 80px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #11141c;
  transition: all 0.2s ease;
  user-select: none;
}

.showcase-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) contrast(1.1);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.showcase-thumb-item:hover img,
.showcase-thumb-item.active img {
  filter: brightness(1.0) contrast(1.1);
  transform: scale(1.08);
}

.showcase-thumb-item.active {
  border-color: #d8a760;
  box-shadow: 0 0 14px rgba(216, 167, 96, 0.4);
}

.showcase-thumb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 6px;
  background: rgba(6, 8, 11, 0.85);
  font-family: var(--font-mono, monospace);
  font-size: 0.62rem;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(4px);
}

/* ========================================================
   MODE 2: UPGRADED FULL-BLEED CINEMA GRID VIEW
   Enforces strictly 3 products per row on desktop
   ======================================================== */
.cinema-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 991px) {
  .cinema-grid-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .cinema-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.cinema-product-card {
  background: #0a0d13;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  position: relative;
}

.cinema-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(216, 167, 96, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.cinema-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #11141c;
  overflow: hidden;
}

.cinema-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinema-product-card:hover .cinema-card-media img {
  transform: scale(1.08);
}

.cinema-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(8, 10, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d8a760;
  backdrop-filter: blur(8px);
}

.cinema-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cinema-card-cat {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: #8c93a0;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.cinema-card-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.25;
}

.cinema-card-desc {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #9ca3af;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cinema-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.cinema-card-pills .pill-item {
  font-size: 0.7rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cinema-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========================================================
   MODE 3: SOUND REPORT TECHNICAL SPEC TABLE VIEW
   ======================================================== */
.sound-report-table-wrap {
  background: #090c12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow-x: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sound-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  color: #d1d5db;
  min-width: 800px;
}

.sound-report-table th {
  background: #0f131a;
  padding: 14px 16px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #8c93a0;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sound-report-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.sound-report-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-product-thumb {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-right: 12px;
}

.table-product-name {
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.table-product-cat {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  color: #8c93a0;
}

/* ========================================================
   COMPREHENSIVE MOBILE RESPONSIVE ENGINE (SHOWCASE)
   ======================================================== */
@media (max-width: 991px) {
  .product-view-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
  }

  .showcase-category-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .showcase-category-pills::-webkit-scrollbar {
    display: none;
  }

  .btn-cat-pill {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .view-mode-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .btn-view-mode {
    justify-content: center;
    padding: 8px 6px;
    font-size: 0.7rem;
  }

  .showcase-stage-grid {
    grid-template-columns: 1fr;
  }

  .showcase-photo-viewport {
    min-height: 280px;
    max-height: 340px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .showcase-info-panel {
    padding: 26px 20px;
  }

  .showcase-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .showcase-actions .btn-cinema {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .showcase-title {
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .showcase-desc {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .showcase-caps-list {
    gap: 6px;
  }

  .showcase-cap-chip {
    font-size: 0.7rem;
    padding: 4px 9px;
  }

  .showcase-filmstrip {
    padding: 12px 14px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .showcase-thumb-item {
    flex: 0 0 105px;
    height: 64px;
  }

  .sound-report-table-wrap {
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .sound-report-table th,
  .sound-report-table td {
    padding: 10px 12px;
  }
}
