/**
 * Package Display Styles - Vertical Layout with Thumbnails
 * Large image on top, thumbnails below
 */

package-carousel {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.package-carousel {
  width: 100%;
}

/* Main display area with large image */
.pc-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: auto;
  position: relative;
}

/* Large image container with 3D effect */
.pc-main-display {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: #f5f7fa !important; /* Fallback for very old browsers */
  background: -webkit-linear-gradient(315deg, #f5f7fa 0%, #c3cfe2 100%) !important; /* Safari/Chrome/iOS */
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important; /* Standard */
  margin-bottom: 20px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.1),
    0 1px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.pc-main-image {
  max-width: 90%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  margin-bottom: 50px;
}

/* Navigation arrows on sides of main image */
.pc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  z-index: 10;
  outline: none;
  scroll-margin-top: 100px;
}

.pc-arrow:focus {
  outline: none;
}

.pc-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.pc-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.pc-arrow.pc-prev {
  left: 20px;
}

.pc-arrow.pc-next {
  right: 20px;
}

.pc-arrow svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* Selected indicator banner */
.pc-selected-banner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #28a745;
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  font-size: 16px;
}

.pc-checkmark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-checkmark svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* Thumbnails container */
.pc-thumbnails {
  width: 100%;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.pc-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.pc-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.pc-thumbnails::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.pc-thumbnails::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Individual thumbnail */
.pc-thumbnail {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border: 3px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  background: white;
  outline: none;
  scroll-margin-top: 100px;
}

.pc-thumbnail:focus {
  outline: none;
}

.pc-thumbnail:hover {
  border-color: #ccc;
  transform: translateY(-2px);
}

.pc-thumbnail.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.pc-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pc-thumbnail-checkmark {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #28a745;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.pc-thumbnail.selected .pc-thumbnail-checkmark {
  display: flex;
}

.pc-thumbnail-checkmark svg {
  width: 12px;
  height: 12px;
  fill: white;
}

/* Package info below thumbnails - HIDDEN */
.pc-package-info {
  display: none !important;
}

.pc-package-title {
  display: none !important;
}

.pc-package-price {
  display: none !important;
}

.pc-package-count {
  display: none !important;
}

/* Hide default controls - we use custom ones */
.pc-controls {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .pc-main-display {
    min-height: 300px;
  }

  .pc-main-image {
    max-height: 300px;
  }

  .pc-arrow {
    width: 36px;
    height: 36px;
  }

  .pc-arrow svg {
    width: 20px;
    height: 20px;
  }

  .pc-arrow.pc-prev {
    left: 10px;
  }

  .pc-arrow.pc-next {
    right: 10px;
  }

  .pc-thumbnail {
    width: 70px;
    height: 70px;
  }

  .pc-selected-banner {
    font-size: 14px;
    padding: 10px 15px;
  }
}

@media (max-width: 480px) {
  .pc-main-display {
    min-height: 250px;
  }

  .pc-main-image {
    max-height: 250px;
  }

  .pc-thumbnail {
    width: 60px;
    height: 60px;
  }

  .pc-selected-banner {
    font-size: 13px;
    padding: 8px 12px;
  }

  .pc-package-title {
    font-size: 16px;
  }

  .pc-package-price {
    font-size: 20px;
  }
}

/* Print */
@media print {
  .pc-arrow,
  .pc-thumbnails,
  .pc-package-count {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pc-arrow,
  .pc-thumbnail {
    transition: none !important;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .pc-main-display {
    background: #2a2a2a;
  }

  .pc-thumbnail {
    background: #2a2a2a;
  }

  .pc-package-title {
    color: #fff;
  }

  .pc-package-price {
    color: var(--primary-color);
  }
}
