/* ==========================================================================
   PWP Print Studio – Shared Carousel Layout
   Design source: Figma "Image_group" (1440 × 384, 4 cards × 384²)
   ========================================================================== */

.pwpps-carousel-layout {
  --pwpps-carousel-gap: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  padding: 0;
  background: #ffffff;
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

.pwpps-carousel-layout *,
.pwpps-carousel-layout *::before,
.pwpps-carousel-layout *::after {
  box-sizing: inherit;
}

.pwpps-carousel-layout__row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--pwpps-carousel-gap, 24px);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: #bfbfbf #e6e6e6;
}

/* Custom scrollbar styling for WebKit */
.pwpps-carousel-layout__row::-webkit-scrollbar {
  height: 4px;
}

.pwpps-carousel-layout__row::-webkit-scrollbar-track {
  background: #e6e6e6;
  border-radius: 2px;
}

.pwpps-carousel-layout__row::-webkit-scrollbar-thumb {
  background: #bfbfbf;
  border-radius: 2px;
}

.pwpps-carousel-layout__card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 384px;
  width: 384px;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  text-decoration: none;
  transition: opacity 200ms ease;
}

a.pwpps-carousel-layout__card:hover,
a.pwpps-carousel-layout__card:focus-visible {
  opacity: 0.92;
}

.pwpps-carousel-layout__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
}

.pwpps-carousel-layout__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

a.pwpps-carousel-layout__card:hover .pwpps-carousel-layout__img {
  transform: scale(1.03);
}

.pwpps-carousel-layout__body {
  padding: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Empty state */

.pwpps-carousel-layout--empty {
  min-height: 240px;
}

.pwpps-carousel-layout__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 240px;
  padding: 48px 24px;
  color: #8c8c8c;
  text-align: center;
}

.pwpps-carousel-layout__empty-icon {
  color: #bfbfbf;
}

.pwpps-carousel-layout__empty-text {
  margin: 0;
  color: #595959;
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-body);
  line-height: 24px;
  letter-spacing: 0.5px;
}

.pwpps-carousel-layout__empty-hint {
  margin: 0;
  max-width: 480px;
  color: #8c8c8c;
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-body);
  line-height: 20px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1536px) {
  .pwpps-carousel-layout__row {
    height: auto;
  }
}

@media (max-width: 1023px) {
  .pwpps-carousel-layout {
    gap: 16px;
  }

  .pwpps-carousel-layout__row {
    gap: var(--pwpps-carousel-gap, 16px);
    padding-bottom: 12px;
  }

  .pwpps-carousel-layout__card {
    flex: 0 0 240px;
    width: 240px;
  }
}
