/* --- 検索フォームの装飾 --- */
.custom-search-box {
    background: #f7f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e1e8ed;
}
.search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}
.field-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 60px;
}
.field-group label {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #444;
}
.field-group input, 
.field-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    background: #fff;
}
.search-submit-btn {
    background: #0693e3;
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.search-submit-btn:hover {
    background: #007cba;
}

/* --- 3列グリッド表示の装飾（トップ用 ＆ 検索結果 ＆ アーカイブすべて） --- */
/* .archive #primary を追加してアーカイブページも3列のグリッドの土台にする */
.product-grid,
.archive #primary {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 全デバイスで3列固定 */
    gap: 25px;
    margin-bottom: 40px;
}

/* 検索結果・アーカイブページのタイトルと下部ナビは3列ぶち抜きにする */
.search-results .page-header,
.archive .page-header,
.search-results .posts-navigation,
.archive .posts-navigation {
    grid-column: 1 / -1; 
}

/* 各商品アイテムの装飾（アーカイブページの記事枠も統合） */
.product-item,
.search-results article.post,
.archive article.post {
    margin: 0 !important;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 0;
    box-sizing: border-box;
}

/* 検索結果・アーカイブページのデフォルト余白を調整 */
.search-results article.post,
.archive article.post {
    padding: 15px;
}

/* 商品サムネイル（アーカイブ用画像も統合） */
.product-thumbnail img,
.search-results .post-thumbnail img,
.archive .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* 画像の比率を保ったままトリミング */
    display: block;
}

/* 検索結果・アーカイブの画像配置の順序を一番上に矯正 */
.search-results .post-thumbnail,
.archive .post-thumbnail {
    margin: -15px -15px 15px -15px;
    display: block;
    order: -1; 
}

/* 商品情報エリア（グループ化） */
.product-info,
.search-results .entry-header,
.archive .entry-header {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 検索結果・アーカイブのヘッダーpadding調整 */
.search-results .entry-header,
.archive .entry-header {
    padding: 0;
}

/* 商品タイトル（グループ化） */
h2.product-title,
.search-results .entry-title,
.archive .entry-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    line-height: 1.4;
    font-weight: normal;
}
.product-title a,
.search-results .entry-title a,
.archive .entry-title a {
    color: #333;
    text-decoration: none;
}






/*価格*/

.price{
font-size: 24px;
font-weight: bold;
}
.size{
font-size: 18px;
font-weight: bold;
}



/* カテゴリ・説明文・フッターの調整 */
.product-meta-cat span{
	display: inline-block;
}
.product-meta-cat a {
    background: #eee;
    padding: 2px 6px;
    border-radius: 3px;
    color: #666;
    text-decoration: none;
}


.product-custom-fields {
    margin-top: auto; /* 基本情報を上に詰め、カスタム項目を一番下に固定 */
    padding-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}
.badge.size { background: #e3f2fd; color: #0d47a1; }
.badge.zaiko { background: #ffebee; color: #c62828; }

/* 検索結果・アーカイブ画面の余計な日付などのメタ情報を非表示に */
.search-results .entry-meta,
.archive .entry-meta,
.search-results .entry-summary,
.archive .entry-summary {
    display: none;
}


/* 検索結果とアーカイブ一覧の本文を3行（約100文字）で省略し、末尾に「…」をつける */
.search-results .entry-content,
.archive .search-results .entry-content, /* 念のため両方のパターンに対応 */
.archive .entry-content {
    /*display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3; /* 表示する行数（3行でおよそ100文字前後になります） */
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.product-meta-cat .posted-on,
.product-meta-cat .byline{
	font-size: 10px;
    color: #666;
}
.product-meta-cat a.story,
.search-results a.story,
.archive a.story{
	background-color: #cae8f8;
}
.product-meta-cat a.mirai,
.search-results a.mirai,
.archive a.mirai{
	background-color: #f8f2ca;
}






/* --- レスポンシブ (タブレットサイズ) --- */
@media screen and (max-width: 900px) {
    .search-results #primary,
    .archive #primary {
        gap: 15px; 
        padding: 10px; 
    } 
    .product-thumbnail img,
    .search-results .post-thumbnail img,
    .archive .post-thumbnail img {
        height: 150px;
    }
}

/* --- レスポンシブ (スマホサイズ) --- */
@media screen and (max-width: 600px) {
.product-grid,
.archive #primary {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 全デバイスで3列固定 */
    gap: 15px;
    margin-bottom: 40px;
}
    .product-thumbnail img,
    .search-results .post-thumbnail img,
    .archive .post-thumbnail img {
        height: 100px;
    }
    
    /* スマホ用に文字サイズを少し微調整 */
    .product-title,
    .search-results .entry-title,
    .archive .entry-title {
        font-size: 13px;
    }


.custom-search-box{
	margin-bottom: 60px;
}



/* 商品情報エリア（グループ化） */
.product-info,
.archive article.post,
.search-results article.post {
    padding: 10px;
}
/* 商品タイトル（グループ化） */
h2.product-title,
.search-results .entry-title,
.archive .entry-title,
.product-meta-cat {
    font-size: 14px;
    margin: 0;
}
.product-meta-cat a {
    font-size: 12px;
}



.field-group {
    min-width: 200px;
}


}








/* ページネーション */
.pagination {
    text-align: center;
    margin-top: 30px;
    grid-column: 1 / -1;
    line-height: 3em;
}
.pagination .page-numbers {
    padding: 8px 14px;
    border: 1px solid #ddd;
    margin: 0 2px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}
.pagination .page-numbers.current {
    background: #333;
    color: #fff;
    border-color: #333;
}