/* =========================================================
   StoreLab 新弾商品
   スマホ 3列コンパクト表示
========================================================= */

@media screen and (max-width: 767px) {

  .mereca-genre-products {
    margin: 16px 0 24px !important;
    padding: 12px 8px !important;

    background: #f7f9fc !important;

    border: 1px solid #e6e9ee !important;
    border-radius: 14px !important;

    box-shadow: 0 4px 16px rgba(0,0,0,.05) !important;
  }


  /* タイトル */
  .mereca-genre-products-title {
    margin: 0 0 12px !important;
    padding: 0 4px 9px !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;

    border-bottom: 1px solid #e1e5ea !important;
  }


  /* 3列 */
  .mereca-genre-products-list {
    display: grid !important;

    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;

    gap: 7px !important;

    width: 100% !important;
  }


  /* 商品カード */
  .mereca-genre-product-item {
    min-width: 0 !important;
    width: 100% !important;

    margin: 0 !important;
    padding: 5px !important;

    overflow: hidden !important;

    background: #ffffff !important;

    border: 1px solid #e9edf2 !important;
    border-radius: 10px !important;

    box-shadow: 0 2px 7px rgba(0,0,0,.04) !important;
  }


  /* StoreLabカード自体 */
  .mereca-genre-product-item > * {
    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
  }


  /* 画像 */
  .mereca-genre-product-item img {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;

    margin: 0 auto 5px !important;

    object-fit: contain !important;
  }


  /* カード内部の文字をコンパクト化 */
  .mereca-genre-product-item p,
  .mereca-genre-product-item span,
  .mereca-genre-product-item a {
    font-size: 10px !important;
    line-height: 1.4 !important;
  }


  /* ボタン */
  .mereca-genre-product-item button,
  .mereca-genre-product-item a[class*="btn"],
  .mereca-genre-product-item a[class*="button"] {
    min-height: 28px !important;

    padding: 5px 3px !important;

    font-size: 9px !important;
    line-height: 1.25 !important;

    border-radius: 6px !important;
  }

}
 


/* =========================================================
   MEISY / めれか
   統合カスタムCSS
   文字サイズはSWELL側で管理
========================================================= */


/* =========================================================
   1. 基本
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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


/* =========================================================
   2. HOME 投稿リスト
========================================================= */

/*
ショートコード側で

PC 3列
SP 2列

を指定しているので、
CSS側ではカラム数を無理に変更しない。
*/

.home #main_content .p-postList__item {
  min-width: 0 !important;
}

.home #main_content .p-postList__link {
  color: #222222 !important;
  text-decoration: none !important;
}

.home #main_content .p-postList__thumb {
  overflow: hidden !important;
  background: #f5f5f5 !important;
}

.home #main_content .p-postList__thumb img {
  display: block !important;

  width: 100% !important;
  height: 100% !important;

  object-fit: cover !important;
}

.home #main_content .p-postList__title {
  margin-top: 7px !important;

  color: #222222 !important;

  font-weight: 600 !important;
  line-height: 1.55 !important;
}

.home #main_content .p-postList__meta {
  margin-top: 5px !important;

  color: #888888 !important;
}


/* =========================================================
   3. HOME スマホ
   サイドバーを上に表示
========================================================= */

@media screen and (max-width: 959px) {

  .home .l-content {
    display: flex !important;
    flex-direction: column !important;
  }

  .home #sidebar {
    order: -1 !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 0 30px !important;
  }

  .home #main_content {
    order: 0 !important;

    width: 100% !important;
  }

}


/* =========================================================
   4. HOME スマホ投稿一覧
========================================================= */

@media screen and (max-width: 767px) {

  .home .home-section-title,
  .home h2.home-section-title,
  .home h3.home-section-title {
    min-height: 44px !important;

    margin: 30px 0 14px !important;

    padding: 0 12px !important;

    border-radius: 0 0 13px 0 !important;
  }

  .home #main_content .p-postList__title {
    line-height: 1.5 !important;
  }

}


/* =========================================================
   5. カード画像3列
========================================================= */

/*
カラム全体の追加CSSクラス：
card-3col
*/

.wp-block-columns.card-3col,
.card-3col {
  display: grid !important;

  grid-template-columns:
    repeat(3, minmax(0, 1fr)) !important;

  gap: 18px 12px !important;

  width: 100% !important;

  margin-top: 20px !important;
  margin-bottom: 28px !important;
}

.card-3col > .wp-block-column,
.card-3col > * {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  margin: 0 !important;

  flex: none !important;
  flex-basis: auto !important;
}

.card-3col .wp-block-image,
.card-3col figure.wp-block-image {
  display: block !important;

  width: 100% !important;
  max-width: 100% !important;

  margin: 0 !important;
}

.card-3col .wp-block-image img,
.card-3col figure.wp-block-image img {
  display: block !important;

  width: 100% !important;
  max-width: 100% !important;

  height: auto !important;

  margin: 0 auto !important;

  object-fit: contain !important;
}

.card-3col figcaption {
  margin-top: 5px !important;

  line-height: 1.4 !important;

  text-align: center !important;
}


@media screen and (max-width: 767px) {

  .wp-block-columns.card-3col,
  .card-3col {
    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;

    gap: 12px 5px !important;

    margin-top: 16px !important;
    margin-bottom: 22px !important;
  }

  .card-3col figcaption {
    margin-top: 4px !important;

    line-height: 1.35 !important;
  }

}


/* =========================================================
   6. 通常記事
========================================================= */

.single-post .post_content {
  color: #333333 !important;

  font-weight: 400 !important;

  -webkit-font-smoothing: antialiased;
}

.single-post .post_content p,
.single-post .post_content li,
.single-post .post_content td {
  font-weight: 400 !important;
}

.single-post .post_content strong,
.single-post .post_content b {
  font-weight: 700 !important;
}

.single-post .post_content h2 {
  font-weight: 700 !important;
}

.single-post .post_content h3 {
  font-weight: 600 !important;
}


/* =========================================================
   7. スマホ記事
   文字サイズは指定しない
========================================================= */

@media screen and (max-width: 767px) {

  body {
    line-height: 1.75 !important;
  }


  body.single-post .l-content {
    width: 100% !important;
    max-width: 100% !important;

    padding-left: 10px !important;
    padding-right: 10px !important;
  }


  body.single-post .l-mainContent,
  body.single-post .l-mainContent__inner,
  body.single-post .p-article,
  body.single-post .post_content {
    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
  }


  .p-articleHead__title,
  .c-pageTitle {
    margin-top: 8px !important;
    margin-bottom: 10px !important;

    font-weight: 700 !important;

    line-height: 1.45 !important;



  .p-articleHead__meta,
  .p-articleMetas,
  .c-postTimes,
  .c-postAuthor {
    line-height: 1.5 !important;
  }


  .p-breadcrumb {
    line-height: 1.5 !important;
  }


  body.single-post .post_content,
  body.single-post .post_content p,
  body.single-post .post_content li {
    line-height: 1.9 !important;
  }


  .post_content p {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
  }


  .post_content h2 {
    margin-top: 30px !important;
    margin-bottom: 14px !important;

    padding: 9px !important;

    font-weight: 700 !important;

    line-height: 1.5 !important;
  }


  .post_content h3 {
    margin-top: 22px !important;
    margin-bottom: 11px !important;

    font-weight: 600 !important;

    line-height: 1.55 !important;
  }


  .post_content h4 {
    margin-top: 18px !important;
    margin-bottom: 9px !important;

    line-height: 1.5 !important;
  }


  .post_content table {
    width: 100% !important;

    line-height: 1.5 !important;
  }


  .post_content table th,
  .post_content table td {
    padding: 8px 7px !important;

    line-height: 1.5 !important;
  }


  .post_content .wp-block-table {
    overflow-x: auto !important;

    -webkit-overflow-scrolling: touch !important;
  }


  .post_content img {
    max-width: 100% !important;

    height: auto !important;
  }


  .post_content figcaption,
  .wp-element-caption {
    margin-top: 5px !important;

    color: #777777 !important;

    line-height: 1.5 !important;
  }


  .p-toc {
    margin-top: 18px !important;
    margin-bottom: 25px !important;
  }


  .p-toc__list,
  .p-toc a {
    line-height: 1.7 !important;
  }

}


/* =========================================================
   8. 超小型スマホ
========================================================= */

@media screen and (max-width: 380px) {

  .wp-block-columns.card-3col,
  .card-3col {
    grid-template-columns:
      repeat(3, minmax(0, 1fr)) !important;

    gap: 10px 4px !important;
  }

}


/* =========================================================
   9. i-mobile広告
========================================================= */

.imobile-pc {
  display: block !important;
}

.imobile-sp {
  display: none !important;
}


@media screen and (max-width: 767px) {

  .imobile-pc {
    display: none !important;
  }

  .imobile-sp {
    display: block !important;
  }

}


/* =========================================================
   10. 疑似BOX開封
========================================================= */

@media screen and (max-width: 767px) {

  #eb05-box-simulator {
    margin-top: 20px !important;
    margin-bottom: 20px !important;

    padding: 15px 9px !important;
  }


  #eb05-box-simulator .eb-title {
    line-height: 1.45 !important;
  }

}


/* =========================================================
   11. 固定PRバー
========================================================= */

.mereca-pr-fixed-simple {
  position: fixed;

  left: 0;
  bottom: 0;

  z-index: 9999;

  display: flex;

  align-items: center;
  justify-content: center;

  gap: 18px;

  width: 100%;

  padding: 12px 16px;

  background:
    linear-gradient(
      90deg,
      #081826,
      #123f59,
      #1687a7
    );

  color: #ffffff !important;

  text-decoration: none !important;

  box-shadow:
    0 -4px 18px rgba(0, 0, 0, .18);
}


.mereca-pr-fixed-text {
  font-weight: 700;

  line-height: 1.4;
}


.mereca-pr-fixed-more {
  flex: none;

  padding: 6px 12px;

  background: #ffffff;

  border-radius: 999px;

  color: #123f59;

  font-weight: 800;

  white-space: nowrap;
}


.mereca-pr-fixed-simple:hover {
  opacity: .94;
}


@media screen and (max-width: 767px) {

  .mereca-pr-fixed-simple {
    justify-content: space-between;

    gap: 8px;

    padding:
      9px
      8px
      calc(9px + env(safe-area-inset-bottom));
  }


  .mereca-pr-fixed-text {
    line-height: 1.35;
  }


  .mereca-pr-fixed-more {
    padding: 6px 8px;
  }

}

@media screen and (max-width: 959px) {

  #mereca-media-header .mereca-media-copy {
    display: block !important;

    width: 100% !important;

    text-align: center !important;

    white-space: normal !important;
  }

  #mereca-media-header .mereca-media-copy-main,
  #mereca-media-header .mereca-media-copy-sub {
    display: block !important;

    width: 100% !important;

    white-space: nowrap !important;
  }

}

@media screen and (max-width: 959px) {

  #mereca-media-header .mereca-media-search {
    width: 150px !important;
    max-width: 150px !important;
    flex: 0 0 150px !important;
  }

  #mereca-media-header .mereca-media-search input {
    width: 100% !important;
    max-width: 100% !important;
  }

}

@media screen and (max-width: 959px) {

  #mereca-media-header .mereca-media-search {
    width: 150px !important;
    max-width: 150px !important;
    flex: 0 0 150px !important;

    margin-left: auto !important;
    margin-right: 0 !important;

    display: flex !important;
    justify-content: flex-end !important;
  }

  #mereca-media-header .mereca-media-search form {
    width: 100% !important;
    margin-left: auto !important;
  }

  #mereca-media-header .mereca-media-search input {
    width: 100% !important;
    max-width: 100% !important;
  }

}

/* =========================================================
   StoreLab 新弾カード
   スマホ用コンパクトデザイン
========================================================= */

@media screen and (max-width: 767px) {

  .mereca-genre-products {
    margin: 16px 0 24px !important;
    padding: 12px !important;

    background:
      linear-gradient(
        135deg,
        #f8fbff 0%,
        #ffffff 55%,
        #f5f8fc 100%
      ) !important;

    border: 1px solid #e5eaf0 !important;
    border-radius: 14px !important;

    box-shadow:
      0 4px 18px rgba(0, 0, 0, .05) !important;
  }


  /* 見出し */
  .mereca-genre-products-title {
    position: relative;

    margin: 0 0 11px !important;
    padding: 0 0 8px 11px !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    letter-spacing: .02em !important;

    color: #222 !important;

    border-bottom: 1px solid #e4e8ed !important;
  }


  /* 左のアクセント */
  .mereca-genre-products-title::before {
    content: "";

    position: absolute;

    left: 0;
    top: 3px;
    bottom: 10px;

    width: 4px;

    background:
      linear-gradient(
        180deg,
        #1e88e5,
        #54c3e8
      );

    border-radius: 999px;
  }


  /* 商品一覧 */
  .mereca-genre-products-list {
    display: grid !important;

    grid-template-columns: 1fr !important;

    gap: 9px !important;
  }


  /* 1商品ごと */
  .mereca-genre-product-item {
    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;

    background: #fff !important;

    border: 1px solid #edf0f3 !important;
    border-radius: 11px !important;

    box-shadow:
      0 2px 8px rgba(0, 0, 0, .035) !important;
  }


  /* StoreLabカード内の余白を少し圧縮 */
  .mereca-genre-product-item [class*="storelab"] {
    max-width: 100% !important;
  }


  /* 商品画像を大きくしすぎない */
  .mereca-genre-product-item img {
    max-width: 90px !important;
    height: auto !important;

    object-fit: contain !important;
  }

