/* Series card cover with single texture + colorway strip */
.library-series-cover-new {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  gap: 0;
  background: #fffdfa;
}

.library-series-main-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e2ddd4;
}

.library-series-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.015);
  transition: filter 240ms ease, transform 320ms ease;
}

.library-series-main-image:hover img {
  filter: saturate(0.98) contrast(1.04);
  transform: scale(1.025);
}

.library-series-main-image .library-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #e2ddd4;
  color: #857d73;
  font-size: 0.75rem;
}

.library-colorway-strip {
  display: flex;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  gap: 2px;
  background: #fffdfa;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.library-colorway-strip::-webkit-scrollbar {
  display: none;
}

.library-colorway-thumb {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: #e2ddd4;
  border-radius: 2px;
}

.library-colorway-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
  transition: filter 180ms ease, transform 240ms ease;
}

.library-colorway-thumb:hover img,
.library-colorway-thumb:focus img {
  filter: saturate(1);
  transform: scale(1.08);
}

.library-colorway-thumb .library-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #e2ddd4;
  color: #857d73;
  font-size: 0.5rem;
  font-weight: 600;
}

/* Mobile refinements for compact layout */
@media (max-width: 760px) {
  .library-series-cover-new {
    border-radius: 3px;
    overflow: hidden;
  }

  .library-series-main-image {
    aspect-ratio: 4 / 3;
  }

  .library-colorway-strip {
    padding: 3px;
    gap: 3px;
  }

  .library-colorway-thumb {
    width: 24px;
    height: 24px;
  }
}

/* Mobile site body overrides */
body.mobile-site .library-series-cover-new {
  border-radius: 0;
}

body.mobile-site .library-series-main-image img {
  filter: none;
}

body.mobile-site .library-colorway-thumb img {
  filter: none;
}

body.mobile-site .library-series-cover-new {
  background: #fff !important;
}

body.mobile-site .library-colorway-strip {
  background: #fff !important;
}

/* Desktop refinements: lighter landscape cover with compact thumbnails */
@media (min-width: 761px) {
  .library-series-main-image {
    aspect-ratio: 3 / 2;
    background: #f5f3f0;
  }

  .library-colorway-strip {
    padding: 4px;
    gap: 4px;
    background: #faf9f7;
  }

  .library-colorway-thumb {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: border-color 180ms ease, transform 180ms ease;
  }

  .library-colorway-thumb:hover,
  .library-colorway-thumb:focus {
    border-color: rgba(0, 0, 0, 0.16);
    outline: none;
  }

  .library-colorway-thumb:focus-visible {
    outline: 2px solid #6b5d4f;
    outline-offset: 2px;
  }

  .library-colorway-thumb[aria-current="true"] {
    border-color: rgba(0, 0, 0, 0.24);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  }

  @media (prefers-reduced-motion: reduce) {
    .library-series-main-image img {
      transition: none;
    }

    .library-colorway-thumb img {
      transition: none;
    }

    .library-colorway-thumb {
      transition: none;
    }
  }
}
