body {
  height: 100dvh;
  overflow: hidden;
  position: relative;
  background-color: var(--light-cream);
}

/* Carousel */
.carousel {
  width: 100%;
  height: calc(100vh - 170px);
  overflow: hidden;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 25px;
  background-color: transparent;
  position: relative;
  border-radius: 32px 32px 32px 0;
  isolation: isolate;
}

.carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1;
}

.carousel__title {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  padding: 20px;
  border-radius: 0 32px 0 0;
  background-color: var(--white);
  font: 400 32px / 1.2 'Lekton';
  color: var(--brown);
  text-align: center;
}

.carousel__background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  filter: grayscale(0.3);
}

.carousel__gallery {
  width: calc(100% - 150px);
  margin-inline: auto;
  overflow: hidden;
  user-select: none;
  position: relative;
  z-index: 2;
}

.carousel__inner {
  display: flex;
  gap: 30px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.carousel__slide {
  flex-shrink: 0;
  box-sizing: border-box;
  width: calc((100% - 90px) / 4);
}

/* Product Card */
.pcard {
  overflow: hidden;
  transition: all 0.3s ease;
}

.pcard__image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  overflow: hidden;
}

.pcard__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pcard:hover .pcard__image {
  transform: scale(1.05);
}

.pcard__title {
  font: 600 20px / 1.3 'Arial Nova';
  color: var(--brown);
  padding: 15px 10px 5px 10px;
  background-color: var(--white);
}

.pcard__price {
  font: 400 18px / 1 'Arial Nova';
  color: var(--brown);
  padding: 0 10px 15px 10px;
  background-color: var(--white);
  border-radius: 0 0 16px 16px;
}

/* Navigation Arrows */
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.carousel__arrow svg {
  width: 20px;
  height: 20px;
  color: var(--brown);
}

.carousel__arrow:hover {
  background: #f5f5f5;
  transform: translateY(-50%) scale(1.03);
}

.carousel__arrow--prev {
  left: 25px;
}

.carousel__arrow--next {
  right: 25px;
}

/* Pagination */
.carousel__pagination {
  width: max-content;
  margin-inline: auto;
  margin-top: 25px;
  border-radius: 40px;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: var(--white);
  position: relative;
  z-index: 2;
}

.merrygo-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray200);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.merrygo-bullet-active {
  background: var(--brown);
}

/* Responsive Breakpoints */
@media (max-width: 1440px) {
  .carousel {
    height: calc(100vh - 140px);
  }

  .carousel__gallery {
    width: calc(100% - 130px);
  }

  .carousel__arrow {
    width: 40px;
    height: 40px;
  }

  .carousel__pagination {
    padding: 8px 16px;
  }

  .merrygo-bullet {
    width: 8px;
    height: 8px;
  }

  .pcard__title {
    font-size: 18px;
  }

  .pcard__price {
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
  .carousel {
    height: calc(100vh - 120px);
    padding: 15px;
  }

  .carousel__title {
    font-size: 24px;
    padding: 10px;
    border-radius: 0 16px 0 0;
  }

  .carousel__gallery {
    width: calc(100% - 98px);
  }

  .carousel__inner {
    gap: 25px;
  }

  .carousel__slide {
    width: calc((100% - 50px) / 3);
  }

  .carousel__arrow {
    width: 34px;
    height: 34px;
  }

  .carousel__arrow--prev {
    left: 15px;
  }

  .carousel__arrow--next {
    right: 15px;
  }
}

@media (max-width: 768px) {
  .carousel__inner {
    gap: 20px;
  }

  .carousel__slide {
    width: calc((100% - 20px) / 2);
  }
}

@media (max-width: 560px) {
  .carousel {
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-radius: 0;
    padding: 15px 15px 0 15px
  }

  .carousel::before {
    height: calc(100% - 44px);
    border-radius: 16px;
    overflow: hidden;
  }

  .carousel__title {
    width: 100%;
    line-height: 1;
    border-radius: 0;
    text-align: center;
  }

  .carousel__background {
    height: calc(100% - 44px);
    border-radius: 16px;
    overflow: hidden;
  }

  .carousel__gallery {
    height: calc(100% - 59px);
    align-content: center;
    max-width: 260px;
    border-radius: 16px;
  }

  .carousel__inner {
    gap: 10px;
    height: 80%;
  }

  .carousel__slide {
    width: 100%; 
  }

  .pcard {
    height: 100%;
  }

  .pcard__image-wrapper {
    aspect-ratio: unset;
    height: calc(100% - 74px);
  }

  .carousel__pagination {
    position: absolute;
    bottom: 59px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
  }
}