/* Featured Brands Swiper Styles - Matching featured-collection-swiper styles */

/* Reuse container styles from featured-collection-swiper.css */
.featured-brands-swiper-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5rem;
  padding-bottom: 3rem;
  position: relative;
  width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

/* Ensure all elements use border-box sizing */
.featured-brands-swiper-container *,
.featured-brands-swiper-container *::before,
.featured-brands-swiper-container *::after {
  box-sizing: border-box;
}

.featured-brands-swiper {
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Initial layout before Swiper initializes */
.featured-brands-swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}

/* Hide overflow during initialization */
.featured-brands-swiper:not(.swiper-initialized) {
  overflow: hidden;
}

/* Slide Layout */
.featured-brands-swiper .swiper-slide {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: auto;
}

/* Ensure slides are visible before Swiper init */
.featured-brands-swiper:not(.swiper-initialized) .swiper-slide {
  flex: 0 0 calc((100% / 4) - (20px * 3 / 4));
  max-width: calc((100% / 4) - (20px * 3 / 4));
  display: flex;
  flex-direction: column;
}

/* Brand Card Styles */
.featured-brand-card {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.featured-brand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.featured-brand-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  text-align: left;
}

/* Image wrapper - 正方形のアスペクト比 */
.featured-brand-card__image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1.8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  /* background-color: #f8f8f8; */
}

.featured-brand-card__image {
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ブランドロゴの場合はより小さく表示 */
.featured-brand-card__image--logo {
  width: auto;
  max-width: 80%;
  max-height: 80%;
}

.featured-brand-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content section */
.featured-brand-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.featured-brand-card__name {
  font-size: 1.1rem;
  line-height: 1.4;
  color: #333;
  margin: 0;
  text-align: left;
}

.featured-brand-card__product {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
  .featured-brands-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc((100% / 3) - (20px * 2 / 3));
    max-width: calc((100% / 3) - (20px * 2 / 3));
  }

  .featured-brands-swiper-container {
    padding: 1.5rem;
  }
}

@media screen and (max-width: 990px) {
  .featured-brands-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc((100% / 2) - (20px / 2));
    max-width: calc((100% / 2) - (20px / 2));
  }
}

@media screen and (max-width: 768px) {
  .featured-brands-swiper:not(.swiper-initialized) .swiper-wrapper {
    gap: 10px;
  }

  .featured-brands-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc((100% / 2) - (10px / 2));
    max-width: calc((100% / 2) - (10px / 2));
  }

  .featured-brands-swiper-container {
    padding: 1rem 2rem;
    max-width: 100%;
  }

  .featured-brand-card__content {
    padding: 1rem;
  }

  .featured-brand-card__name {
    font-size: 0.95rem;
  }

  .featured-brand-card__product {
    font-size: 0.8rem;
  }

  /* Hide navigation arrows on mobile */
  .featured-collection-button-next,
  .featured-collection-button-prev {
    display: none;
  }
}

/* Scrollbar Styles */
.featured-brands__scrollbar {
  --swiper-scrollbar-size: 3px;
  --swiper-scrollbar-bg-color: #ffffff;
  --swiper-scrollbar-sides-offset: 25%;
  display: block;
  max-width: 50%;
  margin: 20px auto 0;
}

.featured-brands__scrollbar .swiper-scrollbar-drag {
  background: #505050;
  opacity: 0.8;
  border-radius: 3px;
  cursor: grab;
  position: relative;
  height: 100%;
  display: block;
}

.featured-brands__scrollbar.swiper-scrollbar-horizontal {
  width: 100%;
}

/* Hide scrollbar when navigation arrows are visible (PC) */
@media screen and (min-width: 1681px) {
  .featured-brands__scrollbar {
    display: none;
  }
}
