/**
 * goods.css - グッズページ
 */

/* 一覧ページ */
.goods-list-section {
  padding: 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.page-title {
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  font-weight: 600;
}

.page-title-img {
  margin: 0 0 1.5rem;
  text-align: center;
}

.page-title-img img {
  max-width: 100%;
  height: auto;
}

/* タブナビゲーション */
.goods-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.goods-tab {
  background: transparent;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.goods-tab:hover {
  background: rgba(0,0,0,0.05);
  color: var(--color-text);
}

.goods-tab.active {
  background: var(--color-primary);
  color: #fff;
}

.goods-tab-content {
  display: none;
}

.goods-tab-content.active {
  display: block;
}

.goods-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.goods-item {
  display: block;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
}

.goods-item:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.goods-item img {
  display: block;
  height: auto;
  max-width: 100%; /* モバイル時に縮小 */
}

/* 詳細ページ */
.goods-detail-section {
  padding: 2rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.goods-detail-header {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

.goods-detail-cover {
  position: relative;
}

.goods-detail-cover img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s;
}

.goods-detail-cover img:hover {
  transform: scale(1.02);
}

.goods-detail-info h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.goods-detail-info .meta-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.goods-detail-info .meta-label {
  color: var(--color-text-muted);
  min-width: 80px;
  flex-shrink: 0;
}

.goods-detail-info .meta-value {
  color: var(--color-text);
}

.goods-price {
  font-weight: 600;
  font-size: 1.1rem;
}

.goods-sales-links {
  margin-top: 1rem;
}

.goods-sales-links ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.goods-sales-links a {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.goods-sales-links a:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

/* 紹介文 */
.goods-description-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* モーダル */
.img-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.img-modal.show {
  display: flex;
}

.img-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.img-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
  .goods-grid {
    gap: 0.5rem;
  }

  .goods-detail-header {
    grid-template-columns: 1fr;
  }

  .goods-detail-cover {
    max-width: 320px;
    margin: 0 auto;
  }
}

