<style>
/* Product Detail Page Component */
.product-detail-page {
  min-height: 100vh;
}

.product-detail-page__main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 20px 32px;
}

.product-detail-page__breadcrumb {
  margin-bottom: 16px;
}

.product-detail-page__hero {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.product-detail-page__images {
  width: 560px;
  flex-shrink: 0;
}

/* Product Carousel Styles */
.product-carousel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-carousel__main {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #f5f5f5;
}

.product-carousel__main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-carousel__thumbs {
  width: 100%;
}

.product-carousel__thumbs-wrapper {
  width: 100%;
  overflow: visible;
}

.product-carousel__thumbs-track {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-carousel__thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.product-carousel__thumb:hover {
  border-color: #cccccc;
}

.product-carousel__thumb--active {
  border-color: #212121;
}

.product-carousel__thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-detail-page__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-detail-page__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-detail-page__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 1.2px;
  color: #212121;
  margin: 0;
}

.product-detail-page__codes {
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.84px;
  color: #6f6f6f;
}

.product-detail-page__code-row {
  display: flex;
}

.product-detail-page__code-label,
.product-detail-page__code-value,
.product-detail-page__code-single {
  white-space: nowrap;
}

.product-detail-page__price {
  display: flex;
  align-items: end;
  gap: 5px;
  font-family: 'Lexend', sans-serif;
  font-weight: 400;
}

.product-detail-page__price-amount {
  font-size: 22px;
  color: #323232;
}

.product-detail-page__price-tax {
  font-size: 14px;
  color: #6f6f6f;
}

.product-detail-page__options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.product-detail-page__option {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-detail-page__option-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.96px;
  color: #212121;
}

.product-detail-page__select-wrapper {
  position: relative;
  width: 100%;
}

.product-detail-page__select {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 12px;
  background-color: white;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  color: #3a3a3a;
  appearance: none;
  cursor: pointer;
}

.product-detail-page__select:focus {
  outline: none;
  border-color: #212121;
}

.product-detail-page__select-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.product-detail-page__purchase {
  display: flex;
  gap: 24px;
  align-items: center;
  width: 100%;
}

.product-detail-page__quantity {
  display: flex;
  gap: 8px;
  align-items: center;
}

.product-detail-page__quantity-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.product-detail-page__quantity-btn:hover {
  background-color: #f5f5f5;
}

.product-detail-page__quantity-input {
  width: 60px;
  height: 40px;
  padding: 8px 12px;
  background-color: white;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  text-align: right;
  color: #b8b8b8;
}

.product-detail-page__quantity-input:focus {
  outline: none;
  border-color: #212121;
  color: #212121;
}

.product-detail-page__add-to-cart {
  flex: 1;
  height: 40px;
  background-color: #212121;
  color: white;
  border: none;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.84px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.product-detail-page__add-to-cart:hover {
  background-color: #363636;
}

.product-detail-page__description {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.84px;
  color: #212121;
}

.product-detail-page__description p {
  margin: 0 0 8px 0;
}

/* パンくずリスト */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  color: #757575;
}

.breadcrumb a {
  color: #757575;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #212121;
}

.breadcrumb__separator {
  color: #d5d5d5;
}

/* サムネイルセクション */
.thumbnail-section {
  width: 100%;
  margin: 48px 0;
}

.thumbnail-section__container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 32px;
}

.thumbnail-section__title {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.96px;
  color: #212121;
  margin: 0 0 20px 0;
  padding: 20px 0 0 0;
}

.thumbnail-section__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 12px;
  width: 100%;
}

.thumbnail-section__item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.thumbnail-section__item:hover {
  opacity: 0.8;
}

.thumbnail-section__image-wrapper {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 8px;
  background-color: #f5f5f5;
}

.thumbnail-section__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.thumbnail-section__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thumbnail-section__brand {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 1.6;
  color: #757575;
  margin: 0;
}

.thumbnail-section__name {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  color: #212121;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.thumbnail-section__price {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.5;
  color: #212121;
  margin: 0;
}

/* 会員限定・割引表示 */
.discount-badge {
  display: inline-block;
  background-color: #ff4444;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 8px;
  font-family: 'Noto Sans JP', sans-serif;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .product-detail-page__main {
    padding: 0;
  }

  .product-detail-page__breadcrumb {
    padding: 20px 20px 0 20px;
    margin-bottom: 16px;
  }

  .product-detail-page__hero {
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
  }

  .product-detail-page__images {
    width: 100%;
    padding: 0;
  }

  /* モバイル用カルーセル調整 */
  .product-carousel__thumbs-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .product-carousel__thumbs-track {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: max-content;
    min-width: 100%;
  }

  .product-carousel__thumb {
    width: 60px;
    height: 60px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }

  /* モバイル用スクロールバーのスタイリング */
  .product-carousel__thumbs-wrapper::-webkit-scrollbar {
    height: 4px;
  }

  .product-carousel__thumbs-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
  }

  .product-carousel__thumbs-wrapper::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 2px;
  }

  .product-carousel__thumbs-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999999;
  }

  .product-detail-page__info {
    padding: 0 20px;
  }

  .product-detail-page__header,
  .product-detail-page__price,
  .product-detail-page__options {
    margin-bottom: 0;
  }

  .product-detail-page__add-to-cart {
    width: 100%;
    height: 56px;
    flex: none;
  }

  .product-detail-page__purchase {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }

  .product-detail-page__quantity {
    justify-content: flex-end;
    gap: 4px;
  }

  .thumbnail-section {
    margin: 32px 0;
  }

  .thumbnail-section__container {
    padding: 0 20px;
  }

  .thumbnail-section__title {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .thumbnail-section__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, auto);
    gap: 16px;
  }

  .thumbnail-section__image-wrapper {
    margin-bottom: 12px;
  }

  .thumbnail-section__content {
    gap: 6px;
  }

  .thumbnail-section__name {
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

@media (max-width: 480px) {
  .thumbnail-section__container {
    padding: 0 16px;
  }

  .thumbnail-section__grid {
    gap: 12px;
  }
}

/* エラーメッセージスタイル */
.product-error-message {
  text-align: center;
  margin-top: 50px;
  font-size: 18px;
  font-family: 'Noto Sans JP', sans-serif;
  color: #212121;
}
</style>