@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

.catalog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  overflow: hidden;
}

.catalog-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  justify-content: center;
  gap: 20px;
}

.flipbook-wrapper {
  position: relative;
  overflow: auto;
  max-width: calc(100vw - 200px);
  max-height: calc(100vh - 200px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.flipbook {
  width: 1000px;
  height: 600px;
  transition: transform 0.3s ease;
  transform-origin: center center;
  margin: auto;
}

.flipbook.zoomed {
  cursor: grab;
}

.flipbook.zoomed:active {
  cursor: grabbing;
}

.flipbook .hard {
  background: #c0392b !important;
  color: #fff;
  font-weight: bold;
  border: none;
}

.flipbook .hard small {
  font-style: italic;
  font-weight: lighter;
  opacity: 0.7;
  font-size: 14px;
}

.flipbook .page {
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 0, 0, 0.11);
}

.page img {
  width: 70%;
  object-fit: cover;
  margin: auto;
}

.flipbook .page small {
  font-size: 14px;
  margin-bottom: 10px;
}

.arrow-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 15px 20px;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  transition: all 0.3s;
  z-index: 2100;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.arrow-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

#prev {
  left: 20px;
}

#next {
  right: 20px;
}

.close-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #e74c3c;
  color: white;
  border: none;
  font-size: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 2100;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background-color: #c0392b;
  transform: scale(1.1);
}

.zoom-controls {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.5);
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.zoom-controls button,
.zoom-controls a {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 12px 18px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-weight: 500;
}

.zoom-controls button:hover,
.zoom-controls a:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#fullscreen-toggle {
  background-color: #2980b9;
}

#fullscreen-toggle:hover {
  background-color: #1f6391;
}

.download-btn {
  background-color: #27ae60 !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.download-btn:hover {
  background-color: #1e8449 !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .flipbook {
    width: 800px;
    height: 480px;
  }
  
  .flipbook-wrapper {
    max-width: calc(100vw - 150px);
  }
}

@media (max-width: 900px) {
  .flipbook {
    width: 600px;
    height: 360px;
  }
  
  .arrow-btn {
    padding: 12px 16px;
    font-size: 24px;
  }
  
  #prev {
    left: 10px;
  }
  
  #next {
    right: 10px;
  }
  
  .flipbook-wrapper {
    max-width: calc(100vw - 100px);
  }
}

@media (max-width: 650px) {
  .flipbook {
    width: 90vw;
    height: 54vw;
  }
  
  .arrow-btn {
    padding: 10px 14px;
    font-size: 20px;
  }
  
  .zoom-controls {
    bottom: 20px;
    padding: 10px 15px;
  }
  
  .zoom-controls button,
  .zoom-controls a {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .close-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
  
  .flipbook-wrapper {
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 150px);
  }
}