/******************************/
/* category */
/******************************/
.p-category {
  overflow: hidden;
}
.p-category__ttl {
  margin-top: 0;
  margin-bottom: 30px;
  line-height: 1.4;
  font-size: 28px;
  font-weight: normal;
  color: #000000;
  word-break: break-all;
}
@media screen and (max-width: 767px) {
  .p-category__ttl {
    margin-bottom: 30px;
    font-size: 20px;
  }
}
.p-category-free {
  margin-top: 30px;
  margin-bottom: 30px;
  line-height: 2;
}
@media only screen and (max-width: 767px) {
  .p-category-free {
    margin-bottom: 45px;
  }
}
.p-category-search {
  margin-bottom: 30px;
}
@media screen and (max-width: 767px) {
  .p-category-search {
    margin-bottom: 20px;
    text-align: center;
  }
}
/***** カテゴリ一覧 *****/
.p-category-list {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  margin-bottom: 60px;
  margin-left: -10px;
  margin-right: -10px;
}
@media screen and (max-width: 767px) {
  .p-category-list {
    margin-left: -10px;
    margin-right: -10px;
  }
}
@media screen and (max-width: 767px) {
  .p-category-list {
    display: block;
    margin-left: 0;
    margin-right: 0;
  }
}
.p-category-list__item {
  box-sizing: border-box;
  margin-bottom: 20px;
  padding-left: 10px;
  padding-right: 10px;
  width: 50%;
  word-break: break-all;
}
@media screen and (max-width: 1023px) {
  .p-category-list__item {
    width: 50%;
  }
}
@media screen and (max-width: 767px) {
  .p-category-list__item {
    margin-top: 0;
    margin-bottom: 10px;
    padding-left: 0;
    padding-right: 0;
    width: auto;
  }
}
.p-category-list__link {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  padding: 10px;
  min-height: 100px;
  font-size: 16px;
  background: #f6f6f6;
}
@media screen and (max-width: 767px) {
  .p-category-list__link {
    min-height: 70px;
    font-size: 15px;
  }
}
.p-category-list__link:hover {
  background: #f0f0f0;
  text-decoration: none;
}
.p-category-list__img {
  display: block;
  margin-right: 20px;
  width: 80px;
}
@media screen and (max-width: 1023px) {
  .p-category-list__img {
    width: 50px;
  }
}
.p-category-list__name {
  display: block;
  flex: 1;
  font-size: 18px;
}
@media screen and (max-width: 767px) {
  .p-category-list__name {
    font-size: 16px;
  }
}
/***** 商品件数・ソート *****/
.p-item-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
@media screen and (max-width: 767px) {
  .p-item-list-head {
    display: block;
  }
}
.p-item-list-num {
  font-size: 16px;
}
@media screen and (max-width: 767px) {
  .p-item-list-num {
    margin-bottom: 15px;
    text-align: center;
  }
}
.p-item-sort {
  display: flex;
  align-items: center;
}
.p-item-sort__ttl {
  white-space: nowrap;
  margin-right: 10px;
}
.p-item-sort__select {
  padding: 10px;
  border: 1px solid #b3b2b2;
  border-radius: 3px;
  height: auto;
  min-width: 180px;
  line-height: 1.4;
  color: #000000;
}
@media only screen and (max-width: 767px) {
  .p-item-sort__select {
    flex: 1;
  }
}
.p-item-sort-list {
  display: flex;
  flex-wrap: wrap;
}
.p-item-sort-list__item {
  margin-left: 30px;
}
@media screen and (max-width: 767px) {
  .p-item-sort-list__item {
    margin-left: 25px;
  }
}
.p-item-sort-list__item:first-child {
  margin-left: 0;
}
.p-item-sort-list__item span {
  text-decoration: underline;
}
.campaign-box {
    font-family: "Noto Sans JP", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "游ゴシック", "Yu Gothic", YuGothic, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.campaign-box h1 {
    color: #4a4a4a;
    border-bottom: 2px solid #4a4a4a;
    padding-bottom: 10px;
}

.campaign-box .highlight {
    color: #e74c3c;
    font-weight: bold;
}

.campaign-box .btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.campaign-box .btn:hover {
    background-color: #2980b9;
}

/* 商品簡易説明用 */
.c-item-list__desc {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.6;
  color: #666;  /* やや薄めの文字色 */
}

/*  無限スクロール用CSS */
/* ローディングスピナー */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
}

.loading-spinner:after {
    content: " ";
    display: block;
    width: 32px;
    height: 32px;
    margin: 4px;
    border-radius: 50%;
    border: 3px solid #ccc;
    border-color: #333 transparent #333 transparent;
    animation: loading-spinner 1.2s linear infinite;
}

@keyframes loading-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 商品アイテムのトランジション */
.c-item-list__item {
    transition: opacity 0.5s ease-in-out;
}

/* モバイル対応 */
@media screen and (max-width: 767px) {
    #loading-indicator,
    #end-message {
        font-size: 14px;
    }
    
    .loading-spinner {
        width: 30px;
        height: 30px;
    }
    
    .loading-spinner:after {
        width: 24px;
        height: 24px;
        margin: 3px;
        border-width: 2px;
    }
}

/* カテゴリ説明欄の画像スタイル */
.p-category-free img {
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* floatが設定されている画像の余白調整 */
.p-category-free img[align="right"],
.p-category-free img[style*="float: right"] {
    margin: 0 0 10px 15px;
}

.p-category-free img[align="left"],
.p-category-free img[style*="float: left"] {
    margin: 0 15px 10px 0;
}