@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.2
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/

/* ========================================================== */
/* 全体レイアウト */
/* ========================================================== */

.magazine-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

.magazine-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.magazine-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: bold;
}

.magazine-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* ========================================================== */
/* 統計セクション */
/* ========================================================== */

.stats-section {
    display: flex !important;
    gap: 8px !important; 
    padding: 3px 0 !important;
    justify-content: flex-start;
    margin-bottom: 30px;
}

.stat-card {
    padding: 3px 6px !important; 
    border-radius: 4px !important;
    font-size: 14px !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    text-align: center !important;
    border-left: none !important;
}

.stat-card .label {
    font-size: 0.7em !important;
    line-height: 1 !important;
    margin-bottom: 1px !important; 
    color: #666 !important;
}

.stat-card .number {
    font-size: 1em !important;
    line-height: 1 !important;
    font-weight: bold !important;
    color: #333 !important;
    margin: 0 !important;
}

/* ========================================================== */
/* フィルターセクション */
/* ========================================================== */

.filter-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ========================================================== */
/* 雑誌カードグリッド */
/* ========================================================== */

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.magazine-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.magazine-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* ========================================================== */
/* 画像エリア（重複削除・統合版）*/
/* ========================================================== */

.magazine-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 135%; /* アスペクト比 1:1.35 */
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.magazine-image.no-image {
    background: none !important;
}

.magazine-image.loading {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 画像とリンクのスタイル */
.magazine-image img,
.magazine-image a,
.image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.magazine-image img {
    object-fit: contain;
    background: white;
}

.magazine-image a {
    display: block;
    text-decoration: none;
}

/* NO IMAGE プレースホルダー */
.magazine-image .no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f8f8 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ccc !important;
    border: 1px dashed #ccc;
    box-sizing: border-box;
    font-size: 0.9em;
    z-index: 1;
}

/* 日付バッジ */
.magazine-date-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    line-height: 1;
    backdrop-filter: blur(10px);
}

/* ========================================================== */
/* カードボディ（統合版）*/
/* ========================================================== */

.magazine-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.magazine-person {
    font-size: 1.6em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
    line-height: 1.3;
}

.magazine-title {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.group-tag {
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    font-size: 0.85em;
    color: #555;
    font-weight: 600;
}

/* ========================================================== */
/* 購入リンクボタン */
/* ========================================================== */

.buy-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.buy-link {
    padding: 8px 12px;
    font-size: 0.85em;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid;
}

.buy-link:hover:not(.disabled) {
    transform: scale(1.05);
}

.amazon-link {
    background: #ff9900;
    color: white;
    border-color: #ff9900;
}

.rakuten-link {
    background: #bf0000;
    color: white;
    border-color: #bf0000;
}

.seven-link {
    background: #2d8c2e;
    color: white;
    border-color: #2d8c2e;
}

.tower-link {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
}

.buy-link.disabled {
    background: #e0e0e0;
    color: #999;
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.buy-link.disabled:hover {
    transform: none;
}

/* ========================================================== */
/* その他のUI要素 */
/* ========================================================== */

.loading {
    text-align: center;
    padding: 60px;
    font-size: 1.2em;
    color: #667eea;
}

.loading-progress {
    margin-top: 10px;
    font-size: 0.9em;
    color: #999;
}

.error-message {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-top: 30px;
}

.no-results h3 {
    color: #666;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.no-results p {
    color: #999;
}

/* ========================================================== */
/* ページネーション */
/* ========================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.pagination button.active {
    background: #667eea;
    color: white;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========================================================== */
/* レスポンシブデザイン */
/* ========================================================== */

@media (max-width: 768px) {
    .magazine-header h1 {
        font-size: 1.8em;
    }

    .filter-row {
        flex-direction: column;
    }

    .magazine-grid {
        grid-template-columns: 1fr;
    }

    .buy-links {
        grid-template-columns: 1fr;
    }

    .magazine-person {
        font-size: 1.4em;
    }
}

@media screen and (max-width: 1023px){
  /* 必要に応じて追加 */
}

@media screen and (max-width: 834px){
  /* 必要に応じて追加 */
}

@media screen and (max-width: 480px){
  /* 必要に応じて追加 */
}