/* layout.css - サイトの骨格、配置、サイズ */

/* --- 基本設定 --- */
body {
    margin: 0;
    padding: 0;
}

.wrap {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    box-sizing: border-box;
}

/* --- 横スクロールエリア --- */
.yoko {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    /* 追加: パディングを含めるため */
}

.yoko>* {
    flex: 0 0 auto;
    width: 160px;
    white-space: normal;
}

.yoko img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* --- products コンテナレイアウト --- */
.products {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 3%;
    box-sizing: border-box;
    padding: 10px;
    width: 93%;
    margin-left: auto;
    margin-right: auto;
}

/* col1 レイアウト */
.products:not(.col2) .left {
    width: 47%;
    min-width: 0;
    box-sizing: border-box;
}

.products:not(.col2) .right {
    width: 50%;
    padding-left: 10px;
    box-sizing: border-box;
}

/* col2 レイアウト */
.products.col2 {
    display: block;
    width: 45%;
    margin-left: auto;
    margin-right: auto;
}

.products.col2 .left,
.products.col2 .right {
    width: 100%;
    padding-left: 0;
    margin-left: auto;
    margin-right: auto;
}

.products.col2 .left {
    margin-bottom: 10px;
    min-width: 0;
}

/* --- スライダーレイアウト --- */
.slider-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.slider-wrapper {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    width: 100%;
}

.slider-wrapper img {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    scroll-snap-align: start;
    object-fit: contain;
    display: block;
}

/* スライダーナビ位置 */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev {
    left: 5px;
}

.slider-next {
    right: 5px;
}

/* 1枚画像レイアウト */
.single-image-wrapper {
    width: 100%;
}

.single-image-wrapper img {
    width: 100% !important;
    height: auto !important;
    display: block;
    object-fit: contain;
}

/* --- 見出しレイアウト --- */
h2 {
    width: 80%;
    margin: 30px auto;
    text-align: center;
    position: relative;
}



/* --- アイコン・バッジ等の配置 --- */
.pict {
    margin: 1em 0;
}

.cook_item {
    display: inline-block;
    padding: 2px 5px;
    margin-right: 3px;
}

.limited_su {
    padding: 0.1em 0.5em;
    margin-right: 3px;
}

/* プルダウン・テキスト配置 */
.variant-select-wrap {
    margin-top: 5px;
    margin-bottom: 5px;
}

.variant-select {
    width: 100%;
    padding: 5px;
}

.top {
    margin-bottom: 5px;
}

.prd_bland,
.prd_hinmei,
.prd_kikaku {
    margin: 0.2em 0;
}

.conversion {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.point_btn,
.order_btn {
    width: 80%;
    padding: 10px 8px;
    margin: 1em auto 0.3em auto;
}

/* --- 価格レイアウト --- */
.info_price {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: baseline;
    width: 100%;
}

.hontai {
    text-align: right;
}

.intax {
    text-align: right;
}

.price.nenyasu {
    display: block;
    /* 年間最安値用のブロック表示 */
}

.annotation {
    margin-top: 0.3em;
}

/* --- モーダルレイアウト --- */
/* 拡大モーダル */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.modal-content-box {
    width: min(90vw, 90vh, 700px);
    height: min(90vw, 90vh, 700px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.modal-image {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* 詳細テキストモーダル */
.detail-btn {
    display: inline-block;
    padding: 0;
    margin-top: 5px;
}

.text-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.text-modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    padding: 25px 20px;
    overflow-y: auto;
    position: relative;
}

.text-modal-body {
    margin-top: 10px;
    text-align: left;
}

.text-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 上に戻るボタン配置 --- */
.modoru {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.modoru.show {
    opacity: 1;
    pointer-events: auto;
}

.modoru:hover {
    background-color: #555;
}


