* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #1a1a1a;
  color: #ffffff;
  overflow-x: hidden;
}

.display-container {
  min-height: 100vh;
}

/* Header */
.display-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.display-header h1 {
  font-size: 36px;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.view-toggle, .control-btn {
  padding: 12px 24px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.view-toggle:hover, .control-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

.view-toggle.active {
  background: white;
  color: #667eea;
  border-color: white;
}

/* Grid View */
.grid-view {
  display: none;
  padding: 40px;
}

.grid-view.active {
  display: block;
}

.vignettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 30px;
  max-width: 1600px;
  margin: 0 auto;
}

.vignette-card {
  background: #2a2a2a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.vignette-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 48px rgba(102, 126, 234, 0.4);
}

.vignette-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.vignette-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vignette-info {
  padding: 25px;
}

.vignette-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
}

.vignette-info h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #ffffff;
}

.vignette-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.badge {
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.vignette-meta {
  font-size: 14px;
  color: #999;
  margin-bottom: 12px;
}

.vignette-meta span {
  margin-right: 15px;
}

.vignette-description {
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 15px;
}

.product-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #3a3a3a;
}

.product-tag {
  padding: 4px 10px;
  background: #3a3a3a;
  border-radius: 12px;
  font-size: 11px;
  color: #aaa;
}

/* Slideshow View */
.slideshow-view {
  display: none;
  padding: 40px;
  min-height: calc(100vh - 120px);
}

.slideshow-view.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.slideshow-container {
  position: relative;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.slideshow-content {
  background: #2a2a2a;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}

.slide {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.slide.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-image-container {
  width: 100%;
  height: 500px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
}

.slide-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-info {
  padding: 40px;
}

.slide-info h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.slide-info .vignette-badges {
  margin-bottom: 20px;
}

.slide-info .vignette-meta {
  font-size: 16px;
  margin-bottom: 20px;
}

.slide-info .vignette-description {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 25px;
}

.slide-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 25px;
}

.slide-product-card {
  background: #1a1a1a;
  padding: 15px;
  border-radius: 12px;
  border: 1px solid #3a3a3a;
}

.slide-product-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #ffffff;
}

.slide-product-card .product-category {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.slide-product-card .product-price {
  font-size: 18px;
  color: #667eea;
  font-weight: 700;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 20px 25px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 10;
}

.slide-nav:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

.slide-nav.prev {
  left: -70px;
}

.slide-nav.next {
  right: -70px;
}

.slide-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.indicator {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: white;
  width: 40px;
  border-radius: 6px;
}

/* Detail Modal */
.detail-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.detail-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.detail-content {
  background: #2a2a2a;
  border-radius: 20px;
  width: 100%;
  max-width: 1200px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.8);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-detail {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 32px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.close-detail:hover {
  background: rgba(231, 76, 60, 0.8);
  border-color: rgba(231, 76, 60, 1);
}

#detail-body {
  padding: 40px;
}

.detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.detail-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
}

.detail-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.detail-product-card {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #3a3a3a;
  transition: border-color 0.3s ease;
}

.detail-product-card:hover {
  border-color: #667eea;
}

.detail-product-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.detail-product-card .product-detail {
  font-size: 14px;
  color: #999;
  margin: 6px 0;
}

.detail-product-card .product-price {
  font-size: 24px;
  color: #667eea;
  font-weight: 700;
  margin: 15px 0 10px 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 100px 20px;
  color: #666;
}

.empty-state h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

/* Fullscreen */
.display-container:-webkit-full-screen {
  width: 100%;
  height: 100%;
}

.display-container:-moz-full-screen {
  width: 100%;
  height: 100%;
}

.display-container:fullscreen {
  width: 100%;
  height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .display-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .display-header h1 {
    font-size: 28px;
  }

  .vignettes-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .slideshow-view {
    padding: 20px;
  }

  .slide-nav {
    padding: 15px 20px;
    font-size: 18px;
  }

  .slide-nav.prev {
    left: 10px;
  }

  .slide-nav.next {
    right: 10px;
  }

  .slide-products {
    grid-template-columns: 1fr;
  }

  .detail-products {
    grid-template-columns: 1fr;
  }
}
