/**
 * Hermès完全準拠 - 商品グリッド
 * ネオプラズマ株式会社専用
 *
 * 参考: https://www.hermes.com/jp/ja/
 * 実装: Hermèsの商品一覧グリッドを完全再現
 */

/* ============================================
   セクションコンテナ
   ============================================ */

.product-section {
  padding: 48px 15px;
  background-color: #ffffff;
}

/* タブレット */
@media (min-width: 768px) {
  .product-section {
    padding: 64px 24px;
  }
}

/* デスクトップ */
@media (min-width: 1024px) {
  .product-section {
    padding: 80px 48px;
  }
}

/* ワイド */
@media (min-width: 1920px) {
  .product-section {
    padding: 96px 48px;
  }
}

/* セクションコンテナ（最大幅制限） */
.product-section-inner {
  max-width: 1920px;
  margin: 0 auto;
}

@media (min-width: 1306px) {
  .product-section-inner {
    max-width: 1258px;
  }
}

/* ============================================
   セクションヘッダー
   ============================================ */

.product-section-header {
  text-align: center;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .product-section-header {
    margin-bottom: 56px;
  }
}

@media (min-width: 1024px) {
  .product-section-header {
    margin-bottom: 64px;
  }
}

.product-section-title {
  font-size: 28px;
  font-weight: 300; /* Hermès: 細身 */
  line-height: 1.3;
  letter-spacing: 0.05em;
  color: #222222;
  margin: 0 0 16px 0;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

@media (min-width: 768px) {
  .product-section-title {
    font-size: 36px;
    margin-bottom: 20px;
  }
}

@media (min-width: 1024px) {
  .product-section-title {
    font-size: 42px;
    margin-bottom: 24px;
  }
}

.product-section-description {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: #666666;
  max-width: 700px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .product-section-description {
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  .product-section-description {
    font-size: 16px;
  }
}

/* ============================================
   商品グリッド
   ============================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* モバイル: 2カラム */
  gap: 24px;
}

/* タブレット: 3カラム */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* デスクトップ: 4カラム */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
}

/* ワイド: 4カラム（間隔広め） */
@media (min-width: 1440px) {
  .product-grid {
    gap: 40px;
  }
}

/* ============================================
   商品カード
   ============================================ */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px); /* Hermès: 微妙な浮き上がり */
}

/* ============================================
   商品画像
   ============================================ */

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 正方形比率 */
  overflow: hidden;
  background-color: #f5f5f5; /* プレースホルダー背景 */
  margin-bottom: 16px;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease; /* Hermès: ゆったりとしたズーム */
}

.product-card:hover .product-image {
  transform: scale(1.05); /* ホバーで微妙にズーム */
}

/* 画像読み込み前のプレースホルダー */
.product-image[data-src] {
  background: linear-gradient(
    135deg,
    #f5f5f5 0%,
    #eeeeee 50%,
    #f5f5f5 100%
  );
  background-size: 200% 200%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ============================================
   商品ラベル・バッジ
   ============================================ */

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: #fd780f; /* ネオプラズマオレンジ */
  color: #ffffff;
  border-radius: 2px;
}

.product-badge.new {
  background-color: #fd780f;
}

.product-badge.sale {
  background-color: #d32f2f;
}

.product-badge.limited {
  background-color: #222222;
}

/* ============================================
   商品情報
   ============================================ */

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

/* 商品名 */
.product-name {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #444444;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 2行まで表示 */
  -webkit-box-orient: vertical;
}

@media (min-width: 768px) {
  .product-name {
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  .product-name {
    font-size: 16px;
  }
}

/* 商品カテゴリ（オプション） */
.product-category {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #888888;
  text-transform: uppercase;
}

/* 商品価格 */
.product-price {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #222222;
  margin: 4px 0 0 0;
}

@media (min-width: 768px) {
  .product-price {
    font-size: 16px;
  }
}

@media (min-width: 1024px) {
  .product-price {
    font-size: 17px;
  }
}

/* 価格（セール時） */
.product-price-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-price.original {
  font-size: 13px;
  font-weight: 300;
  color: #999999;
  text-decoration: line-through;
}

.product-price.sale {
  color: #d32f2f;
}

/* ============================================
   お気に入りボタン
   ============================================ */

.product-favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: none; /* お気に入り機能を非表示 */
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.product-favorite:hover {
  background-color: rgba(255, 255, 255, 1);
  border-color: #fd780f;
  transform: scale(1.1);
}

.product-favorite svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #444444;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.product-favorite.active svg {
  fill: #fd780f;
  stroke: #fd780f;
}

/* ============================================
   カートボタン（ホバー時表示）
   ============================================ */

.product-cart-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.product-card:hover .product-cart-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.product-cart-btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #ffffff;
  background-color: #fd780f;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.product-cart-btn:hover {
  background-color: #e46d0d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(253, 120, 15, 0.3);
}

/* ============================================
   「もっと見る」ボタン
   ============================================ */

.product-section-footer {
  text-align: center;
  margin-top: 48px;
}

@media (min-width: 768px) {
  .product-section-footer {
    margin-top: 56px;
  }
}

@media (min-width: 1024px) {
  .product-section-footer {
    margin-top: 64px;
  }
}

.product-view-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 40px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #444444;
  background-color: transparent;
  border: 1px solid #444444;
  transition: all 0.3s ease;
}

.product-view-more:hover {
  background-color: #444444;
  color: #fcf7f1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .product-view-more {
    padding: 16px 48px;
    font-size: 15px;
  }
}

/* ============================================
   Reduced Motion対応
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-image,
  .product-favorite,
  .product-cart-overlay,
  .product-cart-btn,
  .product-view-more {
    transition: none;
  }

  .product-card:hover {
    transform: none;
  }

  .product-card:hover .product-image {
    transform: none;
  }

  .product-favorite:hover {
    transform: none;
  }

  .product-cart-btn:hover {
    transform: none;
  }

  .product-view-more:hover {
    transform: none;
  }

  .product-image[data-src] {
    animation: none;
  }
}

/* ============================================
   モバイル版テキスト折り返し調整
   ============================================ */

/* PC版では改行タグを非表示 */
.mobile-br {
  display: inline;
}

@media (min-width: 768px) {
  .mobile-br {
    display: none;
  }
}

/* スマホ版でテキストサイズを小さくして1行に収める */
@media (max-width: 767px) {
  .product-section-description {
    font-size: 12px;
    letter-spacing: 0em;
    line-height: 1.4;
    padding: 0 5px;
    white-space: nowrap;
  }
}
