/**
 * プラグイン・機材辞典 シングルページ CSS v3.0
 * 
 * 新機能:
 * - View数表示
 * - 製品概要セクション
 * - イボGからの一言（吹き出しデザイン）
 * - レコメンドセクション
 * - ランキングセクション（アーカイブ用）
 */

/* ===========================================
   全体レイアウト
   =========================================== */
.single-gear .l-article__body {
    max-width: 800px;
    margin: 0 auto;
}

/* ===========================================
   ヘッダー部分
   =========================================== */
.gear-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.gear-header-inner {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.gear-thumbnail {
    flex-shrink: 0;
    width: 140px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gear-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.gear-header-info {
    flex: 1;
    min-width: 0;
}

.gear-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.3;
}

.gear-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.gear-reading {
    color: #666;
    font-size: 0.9rem;
}

.gear-manufacturer {
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.95rem;
}

/* View数表示 */
.gear-view-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #888;
    margin-left: auto;
}

.gear-view-count svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.gear-rating {
    margin-bottom: 10px;
}

.rating-stars {
    color: #f39c12;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.rating-number {
    color: #888;
    font-size: 0.9rem;
    margin-left: 4px;
}

.gear-category {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gear-cat-link {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f9ff;
    color: #3b82f6;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.gear-cat-link:hover {
    background: #3b82f6;
    color: #fff;
}

/* ===========================================
   共通セクションスタイル
   =========================================== */
.gear-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px 0;
}

.gear-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

/* ===========================================
   製品概要セクション
   =========================================== */
.gear-overview {
    background: linear-gradient(135deg, #f0f9ff 0%, #fff 100%);
    border: 1px solid #e0f2fe;
}

.gear-overview-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2c3e50;
}

/* ===========================================
   価格セクション
   =========================================== */
.gear-price-section {
    text-align: center;
    background: #fff;
    border: 1px solid #e9ecef;
}

.gear-price-info {
    padding: 16px 0;
}

.price-sale {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.price-original {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.price-current {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.price-discount {
    display: inline-block;
    padding: 4px 10px;
    background: #ef4444;
    color: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.price-normal .price-current {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.price-note {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
}

/* ===========================================
   対応環境セクション
   =========================================== */
.gear-environment {
    background: #fff;
    border: 1px solid #e9ecef;
}

.environment-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.env-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px dashed #e9ecef;
}

.env-row:last-child {
    border-bottom: none;
}

.env-label {
    font-weight: 600;
    color: #666;
    min-width: 60px;
}

.env-value {
    color: #333;
}

/* ===========================================
   こんな人におすすめ
   =========================================== */
.gear-recommended-for {
    background: linear-gradient(135deg, #fef3c7 0%, #fff 100%);
    border: 1px solid #fcd34d;
}

.recommended-for-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

/* ===========================================
   イボGからの一言 - プレミアムデザイン
   =========================================== */
.gear-ibo-comments {
    margin: 3em 0 2em !important;
    padding: 0 !important;
    background: transparent !important;
    clear: both;
}

.ibo-comments-box {
    background: #fff !important;
    border: 1px solid #3b82f6 !important;
    border-radius: 16px !important;
    position: relative !important;
    padding: 0 !important;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15) !important;
    overflow: visible !important;
}

.ibo-comments-header {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%) !important;
    padding: 10px 20px 10px 95px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 14px 14px 0 0 !important;
    color: #fff !important;
    height: 60px !important;
    position: relative;
}

.ibo-avatar {
    position: absolute !important;
    left: 15px !important;
    top: -30px !important;
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    border: 4px solid #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    background: #fff !important;
    overflow: hidden !important;
    z-index: 10 !important;
}

.ibo-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.ibo-label {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ibo-comments-content {
    padding: 25px 25px 25px !important;
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    color: #444 !important;
    font-weight: 500 !important;
    position: relative;
}

.ibo-comments-content::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 40px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
}

/* ===========================================
   スクリーンショット
   =========================================== */
.gear-screenshots {
    background: #fff;
    border: 1px solid #e9ecef;
}

.screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.screenshot-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.screenshot-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshots-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

/* ===========================================
   購入リンク
   =========================================== */
.gear-purchase,
.gear-affiliate {
    background: #fff;
    border: 1px solid #e9ecef;
}

.purchase-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.purchase-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.purchase-link:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.purchase-link.official {
    background: #10b981;
}

.purchase-link.official:hover {
    background: #059669;
}

/* ===========================================
   関連コンテンツ
   =========================================== */
.gear-related-glossary,
.gear-related-posts {
    background: #fff;
    border: 1px solid #e9ecef;
}

.related-glossary-list,
.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.related-glossary-list li,
.related-posts-list li {
    margin: 0;
}

.related-glossary-list a,
.related-posts-list a {
    display: block;
    padding: 10px 14px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.related-glossary-list a:hover,
.related-posts-list a:hover {
    background: #3b82f6;
    color: #fff;
}

/* ===========================================
   レコメンドセクション
   =========================================== */
.gear-recommendations-section {
    margin: 3em 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    border: 1px solid #e9ecef;
}

.gear-recommendations-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
}

.gear-recommendations-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gear-recommendation-block {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    box-sizing: border-box;
}

.gear-recommendation-block.collaborative {
    border-left-color: #3b82f6;
}

.gear-recommendation-block.same-category {
    border-left-color: #f39c12;
}

.gear-recommendation-block.same-manufacturer {
    border-left-color: #10b981;
}

.recommendation-block-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommendation-icon {
    font-size: 1.1em;
}

.recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    overflow: hidden;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.recommendation-item:hover {
    border-color: #3b82f6;
    background: #fff;
}

.recommendation-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #3b82f6;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.same-category .recommendation-rank {
    background: #f39c12;
}

.same-manufacturer .recommendation-rank {
    background: #10b981;
}

.recommendation-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
    min-width: 0;
}

.recommendation-link:hover {
    color: #3b82f6;
}

.recommendation-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommendation-manufacturer,
.recommendation-category {
    display: inline-block;
    padding: 2px 8px;
    background: #e9ecef;
    color: #666;
    border-radius: 4px;
    font-size: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.recommendation-score {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 600;
    flex-shrink: 0;
}

.recommendation-views {
    font-size: 11px;
    color: #888;
    flex-shrink: 0;
}

/* ===========================================
   ランキングセクション（アーカイブ用）
   =========================================== */
.gear-ranking-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #fff 100%);
    border: 1px solid #3b82f6;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
}

.gear-ranking-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.gear-ranking-icon {
    font-size: 24px;
}

.gear-ranking-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.gear-ranking-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gear-ranking-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.gear-ranking-item:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.gear-ranking-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: #e9ecef;
    color: #666;
}

.gear-ranking-rank.gold {
    background: linear-gradient(135deg, #f4d03f 0%, #e9a825 100%);
    color: #1a1a2e;
}

.gear-ranking-rank.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #1a1a2e;
}

.gear-ranking-rank.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: #fff;
}

.gear-ranking-name {
    font-weight: 500;
}

.gear-ranking-manufacturer {
    font-size: 0.8rem;
    color: #666;
}

.gear-ranking-views {
    font-size: 0.8rem;
    color: #888;
    margin-left: auto;
}

/* ===========================================
   戻るリンク
   =========================================== */
.gear-back {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.gear-back-link {
    display: inline-block;
    padding: 12px 32px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.gear-back-link:hover {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* ===========================================
   レスポンシブ対応
   =========================================== */
@media (max-width: 768px) {
    .gear-header-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .gear-thumbnail {
        width: 120px;
    }
    
    .gear-title {
        font-size: 1.5rem;
    }
    
    .gear-meta {
        justify-content: center;
        gap: 8px;
    }
    
    .gear-view-count {
        width: 100%;
        margin-top: 8px;
        margin-left: 0;
        justify-content: center;
    }
    
    .gear-category {
        justify-content: center;
    }
    
    .gear-section {
        padding: 16px;
    }
    
    .gear-ibo-comments {
        margin: 2em 0 1.5em !important;
    }
    
    .ibo-comments-header {
        padding-left: 85px !important;
    }
    
    .ibo-avatar {
        width: 60px !important;
        height: 60px !important;
        top: -25px !important;
        left: 12px !important;
    }
    
    .ibo-comments-content {
        padding: 20px 16px !important;
        font-size: 0.95rem !important;
    }
    
    .price-current {
        font-size: 1.6rem;
    }
    
    .gear-ranking-section {
        padding: 16px;
    }
    
    .gear-ranking-list {
        flex-direction: column;
    }
    
    .gear-ranking-item {
        width: 100%;
    }
    
    .gear-recommendations-section {
        padding: 16px;
        margin: 2em 0;
    }
    
    .gear-recommendations-title {
        font-size: 1.1rem;
    }
    
    .gear-recommendation-block {
        padding: 14px;
    }
    
    .recommendation-block-title {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .recommendation-list {
        grid-template-columns: 1fr;
    }
    
    .recommendation-item {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .recommendation-rank {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .recommendation-name {
        font-size: 0.9rem;
    }
    
    .recommendation-manufacturer,
    .recommendation-category {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .recommendation-score,
    .recommendation-views {
        font-size: 10px;
    }
    
    .screenshots-gallery {
        grid-template-columns: 1fr;
    }
    
    .purchase-links {
        flex-direction: column;
    }
    
    .purchase-link {
        width: 100%;
        justify-content: center;
    }
    
    .related-glossary-list,
    .related-posts-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gear-title {
        font-size: 1.3rem;
    }
    
    .gear-section {
        padding: 14px;
    }
    
    .gear-section-title {
        font-size: 0.95rem;
    }
    
    .gear-recommendations-section {
        padding: 12px;
        margin: 1.5em 0;
    }
    
    .gear-recommendations-title {
        font-size: 1rem;
        margin-bottom: 16px;
    }
    
    .gear-recommendations-grid {
        gap: 14px;
    }
    
    .gear-recommendation-block {
        padding: 12px;
        border-radius: 10px;
    }
    
    .recommendation-block-title {
        font-size: 0.85rem;
        margin-bottom: 10px;
        gap: 6px;
    }
    
    .recommendation-icon {
        font-size: 1em;
    }
    
    .recommendation-item {
        padding: 8px;
        gap: 6px;
    }
    
    .recommendation-rank {
        width: 20px;
        height: 20px;
        font-size: 10px;
        border-radius: 4px;
    }
    
    .recommendation-link {
        gap: 6px;
    }
    
    .recommendation-name {
        font-size: 0.85rem;
    }
    
    .recommendation-manufacturer,
    .recommendation-category {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    .recommendation-score,
    .recommendation-views {
        font-size: 9px;
    }
}
