/* =============================================
   グッズページ専用スタイル
   ドラえもん100サイトデザインに準拠
   ============================================= */

/* ページタイトル */
#slide_sub {
    padding-bottom: 20px;
}

.goods_page_title {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1;
    letter-spacing: 0;
    margin-top: 60px;
    margin-bottom: 10px;
}

.goods_page_subtitle {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

/* グッズセクション */
.goods_section {
    padding: 20px 0 80px;
}

/* カテゴリーフィルターボタン */
.goods_category_filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.goods_cat_btn {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 20px;
    border: 2px solid #fff;
    border-radius: 30px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.goods_cat_btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.goods_cat_btn.active {
    background: #fff;
    color: var(--color-navy, #003F7E);
}

/* NEWボタン（フィルター） ※他のカテゴリーボタンと同一デザイン */

/* カテゴリーグループ */
.goods_category_group {
    margin-bottom: 50px;
}

/* ★ NEW ARRIVAL セクション（他カテゴリーと同等の見た目） */
.goods_new_arrival_group {
    margin-bottom: 60px;
}

.goods_new_arrival_title {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.goods_new_arrival_badge {
    font-family: "Arial Rounded MT Bold", "Helvetica Rounded", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
}

.goods_new_arrival_sub {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 1rem;
    color: #fff;
    opacity: 0.92;
}

@media (max-width: 767px) {
    .goods_new_arrival_title {
        flex-wrap: wrap;
        gap: 8px;
    }
    .goods_new_arrival_badge {
        font-size: 1.2rem;
    }
    .goods_new_arrival_sub {
        font-size: 0.85rem;
    }
}

.goods_category_group.hidden {
    display: none;
}

.goods_category_title {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

/* グリッドレイアウト: 3列 */
.goods_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
}

/* 商品アイテム */
.goods_item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.goods_item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.goods_item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.goods_item a,
.goods_item img,
.goods_item a:hover,
.goods_item img:hover,
.goods_item:hover img,
.goods_item:hover a {
    transform: none !important;
    transition: none !important;
}

/* 画像エリア */
.goods_item_gallery {
    position: relative;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goods_noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1rem;
    font-family: "M PLUS Rounded 1c", sans-serif;
    background: #f0f0f0;
    aspect-ratio: 1 / 1;
}

/* 商品情報 */
.goods_item_info {
    padding: 15px 18px 20px;
}

.goods_item_name {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-navy, #003F7E);
    line-height: 1.5;
    margin: 0 0 8px;
}

.goods_item_size {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 5px;
}

.goods_item_price {
    margin: 0;
    color: #333;
}

.goods_item_price .price_num {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0;
}

.goods_item_price .price_tax {
    font-size: 0.75rem;
    color: #999;
    margin-left: 2px;
}

/* 空メッセージ */
.goods_empty {
    text-align: center;
    color: #fff;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 1.2rem;
    padding: 80px 0;
}


/* =============================================
   サムネイル（一覧用）
   ============================================= */

/* goods_item をクリッカブルに */
.goods_modal_trigger {
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.goods_modal_trigger:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    transform: translateY(-3px);
}

.goods_item_thumb {
    position: relative;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goods_thumb_img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* 枚数バッジ */
.goods_thumb_count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.7rem;
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    pointer-events: none;
}
.goods_thumb_count::before {
    content: '⊞ ';
}


/* =============================================
   グッズモーダル
   ============================================= */

.goods_modal {
    position: fixed;
    inset: 0;
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: goodsModalFadeIn 0.3s ease forwards;
}

.goods_modal[hidden] {
    display: none;
}

@keyframes goodsModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes goodsModalSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.goods_modal_overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.goods_modal_inner {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 520px;
    max-height: 90dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
    animation: goodsModalSlideIn 0.3s ease forwards;
}

/* 閉じるボタン */
.goods_modal_close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.goods_modal_close:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* 画像スライダー */
.goods_modal_slider {
    position: relative;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
}

.goods_modal_track {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.goods_modal_img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    box-sizing: border-box;
}

/* 前後ボタン */
.goods_modal_prev,
.goods_modal_next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.goods_modal_prev:hover,
.goods_modal_next:hover {
    background: rgba(0, 0, 0, 0.88);
}
.goods_modal_prev { left: 10px; }
.goods_modal_next { right: 10px; }

/* ドットインジケーター */
.goods_modal_dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.goods_modal_dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.goods_modal_dot.is_active {
    background: #fff;
}

/* モーダル商品情報 */
.goods_modal_info {
    padding: 18px 22px 22px;
}

.goods_modal_title {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-navy, #003F7E);
    margin: 0 0 8px;
    line-height: 1.5;
}

.goods_modal_size {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 6px;
}

.goods_modal_price {
    margin: 0;
    color: #333;
}

.goods_modal_price .price_num {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
}

.goods_modal_price .price_tax {
    font-size: 0.75rem;
    color: #999;
    margin-left: 2px;
}

/* モーダル表示中のbodyスクロール禁止 */
body.goods_modal_open {
    overflow: hidden;
}

/* モーダル レスポンシブ */
@media screen and (max-width: 640px) {
    .goods_modal_inner {
        width: 95%;
        border-radius: 10px;
    }

    .goods_modal_prev,
    .goods_modal_next {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .goods_modal_info {
        padding: 14px 16px 18px;
    }

    .goods_modal_title {
        font-size: 0.95rem;
    }
}


/* =============================================
   矢印切替ギャラリー（グッズ用）
   ============================================= */

.goods_gallery_shell {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.goods_gallery {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.goods_item_gallery .swiper,
.goods_item_gallery .swiper-wrapper,
.goods_item_gallery .swiper-slide,
.goods_gallery_track,
.goods_gallery_slide {
    height: 100%;
}

.goods_gallery_track {
    width: 100%;
    height: 100%;
}

.goods_gallery_slide {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.goods_gallery .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.goods_gallery_slide img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.goods_single_img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.goods_media_img.is-portrait {
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: calc(100% - 10px) !important;
}

.goods_media_img.is-landscape {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

.goods_media_img.is-square {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
}

/* 矢印ボタン */
.goods_gallery_prev,
.goods_gallery_next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.goods_gallery_prev:hover,
.goods_gallery_next:hover {
    background: rgba(0, 0, 0, 0.95);
}

.goods_gallery_prev {
    left: -17px;
}

.goods_gallery_next {
    right: -17px;
}


/* =============================================
   レスポンシブ
   ============================================= */

/* タブレット */
@media screen and (max-width: 820px) {
    .goods_page_title {
        font-size: 3.5rem;
        margin-top: 40px;
    }

    .goods_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 20px;
    }

    .goods_item_info {
        padding: 12px 15px 18px;
    }
}

/* スマートフォン */
@media screen and (max-width: 640px) {
    .goods_category_filter {
        gap: 6px;
        margin-bottom: 25px;
    }

    .goods_cat_btn {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .goods_category_title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .goods_category_group {
        margin-bottom: 35px;
    }
    .goods_page_title {
        font-size: 2.5rem;
        margin-top: 30px;
        margin-bottom: 5px;
    }

    .goods_page_subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .goods_section {
        padding: 20px 0 50px;
    }

    .goods_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 10px;
    }

    .goods_item {
        border-radius: 8px;
    }

    .goods_item_info {
        padding: 10px 12px 15px;
    }

    .goods_item_name {
        font-size: 0.8rem;
    }

    .goods_item_price .price_num {
        font-size: 1.05rem;
    }

    .goods_item_price .price_tax {
        font-size: 0.65rem;
    }

    .goods_gallery_prev,
    .goods_gallery_next {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .goods_gallery_prev {
        left: -17px;
    }

    .goods_gallery_next {
        right: -17px;
    }
}

/* ===== ステータス凡例（注意書き内に表示） ===== */
.goods_status_legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #cfdce9;
}

.goods_status_legend_item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.goods_status_legend_item .goods_status_badge {
    position: static;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.goods_status_legend_desc {
    font-size: 12px;
    color: #5f6f8a;
    line-height: 1.4;
    white-space: nowrap;
}

.goods_status_legend_notes {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed #cfdce9;
}

.goods_status_legend_notes_title {
    font-weight: 700;
    margin: 0 0 8px;
    color: #2a3a55;
}

.goods_status_legend_notes p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.7;
    color: #5f6f8a;
}

.goods_status_legend_notes p:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .goods_status_legend {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px 14px;
        padding: 12px 14px;
        margin: 0 0 20px;
        width: 100%;
    }
    .goods_status_legend_item {
        gap: 6px;
    }
    .goods_status_legend_desc {
        font-size: 11px;
        white-space: normal;
    }
    .goods_status_legend_notes {
        margin-top: 18px;
        padding-top: 14px;
    }
    .goods_status_legend_notes p {
        font-size: 12px;
    }
}

/* ===== ステータスバッジ（かわいい版） ===== */
.goods_item_thumb {
    position: relative;
}

/* 複数バッジを左上に縦積みするラッパー */
.goods_status_badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}

/* ラッパー内では個々のバッジの絶対配置を解除して縦積みに従わせる */
.goods_status_badges .goods_status_badge {
    position: static;
    top: auto;
    left: auto;
}

.goods_status_badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 8px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    color: #fff;
    background: #6b7280;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.goods_status_icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.goods_status_icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.goods_status_label {
    white-space: nowrap;
    transform: translateY(-0.5px);
}

/* new: NEW（イエロー〜オレンジ／英字フォント） */
.goods_status_badge.is_new {
    background: linear-gradient(135deg, #fde047, #f59e0b);
    color: #fff;
    font-family: "Arial Rounded MT Bold", "Helvetica Rounded", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
    letter-spacing: 0.06em;
}
.goods_status_badge.is_new .goods_status_label {
    font-family: "Arial Rounded MT Bold", "Helvetica Rounded", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
}

/* preorder: 予約販売（黄緑寄りグリーン） */
.goods_status_badge.is_preorder {
    background: linear-gradient(135deg, #a7e635, #65c728);
    color: #fff;
}

/* backorder: 入荷待ち（くもり空ブルー） */
.goods_status_badge.is_backorder {
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    color: #fff;
}

/* partial_backorder: 一部入荷待ち（入荷待ちより薄い水色） */
.goods_status_badge.is_partial_backorder {
    background: linear-gradient(135deg, #cfeffd, #7dd3fc);
    color: #fff;
}

/* soldout: 完売（やわらかレッド） */
.goods_status_badge.is_soldout {
    background: linear-gradient(135deg, #fb7185, #ef4444);
    color: #fff;
}

/* partial_soldout: 一部完売（完売より薄い赤・ピンク寄り） */
.goods_status_badge.is_partial_soldout {
    background: linear-gradient(135deg, #fecdd3, #fb7185);
    color: #fff;
}

.goods_item:has(.goods_status_badge.is_soldout) .goods_thumb_img {
    filter: grayscale(0.55) brightness(0.96);
}

/* few: 残りわずか（ピンク） */
.goods_status_badge.is_few {
    background: linear-gradient(135deg, #fda4d4, #ec4899);
    color: #fff;
}

/* limited: 数量限定（パープル） */
.goods_status_badge.is_limited {
    background: linear-gradient(135deg, #c084fc, #9333ea);
    color: #fff;
}

@media (max-width: 640px) {
.goods_status_legend_item {
    display: flex;
	flex-direction: column;
    align-items: flex-start;
}

    /* サムネイル上のバッジのみ縮小（複数並んでも写真を覆わないように） */
    .goods_status_badges {
        top: 8px;
        left: 8px;
        gap: 4px;
    }
    .goods_status_badges .goods_status_badge {
        font-size: 8px;
        padding: 2px 7px 2px 2px;
        gap: 3px;
    }
    .goods_status_badges .goods_status_icon {
        width: 12px;
        height: 12px;
        flex-basis: 12px;
    }
    .goods_status_badges .goods_status_icon svg {
        width: 8px;
        height: 8px;
    }
    /* 以下は凡例エリアのバッジ用（据え置き） */
    .goods_status_badge {
        font-size: 14px;
        padding: 6px 14px 6px 6px;
        gap: 8px;
        top: 8px;
        left: 8px;
    }
    .goods_status_icon {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }
    .goods_status_icon svg {
        width: 15px;
        height: 15px;
    }
}
