
/* ===== 共通スタイル ===== */
#applied_sokunou_btopc_area {
  margin: 0 auto 20px;
  max-width: 1200px;
  padding: 10px;
}
.applied_sokunou_btopc_area_h2 {
  margin: 0;
}

/* -------- ローディングアイコン -------- */
#applied_sokunou_btopc_area.loading {
  min-height: 300px; /* お好みで調整 */
  position: relative;
}
#loadingIndicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.lds-dual-ring {
  display: inline-block;
  width: 64px;
  height: 64px;
}
.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 46px;
  height: 46px;
  margin: 1px;
  border-radius: 50%;
  border: 5px solid #1976d2;
  border-color: #1976d2 transparent #1976d2 transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ローディングテキスト用 */
#loadingText {
  position: absolute;
  top: calc(50% + 48px); /* ローディングアイコンの直下に配置 */
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  font-weight: bold;
  color: #1976d2;  /* ローディングアイコンの色と合わせる */
  letter-spacing: 0.5px;
  animation: loadingPulse 1.5s ease-in-out infinite;
}

/* パルスアニメーション */
@keyframes loadingPulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.2; }
  100% { opacity: 1; }
}

/* -------- フィルタボタンエリア -------- */
#applied_sokunou_btopc_filter {
  column-count: 2;
  column-gap: 16px;
  margin-bottom: 20px;
}
#applied_sokunou_btopc_filter > div.applied-sokunou-btopc-filter-group-clear {
  display: block;
  break-before: column;
  column-span: all;
  width: 50%;
  margin: auto;
  border: none;
}
@media (max-width: 1024px) {
  #applied_sokunou_btopc_filter {
    column-count: 1;
  }
}
.applied-sokunou-btopc-filter-group {
  display: inline-block;
  padding: 10px;
  width: 100%;
  margin-bottom: 10px;
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  border: solid 1px #ccc;
  border-radius: 4px;
}
.applied-sokunou-btopc-filter-group h3 {
  margin: 0 0 8px 0;
  font-size: 1.3rem;
  font-weight: bold;
  display: inline-block;
  align-items: center;
}
.applied-sokunou-btopc-filter-group h3 svg {
  margin-right: 4px;
}
.applied-sokunou-btopc-filter-group > p {
  display: inline-block;
  margin: 0 0 8px 8px;
}
.applied-sokunou-btopc-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.applied-sokunou-btopc-result-count {
  display: block;
  break-before: column;
  column-span: all;
  width: 100%;
  margin-top: -24px;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.6);
  text-align: left;
}

/* —— ソート切替トグル（固有クラス名版） —— */
.applied-sokunou-btopc-sort-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: -18px 0 16px 0;
  column-span: all;
}
.applied-sokunou-btopc-sort-container .applied-sokunou-btopc-sort-label,
.applied-sokunou-btopc-sort-container .applied-sokunou-btopc-sort-asc-label,
.applied-sokunou-btopc-sort-container .applied-sokunou-btopc-sort-desc-label {
  font-size: 0.9rem;
  color: #555;
}

/* トグルスイッチ全体 */
.applied-sokunou-btopc-sort-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
/* チェックボックス本体を非表示 */
.applied-sokunou-btopc-sort-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}
/* スライダー本体 */
.applied-sokunou-btopc-sort-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}
/* ノブ */
.applied-sokunou-btopc-sort-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
/* チェック時の背景色 */
.applied-sokunou-btopc-sort-toggle-input:checked + .applied-sokunou-btopc-sort-toggle-slider {
  background-color: #1976d2;
}
/* チェック時のノブ移動 */
.applied-sokunou-btopc-sort-toggle-input:checked + .applied-sokunou-btopc-sort-toggle-slider:before {
  transform: translateX(20px);
}

/* 最新の流行を意識したかっこいいボタンデザイン */
.applied-sokunou-btopc-filter-buttons button {
  flex-grow: 2;
  box-sizing: border-box;
  padding: 8px 16px;
  background-color: #888;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.applied-sokunou-btopc-filter-group[data-filter-type="custom"]
  button:nth-child(-n+4) {
  flex-shrink: 3;
  min-width: 100%;
}
.applied-sokunou-btopc-filter-group[data-filter-type="custom"]
  button:nth-child(n+5) {
  flex-shrink: 1;
}
.applied-sokunou-btopc-filter-buttons button:hover {
  background-color: #2088ff;
  box-shadow: 0px 2px 4px rgba(0,0,0,0.3);
}
.applied-sokunou-btopc-filter-buttons button.applied-sokunou-btopc-selected {
  background-color: #0d47a1;
}
.applied-sokunou-btopc-filter-buttons button.applied-sokunou-btopc-disabled,
.applied-sokunou-btopc-filter-buttons button.applied-sokunou-btopc-unavailable {
  background-color: #fff;
  color: #fff;
  pointer-events: none;
}

/* すべての選択解除ボタン用 */
.applied-sokunou-btopc-filter-group-clear h3 {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 8px 0;
}
.applied-sokunou-btopc-filter-group-clear .applied-sokunou-btopc-filter-buttons {
  display: flex;
  gap: 8px;
}
.applied-sokunou-btopc-clear-all {
  padding: 8px 16px;
  background-color: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
button.applied-sokunou-btopc-clear-all.applied-sokunou-btopc-disabled {
  background-color: #fff;
  color: #fff;
  cursor: not-allowed;
}

/* -------- 商品リストエリア -------- */
#applied_sokunou_btopc_list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
@media (max-width: 1024px) {
  #applied_sokunou_btopc_list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
.applied-sokunou-btopc-product-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.applied-sokunou-btopc-product-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.applied-sokunou-btopc-product-image {
  padding-top: 10px;
  width: 100%;
  background-color: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.applied-sokunou-btopc-product-image img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}
.applied-sokunou-btopc-product-info {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mcon .applied-sokunou-btopc-product-info p,
.mcon li.innrtList_li p {
  margin-bottom: 0;
}
.mcon .applied-sokunou-btopc-product-info p.applied-sokunou-btopc-product-name,
.mcon .applied-sokunou-btopc-product-info p.item-prefix,
.mcon .applied-sokunou-btopc-product-info p.item-info-note,
.mcon .applied-sokunou-btopc-product-info p.applied-sokunou-btopc-product-price,
.mcon .applied-sokunou-btopc-product-info p.applied-sokunou-btopc-product-shipping,
.mcon .applied-sokunou-btopc-product-info p.applied-sokunou-btopc-product-quantity,
#category li.innrtList_li p.name p.item-prefix,
#category li.innrtList_li p.name p.item-info-note {
  margin-bottom: 0.3em;
}
.applied-sokunou-btopc-product-info > a:last-child {
  display: inline-block;
  width: 70%;
  margin: auto;
  padding: 4px;
  text-align: center;
  color: white;
  background-color: #196BC7;
}
.applied-sokunou-btopc-product-name,
#category li.innrtList_li p.name {
  font-size: 0.95rem;
  font-weight: bold;
  margin: 0;
}
#category li.innrtList_li p.name,
#category li.innrtList_li p.price,
#category li.innrtList_li p.shouhin_addcode {
  margin-top: 10px;
}

/* —— 商品リストのスペック表示 —— */
.applied-sokunou-btopc-product-info .spec-list,
#category li.innrtList_li p.name .spec-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}
.applied-sokunou-btopc-product-info .spec-list li,
#category li.innrtList_li p.name .spec-list li {
  display: inline-block;
}
.applied-sokunou-btopc-product-info .spec-list li a,
.applied-sokunou-btopc-product-info p.item-prefix a,
.applied-sokunou-btopc-product-info p.item-info-note a,
#category li.innrtList_li p.name .spec-list li a,
#category li.innrtList_li p.name p.item-prefix a,
#category li.innrtList_li p.name p.item-info-note a {
  color: #333;
}
.applied-sokunou-btopc-product-info .spec-full,
#category li.innrtList_li p.name .spec-full {
  width: 100%;
  font-size: 1.1rem;
  font-weight: bold;
  border-top: none;
  border-right: none;
  border-left: none;
  border-bottom: 1px solid #ccc;
  margin: 0;
  padding: 0.2em 0 0;
}
.applied-sokunou-btopc-product-info .spec-type,
#category li.innrtList_li p.name .spec-type {
  width: 20%;
  font-size: 0.9rem;
  border-top: none;
  border-right: none;
  border-left: none;
  border-bottom: 1px solid #ccc;
  margin: 0;
  padding: 0.2em 0 0;
}
.applied-sokunou-btopc-product-info .spec-value,
#category li.innrtList_li p.name .spec-value {
  width: 80%;
  font-size: 1.1rem;
  font-weight: bold;
  border-top: none;
  border-right: none;
  border-left: none;
  border-bottom: 1px solid #ccc;
  margin: 0;
  padding: 0.2em 0 0;
}
.applied-sokunou-btopc-product-info .hide-colon,
#category li.innrtList_li p.name .hide-colon {
  display: none;
}
.applied-sokunou-btopc-product-info .item-prefix,
#category li.innrtList_li p.name .item-prefix {
  font-size: 1rem;
  color: #333;
  margin: 0;
  padding: 0;
  border-top: none;
  border-right: none;
  border-left: none;
  border-bottom: 1px solid #ccc;
}
.applied-sokunou-btopc-product-info .item-info-note,
#category li.innrtList_li p.name .item-info-note {
  font-size: 0.9rem;
  color: #333;
  margin: 0.2em 0 0 0;
  padding: 0;
}

.applied-sokunou-btopc-product-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: #e53935;
  margin: -12px 0 0 0;
}
.applied-sokunou-btopc-product-quantity {
  font-size: 1rem;
  color: #333;
  margin: 0;
}
.applied-sokunou-btopc-product-name a,
#category li.innrtList_li p.name a {
  text-decoration: none;
  color: inherit;
}
.applied-sokunou-btopc-product-name a:hover,
#category li.innrtList_li p.name  a:hover {
  text-decoration: underline;
}

/* ===== ページャーのスタイル（最新マテリアルデザイン風） ===== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
}
.pagination-container button {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 12px;
  margin: 0 4px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}
@media (max-width: 1024px) {
  .pagination-container button {
    padding: 14px 4px;
    margin: 0 2px;
    min-width: 24px;
  }
}
.pagination-container button:hover {
  background-color: #e0e0e0;
}
.pagination-container button.active {
  background-color: #1976d2;
  color: #fff;
  border-color: #1976d2;
}
.pagination-container button:disabled {
  opacity: 0;
  cursor: default;
  pointer-events: none;
}

/* ===== アコーディオン ===== */

/* コンテンツラッパー */
#btopc-accordion-content {
  overflow: hidden;
  height: 0;
  display: none;
  transition: height 1s ease;
}

/* ボタン */
#btopc-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #196BC7;
  color: #fff;
  padding: 0.75rem 2rem;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  width: auto;
  margin: 0.75rem auto;
  border-radius: 25px;
  transition: background-color .2s;
}
#btopc-accordion-toggle .svg-inline--fa {
  margin-right: 6px;
}
#btopc-accordion-toggle.open {
  background-color: #196BC7;
}
#applied_sokunou_btopc_area.loading:not(.open) {
  min-height: 0 !important;
}
