@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
  :root {
    --bg-color: #f7f9fa;
    --box-bg: #ffffff;
    --accent: #2b3a42;
    --text-main: #333333;
    --text-sub: #666666;
    --radius: 24px;
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
  }

  header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
  }

  .neko-bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
  }

  .bento-box {
    background: var(--box-bg);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
    overflow: hidden;
    position: relative;
  }

  .bento-box.wide {
    grid-column: span 2;
  }

  .hero-box {
    padding: 32px 20px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%);
  }
  .hero-box h1 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--accent);
  }
  .search-bar {
    display: flex;
    background: #fff;
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #eaeaea;
  }
  .search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
  }
  .search-bar button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0 20px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
  }
  .search-bar button:active {
    opacity: 0.8;
    transform: scale(0.95);
  }

  .category-box {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-decoration: none;
    color: var(--text-main);
    min-height: 120px;
  }
  .category-box:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }
  .cat-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }
  .cat-name {
    font-size: 14px;
    font-weight: 700;
  }

  .trend-box {
    padding: 20px;
  }
  .box-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* ★ 新機能：横スクロールコンテナ */
  .scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 12px; /* スクロールバー用の余白 */
    margin-bottom: 8px;
    scroll-snap-type: x mandatory; /* ピタッと止まるスナップ機能 */
    -webkit-overflow-scrolling: touch; /* スマホでの滑らかなスクロール */
    /* スクロールバーを隠してスタイリッシュに */
    scrollbar-width: none; 
  }
  .scroll-container::-webkit-scrollbar {
    display: none;
  }

  /* ★ 横スクロール内の各アイテム（画像） */
  .scroll-item {
    flex: 0 0 120px; /* 1枚の画像の幅を固定 */
    scroll-snap-align: start; /* スクロール時に左端にピタッと合わせる */
  }

  .img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #e2e8f0;
    border-radius: 12px;
    animation: pulse 1.5s infinite ease-in-out;
  }
  @keyframes pulse {
    0% { background-color: #f1f5f9; }
    50% { background-color: #e2e8f0; }
    100% { background-color: #f1f5f9; }
  }

  .action-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    transition: transform 0.1s;
  }
  .action-btn:active {
    transform: scale(0.98);
  }

  .guide-link {
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    text-decoration: none;
    color: var(--text-main);
    height: 100%;
    justify-content: center;
  }
  .guide-box:active {
    background: #f8fafc;
  }
  .guide-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 4px;
  }
  .guide-desc {
    font-size: 11px;
    color: var(--text-sub);
  }
.bento-spacer {
  grid-column: span 2; /* 2列分（横幅いっぱい）の場所を取る */
  height: 68px; /* ここの数字を変えれば、隙間の広さを自由にいじれるよ */
}
/* PCビュー（画面幅が769px以上）のときだけ適用するスタイル */
@media screen and (min-width: 769px) {
    /* メインのBentoグリッド全体を少し広げて存在感を出す */
    .neko-bento-grid {
        max-width: 1000px; /* 必要に応じて幅を調整してね */
        margin: 0 auto;
    }

    /* ヒーローエリアの文字やパディングを大きくする */
    .hero-box h1 {
        font-size: 2.2rem;
    }
    .hero-box {
        padding: 40px;
    }

    /* 各ボックスの余白や文字をPC用にリッチにする */
    .bento-box {
        padding: 24px;
    }
}