/* === カードページ専用：背景 === */
body {
  background-image: url('/common/img/marble-texture.jpg');
  /*background-repeat: repeat-x;*/
  background-position: top center;
  background-size: auto;
  background-color: #f5f5f5;
}

/* === カードリスト === */
.card-list {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  padding: 20px;
}

.card-item {
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 14px;
  text-align: center;
  transition: box-shadow 0.3s;
}
.card-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

.card-title {
  font-size: 14px;
  margin: 8px 0;
  font-weight: bold;
}

.card-info {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}

.card-cost,
.category-tag,
.color-tag {
  padding: 2px 6px;
  border-radius: 3px;
  background-color: #f2f2f2;
  font-size: 11px;
}

.card-no {
  display: inline-block;
  margin-top: 8px;
  padding: 1px 7px;
  background-color: #fff;
  color: #000;
  font-size: 0.6rem;
  font-weight: bold;
  border: 1px solid #000;
}

.card-stock {
  font-size: 0.8rem;
  margin-top: 6px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.card-stock i {
  color: #333;
  font-size: 1rem;
}

.card-price {
  font-size: 0.8rem;
  margin-top: 6px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.card-price i {
  color: #333;
  font-size: 1rem;
}

/* === カード検索フォーム === */
.card-search-form {
  max-width: 1200px;
  margin: 70px auto 0;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.search-text {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
}

.search-select {
  appearance: none;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.3s ease;
  color: #333;
}

.search-select:focus {
  outline: none;
  border-color: #000;
  color: #333;
}

.search-select option {
  color: #333;
}

.search-select::-ms-expand {
  display: none;
}

.search-button {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #000;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-button:hover {
  background-color: #333;
}

/* === 特定のform-row（2段目）をスマホでも横並びにするクラス === */
.card-search-form .form-row.select-group {
  flex-wrap: nowrap;
  gap: 6px;
}

.card-search-form .form-row.select-group .search-select {
  flex: 1;
  min-width: 0;
}

/* === 検索結果なし === */
.no-results {
  position: relative;
  min-height: calc(100vh - 400px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #333;
  font-size: 1.1em;
  gap: 16px;
  box-sizing: border-box;
}

.no-results i {
  font-size: 48px;
  color: #999;
}

/* === ページネーション === */
.pagination {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  color: black;
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.pagination a,
.pagination span {
  color: black;
  text-decoration: none;
  margin: 0 5px;
}

.pagination .current {
  font-weight: bold;
}

.pagination .prev,
.pagination .next {
  font-size: 18px;
}

/* === 上部に戻るボタン === */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #000;
  font-size: 14px;
}

.back-to-top span {
  font-weight: bold;
}

.top-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
}

/* === レスポンシブ === */
@media screen and (max-width: 768px) {
  .card-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .card-item {
    font-size: 12px;
  }

  .card-search-form {
    margin-top: 50px;
  }

  .card-search-form .search-select {
    min-width: 120px;
  }
}

@media screen and (max-width: 480px) {
  .card-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .card-item {
    padding: 8px;
    font-size: 12px;
  }

  .card-search-form .search-select {
    font-size: 14px;
    padding: 8px;
  }
}
