/* Catalog Page */
.catalog-page {
  width: 100%;
  overflow-x: hidden;
  background-color: #f9f9f9;
}

/* Hero Section */
.catalog-hero {
  background: linear-gradient(135deg, #001f3f 0%, #003366 100%);
  color: #fff;
  padding: calc(var(--navbar-height) + 2rem) 2rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.catalog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.catalog-hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.catalog-hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(45deg, #fff, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.catalog-hero p {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 2rem;
  opacity: 0.95;
  line-height: 1.6;
}

.catalog-hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 1rem 2.5rem;
  background: #d4af37;
  color: #001f3f;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-hero:hover {
  background: #f3e5ab;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.btn-hero-secondary {
  background: transparent;
  color: #001f3f;
  border: 2px solid #001f3f;
}

.btn-hero-secondary:hover {
  background: #001f3f;
  color: #d4af37;
}

/* Catalog Viewer Section */
.catalog-viewer-section {
  padding: 4rem 0;
  background: #fff;
  position: relative;
}

.catalog-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #001f3f;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.catalog-header h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #d4af37;
}

.catalog-header p {
  color: #666;
  font-size: 1.1rem;
  margin-top: 2rem;
}

/* Flipbook Container */
.flipbook-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.flipbook-wrapper {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(0, 31, 63, 0.1);
  border: 1px solid rgba(0, 31, 63, 0.1);
}

/* Controls Bar */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: #f9f9f9;
  border-radius: 12px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  border: 1px solid rgba(0, 31, 63, 0.1);
}

.page-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #001f3f;
  font-weight: 600;
}

.catalog-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #001f3f;
}

.control-buttons {
  display: flex;
  gap: 0.5rem;
}

.control-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #001f3f;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 31, 63, 0.1);
  text-decoration: none;
}

.control-btn:hover {
  background: #d4af37;
  color: #001f3f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.control-btn.active {
  background: linear-gradient(135deg, #d4af37, #b8963e);
  color: #001f3f;
  border-color: #d4af37;
}

.control-btn svg {
  width: 20px;
  height: 20px;
}

.download-btn {
  background: linear-gradient(135deg, #d4af37, #b8963e);
  color: #001f3f;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #b8963e, #d4af37);
}

/* PDF Viewer Area */
.pdf-viewer-area {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  min-height: 600px;
  background: #f9f9f9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 31, 63, 0.1);
}

.pdf-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #001f3f;
  z-index: 10;
}

.pdf-loading p {
  color: #001f3f;
  font-weight: 500;
}

.loading-hint {
  color: #666 !important;
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(212, 175, 55, 0.3);
  border-top-color: #d4af37;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-progress-bar {
  width: 200px;
  height: 6px;
  background: rgba(0, 31, 63, 0.1);
  border-radius: 3px;
  margin: 1rem auto;
  overflow: hidden;
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #f0d78c);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.loading-percent {
  font-size: 0.9rem;
  color: #d4af37;
  font-weight: 600;
}

/* PDF Navigation */
.pdf-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 31, 63, 0.1);
}

.pdf-nav-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f9f9f9;
  color: #001f3f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 31, 63, 0.1);
}

.pdf-nav-btn:hover:not(:disabled) {
  background: #d4af37;
  color: #001f3f;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.pdf-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.pdf-nav-btn svg {
  width: 20px;
  height: 20px;
}

.pdf-page-info {
  color: #001f3f;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.pdf-page-info input {
  width: 50px;
  background: #fff;
  border: 1px solid rgba(0, 31, 63, 0.2);
  color: #001f3f;
  text-align: center;
  padding: 0.25rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
}

.pdf-page-info input:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* PDF Canvas - Book Style */
.pdf-canvas-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: #f9f9f9;
  position: relative;
}

.pdf-canvas-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(0, 31, 63, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.book-pages-container {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
}

.book-page {
  position: relative;
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.book-page canvas {
  display: block;
  max-width: 45vw;
  max-height: 80vh;
  height: auto;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 31, 63, 0.1);
  border-radius: 4px;
  background: #fff;
}

.book-page.left-page canvas {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.book-page.right-page canvas {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.book-spine {
  width: 4px;
  height: 100%;
  background: linear-gradient(to right,
      rgba(212, 175, 55, 0.3) 0%,
      rgba(212, 175, 55, 0.5) 50%,
      rgba(212, 175, 55, 0.3) 100%);
  box-shadow:
    inset -2px 0 10px rgba(0, 0, 0, 0.5),
    inset 2px 0 10px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 5;
}

.pdf-canvas-wrapper.single-page .book-pages-container {
  gap: 0;
}

.pdf-canvas-wrapper.single-page .book-page canvas {
  max-width: 70vw;
  max-height: 85vh;
  border-radius: 4px;
}

.pdf-canvas-wrapper.single-page .book-spine {
  display: none;
}

@media (max-width: 768px) {
  .catalog-hero {
    padding: calc(var(--navbar-height) + var(--spacing-md)) var(--spacing-sm) var(--spacing-md);
  }

  .catalog-hero-content {
    max-width: 100%;
  }

  .catalog-hero h1 {
    font-size: clamp(2rem, 7vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
  }

  .catalog-hero p {
    font-size: clamp(1rem, 3.5vw, 1.1rem);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
  }

  .catalog-hero-actions {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.95rem;
  }

  .catalog-viewer-section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .catalog-header {
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-sm);
  }

  .catalog-header h2 {
    font-size: clamp(1.75rem, 6vw, 2rem);
    margin-bottom: var(--spacing-sm);
  }

  .catalog-header p {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    margin-top: var(--spacing-md);
  }

  .flipbook-container {
    padding: 0 var(--spacing-sm);
  }

  .flipbook-wrapper {
    padding: var(--spacing-md);
    border-radius: 12px;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
  }

  .page-info {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
  }

  .catalog-title {
    font-size: 1rem;
  }

  .control-buttons {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
  }

  .control-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.95rem;
  }

  .pdf-viewer-area {
    height: 60vh;
    min-height: 400px;
    border-radius: 8px;
  }

  .book-page canvas {
    max-width: 95vw;
    max-height: 55vh;
  }

  .pdf-canvas-wrapper {
    padding: var(--spacing-sm);
  }

  .book-pages-container {
    gap: 3px;
  }

  .book-spine {
    width: 2px;
  }

  .pdf-canvas-wrapper.single-page .book-page canvas {
    max-width: 95vw;
    max-height: 60vh;
  }

  .pdf-nav {
    bottom: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    max-width: 95%;
  }

  .pdf-nav-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .pdf-nav-btn svg {
    width: 16px;
    height: 16px;
  }

  .pdf-page-info {
    font-size: 0.8rem;
    gap: var(--spacing-xs);
  }

  .pdf-page-info input {
    width: 35px;
    font-size: 0.8rem;
    padding: 0.2rem;
  }

  .pdf-loading {
    padding: var(--spacing-sm);
  }

  .pdf-loading p {
    font-size: 0.9rem;
  }

  .loading-hint {
    font-size: 0.8rem;
    margin-top: var(--spacing-xs);
  }

  .loader-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }

  .loading-progress-bar {
    width: 150px;
    height: 5px;
  }
}

/* Catalog Section - Works for both Mobile and Desktop */
.catalog-mobile-section {
  padding: var(--spacing-xl) var(--spacing-md);
  background: #fff;
}

.catalog-mobile-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.catalog-mobile-icon {
  color: #001f3f;
  margin-bottom: var(--spacing-md);
}

.catalog-mobile-icon svg {
  stroke: #d4af37;
}

.catalog-mobile-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #001f3f;
  margin-bottom: var(--spacing-sm);
}

.catalog-mobile-content p {
  color: #666;
  font-size: 1rem;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.catalog-mobile-buttons {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.catalog-mobile-buttons .btn-hero {
  min-width: 180px;
  justify-content: center;
}

.catalog-mobile-products-link {
  display: inline-block;
  color: #001f3f;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}


.catalog-mobile-products-link:hover {
  color: #d4af37;
}

.catalog-cover-link {
  display: block;
  margin-bottom: var(--spacing-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.catalog-cover-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 31, 63, 0.25);
}

.catalog-cover-image {
  width: 100%;
  max-width: 450px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .catalog-mobile-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .catalog-mobile-buttons .btn-hero {
    width: 100%;
    min-width: auto;
  }

  .catalog-cover-image {
    max-width: 320px;
  }
}