.collection-showcase-v2 {
  --card-gap: 20px;
  display: block;
  width: 100%;
  position: relative;
  background-color: var(--bg-color, #ffffff);
  color: var(--body-color, #5a6b75);
  overflow: hidden;
  box-sizing: border-box;
  scroll-margin-top: 130px;
}

.collection-showcase-v2__container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--padding-top, 48px) var(--side-padding-desktop, 40px) var(--padding-bottom, 48px);
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .collection-showcase-v2__container {
    padding: var(--padding-top-mobile, 36px) var(--side-padding-mobile, 24px) var(--padding-bottom-mobile, 36px);
  }
}

/* Header Area (Centered Title + Subtitle) */
.collection-showcase-v2__header {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.collection-showcase-v2__heading {
  margin: 0 0 12px 0;
  font-family: var(--sort-title-font, Marcellus, Georgia, 'Times New Roman', serif);
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--heading-color, #293b2b);
}

.collection-showcase-v2__subtitle {
  margin: 0;
  font-family: var(--sort-body-font, Poppins, -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--body-color, #5a6b75);
  max-width: 660px;
}

.collection-showcase-v2__btn-wrapper {
  margin-top: 18px;
}

.collection-showcase-v2__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sort-body-font, Poppins, sans-serif);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.collection-showcase-v2__btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.collection-showcase-v2__btn--underline {
  color: var(--button-color, #293b2b);
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}

.collection-showcase-v2__btn--underline:hover {
  opacity: 0.82;
  gap: 12px;
}

.collection-showcase-v2__btn--underline:hover svg {
  transform: translateX(3px);
}

.collection-showcase-v2__btn--solid {
  background-color: var(--button-color, #293b2b);
  color: var(--button-text-color, #ffffff);
  border-radius: 9999px;
  padding: 10px 24px;
  border: 1px solid transparent;
}

.collection-showcase-v2__btn--solid:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Carousel Outer Box */
.collection-showcase-v2__carousel {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Track holding the cards */
.collection-showcase-v2__track {
  display: flex;
  gap: var(--card-gap, 20px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 2px;
  margin: -8px -2px;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}

.collection-showcase-v2__track::-webkit-scrollbar {
  display: none;
}

.collection-showcase-v2__track.is-dragging {
  scroll-behavior: auto;
  cursor: grabbing;
  cursor: -webkit-grabbing;
}

.collection-showcase-v2__track.is-linear-autoplay {
  scroll-behavior: auto;
  scroll-snap-type: none;
}

/* 4 rectangular cards on desktop (applied to direct track children: handles both editor wrappers and live cards) */
.collection-showcase-v2__track > * {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .collection-showcase-v2__track > * {
    flex: 0 0 calc((100% - 3 * var(--card-gap, 20px)) / 4);
    min-width: calc((100% - 3 * var(--card-gap, 20px)) / 4);
    max-width: calc((100% - 3 * var(--card-gap, 20px)) / 4);
  }
}

/* Tablet view: 2.5 cards */
@media (min-width: 640px) and (max-width: 1023px) {
  .collection-showcase-v2__track > * {
    flex: 0 0 calc((100% - 1.5 * var(--card-gap, 16px)) / 2.5);
    min-width: calc((100% - 1.5 * var(--card-gap, 16px)) / 2.5);
    max-width: calc((100% - 1.5 * var(--card-gap, 16px)) / 2.5);
  }
}

/* Mobile view: 1.25 cards peek */
@media (max-width: 639px) {
  .collection-showcase-v2__track > * {
    flex: 0 0 calc((100% - var(--card-gap, 12px)) / 1.25);
    min-width: calc((100% - var(--card-gap, 12px)) / 1.25);
    max-width: calc((100% - var(--card-gap, 12px)) / 1.25);
  }
}

/* Card Styling: fills 100% of the column */
.collection-showcase-v2__card {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  height: var(--card-height, 420px);
  border-radius: var(--card-radius, 16px);
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
  display: block;
  cursor: pointer;
  background-color: #eaeaea;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.collection-showcase-v2__card-link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  text-decoration: none;
}

@media (max-width: 639px) {
  .collection-showcase-v2__card {
    height: clamp(320px, 76vw, var(--card-height, 420px));
  }
}

.collection-showcase-v2__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.collection-showcase-v2__card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.collection-showcase-v2__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.collection-showcase-v2__card:hover .collection-showcase-v2__card-img {
  transform: scale(1.05);
}

.collection-showcase-v2__card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #94a3b8;
}

.collection-showcase-v2__card-title {
  position: absolute;
  bottom: 22px;
  left: 16px;
  right: 16px;
  text-align: center;
  font-family: var(--sort-body-font, Poppins, -apple-system, sans-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #ffffff;
  color: var(--title-color, #ffffff);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 10;
  transition: transform 0.3s ease;
}

.collection-showcase-v2--title-center .collection-showcase-v2__card-title {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 639px) {
  .collection-showcase-v2__card-title {
    font-size: 15px;
    bottom: 18px;
    left: 12px;
    right: 12px;
  }

  .collection-showcase-v2--title-center .collection-showcase-v2__card-title {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }
}

.collection-showcase-v2--custom-font-sizes .collection-showcase-v2__heading {
  font-size: var(--heading-font-size-desktop, 40px);
}

.collection-showcase-v2--custom-font-sizes .collection-showcase-v2__subtitle {
  font-size: var(--body-font-size-desktop, 16px);
}

.collection-showcase-v2--custom-font-sizes .collection-showcase-v2__btn {
  font-size: var(--button-font-size-desktop, 14px);
}

.collection-showcase-v2--custom-font-sizes .collection-showcase-v2__card-title {
  font-size: var(--card-title-font-size-desktop, 17px);
}

@media (max-width: 639px) {
  .collection-showcase-v2--custom-font-sizes .collection-showcase-v2__heading {
    font-size: var(--heading-font-size-mobile, 26px);
  }

  .collection-showcase-v2--custom-font-sizes .collection-showcase-v2__subtitle {
    font-size: var(--body-font-size-mobile, 14px);
  }

  .collection-showcase-v2--custom-font-sizes .collection-showcase-v2__btn {
    font-size: var(--button-font-size-mobile, 14px);
  }

  .collection-showcase-v2--custom-font-sizes .collection-showcase-v2__card-title {
    font-size: var(--card-title-font-size-mobile, 15px);
  }
}

.collection-showcase-v2__card:hover .collection-showcase-v2__card-title {
  transform: translateY(-2px);
}

.collection-showcase-v2--title-center .collection-showcase-v2__card:hover .collection-showcase-v2__card-title {
  transform: translateY(-50%) scale(1.03);
}

/* Navigation Arrow Buttons */
.collection-showcase-v2__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  color: var(--arrow-color, #293b2b);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
}

.collection-showcase-v2__arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}

.collection-showcase-v2__arrow:hover:not(:disabled) {
  background: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.collection-showcase-v2__arrow:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
}

.collection-showcase-v2__arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.collection-showcase-v2__arrow--prev {
  left: -22px;
}

.collection-showcase-v2__arrow--next {
  right: -22px;
}

@media (max-width: 1100px) {
  .collection-showcase-v2__arrow--prev {
    left: 8px;
  }
  .collection-showcase-v2__arrow--next {
    right: 8px;
  }
}

/* Scroll Progress Bar */
.collection-showcase-v2__progress {
  width: 100%;
  max-width: 160px;
  height: 3px;
  background: rgba(41, 59, 43, 0.12);
  border-radius: 9999px;
  margin: 32px auto 0;
  position: relative;
  overflow: hidden;
}

.collection-showcase-v2__progress-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 25%;
  background: var(--heading-color, #293b2b);
  border-radius: 9999px;
  transition: transform 0.15s ease-out, width 0.15s ease-out;
  transform-origin: left center;
}
