/* =======================================
   商品詳細ページ product_detail.css
   ======================================= */

/* コンテナ（PC: 1200px 幅、左右30px 内側余白） */
.ec-productRole {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
}

/* グリッド（PC: 2列、商品画像・商品情報） */
.ec-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* 商品画像エリア */
.item_visual {
    position: relative;
}
.slide-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* サムネイルナビ */
.item_nav {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.slideThumb img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
}
.slideThumb img:hover {
    border-color: #c5001f;
}

/* 商品情報 */
.ec-productRole__profile {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ec-productRole__title h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.ec-productRole__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 0 10px 0;
    list-style: none;
}
.ec-productRole__tag {
    border: 1px solid #000000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* カテゴリラベル */
.ec-productRole__category {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ec-productRole__category a {
    background-color: #dddddd;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
    color: inherit;
}
.ec-productRole__category a:hover {
    text-decoration: underline;
}

/* 内容量・成分・おすすめは区切り線＋余白で表示 */
.ec-productRole__section {
    display: flex;
    flex-direction: column;
}
.ec-divider {
    border-top: 1px solid #000;
    margin-bottom: 5px; /* 下線と内容の間に余白を追加 */
}
.ec-section-title {
    font-weight: 700;
    margin: 5px 0;
}
.ec-section-content {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 5px; /* 下線から少し離す */
}
.ec-spacer {
    height: 30px;
}

/* 商品説明 */
.ec-productRole__description {
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0;
}

/* 価格＋数量横並び */
.ec-productRole__details {
    padding: 0 10px 10px 10px;
}
.ec-priceQuantityWrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    margin: 0;
    justify-content: flex-start;
}
.ec-priceLabel {
    background-color: #000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
}
.ec-shelfGrid__price {
    font-weight: 700;
    margin: 0 0 0 6px;
    display: inline-block;
}
.ec-quantityLabel {
    background-color: #000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
}
.ec-numberInput {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ec-numberInput input {
    width: 40px;
    padding: 4px 6px;
    text-align: right;
}

/* カートボタン */
.ec-productRole__btn {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}
.ec-blockBtn--action {
    padding: 10px 15px;
    font-weight: 600;
    text-align: center;
    background-color: #999999;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
}
.ec-blockBtn--action:hover {
    background-color: #c5001f;
}
.ec-btn-disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* モーダル */
.ec-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; }
.ec-modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.ec-modal-wrap { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 8px; padding: 20px; width: 90%; max-width: 400px; text-align: center; }
.ec-modal-close { position: absolute; top: 10px; right: 10px; cursor: pointer; }
.ec-modal-box { margin-top: 20px; }
.ec-inlineBtn--action { display:inline-block; padding:8px 12px; margin:5px; border-radius:4px; text-decoration:none; background:#e60023; color:#fff; }
.ec-inlineBtn--cancel { display:inline-block; padding:8px 12px; margin:5px; border-radius:4px; text-decoration:none; background:#f0f0f0; color:#333; }

/* タブレット表示（左右30px、1列表示） */
@media screen and (max-width: 1024px) {
    .ec-productRole {
        padding-left: 30px;
        padding-right: 30px;
    }
    .ec-grid2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* SP表示（左右15px） */
@media screen and (max-width: 767px) {
    .ec-productRole {
        padding-left: 15px;
        padding-right: 15px;
    }
    .item_nav {
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
    }
    .slideThumb img {
        width: 80px;
        height: 80px;
    }
}
