/* ===========================================
   商品検索ページ スタイル（1カラムレイアウト）
   =========================================== */

/* 検索ページ全体 */
.product-search-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.product-search-page h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
  color: #333;
}

.search-container {
  display: block;
}

/* ===========================================
 サイドバー（絞り込みフォーム）
 =========================================== */
.search-sidebar {
  width: 100%;
  margin-bottom: 40px;
  padding: 25px;
  background: #f9f9f9;
  border-radius: 8px;
}

.filter-section {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #ddd;
}

.filter-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-section h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
  padding-left: 10px;
  border-left: 3px solid #0073aa;
	text-align: left !important;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: all 0.2s;
}

.filter-label:hover {
  background: #fff;
  border-color: #0073aa;
  box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
}

.filter-label input[type="radio"],
.filter-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0073aa;
}

.filter-label span {
  color: #555;
}

.filter-label:hover span {
  color: #0073aa;
}

/* ===========================================
 ボタン
 =========================================== */
.filter-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid #ddd;
}

.btn-search,
.btn-reset {
  padding: 14px 30px;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-search {
  background: #0073aa;
  color: #fff;
  flex: 1;
}

.btn-search:hover {
  background: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.btn-reset {
  background: #f0f0f0;
  color: #333;
}

.btn-reset:hover {
  background: #e0e0e0;
}

/* ===========================================
 検索結果エリア
 =========================================== */
.search-results {
  width: 100%;
}

.results-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.results-count {
  font-size: 14px;
  color: #666;
}

.results-count span {
  font-size: 18px;
  font-weight: bold;
  color: #0073aa;
}

/* ===========================================
 商品リスト
 =========================================== */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  min-height: 200px;
  position: relative;
  align-items: start;
}

.product-list.loading {
  opacity: 0.5;
  pointer-events: none;
}

.product-list.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===========================================
 商品カード
 =========================================== */
.product-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.product-thumbnail {
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid #ededed;
  aspect-ratio: 16 / 10.7;
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.product-card:hover .product-thumbnail img {
  transform: scale(1.05);
}

.product-thumbnail .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 14px;
}

.product-info {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-title a {
  color: #333;
  text-decoration: none;
}

.product-title a:hover {
  color: #0073aa;
}

.product-model {
  font-size: 13px;
  color: #666;
  margin: 5px 0;
}

.product-category-name {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  background: #0073aa;
  padding: 3px 10px;
  border-radius: 3px;
  margin-top: 8px;
}

/* サブタクソノミータグ */
.product-taxonomies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

span.taxonomy-tag {
  color: #9c9595;
  font-size: .9rem;
  border: 1px solid #b3afaf;
  padding: 1px 8px 2px;
  border-radius: 20px;
}

.product-link {
  display: block;
  padding: 12px;
  text-align: center;
  background: #f8f8f8;
  color: #0073aa;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  border-top: 1px solid #eee;
  transition: all 0.3s;
  margin-top: auto;
}

.product-link:hover {
  background: #0073aa;
  color: #fff;
}

/* ===========================================
 メッセージ
 =========================================== */
.initial-message,
.no-products,
.loading-message,
.error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  color: #666;
  font-size: 15px;
}

.initial-message {
  background: #f9f9f9;
  border-radius: 8px;
  border: 2px dashed #ddd;
}

.no-products {
  background: #fff8e6;
  border-radius: 8px;
  color: #996600;
}

.error {
  background: #ffe6e6;
  border-radius: 8px;
  color: #cc0000;
}

/* ===========================================
 ページネーション
 =========================================== */
.pagination {
  margin-top: 40px;
}

.pagination-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.pagination a,
.pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}

.pagination a {
  color: #333;
  background: #fff;
}

.pagination a:hover {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

.pagination .current {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
  font-weight: bold;
}

.pagination .prev,
.pagination .next {
  font-weight: bold;
}

/* ===========================================
 レスポンシブ対応
 =========================================== */

/* タブレット */
@media (max-width: 992px) {
  .product-list {
      grid-template-columns: repeat(3, 1fr);
  }
}

/* スマートフォン */
@media (max-width: 768px) {
  .product-search-page {
      padding: 20px 15px;
  }

  .product-search-page h1 {
      font-size: 24px;
      margin-bottom: 25px;
  }

  .search-sidebar {
      padding: 20px;
  }

  .filter-buttons {
      flex-direction: row;
  }

  .btn-search {
      flex: 2;
  }

  .btn-reset {
      flex: 1;
  }

  .product-list {
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
  }

  .product-info {
      padding: 12px;
  }

  .product-title {
      font-size: 14px;
  }
}

/* 小型スマートフォン */
@media (max-width: 480px) {
  .filter-options {
      gap: 8px;
  }

  .filter-label {
      padding: 6px 12px;
      font-size: 13px;
  }

  .product-list {
      grid-template-columns: 1fr;
  }

  .pagination-inner {
      gap: 3px;
  }

  .pagination a,
  .pagination .current {
      min-width: 35px;
      height: 35px;
      font-size: 13px;
  }
}