/* ========================================
   作品タイトルリンク (一時的にオフ)
======================================== */
/*
.item-title a {
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.item-title a:hover {
    text-decoration: underline;
}
*/

/* ========================================
   サムネイルホバー効果
======================================== */
.thumbnail-image-wrapper {
    position: relative;
    cursor: pointer;
}

.thumbnail-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.thumbnail-image-wrapper:hover::after {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   販売数表示コンテナ
======================================== */
.sales-display-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    padding: 0;
    width: 100%;
}

/* ========================================
   販売数ボックス（背景色追加）
======================================== */
.sales-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
    max-width: 120px;
    padding: 4px 1px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

/* 販売数ラベル */
.sales-box-label {
    font-size: 0.7em;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #757575;
    line-height: 1.3;
    white-space: nowrap;
}

/* 販売数値 */
.sales-box-value {
    font-size: 0.85em;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #424242;
    line-height: 1.4;
    white-space: nowrap;
}

/* ========================================
   サイト別価格の行（縁取り削除）
======================================== */
.site-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 4px 8px;
    margin: 2px 0;
    background-color: #fafafa;
    border-radius: 6px;
}

/* サイト名（縦中央揃え） */
.site-name {
    display: flex;
    align-items: center;
    min-width: 70px;
    font-weight: 600;
    font-size: 0.9em;
}

/* サイトリンク（有効） */
.site-link {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #ffffff;
    text-align: center;
    min-width: 70px;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.site-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.site-link:hover {
    color: #ffffff;
}

.site-link:hover::after {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Fanzaカラー - 自然なグラデーション */
.site-link.fanza {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    box-shadow: 0 2px 4px rgba(229, 57, 53, 0.3);
}

/* DLSiteカラー - 自然なグラデーション */
.site-link.dlsite {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

/* サイトリンク（無効・未販売） */
.site-link-disabled {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    color: #9e9e9e;
    background-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
    text-align: center;
    min-width: 70px;
    font-weight: 600;
    font-size: 0.9em;
    pointer-events: none;
}

.site-link-disabled.fanza {
    border: 2px dashed #ffcdd2;
}

.site-link-disabled.dlsite {
    border: 2px dashed #bbdefb;
}

/* ========================================
   価格詳細ボックス（矩形・統一幅）
======================================== */
.price-details-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
    width: 180px;
    min-height: 80px;
    padding: 8px 10px;
    background-color: #fafafa;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    justify-content: center;
    align-items: center;
}

/* ========================================
   価格アイテム（中央揃え）
======================================== */
.price-item {
    text-align: center;
    line-height: 1.2;
}

/* セール終了日（赤 - 緊急性） */
.sale-end-date {
    font-size: 0.75em;
    color: #d32f2f;
    font-weight: 700;
    margin-bottom: 0;
}

/* 24時間以内のセールはより強調 */
.sale-end-date.urgent {
    color: #b71c1c;
    font-weight: 800;
    animation: urgency-pulse 2s ease-in-out infinite;
}

@keyframes urgency-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.75;
    }
}

/* 定価（グレー・打ち消し線） */
.original-price {
    text-decoration: line-through;
    color: #757575;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 2px;
}

/* セール価格（赤・太字 - 最重要） */
.sale-price {
    color: #d32f2f;
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 0 1px 3px rgba(211, 47, 47, 0.2);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* 通常価格（ダークグレー） */
.regular-price {
    color: #424242;
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.3;
}

/* 未販売表示 */
.not-available {
    color: #999;
    font-size: 0.9em;
    font-style: italic;
}

/* ========================================
   レスポンシブ対応
======================================== */
@media (max-width: 768px) {
    .sales-display-container {
        flex-direction: column;
    }

    .sales-box {
        max-width: 100%;
    }

    .thumbnail-area {
        width: 100%;
    }

    .thumbnail-image-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .site-price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .site-name {
        width: 100%;
    }

    .site-link,
    .site-link-disabled {
        width: 100%;
    }

    .price-details-box {
        width: 100%;
    }
}

/* ========================================
   画像モーダル
======================================== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    z-index: 10000;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 42px;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    transition: opacity 0.2s;
    font-weight: 300;
}

.image-modal-close:hover {
    opacity: 0.7;
}

.image-modal-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    position: relative;
}

.gallery-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.image-modal-body img {
    max-width: 80vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.gallery-nav {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.gallery-indicator {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.image-modal-info {
    color: white;
    text-align: center;
    max-width: 600px;
}

.image-modal-info h3 {
    font-size: 20px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.image-modal-info p {
    font-size: 16px;
    color: #ccc;
    margin: 0;
}

@media (max-width: 768px) {
    .image-modal-body {
        flex-direction: column;
        gap: 10px;
    }

    .image-modal-body img {
        max-width: 90vw;
        max-height: 55vh;
    }

    .image-modal-close {
        font-size: 36px;
        top: -45px;
    }

    .image-modal-info h3 {
        font-size: 16px;
    }

    .image-modal-info p {
        font-size: 14px;
    }

    .gallery-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .gallery-image-container {
        order: 2;
    }

    .gallery-nav-prev {
        order: 1;
    }

    .gallery-nav-next {
        order: 3;
    }
}
