/* Local Font */
@font-face {
  font-family: 'Red Hat Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/RedHatMono-Variable.woff2') format('woff2');
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #0b0b0c url('images/texture.png') repeat center;
  color: #ffffff;
  font-family: 'Red Hat Mono', monospace, sans-serif;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.5rem 4rem 1.5rem;
  -webkit-font-smoothing: antialiased;
}

/* Layout Container */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 500px;
  width: 100%;
  animation: fadeIn 0.8s ease-out;
}

.detail-container {
  max-width: 660px;
}

/* Brand (Logo + Heading) */
.brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
}

.brand-text {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  line-height: 1;
}

/* Subtitle Tagline */
.tagline {
  font-size: 1.15rem;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2rem;
}

/* X (Twitter) Link Button */
.x-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.x-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.x-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Entangled Squares Divider */
.divider-wrapper {
  margin: 2.5rem 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.divider-img {
  width: 100%;
  max-width: 340px;
  height: auto;
  opacity: 0.85;
}

/* Single-Column Catalog List */
.catalog {
  width: 100%;
}

.catalog-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

.catalog-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.catalog-divider {
  width: 60px;
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin-bottom: 0.25rem;
}

.catalog-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.catalog-item-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.catalog-artist {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.kofi-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.kofi-link:hover {
  opacity: 1;
  transform: scale(1.15);
}

.kofi-icon {
  width: 20px;
  height: auto;
  display: block;
}

.catalog-media-wrapper {
  width: 100%;
  max-width: 380px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.03);
}

.catalog-media {
  width: 100%;
  height: auto;
  display: block;
}

.more-info-link {
  display: inline-block;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}

.more-info-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.home-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.home-icon-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.home-icon {
  width: 20px;
  height: 20px;
}

/* Amazon-Style Condensed Product Gallery */
.product-gallery {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
}

/* Pricing & Purchase Section on Detail Page */
.purchase-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.25rem;
  width: 100%;
}

.price-display {
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.buy-options {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 520px;
}

.buy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
}

.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.buy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.shipping-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.03em;
}

.main-media-box {
  position: relative;
  flex: 1;
  max-width: 440px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  background: rgba(255, 255, 255, 0.03);
  aspect-ratio: 3 / 4;
}

/* Loading Placeholder Spinner Overlay */
.main-media-box.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  margin-left: -14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: mediaSpinner 0.6s linear infinite;
  z-index: 12;
  pointer-events: none;
}

@keyframes mediaSpinner {
  to {
    transform: rotate(360deg);
  }
}

.main-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Magnifying Glass Zoom Button (bottom right on hover) */
.zoom-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease, background 0.2s ease;
  z-index: 10;
}

.main-media-box:hover .zoom-btn {
  opacity: 1;
  visibility: visible;
}

.zoom-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.zoom-icon {
  width: 18px;
  height: 18px;
}

/* Full Size Zoom Lightbox Overlay */
.zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
  padding: 1.5rem;
}

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

.zoom-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.zoom-modal-content img,
.zoom-modal-content video {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.25s ease-out;
}

.zoom-hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.6);
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slight Fade-in Animation for Gallery Media Switch */
.fade-media {
  animation: slightFade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slightFade {
  from {
    opacity: 0.4;
    transform: scale(0.995);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.thumb-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.thumb-btn {
  position: relative;
  width: 64px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.04);
}

.thumb-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  backdrop-filter: blur(4px);
}

/* Entrance Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Adjustments */
@media (max-width: 580px) {
  body {
    padding: 2rem 1rem;
  }

  .product-gallery {
    flex-direction: column;
    align-items: center;
  }

  .main-media-box {
    max-width: 100%;
  }

  .thumb-column {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .thumb-btn {
    width: 54px;
    height: 68px;
  }

  .brand {
    gap: 0.85rem;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-text {
    font-size: 2.4rem;
  }

  .tagline {
    font-size: 0.95rem;
    letter-spacing: 0.18em;
  }

  .catalog-media-wrapper {
    max-width: 100%;
  }

  .catalog-item-title {
    font-size: 1.15rem;
  }

  .zoom-btn {
    opacity: 1;
    visibility: visible;
  }
}
