@charset "UTF-8";

/* --- ページ全体のコンテナ --- */
.item-page-container {
    padding-top: 40px;
    padding-bottom: 80px;
    min-height: 60vh;
}

/* --- パンくずリスト --- */
.breadcrumb {
    margin-bottom: 30px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    color: var(--border-color);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb li:last-child {
    color: var(--text-main);
    font-weight: 500;
}

/* --- 2カラムレイアウト --- */
.item-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
}

/* --- 左側：画像ギャラリー --- */
.item-gallery {
    /* PCでは画像部分をスクロール追従させる */
    position: sticky;
    top: 100px; 
    align-self: start;
}

.main-image-wrapper {
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 右側：商品情報 --- */
.item-info {
    display: flex;
    flex-direction: column;
}

.info-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 15px;
    width: fit-content;
}

.info-name {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--text-main);
}

.info-price-area {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.info-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.info-price span {
    font-size: 1rem;
    font-weight: normal;
    color: var(--text-muted);
}

/* アクション（購入ボタン）エリア */
.info-action {
    margin-bottom: 40px;
    background: #fcfcfc;
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
}

.btn-large {
    font-size: 1.1rem;
    padding: 16px 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.action-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
    text-align: center;
}

/* 商品説明エリア */
.info-description h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.description-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-main);
}

/* --- エラー時の表示 --- */
.error-state {
    text-align: center;
    padding: 100px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.error-state h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #E63232;
}

/* --- スマホ対応 --- */
@media (max-width: 768px) {
    .item-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
    
    .item-gallery {
        position: static; /* スマホでは追従させない */
    }
    
    .info-name {
        font-size: 1.4rem;
    }
    
    .info-price {
        font-size: 1.8rem;
    }
    
    .info-action {
        padding: 15px;
    }
    
    .btn-large {
        font-size: 1rem;
        padding: 14px 20px;
    }
}
/* --- 追加：画像ギャラリー --- */
.thumbnail-list {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.thumb-item {
    width: calc(25% - 7.5px); 
    aspect-ratio: 1 / 1;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #f8f9fa;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item:hover {
    opacity: 1;
}

.thumb-item.active {
    opacity: 1;
    border-color: var(--primary-color);
}

.badge-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.info-category-badge {
    margin-bottom: 0; /* 元のmarginをリセット */
}

/* 受注生産バッジ */
.info-mto-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: #fff4e6;
    border: 1px solid #ffd8a8;
    color: #e67700;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 4px;
}

/* 受注生産の注意書きボックス */
.mto-notice {
    background-color: #fffaf0;
    border-left: 4px solid #f59f00;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #495057;
    border-radius: 0 4px 4px 0;
}

.mto-notice p {
    margin: 0;
    line-height: 1.6;
}

.mto-notice strong {
    color: #e67700;
}

/* 発注依頼ボタン */
.btn-order {
    background-color: #212529;
}

.btn-order:hover {
    background-color: #343a40;
}