/* ===================================
   Brand Slider - Scoped Styles
   Embeddable slider for brand showcases
   =================================== */

/* ===================================
   Slider Container - Transform-based
   =================================== */

.brand-slider {
  position: relative;
  width: 100%;
  height: 700px;
  margin: 0;
  overflow: visible;
  z-index: 1;
  animation: brand-slider-fadeIn 0.6s ease-out;
}

@media (max-width: 380px) {
  .brand-slider {
    height: 750px;
  }
}
@media (min-width: 768px) {
  .brand-slider {
    height: 750px;
  }
}

.brand-slider__track {
  display: flex;
  height: 100%;
  padding: 20px 0;
  will-change: transform;
  cursor: grab;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.brand-slider__track:active {
  cursor: grabbing;
}

/* ===================================
   Individual Slide
   =================================== */

.brand-slider__slide {
  width: calc(100vw - 40px);
  height: 700px;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 10px;
}
@media (max-width: 380px) {
  .brand-slider__slide {
    height: 750px;
  }
}

@media (min-width: 768px) {
  .brand-slider__slide {
    height: 750px;
  }
}
/* ===================================
   Slide Content
   =================================== */

.brand-slider__content {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  height: auto;
  /* max-height: calc(100vh - 120px); */
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 8px 32px rgba(255, 179, 217, 0.2);
  overflow: hidden;
  transform: translateZ(0);
  transition: all 0.4s ease-out;
  animation: brand-slider-slideUp 0.8s ease-out 0.2s both;
  will-change: transform;
  -webkit-transform: translateZ(0);
}

/* ===================================
   Image Wrapper
   =================================== */

.brand-slider__image-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  min-height: 280px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #fff0f7;
}

.brand-slider__image-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ===================================
   Image
   =================================== */

.brand-slider__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
  pointer-events: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ===================================
   Text Content
   =================================== */

.brand-slider__text-content {
  position: relative;
  width: 100%;
  padding: 24px 20px 28px;
  background: #ffffff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 0 0 24px 24px;
}

/* ===================================
   Logo
   =================================== */

.brand-slider__logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.brand-slider__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(255, 179, 217, 0.3));
  transition: transform 0.3s ease;
  animation: brand-slider-float 3s ease-in-out infinite;
}

@media (min-width: 375px) {
  .brand-slider__logo {
    height: 70px;
  }
}

/* ===================================
   Text
   =================================== */

.brand-slider__text {
  font-size: 13px;
  line-height: 1.8;
  color: #5a4a5e;
  text-align: left;
  margin: 0;
  padding: 0 8px;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 375px) {
  .brand-slider__text {
    font-size: 14px;
    line-height: 1.85;
    padding: 0 12px;
  }
}

@media (min-width: 430px) {
  .brand-slider__text {
    font-size: 14.5px;
    line-height: 1.9;
  }
}

/* ===================================
   More Button
   =================================== */

.brand-slider__more-button {
  display: inline-block;
  padding: 8px 24px;
  border: 1.5px solid #ff69b4;
  border-radius: 20px;
  color: #ff69b4;
  text-decoration: none;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin: 4px auto 0;
}

.brand-slider__more-button:hover {
  background-color: #ff69b4;
  color: white;
}

@media (min-width: 375px) {
  .brand-slider__more-button {
    font-size: 14.5px;
    padding: 9px 26px;
  }
}

/* ===================================
   Animations
   =================================== */

@keyframes brand-slider-fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes brand-slider-slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes brand-slider-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ===================================
   Loading Spinner
   =================================== */

.brand-slider__image-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.brand-slider__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 179, 217, 0.2);
  border-top-color: #ff69b4;
  border-radius: 50%;
  animation: brand-slider-spinnerRotate 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform: translateZ(0);
  will-change: transform;
}

@keyframes brand-slider-spinnerRotate {
  0% {
    transform: rotate(0deg) translateZ(0);
  }
  100% {
    transform: rotate(360deg) translateZ(0);
  }
}

/* Image loading states */
.brand-slider__image.loading,
.brand-slider__logo img.loading {
  opacity: 0;
}

.brand-slider__image.loaded,
.brand-slider__logo img.loaded {
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

/* ===================================
   Scrollbar hiding
   =================================== */

.brand-slider {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.brand-slider::-webkit-scrollbar {
  display: none;
}

/* ===================================
   Safe area for notched devices
   =================================== */

@supports (padding: max(0px)) {
  .brand-slider__slide {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* ===================================
   iOS specific fixes
   =================================== */

@supports (-webkit-touch-callout: none) {
  .brand-slider {
    height: -webkit-fill-available;
  }
}

/* ===================================
   Hover effects for desktop
   =================================== */

@media (hover: hover) {
  .brand-slider__content:hover {
    box-shadow: 0 12px 40px rgba(255, 179, 217, 0.3);
    transform: translateY(-4px);
  }
}

/* ===================================
   PC Layout (768px and above)
   =================================== */

@media (min-width: 768px) {
  /* Fixed slide width for PC */
  .brand-slider__slide {
    width: 400px;
  }

  /* Adjust content container for PC */
  .brand-slider__content {
    max-width: 400px;
  }

  /* Optional: Adjust image height for better proportions on PC */
  .brand-slider__image-wrapper {
    height: 320px;
    min-height: 320px;
  }
}
