/* =========================================================
   商品詳細ページ (single-item) のスタイル
========================================================= */

/* 上部レイアウト（PCでは横並び、スマホでは縦並び） */
.item-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

/* 画像エリア */
.item-images {
    flex: 1;
}

.item-main-img {
    margin-bottom: 10px;
}

/* PC・スマホ共通：画像が親要素からはみ出さないようにする */
.item-main-img img {
    width: 100%;
    height: auto;
    display: block;
}

.item-sub-imgs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.item-sub-imgs img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 2px;
}

/* スペック・サマリーエリア */
.item-specs {
    flex: 1;
    min-width: 300px;
}

.item-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #cc0000;
    margin-top: 0;
    margin-bottom: 20px;
}

.item-price .tax-text {
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

.item-summary-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* タクソノミーリスト（メーカー・カテゴリ） */
.item-taxonomy-list {
    border-top: 1px solid #ddd;
    margin: 0;
    padding: 0;
}

.item-taxonomy-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.item-taxonomy-row dt {
    width: 100px;
    font-weight: bold;
    margin: 0;
}

.item-taxonomy-row dd {
    flex: 1;
    margin: 0;
}

/* 詳細説明文エリア */
.item-descriptions {
    margin-top: 40px;
}

.item-desc-section {
    margin-bottom: 30px;
}

/* =========================================================
   レスポンシブ対応 (スマホ向け)
========================================================= */
@media screen and (max-width: 767px) {
    .item-detail-row {
        display: block; /* フレックス解除して縦並びを確実に */
    }

    .item-images {
        width: 100%;
        margin-bottom: 20px; /* 画像と情報の間に余白を作る */
    }

    .item-specs {
        width: 100%;
    }

    /* 価格やスペック表が画像の下に正しく配置されるように */
    .item-price {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
}



/* カタログ風グリッドレイアウト */
.item-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px 20px;
    margin-bottom: 50px;
}

.catalog-card {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.catalog-card__link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 画像：背景を薄いグレーにして商品を引き立てる */
.catalog-card__visual {
    background-color: #f7f7f7;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-card__visual img {
    width: 100%;
    height: auto;
    mix-blend-mode: multiply; /* 白背景の商品画像を馴染ませる */
}

.catalog-card__info {
    padding: 0 5px;
}

.catalog-card__title {
    font-size: 1.05rem;
    font-weight: bold;
    margin: 0 0 10px;
    line-height: 1.5;
    color: #333;
}

.catalog-card__summary {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.catalog-card__price {
    color: #cc0000;
    font-weight: bold;
    font-size: 1.25rem;
    margin-top: auto; /* 下端に固定 */
}

.catalog-card__price span {
    font-size: 0.8rem;
    color: #333;
    font-weight: normal;
    margin-left: 2px;
}

.catalog-card__price span.price-number {
    color: var(--c-red);
    font-size: 1.25rem;
    font-weight: bold;
}

/* モバイル対応 */
@media screen and (max-width: 480px) {
    .item-catalog-grid {
        grid-template-columns: repeat(2, 1fr); /* スマホは2列 */
        gap: 20px 10px;
    }
    .catalog-card__title {
        font-size: 0.95rem;
    }
}

/* =========================================================
   カタログ風一覧レイアウト (archive-item)
========================================================= */

/* グリッドレイアウト */
.item-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 40px 20px;
    margin-bottom: 50px;
}

/* カード全体のスタイル */
.catalog-card {
    background: var(--c-ghost);
    padding: 1em;
}

.catalog-card__link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 画像エリア：薄いグレー背景 */
.catalog-card__visual {
    background-color: var(--c-bg);
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.catalog-card__visual img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* 画像がない時の代わり */
.no-image-placeholder {
    color: #999;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* テキストエリア */
.catalog-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.catalog-card__title {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.catalog-card__summary {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 3行で省略 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 価格表示 */
.catalog-card__price {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    font-weight: bold;
}

.price-number {
    color: #d32f2f;
    font-size: 1.4rem;
}

.price-tax {
    font-size: 0.8rem;
    color: #333;
    margin-left: 4px;
    font-weight: normal;
}

/* 画像エリア全体のスタイル */
.item-images {
    margin-bottom: 20px;
}

/* メイン画像 */
.item-main-img img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* サブ画像リスト */
.item-sub-imgs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* 個別のサブ画像 */
.sub-img-unit {
    width: 100px;
    height: auto;
    object-fit: cover; /* 画像の比率を保ちつつ枠に収める */
    cursor: pointer;
}

/* レスポンシブ (スマホ2列) */
@media screen and (max-width: 767px) {
    .item-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 10px;
    }
    .catalog-card__visual {
        padding: 10px;
    }
    .catalog-card__summary {
        display: none; /* スマホではスッキリさせるため非表示 */
    }
    .price-number {
        font-size: 1.1rem;
    }
}