@charset "UTF-8";
/**
 * Theme Name: Kindle Manga Sale
 * Description: Custom theme for Kindle Manga Sale site
 * Version: 2.0
 */

:root {
    --primary-color: #FF9900;
    --secondary-color: #146eb4;
    --text-color: #333;
    --light-text: #718096;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --sale-card-width: 180px;
    --header-height: 64px;
    --max-width: 1400px;
}

/* =========================================
   Base Styles
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* =========================================
   Layout
   ========================================= */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.site-main {
    flex: 1;
}

/* =========================================
   Header
   ========================================= */
.site-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 50%, #1a202c 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.custom-logo,
.logo-icon {
    height: 40px;
    width: auto;
    display: block;
}

.site-title-text {
    display: flex;
    flex-direction: column;
}

.site-name {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.site-tagline {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.2;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.search-toggle,
.menu-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.search-toggle:hover,
.menu-toggle:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
}

/* 検索バー（スライド表示用） */
.search-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 90;
    visibility: hidden;
}

.search-bar.active {
    transform: translateY(0);
    visibility: visible;
}

.search-bar form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    background: #f8f9fa;
    color: #2d3748;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.search-submit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
}

/* ハンバーガーメニュー（ドロワー） */
.menu-drawer {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 99;
    overflow-y: auto;
    padding: 2rem 0;
}

.menu-drawer.open {
    transform: translateX(0);
}

.menu-items li {
    border-bottom: 1px solid #f0f0f0;
}

.menu-items li a {
    display: block;
    padding: 1rem 1.5rem;
    color: #2d3748;
    font-weight: 600;
    transition: background 0.2s;
}

.menu-items li a:hover {
    background: #f7fafc;
    color: var(--primary-color);
}

/* 旧検索スタイルの無効化 */
.header-search, .search-form {
    /* 不要なスタイルをリセット */
}

/* =========================================
   Hero Section (Top Page)
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 1.5rem 1rem 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.hero-title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 800;
    margin: 0 0 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-sale-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
}

.count-number {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.hero-actions .hero-btn {
    display: inline-block;
    background: var(--primary-color);
    color: #1a202c;
    font-weight: 700;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.6);
}

/* =========================================
   Shelf Section
   ========================================= */
.shelf-section {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.shelf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.shelf-title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    padding-left: 0;
    color: #2d3748;
    white-space: nowrap;
}

/* トップページの棚（横スクロール） */
.shelf-section .sales-grid {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin: 0 -1rem; /* 画面端までスクロールさせるためのネガティブマージン */
    padding-left: 1rem;
    padding-right: 1rem;
}

/* スクロールバーのスタイリング（Webkit） */
.shelf-section .sales-grid::-webkit-scrollbar {
    height: 8px;
}

.shelf-section .sales-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.shelf-section .sales-grid::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.shelf-section .sales-grid::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* カードラッパー（aタグまたはdiv） */
.shelf-section .sale-card-link,
.shelf-section .sale-card {
    flex: 0 0 var(--sale-card-width);
    width: var(--sale-card-width);
    max-width: var(--sale-card-width);
    display: block;
}

.shelf-section .sale-card-link .sale-card {
    width: 100%; /* リンク内のカードは幅100% */
}

/* =========================================
   Sale Card
   ========================================= */
.sale-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    height: 100%; /* 高さ揃え */
    display: flex;
    flex-direction: column;
}

.sale-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.sale-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.sale-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sale-card:hover .sale-card__image img {
    transform: scale(1.05);
}

.sale-card__point-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom-left-radius: 8px;
    z-index: 2;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.1);
}

.sale-card__content {
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 0;
    height: auto;
}

.sale-card__title {
    position: absolute;
    bottom: -0.3rem;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0.3rem 0.5rem 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 700;
    z-index: 5;
    max-height: 3.3rem; /* 0.8rem * 1.5 * 2 + 0.5rem * 2 = 3.4rem より少し小さくして確実に2行に収める */
    word-break: break-word;
    overflow-wrap: break-word;
}

.sale-card__info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    width: 100%;
}

.sale-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sale-card__remaining-time {
    font-size: 0.7rem;
    color: #718096;
    background: #edf2f7;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.sale-card__remaining-time.urgent {
    background: #fff5f5;
    color: #e53e3e;
    font-weight: 600;
}

.sale-card__price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 0.5rem;
}

.sale-card__sale-price {
    color: #e53e3e;
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1;
}

.sale-card__original-price {
    text-decoration: line-through;
    color: #a0aec0;
    font-size: 0.75rem;
    line-height: 1;
    margin-bottom: 2px;
}

/* =========================================
   Sales List Page
   ========================================= */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #2d3748;
    margin: 0;
}

/* セール一覧ページのグリッドレイアウト - より具体的なセレクタで優先度を上げる */
.sales-section.sales-list-page .sales-grid.sales-list-grid,
.sales-list-page .sales-list-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 0.8rem !important;
    padding: 2rem 0 !important;
}

.sales-list-page .sale-card {
    width: 100%;
    flex: auto;
}

/* セール一覧ページ専用：カードサイズを小さく（8カラム表示対応） */
.sales-list-page .sale-card__content {
    padding: 0.35rem 0.4rem;
}

.sales-list-page .sale-card__title {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem 0.3rem;
    max-height: 2.5rem;
    line-height: 1.3;
}

.sales-list-page .sale-card__sale-price {
    font-size: 0.85rem;
}

.sales-list-page .sale-card__original-price {
    font-size: 0.6rem;
}

.sales-list-page .sale-card__remaining-time {
    font-size: 0.6rem;
    padding: 1px 3px;
}

.sales-list-page .sale-card__point-badge {
    font-size: 0.65rem;
    padding: 2px 5px;
}

/* PCで8カラム表示 - 優先度を上げる */
@media (min-width: 768px) and (max-width: 1199px) {
    .sales-section.sales-list-page .sales-grid.sales-list-grid,
    .sales-list-page .sales-list-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 0.8rem !important;
    }
}

/* 大きな画面（1200px以上）で8カラム - 優先度を上げる */
@media (min-width: 1200px) {
    .sales-section.sales-list-page .sales-grid.sales-list-grid,
    .sales-list-page .sales-list-grid {
        grid-template-columns: repeat(8, 1fr) !important;
        gap: 0.8rem !important;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    font-weight: 600;
}

.page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background: #1a202c;
    color: white;
    padding: 3rem 1rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
}

.social-link i {
    display: block;
}

.copyright {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
    :root {
        --sale-card-width: 140px;
        --header-height: 56px;
    }
    
    /* スマホ表示時：記事タイトルと冒頭の文字サイズを小さくしてファーストビューに作品を表示 */
    .single-post .entry-title,
    .single .entry-title,
    body.single-post .entry-title,
    body.single .entry-title,
    .entry-header .entry-title,
    h1.entry-title {
        font-size: 1.3rem !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
    }
    
    /* スマホ表示時：intro-textの文字サイズを小さく */
    .intro-text,
    .intro-text p,
    .intro-text[style*="font-size: 1.1em"],
    .intro-text[style*="font-size:1.1em"] {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        padding: 12px 15px !important;
    }
    
    /* スマホ表示時：entry-meta（日付など）の文字サイズも小さく */
    .entry-meta,
    .single-post .entry-meta,
    .single .entry-meta {
        font-size: 0.85rem !important;
        margin-bottom: 8px !important;
    }
    }
    
    /* ヘッダーのレスポンシブ調整 */
    .header-inner {
        padding: 0 1rem;
    }
    
    .site-branding {
        gap: 0.5rem;
    }
    
    .custom-logo,
    .logo-icon {
        height: 32px;
    }
    
    .site-name {
        font-size: 1.1rem;
    }
    
    .site-tagline {
        display: none; /* モバイルではタグラインを非表示 */
    }
    
    .search-toggle,
    .menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .header-search {
        display: none; /* モバイルでは検索ボタンのみ表示等の対応が必要かも */
    }
    
    /* ヒーローセクションのレスポンシブ調整 */
    .hero-section {
        padding: 1rem 1rem 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-container {
        padding: 0;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
        margin-bottom: 1rem;
        white-space: nowrap;
    }
    
    .hero-sale-count {
        width: 90%;
        justify-content: center;
        padding: 0.4rem 1rem;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }
    
    .count-number {
        font-size: 1.4rem;
    }
    
    .hero-actions .hero-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    /* セール一覧ページの調整 */
    .page-title {
        font-size: 1.2rem; /* SPで1行に収まるように調整 */
        padding: 0 1rem;
    }

    .sales-list-page .sales-list-grid {
        grid-template-columns: repeat(3, 1fr) !important; /* 3カラムに変更 */
        gap: 0.5rem !important; /* 隙間を調整 */
    }
    
    /* グリッドアイテムの幅あふれ防止 */
    .sales-list-page .sales-list-grid > a {
        min-width: 0;
    }

    /* 3カラム時のカード内フォントサイズ調整 */
    .sales-list-page .sale-card__remaining-time {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .sales-list-page .sale-card__sale-price {
        font-size: 0.9rem;
    }
    
    /* 棚タイトルのレスポンシブ調整 */
    .shelf-title {
        font-size: clamp(0.9rem, 5vw, 1.3rem);
        padding-left: 0;
    }
    
    /* 棚間のパディング調整 */
    .shelf-section {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 52px;
    }
    
    /* ヘッダーのさらなる調整 */
    .header-inner {
        padding: 0 0.75rem;
    }
    
    .site-name {
        font-size: 1rem;
    }
    
    .custom-logo,
    .logo-icon {
        height: 28px;
    }
    
    .search-toggle,
    .menu-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    /* ヒーローセクションのさらなる調整 */
    .hero-section {
        padding: 0.75rem 0.75rem 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .hero-title {
        font-size: clamp(1.2rem, 5.5vw, 1.6rem);
        margin-bottom: 0.5rem;
    }
    
    .hero-sale-count {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 1rem;
    }
    
    .count-number {
        font-size: 1.1rem;
    }
    
    .hero-actions .hero-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* 棚タイトルのさらなる調整 */
    .shelf-title {
        font-size: clamp(0.85rem, 6vw, 1.1rem);
        padding-left: 0;
        margin-bottom: 0.75rem;
    }
    
    /* 棚間のパディング調整 */
    .shelf-section {
        margin-bottom: 0.75rem;
    }
}

/* =========================================
   シリーズ詳細ページ（リッチデザイン）
   ========================================= */

/* コンテナ調整 */
.site-main {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* ヒーローセクション */
.series-hero {
    position: relative;
    width: 100%;
    color: #fff;
    overflow: hidden;
    padding-top: 4rem; /* ヘッダー分 */
    padding-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 0;
}

.series-hero-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: 1;
    transform: scale(1.1); /* ブラーの端切れ防止 */
}

.series-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26,32,44,0.7) 0%, rgba(26,32,44,0.9) 100%);
    z-index: 2;
}

.series-hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

/* 表紙画像 */
.series-cover-wrapper {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.series-cover-wrapper:hover {
    transform: translateY(-5px);
}

.series-cover-main {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.series-cover-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    border-radius: 8px;
    border: 2px dashed rgba(255,255,255,0.2);
}

/* 作品情報（右カラム） */
.series-hero-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.series-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.tag-completed {
    background: #48bb78;
    color: #fff;
}

.tag-ongoing {
    background: #4299e1;
    color: #fff;
}

.tag-volumes {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.tag-genre {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}

.series-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.series-magazines {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
}

.series-magazines .meta-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.series-magazines .magazines-list {
    color: rgba(255,255,255,0.95);
}

.series-awards {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
}

.series-awards .meta-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.awards-list {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.award-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.4rem 0.6rem;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    border-left: 3px solid #ffd700;
}

.award-name {
    font-weight: 600;
    color: #fff;
}

.award-category {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    padding: 0.1rem 0.4rem;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.award-year {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.award-rank {
    font-size: 0.85rem;
    color: #ffd700;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    background: rgba(255,215,0,0.2);
    border-radius: 4px;
}

.series-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.series-meta-grid {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 1.2rem;
    margin-bottom: 0.5rem;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    opacity: 0.7;
    font-size: 0.85rem;
}

.meta-label i {
    margin-right: 0.2rem;
}

/* ヒーロー内情報ボックス（セール中/通常共通） */
.hero-info-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.2rem; /* 上パディングを増やしてバッジスペース確保 */
    margin-top: 0.5rem;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative; /* バッジの基準 */
}

/* セール中の場合は強調表示 */
.hero-info-box.has-sale {
    border-color: rgba(255, 75, 43, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 75, 43, 0.1);
}

/* セール中でない場合は落ち着いたデザイン */
.hero-info-box.no-sale {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* 絶対配置のセールバッジ */
.sale-badge-absolute {
    position: absolute;
    top: -12px;
    left: -10px;
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4);
    animation: pulse 2s infinite;
    z-index: 5;
}

.hero-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.info-badge {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(255, 75, 43, 0.6);
    }
}

.sale-limit {
    font-size: 0.8rem;
    color: #ffd700;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 価格と期限の横並びラッパー */
.hero-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.8rem;
    gap: 1rem;
}

.hero-info-price {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.hero-info-limit {
    margin-bottom: 0.4rem; /* 価格のベースラインと調整 */
}

.price-main {
    color: #fff;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
}

.price-main .currency {
    font-size: 1.1rem;
    margin-right: 2px;
}

.price-main .amount {
    font-size: 2rem; /* 2.5remから縮小 */
    letter-spacing: -1px;
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.price-sub {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.price-sub .original {
    text-decoration: line-through;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.price-sub .discount-rate {
    color: #ff4b2b;
    background: white;
    padding: 0 0.35rem;
    border-radius: 3px;
    font-weight: bold;
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.hero-info-points {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    width: fit-content;
}

.hero-info-status {
    margin-bottom: 0.8rem;
}

.status-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0;
    padding: 0.3rem 0;
}

.point-icon {
    background: #ffd700;
    color: #333;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.7rem;
}

.point-text {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.85rem;
}

.hero-info-cta {
    margin-top: 0.8rem;
}

.btn-amazon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #FF9900;
    color: #111;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.btn-amazon-large:hover {
    background: #ffad33;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

/* メインコンテンツエリア */
.series-content-container {
    max-width: 1000px;
    margin: -40px auto 0; /* ヒーローに少し重ねる */
    position: relative;
    z-index: 10;
    padding: 0 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.section-heading {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2d3748;
}

.section-heading i {
    color: #718096;
}

/* あらすじ */
.synopsis-container p {
    line-height: 1.6;
    color: #4a5568;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.read-more-btn {
    background: none;
    border: none;
    color: #4299e1;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    font-size: 0.9rem;
    margin-top: 0;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* 関連セール（ミニカード） */
.related-sales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.2rem;
}

.mini-sale-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.mini-sale-card:hover {
    transform: translateY(-3px);
}

.mini-card-image {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    aspect-ratio: 2/3;
    margin-bottom: 0.6rem;
}

.mini-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-point-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-bottom-left-radius: 6px;
}

.mini-card-title {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #2d3748;
}

.mini-card-price {
    font-weight: 700;
    color: #e53e3e;
    font-size: 1rem;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #2d3748;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
}

.modal-close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    line-height: 1.8;
    color: #4a5568;
    font-size: 1.05rem;
}

/* SPレスポンシブ対応 */
@media (max-width: 768px) {
    .series-hero {
        padding-top: 3.5rem;
        padding-bottom: 4rem;
    }

    .series-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .series-cover-wrapper {
        width: 240px;
        margin: 0 auto;
        max-width: 80%;
    }

    .series-hero-title {
        font-size: 1.8rem;
    }

    .series-tags {
        justify-content: center;
    }

    .series-meta-grid {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-info-box {
        margin: 0 auto;
        width: 100%;
    }
    
    .series-content-container {
        margin-top: -20px;
        padding: 0 1rem 3rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .price-main .amount {
        font-size: 2.5rem;
    }
}


    .series-hero-title {
        font-size: 1.8rem;
    }

    .series-tags {
        justify-content: center;
    }

    .series-meta-grid {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-info-box {
        margin: 0 auto;
        width: 100%;
    }
    
    .series-content-container {
        margin-top: -20px;
        padding: 0 1rem 3rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .price-main .amount {
        font-size: 2.5rem;
    }
}


/* �ڍ׃y�[�W���^���i�R���p�N�g�Łj */
.series-meta-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
}

.series-meta-info .meta-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    border: none;
}

.series-meta-info .meta-row i {
    width: 1.2em;
    text-align: center;
    opacity: 0.6;
    font-size: 0.9em;
}

/* �^�O���X�g */
.series-tags-list.compact-tags {
    margin-top: 0.4rem;
    gap: 0.4rem;
}

.tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px; /* �ۂ݂����炷 */
}

/* �I�[�f�B�G���X�^�O */
.tag-audience {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

/* ��ܗ� */
.series-awards.compact-awards {
    margin-top: 0.4rem;
}

.series-awards.compact-awards .awards-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0;
}

.series-awards.compact-awards .award-item {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    background: rgba(255, 215, 0, 0.15);
    border-left: 2px solid #ffd700;
    border-radius: 2px;
}

.series-awards.compact-awards .award-item i {
    color: #ffd700;
    margin-right: 0.3rem;
    font-size: 0.9em;
}

.awards-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    height: 24px; /* ���̃^�O�ƍ��������킹�� */
    align-self: center;
}

.awards-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* =========================================
   投稿ページ用スタイル
   ========================================= */

/* 投稿コンテンツの幅制限（black_friday_article.htmlと同じ840px） */
/* より強力なセレクタで確実に適用 - 投稿ページ（.single-post, .single）は中央揃え */
body.single-post main.site-main > .container,
body.single main.site-main > .container,
body.single-post main.site-main .container,
body.single main.site-main .container,
body.single-post .site-main > .container,
body.single .site-main > .container,
body.single-post .site-main .container,
body.single .site-main .container {
    max-width: 840px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ページ（.page）は中央揃えのまま */
body.page .site-main > .container,
body.page main.site-main .container {
    max-width: 840px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* 投稿本文のコンテンツエリア（幅制限内で表示） */
.site-main .entry-content {
    max-width: 100%;
}

/* 記事内の要素も幅制限内に収める */
.site-main article {
    max-width: 100%;
}

/* エントリコンテンツ内の記事要素（.article-header, .article-body, .article-footer）に幅制限を適用 */
body.single-post .entry-content,
body.single .entry-content,
.single-post .entry-content,
.single .entry-content {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.single-post .entry-content .article-header,
body.single .entry-content .article-header,
body.single-post .entry-content .article-body,
body.single .entry-content .article-body,
body.single-post .entry-content .article-footer,
body.single .entry-content .article-footer,
.single-post .entry-content .article-header,
.single .entry-content .article-header,
.single-post .entry-content .article-body,
.single .entry-content .article-body,
.single-post .entry-content .article-footer,
.single .entry-content .article-footer {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* =========================================
   セール記事用スタイル（投稿内で使用）
   ========================================= */

/* セールアイテムのコンテナ（CSS Gridレイアウト） */
.sale-item-wrapper {
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0 0 0 !important; /* 上部のパディングを少しだけに */
    margin-bottom: 10px !important; /* コンテンツ下部と区切り線の間のマージン */
    padding-bottom: 0 !important;
}

/* より詳細なセレクタで確実に適用 */
body.single-post .sale-item-wrapper,
body.single .sale-item-wrapper,
article .sale-item-wrapper,
.single-post .sale-item-wrapper,
.single .sale-item-wrapper,
.article-body .sale-item-wrapper,
.entry-content .sale-item-wrapper {
    padding: 10px 0 0 0 !important; /* 上部のパディングを少しだけに */
    margin-bottom: 10px !important; /* コンテンツ下部と区切り線の間のマージン */
    padding-bottom: 0 !important;
}

/* より詳細なセレクタで確実に適用 */
.single-post .sale-item-wrapper,
.single .sale-item-wrapper,
.article-body .sale-item-wrapper,
.entry-content .sale-item-wrapper {
    padding: 10px 0 0 0 !important; /* 上部のパディングを少しだけに */
    margin-bottom: 10px !important; /* コンテンツ下部と区切り線の間のマージン */
    padding-bottom: 0 !important;
}

/* sale-item-wrapper内の余分な<p>タグのマージン・パディングを削除 */
.sale-item-wrapper > p,
.sale-item-container > p,
.sale-item-buttons + p,
.sale-item-wrapper p:empty {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    height: 0 !important;
    display: none !important;
}

.sale-item-container {
    display: grid;
    gap: 16px 16px; /* 縦のgapを16px、横のgapも16px */
    row-gap: 0.75em !important; /* ボタン下の空間を少しだけ確保 */
    /* スマホレイアウト (2段構成) */
    grid-template-areas:
        "image info"
        "buttons buttons";
    grid-template-columns: 100px 1fr; /* 画像幅固定 */
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* より詳細なセレクタで確実に適用 */
body.single-post .sale-item-container,
body.single .sale-item-container,
article .sale-item-container {
    row-gap: 0.75em !important; /* ボタン下の空間を少しだけ確保 */
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.sale-item-image {
    grid-area: image;
    display: flex;
    align-items: flex-start;
}

.sale-item-info {
    grid-area: info;
    align-items: flex-start;
}

.sale-item-buttons {
    grid-area: buttons;
    margin-top: 0 !important; /* ボタン上のマージンを削除 */
    margin-bottom: 0 !important; /* ボタン下のマージンを削除 */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* より詳細なセレクタで確実に適用 */
body.single-post .sale-item-buttons,
body.single .sale-item-buttons,
article .sale-item-buttons {
    margin: 0 !important;
    padding: 0 !important;
}

/* PCレイアウト (768px以上) */
@media (min-width: 768px) {
    .sale-item-container {
        grid-template-areas:
            "image info"
            "image buttons";
        grid-template-columns: 140px 1fr; /* PCは画像少し大きく */
        gap: 16px 24px;
    }
}

/* セールアイテム内の要素スタイル */
.sale-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sale-item-info > * {
    margin: 0;
}

.sale-item-info h3 {
    margin: 0;
    padding: 0;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.4;
    color: #333;
}

.sale-item-info .price-row,
.sale-item-info .price-meta,
.single-post .sale-item-info .price-meta,
.single .sale-item-info .price-meta,
.article-body .sale-item-info .price-meta,
.entry-content .sale-item-info .price-meta,
body.single-post .sale-item-info .price-meta,
body.single .sale-item-info .price-meta,
article .sale-item-info .price-meta {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* 折り返さない */
    gap: 8px !important;
    margin-bottom: 2px !important;
    flex-direction: row !important; /* 横並びを明示 */
    width: 100% !important;
    flex-flow: row nowrap !important; /* 横並びを強制 */
}

/* price-meta内の要素を確実に横並びにする */
.price-meta > *,
.sale-item-info .price-meta > *,
.price-meta span,
.sale-item-info .price-meta span,
.price-meta .deadline,
.price-meta .price,
.single-post .price-meta > *,
.single .price-meta > *,
.article-body .price-meta > *,
.entry-content .price-meta > *,
.single-post .sale-item-info .price-meta > *,
.single .sale-item-info .price-meta > *,
.article-body .sale-item-info .price-meta > *,
.entry-content .sale-item-info .price-meta > * {
    display: block !important; /* flexboxの子要素として扱う */
    white-space: nowrap !important;
    float: none !important;
    clear: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important; /* 縮小しない */
}

/* インラインスタイルを上書き（PointBadgeなど） */
.price-meta span[style],
.sale-item-info .price-meta span[style],
.single-post .price-meta span[style],
.single .price-meta span[style] {
    display: block !important; /* flexboxの子要素として扱う */
    white-space: nowrap !important;
    float: none !important;
    clear: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important; /* 縮小しない */
}

.sale-item-info .deadline {
    font-size: 0.8rem;
    color: #d32f2f;
    font-weight: bold;
}

.sale-item-info .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #B12704;
}

/* 価格メタ情報内の要素 */
.price-meta .deadline {
    font-size: 0.8rem;
    color: #d32f2f;
    font-weight: bold;
}

.price-meta .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #B12704;
}

.sale-item-info .review,
.sale-item-info .review-text {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.5;
    margin: 2px 0 0 0;
    padding-top: 4px;
    border-top: 1px dashed #eee;
}

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

.sale-item-buttons a {
    flex: 1 !important;
    padding: calc(0.95rem * 0.5) 0 !important; /* 文字幅の2倍まで（上下パディング合計で文字幅と同じ） */
    text-decoration: none !important;
    border-radius: 4px !important;
    font-size: 0.95rem !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: opacity 0.2s, background 0.2s;
    line-height: 1 !important; /* flexboxで中央揃えするため1に */
    min-height: 0 !important;
    height: auto !important;
    max-height: calc(0.95rem * 2) !important; /* 文字幅の2倍を最大高さに */
    box-sizing: border-box !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

.sale-item-buttons .amazon-btn {
    background: #ff9900;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sale-item-buttons .detail-btn {
    border: 1px solid #ccc;
    color: #333;
    background: #fff;
    transition: background 0.2s;
}

.sale-item-buttons .detail-btn:hover {
    background: #f5f5f5;
}

.sale-item-image a {
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    line-height: 0;
}

.sale-item-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    margin: 0;
    padding: 0;
    display: block;
    vertical-align: top;
}

/* =========================================
   セール記事専用スタイル（投稿ページのみ）
   ========================================= */

/* 投稿ページ（.single-post）内でのみ適用されるスタイル */
/* ヘッダーは画面幅いっぱい（幅制限なし）、メインコンテンツのみ840pxに制限 */
/* ヘッダーの幅制限を明示的に解除（画面幅いっぱいに表示） */
body.single-post .site-header,
body.single .site-header {
    width: 100% !important;
    max-width: 100% !important;
}

body.single-post .site-header .header-inner,
body.single .site-header .header-inner {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 1.5rem !important;
}

/* コンテナ全体に幅制限を追加（タイトル、投稿日、本文すべてに適用） */
/* より強力なセレクタで確実に適用 - 重複を避けるため、上記の定義を使用 */

/* エントリコンテンツ全体にも幅制限を適用 */
body.single-post .entry-content,
body.single .entry-content,
.single-post .entry-content,
.single .entry-content {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* エントリーヘッダー（タイトル、投稿日）も幅制限内に収める */
.single-post .entry-header,
.single .entry-header,
.single-post .entry-title,
.single .entry-title,
.single-post .entry-meta,
.single .entry-meta {
    max-width: 100%;
}

/* 投稿者情報を非表示 */
.entry-meta .byline,
.single-post .entry-meta .byline,
.single .entry-meta .byline,
.entry-meta .author,
.single-post .entry-meta .author,
.single .entry-meta .author {
    display: none !important;
}

/* アイキャッチ画像（記事内）を非表示 */
.post-thumbnail,
.single-post .post-thumbnail,
.single .post-thumbnail,
article .post-thumbnail,
.entry-header + .post-thumbnail {
    display: none !important;
}

.single-post .article-wrapper,
.single .article-wrapper,
.single-post .article-header,
.single .article-header,
.single-post .article-body,
.single .article-body,
.single-post .article-footer,
.single .article-footer,
.entry-content .article-header,
.entry-content .article-body,
.entry-content .article-footer {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.5;
    color: #333;
    box-sizing: border-box;
}

/* スマホ・PC共通スタイル - セールアイテムコンテナ */
/* 投稿コンテンツ内の要素にも適用されるように、.article-body内の要素も対象に追加 */
/* CSS Gridレイアウトを使用（元のHTMLファイルと同じ） */
.single-post .sale-item-container,
.single .sale-item-container,
.article-body .sale-item-container,
.entry-content .sale-item-container,
.sale-item-container {
    display: grid !important;
    gap: 16px 16px !important;
    row-gap: 1em !important; /* ボタン下の空間を文章一行分に */
    /* スマホレイアウト (2段構成) */
    grid-template-areas:
        "image info"
        "buttons buttons";
    grid-template-columns: 100px 1fr !important; /* 画像幅固定 */
    grid-template-rows: auto auto !important; /* 明示的に2行を定義 */
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.single-post .sale-item-image,
.single .sale-item-image,
.article-body .sale-item-image,
.entry-content .sale-item-image,
.sale-item-image {
    grid-area: image !important;
    display: flex;
    align-items: flex-start;
}

.single-post .sale-item-info,
.single .sale-item-info,
.article-body .sale-item-info,
.entry-content .sale-item-info,
.sale-item-info {
    grid-area: info !important;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

.single-post .sale-item-info > *,
.single .sale-item-info > *,
.article-body .sale-item-info > *,
.entry-content .sale-item-info > *,
.sale-item-info > * {
    margin: 0;
}

.single-post .sale-item-buttons,
.single .sale-item-buttons,
.article-body .sale-item-buttons,
.entry-content .sale-item-buttons,
.sale-item-buttons {
    grid-area: buttons !important;
    display: flex !important;
    gap: 10px;
    width: 100% !important; /* ボタンエリアが全幅を取るように */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 投稿ページ内のボタン高さを強制的に低くする（記事内の inline style より優先） */
/* SP用（デフォルト） */
body.single-post .sale-item-buttons a,
body.single .sale-item-buttons a,
.single-post .sale-item-buttons a,
.single .sale-item-buttons a,
.article-body .sale-item-buttons a,
.entry-content .sale-item-buttons a,
article .sale-item-buttons a {
    padding: calc(0.95rem * 0.5) 0 !important; /* 文字幅の2倍まで（上下パディング合計で文字幅と同じ） */
    max-height: calc(0.95rem * 2) !important; /* 文字幅の2倍を最大高さに */
    min-height: 0 !important;
    line-height: 1 !important; /* flexboxで中央揃えするため1に */
    font-size: 0.95rem !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* PCレイアウト (768px以上) */
@media (min-width: 768px) {
    body.single-post .site-header .header-inner,
    body.single .site-header .header-inner {
        padding: 0 2rem !important;
    }
    
    body.single-post main.site-main > .container,
    body.single main.site-main > .container,
    body.single-post main.site-main .container,
    body.single main.site-main .container,
    body.single-post .site-main > .container,
    body.single .site-main > .container,
    body.single-post .site-main .container,
    body.single .site-main .container {
        max-width: 840px !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
    }
    
    .single-post .article-wrapper,
    .single .article-wrapper {
        padding: 0;
    }
    
    /* PCレイアウト (768px以上) - CSS Grid */
    .single-post .sale-item-container,
    .single .sale-item-container,
    .article-body .sale-item-container,
    .entry-content .sale-item-container,
    .sale-item-container {
        grid-template-areas:
            "image info"
            "image buttons";
        grid-template-columns: 140px 1fr !important; /* PCは画像少し大きく */
        grid-template-rows: auto auto !important; /* 明示的に2行を定義 */
        gap: 16px 24px !important;
        row-gap: 0.75em !important; /* ボタン下の空間を少しだけ確保 */
    }
    
    /* PC用ボタン高さ設定 */
    body.single-post .sale-item-buttons a,
    body.single .sale-item-buttons a,
    .single-post .sale-item-buttons a,
    .single .sale-item-buttons a,
    .article-body .sale-item-buttons a,
    .entry-content .sale-item-buttons a,
    article .sale-item-buttons a,
    .sale-item-buttons a {
        line-height: 1 !important; /* flexboxで中央揃えするため1に */
        padding: calc(0.95rem * 0.5) 0 !important; /* 文字幅の2倍まで（上下パディング合計で文字幅と同じ） */
    max-height: calc(0.95rem * 2) !important; /* 文字幅の2倍を最大高さに */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        vertical-align: middle !important;
    }
    
}

/* intro-textの空行を削除 */
.intro-text {
    margin-bottom: 0 !important;
    padding-bottom: 20px !important;
}

.intro-text p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.8 !important;
}

/* セールバナーとAmazonリンクの間の空白を削除 */
/* figureの直後のすべてのpタグ（コメントを含む）を非表示 */
figure.wp-block-image.alignfull + p,
.wp-block-image.alignfull + p,
figure.wp-block-image.alignfull + p + p,
.wp-block-image.alignfull + p + p {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    overflow: hidden !important;
    display: none !important;
}

/* セールバナーの下部マージンも削除 */
.wp-block-image.alignfull,
figure.wp-block-image.alignfull {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* セールバナーの直後のAmazonリンクのpタグのマージンを完全に削除 */
/* より具体的なセレクタで確実に適用 */
.entry-content figure.wp-block-image.alignfull ~ p.has-text-align-center,
.entry-content .wp-block-image.alignfull ~ p.has-text-align-center,
.single-post figure.wp-block-image.alignfull ~ p.has-text-align-center,
.single-post .wp-block-image.alignfull ~ p.has-text-align-center,
.entry-content > figure.wp-block-image.alignfull ~ p.has-text-align-center,
.entry-content > .wp-block-image.alignfull ~ p.has-text-align-center,
body.single-post figure.wp-block-image.alignfull ~ p.has-text-align-center,
body.single-post .wp-block-image.alignfull ~ p.has-text-align-center,
body.single figure.wp-block-image.alignfull ~ p.has-text-align-center,
body.single .wp-block-image.alignfull ~ p.has-text-align-center {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
}

/* インラインスタイルのmargin-topを強制的に上書き（属性セレクタで） */
.entry-content p.has-text-align-center[style*="margin-top"],
.single-post p.has-text-align-center[style*="margin-top"],
body.single-post p.has-text-align-center[style*="margin-top"],
body.single p.has-text-align-center[style*="margin-top"],
p.has-text-align-center[style*="margin-top"] {
    margin-top: 0 !important;
}

/* さらに強力なセレクタ：figureの直後の3番目のpタグ（Amazonリンク） */
.entry-content figure.wp-block-image.alignfull + p + p + p.has-text-align-center,
.entry-content .wp-block-image.alignfull + p + p + p.has-text-align-center,
.single-post figure.wp-block-image.alignfull + p + p + p.has-text-align-center,
.single-post .wp-block-image.alignfull + p + p + p.has-text-align-center {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
}

/* 区切り線（hr）のマージンを少しだけに */
.wp-block-separator,
.wp-block-separator.is-style-wide,
hr.wp-block-separator,
.entry-content .wp-block-separator,
.entry-content hr {
    margin-top: 10px !important; /* コンテンツ下部からのマージン */
    margin-bottom: 10px !important; /* コンテンツ上部へのマージン */
}

/* 最初のsale-item-wrapperの上部マージンも少しだけに */
.entry-content > .sale-item-wrapper:first-child,
.entry-content > hr + .sale-item-wrapper,
.entry-content > .wp-block-separator + .sale-item-wrapper {
    margin-top: 10px !important;
    padding-top: 10px !important;
}
