/* ===== Detail Page ===== */
.detail-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== Back Button ===== */
.back-bar {
  padding: 1rem 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.back-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-white);
}

/* ===== Detail Product Card ===== */
.detail-product-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .detail-product-card {
    flex-direction: row;
  }
}

.detail-cover {
  position: relative;
  width: 100%;
  min-height: 260px;
}

@media (min-width: 768px) {
  .detail-cover {
    width: 60%;
    min-height: auto;
    padding: 20px;
    box-sizing: border-box;
  }
}

.detail-cover .domain-cover {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: 0;
}

@media (min-width: 768px) {
  .detail-cover .domain-cover {
    border-radius: 0;
    min-height: 480px;
  }
}

.detail-cover-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
}

.detail-info {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .detail-info {
    width: 40%;
    padding: 1.5rem 1.75rem;
  }
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
}

.detail-product-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.detail-product-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  flex: 1;
}

.detail-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.detail-stat-icon {
  font-size: 0.9rem;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.detail-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.detail-price-label {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ===== Materials Grid (V2.6.2) ===== */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.material-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  transition: all 0.2s ease;
}

.material-card:hover {
  border-color: #f9a8d4;
  box-shadow: 0 8px 20px rgba(244, 114, 182, 0.12);
  transform: translateY(-2px);
}

.material-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.material-content {
  flex: 1;
  min-width: 0;
}

.material-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.material-format {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.material-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
}

/* Legacy include-item for compatibility */
.include-item {
  display: none; /* Using material-card instead */
}

.include-icon {
  display: none;
}

.include-text {
  display: none;
}

/* ===== Preview Gallery ===== */
.preview-gallery {
  margin-bottom: 1.5rem;
}

.preview-gallery-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.preview-thumb {
  aspect-ratio: 3/2;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-light);
}

.preview-thumb:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0.3;
  background: var(--bg-light);
}

/* ===== Info Cards ===== */
.info-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.info-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-title-icon {
  font-size: 1.125rem;
}

/* ===== Summary ===== */
.summary-text {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Highlights ===== */
.highlights-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.highlight-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.highlight-text {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* ===== Files List ===== */
.files-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.file-icon {
  font-size: 1.125rem;
  color: var(--secondary);
}

.file-name {
  flex: 1;
  color: var(--text-primary);
}

.file-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background: var(--secondary-light);
  color: var(--secondary);
  border-radius: 50px;
}

/* ===== Description ===== */
.description-text {
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: justify;
}

/* V2.6.4 Description Sections with 【】titles */
.description-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.description-section {
  padding: 16px 18px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #f1f5f9;
}

.description-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px 0;
}

.description-section p {
  font-size: 15px;
  line-height: 1.85;
  color: #4b5563;
  margin: 0;
}

/* V2.6.4 Highlight Cards */
.highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #f1f5f9;
  margin-bottom: 12px;
}

.highlight-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-content {
  flex: 1;
}

.highlight-content-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}

.highlight-content-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
}

/* ===== V2.9.8 Purchase Bar (Always Closed) ===== */
.purchase-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-top: 2px solid #f59e0b;
  padding: 1rem;
  box-shadow: 0 -4px 12px rgba(245, 158, 11, 0.15);
  z-index: 100;
}

.purchase-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.purchase-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.purchase-status-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #92400e;
}

.purchase-label {
  font-size: 0.78rem;
  color: #b45309;
  margin-top: 0.15rem;
}

/* Detail page status row (within info column) */
.detail-status-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.detail-status-text {
  font-size: 1rem;
  font-weight: 700;
  color: #92400e;
}

.detail-status-sub {
  font-size: 0.78rem;
  color: #b45309;
}

/* Scenes list */
.scenes-list {
  margin: 0;
  padding: 0 0 0 1.2rem;
  list-style: disc;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.scenes-list li {
  margin-bottom: 0.4rem;
}

.tips-text {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  margin: 0;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-light);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.25rem;
}

.modal-preview {
  width: 100%;
  border-radius: var(--radius);
  background: var(--bg-light);
}

/* ===== Not Found ===== */
.not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.not-found-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.not-found-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.not-found-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ===== Purchase Modal ===== */
.purchase-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.purchase-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.purchase-modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.purchase-modal-overlay.active .purchase-modal {
  transform: scale(1);
}

.purchase-modal-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.purchase-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.purchase-modal-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.purchase-modal-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ===== Detail Page Responsive ===== */
@media (max-width: 768px) {
  .detail-page {
    padding-bottom: 90px; /* Space for fixed purchase bar */
  }

  /* Cover - full width stacked */
  .detail-cover {
    min-height: 280px;
    width: 100%;
  }

  .detail-cover .domain-cover {
    min-height: 280px;
  }

  /* PPT Carousel mobile */
  .ppt-carousel-container {
    min-height: 280px;
  }

  .ppt-carousel-main {
    min-height: 240px;
  }

  .detail-cover-badge {
    top: 0.5rem;
    left: 0.5rem;
  }

  /* Info section stacked */
  .detail-info {
    padding: 1rem;
  }

  .detail-product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .detail-product-summary {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .detail-stats {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .detail-stat {
    font-size: 0.8rem;
  }

  .detail-price-row {
    padding-top: 0.75rem;
  }

  .detail-price {
    font-size: 1.5rem;
  }

  .detail-price-label {
    font-size: 0.7rem;
  }

  .detail-badges {
    margin-bottom: 0.625rem;
    gap: 0.25rem;
  }

  /* Preview Grid */
  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  /* Materials Grid - 1 column on mobile */
  .materials-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .material-card {
    padding: 14px 16px;
    gap: 12px;
  }

  .material-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .material-title {
    font-size: 15px;
  }

  .material-format {
    font-size: 12px;
  }

  .material-desc {
    font-size: 13px;
  }

  /* Includes Grid - 2 columns */
  .includes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .include-item {
    padding: 0.5rem 0.625rem;
  }

  .include-icon { font-size: 1rem; }
  .include-text { font-size: 0.8rem; }

  /* Info Sections */
  .info-section {
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius);
  }

  .info-title {
    font-size: 0.95rem;
    margin-bottom: 0.625rem;
  }

  .highlight-item {
    padding: 0.5rem 0.625rem;
  }

  .highlight-text { font-size: 0.875rem; }

  .file-item {
    padding: 0.5rem 0.625rem;
    font-size: 0.85rem;
  }

  /* Fixed Purchase Bar */
  .purchase-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    z-index: 200;
  }

  .purchase-bar-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .purchase-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
  }

  .purchase-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
  }

  .purchase-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
  }

  .purchase-bar .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    min-height: 48px; /* Touch target >= 44px */
    min-width: 120px;
  }

  /* Purchase Modal - mobile friendly */
  .purchase-modal {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
    max-width: 320px;
  }

  .purchase-modal-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
  }

  .purchase-modal-title {
    font-size: 1.1rem;
  }

  .purchase-modal-text {
    font-size: 0.9rem;
  }

  /* Preview modal */
  .modal {
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-close {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .detail-page {
    padding-bottom: 80px;
  }

  .detail-cover {
    min-height: 160px;
  }

  .detail-cover .domain-cover {
    min-height: 160px;
  }

  .detail-product-title {
    font-size: 1rem;
  }

  .purchase-price {
    font-size: 1.35rem;
  }

  .purchase-bar .btn-lg {
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    min-height: 44px;
  }

  .includes-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
  }

  .include-item {
    padding: 0.4rem 0.5rem;
  }

  .include-text { font-size: 0.75rem; }

  .info-section {
    padding: 0.875rem;
    margin-bottom: 0.625rem;
  }
}

/* ===== V2.6.3 PPT Carousel 4:3 Card ===== */
.ppt-carousel-container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ppt-carousel-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: auto;
  max-height: 460px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ppt-carousel-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 12px;
  box-sizing: border-box;
}

/* Carousel Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  line-height: 1;
}

.carousel-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel-arrow-left {
  left: 10px;
}

.carousel-arrow-right {
  right: 10px;
}

/* Representative PPT thumbnails */
.ppt-carousel-thumbnails {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #fff;
  overflow-x: auto;
  box-sizing: border-box;
}

.carousel-thumbnail {
  flex: 0 0 80px;
  width: 80px;
  height: 54px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #f3f4f6;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.72;
  transition: all 0.2s;
}

.carousel-thumbnail.active {
  border-color: var(--primary, #3b82f6);
  opacity: 1;
}

.carousel-thumbnail:hover {
  opacity: 1;
}

.carousel-thumbnail:focus-visible {
  outline: 2px solid var(--primary, #3b82f6);
  outline-offset: 2px;
}

/* V2.9.8 已移除 carousel-debug-info */
