@charset "utf-8";

section {
    margin-bottom: initial;
}

.icn-bottom {
    z-index: 999;
}

.contpack-list {
    z-index: 100;
}

.footer-btn.disabled {
    display: none;
}

.cont-banner {
    margin-top: initial;
    padding-top: initial;
    padding-bottom: initial;
    background-color: initial;
    background-image: initial;
    background-repeat: repeat;
    margin-left: initial;
    margin-right: initial;
    display: flex;
    justify-content: center;
}

/* ラッパー：左端・上下中央固定 */
.category-drawer {
    position: fixed;
    inset: 0% auto auto 0;
    /* transform: translateY(-50%); */
    top: 188px;
    display: flex;
    align-items: center;
    padding-left: env(safe-area-inset-left, 0);
}

.category-drawer.logout {
    top: 183px;
}

/* 初期は隠す：不透明度/可視性/クリック不可をまとめて制御 */
.category-drawer {
    width: 0%;
    opacity: 0;
    visibility: hidden;
    /* transform: translateY(-50%) translateX(-6px); */
    /* 少しだけ外に寄せておく */
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    pointer-events: none;
    /* ← 非表示時だけクリック不可 */
}

/* 既定は低く */
.category-drawer {
    z-index: 802;
}

/* 表示状態 */
.category-drawer.is-visible {
    opacity: 1;
    visibility: visible;
    /* transform: translateY(-50%); */
    /* 元の位置に戻す */
    transition: opacity .2s ease, transform .2s ease, visibility 0s;
    pointer-events: auto;
    /* ← 表示時だけクリック可 */
}

/* 開いている時は常に可視（上まで戻っても開いていれば出しっぱなしにする） */
.category-drawer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* transform: translateY(-50%); */
    width: 29%;
}

.category-drawer.z-raised {
    width: 100%;
}

.category-drawer.is-open::before {
    content: "";
    display: block;
    position: absolute;
    top: -5px;
    z-index: 3;
    background: url(../img/frame_line.png) no-repeat;
    background-size: cover;
    width: 96%;
    height: 20px;
}

.category-drawer.is-open::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0px;
    z-index: 3;
    background: url(../img/frame_line.png) no-repeat;
    background-size: cover;
    width: 96%;
    height: 20px;
    transform: scaleY(-1);
}

/* トグルボタン（縦長ピル） */
.drawer-toggle {
    display: flex;
    flex-direction: column;
    /* 縦積み */
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 3rem;
    /* タブの太さ */
    min-height: 160px;
    /* タブの高さ */
    padding: 12px 8px;
    /* いつも見えているタブ */
    z-index: 1;
    top: -4px;
    background: #000000b3;
}

.drawer-toggle::before {
    content: "";
    position: absolute;
    top: -5px;
    width: 103%;
    height: 14px;
    background: url(../img/frame_line_s.png) no-repeat;
    background-size: cover;
}

.drawer-toggle::after {
    content: "";
    position: absolute;
    bottom: -3px;
    width: 103%;
    height: 14px;
    background: url(../img/frame_line_s.png) no-repeat;
    background-size: cover;
    transform: scaleY(-1);
}

.category-drawer.is-open .drawer-toggle::before,
.category-drawer.is-open .drawer-toggle::after {
    display: none;
}

.category-drawer.is-open .drawer-toggle {
    height: calc(100vh - 266px);
}

.category-drawer.logout.is-open .drawer-toggle {
    top: 0;
    height: calc(100vh - 181px);
}

/* 文字を縦書きに */
.drawer-toggle .label {
    writing-mode: vertical-rl;
    /* 上→下に流れて右→左で段組 */
    text-orientation: upright;
    /* カナ等を正立表示 */
    line-height: 1.1;
    letter-spacing: .08em;
    /* 読みやすく少し字間 */
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}

.drawer-toggle .chevron {
    display: inline-block;
    font-size: 14px;
    width: 35px;
}

.drawer-toggle .chevron img {
    width: 100%;
    height: auto;
}

/* パネル本体：初期は左に隠す */
.drawer-panel {
    pointer-events: auto;
    height: calc(100vh - 266px);
    top: -4px;
    overflow: auto;
    transform: translateX(calc(-143% - 8px));
    transition: transform .25s ease;
    background-image: linear-gradient(90deg, #000000b3, #000000b3 83%, #00000033);
    padding: 36px 0;
}

.category-drawer.logout .drawer-panel {
    height: calc(100vh - 181px);
}

/* 閉：右向き / 開：左向きに */
.drawer-toggle .chevron {
    transform: rotate(0deg);
}

.category-drawer.is-open .drawer-toggle .chevron {
    transform: rotate(180deg);
}

/* 縦書き未対応ブラウザのフォールバック（ほぼ不要だが保険） */
@supports not (writing-mode: vertical-rl) {
    .drawer-toggle .label {
        transform: rotate(90deg);
        transform-origin: center;
        white-space: nowrap;
    }
}

/* 開いた時 */
.category-drawer.is-open .drawer-panel {
    transform: translateX(0);
    width: 80%;
}

.category-drawer.is-open .drawer-toggle .chevron {
    transform: rotate(-90deg);
    /* ► が ▼ 的な向きに */
}

/* 閉じている時は矢印を右向き（初期）に、開くと下向きイメージに */
.drawer-toggle .chevron {
    transform: rotate(90deg);
}

/* 画像ボタンの縦並び&タッチしやすい余白 */
.cont-category .banner-list {
    display: grid;
    grid-auto-rows: minmax(44px, auto);
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 18px 0 10px;
}

.cont-category .footer-btn {}

.cont-category .footer-btn:active {
    transform: translateY(1px);
}

/* 画像をコンパクトに */
.cont-category .banner_container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cont-category .banner {}

/* スクロールバー */
/* Firefox（CSS Scrollbars） */
.drawer-panel {
    /* 細め＋白いサム／透明トラック */
    scrollbar-width: thin;
    scrollbar-color: #fff transparent;
}

.drawer-panel::-webkit-scrollbar {
    width: 1rem;
    /* ← ここで太さを調整（縦） */
}

/* WebKit系（Chrome/Safari/Edge） */

.drawer-panel::-webkit-scrollbar-track {
    background: transparent;
    /* トラック透明 */
}

.drawer-panel::-webkit-scrollbar-thumb {
    background: #fff;
    /* サム白 */
    border-radius: 8px;

    background-clip: content-box;
}

.drawer-panel::-webkit-scrollbar-thumb:hover {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
}

.drawer-panel::-webkit-scrollbar-corner {
    background: transparent;
    /* 両軸スクロール角の背景も透明に */
}

/* ドロップダウンメニューにアイコン表示 */
#pack-select {
    opacity: 0;
    /* ← これでテキスト非表示 */
}

.select-display {
    pointer-events: none;
    /* クリックはselectが受ける */
    position: absolute;
    left: 0;
    font-size: 1rem;
    padding: 2px 38px 2px 12px;
    color: #373737;
}

.selectbox-3 select {
    min-width: 175px;
}

.select-display img {
    height: 35px;
    object-fit: contain;
}

.select-display.periodicity img {
    top: -3px;
    height: 41px;
    object-fit: contain;
}

.main-wrap {
    padding-bottom: 3rem;
}

/* アクセシビリティ配慮（ハイコントラスト環境はOS任せ） */
@media (forced-colors: active) {
    .drawer-panel {
        scrollbar-color: auto;
    }
}

/* アニメーションが苦手なユーザー配慮 */
@media (prefers-reduced-motion: reduce) {

    .drawer-panel,
    .drawer-toggle .chevron {
        transition: none;
    }
}



@media (max-width: 1100px) {
    .cont-pack {
        margin-left: 2.5rem;
    }
}

@media (min-width: 1025px) {
    .category-drawer.is-open {
        max-width: 359px;
    }
}

@media (max-width: 1024px) {
    .icn-bottom {
        z-index: 997;
    }

    .category-drawer {
        z-index: 998;
    }

    .drawer-panel {
        padding: 32px 0;
    }

    .category-drawer.is-open {
        width: 100%;
    }

    .category-drawer.is-open .drawer-panel {
        width: 100%;
    }

    .cont-category .banner-list {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .category-drawer.is-open::before,
    .category-drawer.is-open::after {
        width: 100%;
        background: url(../img/frame_line_L.png) no-repeat;
        background-size: contain;
    }

    .banner {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {

    .custom-nav {
        z-index: 101;
    }

    .icn-bottom {
        z-index: 103;
    }

    .select-box-wrap,
    .treasure {
        padding-top: 86px;
    }

    .select-display {
        font-size: 1.1rem;
    }

    .category-drawer {
        top: 143px;
        z-index: 104;
    }

    .category-drawer.logout {
        top: 138px;
    }

    .category-drawer.is-open .drawer-toggle {
        height: calc(100vh - 183px);
    }

    .category-drawer.logout.is-open .drawer-toggle {
        height: calc(100vh - 136px);
    }

    .drawer-toggle {
        min-height: 120px;
    }

    .drawer-toggle .chevron {
        display: flex;
        font-size: 14px;
        width: 21px;
        justify-content: center;
        align-items: center;
    }

    .drawer-panel {
        height: calc(100vh - 183px);
        padding: 28px 0;
    }

    .category-drawer.logout .drawer-panel {
        height: calc(100vh - 136px);
    }

    .drawer-toggle::before,
    .drawer-toggle::after {
        background-size: contain;
    }

    .drawer-toggle::before {
        top: -1px;
        width: 103%;
        height: 9px;
    }

    .drawer-toggle::after {
        bottom: -3px;
        width: 103%;
        height: 9px;
    }

    .category-drawer.is-open::after {
        bottom: 9px;
    }

    .category-drawer.logout.is-open::after {
        bottom: 1px;
    }

    .cart-container.foot {
        z-index: 105;
    }

}

@media screen and (max-width: 640px) {
    .cont-category .banner-list {
        grid-template-columns: 1fr 1fr;
    }
}