.carousel-container {
  background-color: transparent;
  padding: 0 !important;
  margin: 0 !important;
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.carousel-wrapper {
  max-width: 1640px !important;
  width: 100% !important;
  margin: 0 auto;
  position: relative;
  /* Add top/bottom padding to give breathing room inside container */
  padding: 40px 120px;
  box-sizing: border-box;
}

/* Tablet */
@media (max-width: 1023px) {
  .carousel-wrapper {
    padding: 30px 60px;
  }
}

/* Phone */
@media (max-width: 575px) {
  .carousel-wrapper {
    padding: 20px 50px;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .carousel-btn-prev {
    left: 8px;
  }

  .carousel-btn-next {
    right: 8px;
  }
}

.carousel-viewport {
  overflow: hidden;
  max-width: 1400px;
  margin: 0 auto;
}

.carousel-track {
  display: flex;
  will-change: transform;
  /* Removed fixed height so it adjusts to scaled images */
  align-items: center;
}

.carousel-slide {
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.book-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  gap: 0;
  width: 100%;
  max-width: 250px;
  transition: opacity 0.45s ease;
}

.book-scalable-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.book-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.book-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  display: block;
}

.book-label {
  background-color: #ff8c00;
  color: white;
  padding: 10px;
  /* Equal padding strictly on all sides */
  line-height: 1;
  /* Eliminates external spacing inside text */
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  /* Use flex positioning and auto sizing to ensure consistent padding */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: auto;
  min-width: unset;
  margin-top: 12px;
  min-height: unset;
  text-align: center;
  box-sizing: border-box;
}

.book-meta {
  background: white;
  color: #0a66c2;
  padding: 0.625em 0.75em;
  box-sizing: border-box;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.375em;
  overflow: hidden;
}

.book-meta .meta-top {
  display: block;
  font-weight: 600;
  font-size: 0.8125em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta .meta-class {
  opacity: 0.8;
}

.book-meta .meta-title {
  color: #000000;
  font-weight: 700;
  font-size: 0.9375em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #0073aa;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.carousel-btn:hover {
  background-color: #005a87;
}

.carousel-btn-prev {
  left: 10px;
}

.carousel-btn-next {
  right: 10px;
}