/* ==============================================
   ENJIN カスタマイズCSS
   縁人（えんじん）マーケットプレイス
   ============================================== */

/* Google Fonts - Noto Sans JP */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* ==============================================
   全体のベーススタイル
   ============================================== */
body {
    background: var(--enjin-bg-main);
    color: #000;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

/* ==============================================
   CSS変数（カラースキーム）
   ============================================== */
:root {
    --enjin-primary: #E60012;
    --enjin-primary-dark: #CC000F;
    --enjin-text: #333333;
    --enjin-text-light: #666666;
    --enjin-text-muted: #999999;
    --enjin-border: #E0E0E0;
    --enjin-border-light: #EEEEEE;
    --enjin-bg-gray: #F5F5F5;
    --enjin-bg-light: #FAFAFA;
    --enjin-bg-main: #D9D9D9;
    --enjin-white: #FFFFFF;
    --enjin-black: #000000;
}

/* ==============================================
   黒帯（トップバーの上）
   ============================================== */
.enjin-black-bar {
    background: #000;
    height: 10px;
}

/* スクロール追従の固定ヘッダー（黒帯〜メインヘッダーを一体で固定） */
.enjin-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 固定ヘッダー分のコンテンツ余白。高さは可変のため customize.js で
   --enjin-header-h を実測設定する（初期値はPCの概算でちらつきを抑制） */
body {
    padding-top: var(--enjin-header-h, 138px);
}

/* ==============================================
   トップバー（通知バー）
   ============================================== */
.enjin-topbar {
    background: var(--enjin-primary);
    color: var(--enjin-white);
    font-size: 12px;
    padding: 8px 0;
    position: relative;
    z-index: 10;
    /* Issue #164: overflow:hidden を削除（リボンの上下方向はみ出し装飾を維持するため） */
}

.enjin-topbar__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.enjin-topbar__message {
    display: flex;
    align-items: center;
}

.enjin-topbar__message-img {
    height: 20px;
    width: auto;
    max-width: 100%; /* Issue #163: 画像の intrinsic 幅 420px が SP viewport を超えるのを抑制 */
}

.enjin-topbar__icon {
    font-size: 14px;
}

.enjin-topbar__icon--yellow {
    color: #FFD700;
}

.enjin-topbar__links {
    display: flex;
    gap: 15px;
}

.enjin-topbar__link {
    color: var(--enjin-white);
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.enjin-topbar__link:hover {
    text-decoration: underline;
}

.enjin-topbar__link-icon {
    width: 14px;
    height: auto;
}

.enjin-topbar__ribbon {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    top: -18px;
    z-index: 15;
}

.enjin-topbar__ribbon-img {
    height: 42px;
    width: auto;
}

.enjin-topbar__ribbon-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: bold;
    color: #FFFFFF;
    white-space: nowrap;
}

.enjin-topbar__ribbon-text:first-of-type {
    top: 5px;
}

.enjin-topbar__ribbon-text:last-of-type {
    top: 17px;
}

/* Issue #124: ヘッダー外部ツール ドロップダウン */
.enjin-topbar__tools {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.enjin-topbar__tools-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--enjin-white);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.enjin-topbar__tools-toggle:hover {
    text-decoration: underline;
}

.enjin-topbar__tools-caret {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.enjin-topbar__tools.is-open .enjin-topbar__tools-caret {
    transform: rotate(180deg);
}

.enjin-topbar__tools-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: var(--enjin-white);
    border: 1px solid var(--enjin-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    display: none;
}

.enjin-topbar__tools.is-open .enjin-topbar__tools-menu {
    display: block;
}

.enjin-topbar__tools-link {
    display: block;
    padding: 8px 16px;
    color: var(--enjin-text);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.enjin-topbar__tools-link:hover {
    background: var(--enjin-bg-gray);
    color: var(--enjin-primary);
}

/* ==============================================
   ヘッダー
   ============================================== */
.enjin-header {
    background: #FFF;
    border-bottom: 1px solid var(--enjin-border);
    padding: 12px 0;
}

.enjin-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.enjin-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.enjin-header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.enjin-header__main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.enjin-header__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.enjin-header__logo-icon {
    width: 36px;
    height: 36px;
    background: var(--enjin-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enjin-header__logo-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--enjin-white);
}

.enjin-header__logo-text {
    font-size: 32px;
    font-weight: 900;
    color: var(--enjin-black);
    letter-spacing: -0.02em;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
}

.enjin-header__logo-img {
    height: 40px;
    width: auto;
}

.enjin-header__search {
    flex: 1;
}

.enjin-header__search-form {
    display: flex;
    border: 2px solid #404040;
    border-radius: 8px;
    overflow: hidden;
    background: var(--enjin-white);
}

.enjin-header__search-select {
    border: none;
    padding: 10px 12px;
    background: #F5F5F5;
    font-size: 13px;
    min-width: 260px;
    color: var(--enjin-text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.enjin-header__search-input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    min-width: 300px;
}

.enjin-header__search-input::placeholder {
    color: #999999;
}

.enjin-header__search-btn {
    background: transparent;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.enjin-header__search-btn:hover {
    opacity: 0.7;
}

.enjin-header__search-icon {
    width: 21px;
    height: 21px;
}

.enjin-header__user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--enjin-text);
    white-space: nowrap;
}

.enjin-header__separator {
    color: #CCCCCC;
    font-size: 14px;
    margin: 0 8px;
}

.enjin-header__nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.enjin-header__nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--enjin-text);
    transition: opacity 0.2s;
}

.enjin-header__nav-item > span:last-child {
    display: none;
}

.enjin-header__nav-item:hover {
    opacity: 0.7;
}

.enjin-header__nav-icon {
    font-size: 24px;
}

.enjin-header__nav-icon-img {
    width: auto;
    height: 26px;
    max-width: 32px;
    display: block;
}

.enjin-header__cart-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enjin-header__cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--enjin-primary);
    color: var(--enjin-white);
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* ==============================================
   メインビジュアル（ヒーロー）
   ============================================== */
.enjin-hero {
    background: var(--enjin-bg-main);
    padding: 50px 0;
    overflow: hidden;
}

.enjin-hero__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.enjin-hero__content {
    flex: 1;
    max-width: 500px;
}

.enjin-hero__title {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.6;
    color: var(--enjin-text);
    margin-bottom: 20px;
}

.enjin-hero__catchphrase-img {
    max-width: 100%;
    height: auto;
    width: 400px;
}

.enjin-hero__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.enjin-hero__logo-icon {
    width: 48px;
    height: 48px;
    background: var(--enjin-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enjin-hero__logo-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--enjin-white);
}

.enjin-hero__logo-text {
    font-size: 42px;
    font-weight: 900;
    color: var(--enjin-black);
    letter-spacing: -0.02em;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
}

.enjin-hero__subtitle {
    font-size: 16px;
    color: var(--enjin-text-light);
    margin-bottom: 25px;
}

.enjin-hero__btn {
    display: inline-block;
    background: var(--enjin-primary);
    color: var(--enjin-white);
    padding: 15px 40px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.enjin-hero__btn:hover {
    background: var(--enjin-primary-dark);
    color: var(--enjin-white);
}

.enjin-hero__image {
    flex: 1;
    text-align: right;
}

.enjin-hero__image img {
    max-width: 963px;
    width: 100%;
    height: auto;
    border-radius: 0;
}

/* ヒーローイラスト（アイソメトリック整備工場プレースホルダー） */
.enjin-hero__illustration {
    width: 500px;
    height: 400px;
}

.enjin-hero__illustration-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1000px;
}

.enjin-hero__shop-visual {
    width: 100%;
    height: 100%;
    position: relative;
    transform: rotateX(10deg) rotateY(-15deg);
    transform-style: preserve-3d;
}

.enjin-hero__shop-roof {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 200px solid transparent;
    border-right: 200px solid transparent;
    border-bottom: 80px solid #E60012;
}

.enjin-hero__shop-body {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 380px;
    height: 280px;
    background: linear-gradient(135deg, #F8F8F8 0%, #FFFFFF 50%, #EEEEEE 100%);
    border: 2px solid #E0E0E0;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.enjin-hero__shop-sign {
    background: var(--enjin-primary);
    color: var(--enjin-white);
    padding: 8px 30px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.enjin-hero__shop-sign-text {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
}

.enjin-hero__shop-windows {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.enjin-hero__shop-window {
    width: 90px;
    height: 70px;
    background: linear-gradient(180deg, #87CEEB 0%, #ADD8E6 100%);
    border: 3px solid #666;
    border-radius: 4px;
}

.enjin-hero__shop-logo {
    margin-top: auto;
}

.enjin-hero__shop-logo img {
    height: 50px;
    width: auto;
}

/* ==============================================
   TOPページレイアウト（2カラム）
   ============================================== */
.enjin-top-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    gap: 46px;
    background: var(--enjin-bg-main);
}

.enjin-top-layout__sidebar {
    width: 254px;
    flex-shrink: 0;
}

.enjin-top-layout__main {
    flex: 1;
    min-width: 0;
}

/* 左サイドバーをスクロール追従で固定（PCのみ。≤768px は積み重ねレイアウトのため適用しない）。
   固定ヘッダー(--enjin-header-h)の直下に sticky させ、メニューが画面高を超える場合は内部スクロール。
   flex の流れを保つ sticky なのでレイアウト崩れ・フッター被りが起きない。 */
@media screen and (min-width: 769px) {
    .enjin-top-layout__sidebar {
        position: sticky;
        top: calc(var(--enjin-header-h, 138px) + 20px);
        align-self: flex-start;
        max-height: calc(100vh - var(--enjin-header-h, 138px) - 40px);
        overflow-y: auto;
    }
}

/* ==============================================
   カテゴリーサイドバー
   ============================================== */

.enjin-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.enjin-category-list__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    color: var(--enjin-text);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s, color 0.2s;
}

.enjin-category-list__link:hover {
    background: var(--enjin-bg-light);
    color: var(--enjin-primary);
}

.enjin-category-list__link::after {
    content: ">";
    color: var(--enjin-primary);
    font-size: 14px;
    font-weight: bold;
}

.enjin-category-list__link--child {
    padding-left: 25px;
    font-size: 12px;
}

/* 大カテゴリーのアコーディオン開閉トグル（子カテゴリーを持つ親） */
.enjin-category-list__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 13px;
    color: var(--enjin-text);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.enjin-category-list__toggle:hover {
    background: var(--enjin-bg-light);
    color: var(--enjin-primary);
}

.enjin-category-list__caret {
    color: var(--enjin-primary);
    font-size: 14px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.enjin-category-list__toggle.is-open .enjin-category-list__caret {
    transform: rotate(180deg);
}

/* 子カテゴリーリスト（初期は閉じた状態） */
.enjin-category-list__children {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

.enjin-category-list__toggle.is-open + .enjin-category-list__children {
    display: block;
}

/* お知らせリスト */
.enjin-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.enjin-news-list__link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
}

.enjin-news-list__date {
    display: block;
    font-size: 11px;
    color: var(--enjin-text-light);
    margin-bottom: 3px;
}

.enjin-news-list__title {
    font-size: 13px;
    color: var(--enjin-text);
    line-height: 1.4;
}

.enjin-news-list__link:hover .enjin-news-list__title {
    color: var(--enjin-primary);
}

/* TOPページのお知らせ帯（ロゴ直下・全幅で目立つ位置に表示） */
.enjin-news-section {
    background: var(--enjin-bg-main);
    padding: 24px 20px 0;
}

.enjin-news-section__inner {
    max-width: 1280px;
    margin: 0 auto;
    background: var(--enjin-white);
    border: 1px solid var(--enjin-border);
    border-radius: 6px;
    padding: 16px 24px;
}

.enjin-news-section__title {
    font-size: 16px;
    font-weight: bold;
    color: var(--enjin-primary);
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--enjin-primary);
}

/* TOP帯では日付とタイトルを横並び（ニュース見出し風） */
.enjin-news-list--top .enjin-news-list__item + .enjin-news-list__item {
    border-top: 1px solid var(--enjin-border-light);
}

.enjin-news-list--top .enjin-news-list__link {
    display: flex;
    gap: 18px;
    align-items: baseline;
    padding: 10px 0;
}

.enjin-news-list--top .enjin-news-list__date {
    margin-bottom: 0;
    flex-shrink: 0;
    font-size: 12px;
}

@media screen and (max-width: 767px) {
    .enjin-news-list--top .enjin-news-list__link {
        flex-direction: column;
        gap: 2px;
    }
}

/* サイト利用リンク */
.enjin-site-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.enjin-site-links__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    color: var(--enjin-text);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s, color 0.2s;
}

.enjin-site-links__link:hover {
    background: var(--enjin-bg-light);
    color: var(--enjin-primary);
}

.enjin-site-links__link::after {
    content: ">";
    color: var(--enjin-primary);
    font-size: 14px;
    font-weight: bold;
}

/* 特定商取引法リスト */
.enjin-tradelaw-list {
    margin: 0;
    padding: 0;
}

.enjin-tradelaw-list__row {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.enjin-tradelaw-list__row:last-child {
    border-bottom: none;
}

.enjin-tradelaw-list__label {
    font-size: 12px;
    font-weight: bold;
    color: var(--enjin-primary);
    margin: 0 0 3px;
}

.enjin-tradelaw-list__value {
    font-size: 13px;
    color: var(--enjin-text);
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
}

/* ==============================================
   商品セクション共通
   ============================================== */
.enjin-section {
    margin-bottom: 30px;
}

.enjin-section__header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
}

.enjin-section__title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.enjin-section__title-icon {
    display: none;
}

.enjin-section__more {
    color: var(--enjin-primary);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.enjin-section__more:hover {
    text-decoration: underline;
}

.enjin-section__body {
    background: #FFF;
    padding: 20px 25px 25px;
    border: 2px solid var(--enjin-primary);
    border-radius: 8px;
}

/* サイドバー用セクション */
.enjin-section--sidebar {
    margin-bottom: 20px;
}

.enjin-section--sidebar .enjin-section__header {
    justify-content: flex-start;
}

.enjin-section--sidebar .enjin-section__body {
    padding: 0;
    border: none;
    border-radius: 0;
    border-bottom: 2px solid var(--enjin-primary);
    padding-bottom: 15px;
    background: var(--enjin-bg-main);
}

.enjin-section__scroll-btn {
    width: 32px;
    height: 32px;
    background: var(--enjin-primary);
    border: none;
    border-radius: 50%;
    color: var(--enjin-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

/* ==============================================
   商品グリッド（4列）
   ============================================== */
.enjin-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.enjin-product-card {
    background: #FFF;
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.enjin-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.enjin-product-card__link {
    display: block;
    text-decoration: none;
    color: var(--enjin-text);
}

.enjin-product-card__image {
    position: relative;
    padding-top: 100%;
    background: #FFF;
}

.enjin-product-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 画像サイズのばらつきを解消し一覧で見た目を揃える（トリミング許容） */
    object-fit: cover;
    object-position: center;
}

/* 商品一覧 / カテゴリ一覧 / 検索結果（EC-CUBE標準 ec-shelfGrid）の画像も正方形で統一 */
.ec-shelfGrid__item-image {
    margin-bottom: 10px;
}

.ec-shelfGrid__item-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
}

.enjin-product-card__body {
    padding: 12px 15px 15px;
    font-size: 12px;
}

.enjin-product-card__title {
    font-size: 13px;
    font-weight: normal;
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.enjin-product-card__price {
    font-size: 16px;
    font-weight: bold;
    color: var(--enjin-primary);
    margin-bottom: 4px;
}

.enjin-product-card__price-tax {
    font-size: 11px;
    font-weight: normal;
    color: #666;
    display: inline;
    margin-left: 4px;
}

.enjin-product-card__meta {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
    line-height: 1.5;
}

.enjin-product-card__code {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.enjin-product-card__contact {
    color: var(--enjin-primary);
    font-size: 11px;
    display: block;
    margin-top: 6px;
}

.enjin-product-card__login-required {
    font-size: 12px;
    color: #666;
    background: #F5F5F5;
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* ==============================================
   フッター
   ============================================== */
.enjin-footer {
    background: var(--enjin-primary);
    color: var(--enjin-white);
    padding: 50px 0 30px;
}

.enjin-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.enjin-footer__logo {
    margin-bottom: 25px;
}

.enjin-footer__logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.enjin-footer__logo-icon {
    width: 40px;
    height: 40px;
    background: var(--enjin-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enjin-footer__logo-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--enjin-primary);
}

.enjin-footer__logo-text {
    font-size: 36px;
    font-weight: 900;
    color: var(--enjin-white);
    letter-spacing: -0.02em;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif;
}

.enjin-footer__logo-img {
    height: 50px;
    width: auto;
}

.enjin-footer__nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.enjin-footer__nav-link {
    color: var(--enjin-white);
    text-decoration: none;
    font-size: 13px;
}

.enjin-footer__nav-link:hover {
    text-decoration: underline;
}

.enjin-footer__tagline {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.enjin-footer__copyright {
    font-size: 12px;
    opacity: 0.8;
    text-align: center;
}

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

/* タブレット */
@media screen and (max-width: 1024px) {
    /* トップバー */
    .enjin-topbar__inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .enjin-topbar__message {
        font-size: 11px;
    }

    .enjin-topbar__ribbon {
        margin-left: 10px;
    }

    .enjin-topbar__ribbon-img {
        height: 36px;
    }

    /* ヘッダー */
    .enjin-header__inner {
        flex-wrap: wrap;
        gap: 15px;
    }

    .enjin-header__logo-img {
        height: 32px;
    }

    .enjin-header__main {
        order: 3;
        width: 100%;
        flex-direction: column;
        gap: 15px;
    }

    .enjin-header__search {
        max-width: 100%;
        width: 100%;
    }

    .enjin-header__actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* ヒーロー */
    .enjin-hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .enjin-hero__title {
        font-size: 26px;
    }

    /* レイアウト */
    .enjin-top-layout {
        flex-direction: column;
    }

    .enjin-top-layout__sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .enjin-section--sidebar {
        margin-bottom: 0;
    }

    .enjin-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* モバイル */
@media screen and (max-width: 768px) {
    /* トップバー */
    .enjin-topbar__message span {
        font-size: 10px;
    }

    .enjin-topbar__links {
        display: none;
    }

    .enjin-topbar__ribbon-img {
        height: 32px;
    }

    .enjin-topbar__ribbon-text {
        font-size: 8px;
    }

    .enjin-topbar__ribbon-text:first-of-type {
        top: 4px;
    }

    .enjin-topbar__ribbon-text:last-of-type {
        top: 14px;
    }

    /* ヘッダー */
    .enjin-header__inner {
        padding: 0 15px;
        gap: 10px;
    }

    .enjin-header__logo-img {
        height: 28px;
    }

    .enjin-header__main {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .enjin-header__search {
        order: 2;
        width: 100%;
    }

    .enjin-header__search-select {
        min-width: 100px;
        font-size: 11px;
        padding: 8px 10px;
        padding-right: 24px;
    }

    .enjin-header__search-input {
        font-size: 12px;
        padding: 8px 10px;
        min-width: 0;
    }

    .enjin-header__actions {
        order: 1;
        width: auto;
        margin-left: auto;
    }

    .enjin-header__user {
        display: none;
    }

    .enjin-header__separator {
        display: none;
    }

    .enjin-header__nav {
        gap: 10px;
    }

    .enjin-header__nav-icon-img {
        height: 22px;
    }

    /* ヒーロー */
    .enjin-hero {
        padding: 25px 0;
    }

    .enjin-hero__title {
        font-size: 22px;
    }

    .enjin-hero__subtitle {
        font-size: 14px;
    }

    .enjin-hero__title {
        font-size: 22px;
    }

    .enjin-hero__subtitle {
        font-size: 14px;
    }

    .enjin-top-layout__sidebar {
        grid-template-columns: 1fr;
    }

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

    .enjin-product-card__body {
        padding: 10px;
    }

    .enjin-product-card__title {
        font-size: 13px;
    }

    .enjin-product-card__price {
        font-size: 14px;
    }

    .enjin-footer__nav {
        flex-direction: column;
        gap: 15px;
    }
}

/* Issue #165: role="button" のブラウザデフォルト cursor:pointer を PC/タブレットでは打ち消す */
.enjin-section--collapsible .enjin-section__header {
    cursor: default;
    user-select: none;
    position: relative;
}

/* Issue #165: SP (768px 未満、タブレット 768px 以上は対象外) のみカテゴリセクションを折り畳み UI 化 */
@media screen and (max-width: 767px) {
    .enjin-section--collapsible .enjin-section__header {
        cursor: pointer;
    }

    .enjin-section--collapsible .enjin-section__header::after {
        content: "＞";
        font-size: 14px;
        color: var(--enjin-primary);
        margin-left: 8px;
        display: inline-block;
        transition: transform 0.2s ease;
    }

    .enjin-section--collapsible.is-open .enjin-section__header::after {
        transform: rotate(90deg);
    }

    .enjin-section--collapsible .enjin-section__body {
        max-height: 0;
        overflow: hidden;
        padding-top: 0;
        padding-bottom: 0;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .enjin-section--collapsible.is-open .enjin-section__body {
        max-height: 1500px;
        padding-bottom: 15px;
    }
}

/* 超小型デバイス */
@media screen and (max-width: 480px) {
    /* トップバー */
    .enjin-topbar__message span {
        font-size: 9px;
    }

    /* Issue #164: SP ではページ右上に配置（スクロール追随しない、top:0 で隙間ゼロ）
       top:-18px = .enjin-black-bar 10px + .enjin-topbar padding-top 8px の相殺
       containing block は .enjin-topbar__inner (position:relative) */
    .enjin-topbar__ribbon {
        position: absolute;
        top: -18px;
        right: 0;
        margin-left: 0;
    }

    .enjin-topbar__ribbon-img {
        height: 28px;
    }

    .enjin-topbar__ribbon-text {
        font-size: 7px;
    }

    .enjin-topbar__ribbon-text:first-of-type {
        top: 3px;
    }

    .enjin-topbar__ribbon-text:last-of-type {
        top: 11px;
    }

    /* ヘッダー */
    .enjin-header__logo-img {
        height: 24px;
    }

    .enjin-header__search-select {
        display: none;
    }

    .enjin-header__search-form {
        border-radius: 6px;
    }

    .enjin-header__search-input {
        padding: 8px 12px;
    }

    .enjin-header__nav-icon-img {
        height: 20px;
    }

    .enjin-header__nav {
        gap: 8px;
    }

    /* ヒーロー */
    .enjin-hero__btn {
        display: block;
        text-align: center;
    }

    .enjin-hero__catchphrase-img {
        width: 280px;
    }
}

/* ==============================================
   EC-CUBEデフォルトスタイル上書き
   TOPページでカスタムテンプレートを使用
   ============================================== */

body.front_page .ec-layoutRole__header,
body.front_page .ec-layoutRole__footer {
    display: none;
}

body.front_page .ec-layoutRole {
    padding-top: 0;
}

body.front_page .ec-layoutRole__mainBottom,
body.front_page .ec-layoutRole__contentBottom,
body.front_page .ec-layoutRole__contentTop,
body.front_page .ec-layoutRole__left,
body.front_page .ec-layoutRole__right {
    display: none;
}

body.front_page .ec-sliderRole,
body.front_page .ec-eyecatchRole,
body.front_page .ec-newsRole,
body.front_page .ec-topicRole,
body.front_page .ec-categoryRole,
body.front_page .ec-role > .ec-newItemRole,
body.front_page .ec-role,
body.front_page .ec-secHeading,
body.front_page .ec-shelfRole {
    display: none;
}

body.front_page .ec-layoutRole__contents {
    display: block;
    background: var(--enjin-bg-main);
}

body.front_page .ec-layoutRole__main,
body.front_page .ec-layoutRole__mainWithColumn,
body.front_page .ec-layoutRole__mainBetweenColumn {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--enjin-bg-main);
}

/* 複数選択チェックボックスの2列グリッド（職種など / Issue #116） */
.enjin-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
}

.enjin-checkbox-grid__item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
}

.enjin-checkbox-grid__item input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0;
}

@media screen and (max-width: 480px) {
    .enjin-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* 価格表示（ログイン必要）*/
.ec-price-login-required {
    font-size: 12px;
    color: var(--enjin-text-light);
    background: var(--enjin-bg-gray);
    padding: 4px 8px;
    border-radius: 3px;
}

/* 下層ページの EC-CUBE 標準ブロック非表示（ENJIN固定ヘッダーと重複のため） */
/* EC-CUBE表記（ショップ名見出し ec-headerTitle）: 全下層ページで非表示 */
.ec-headerTitle {
    display: none;
}

/* カテゴリーメニュー（ec-categoryNaviRole）: 設置した下層ページのみ非表示
   （商品一覧等のカテゴリ切替導線は維持する） */
body#page_privacy .ec-categoryNaviRole,
body#page_terms .ec-categoryNaviRole,
body#page_help_tradelaw .ec-categoryNaviRole,
body#page_contact .ec-categoryNaviRole,
body#page_help_about .ec-categoryNaviRole {
    display: none;
}

/* 下層ページ: 本文とフッターの間に余白を設ける
   （特定商取引/個人情報/利用規約/お問い合わせ/カート/会員登録/マイページ会員変更） */
body#page_privacy .ec-layoutRole__contents,
body#page_terms .ec-layoutRole__contents,
body#page_help_tradelaw .ec-layoutRole__contents,
body#page_contact .ec-layoutRole__contents,
body#page_cart .ec-layoutRole__contents,
body#page_entry .ec-layoutRole__contents,
body#page_mypage_change .ec-layoutRole__contents {
    margin-bottom: 40px;
}

/* 環境バッジ（ST）: 本番(prod)以外でロゴ横に表示。表示制御は Twig 側 app.environment 条件 */
.enjin-env-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 9px;
    background: #ff6600;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.5;
    border-radius: 4px;
    letter-spacing: 0.06em;
    vertical-align: middle;
    white-space: nowrap;
}

/* ==============================================
   スクロールトップボタン（ENJINカスタム）
   ============================================== */
.enjin-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--enjin-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.enjin-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.enjin-scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(230, 0, 18, 0.4);
}

.enjin-scroll-top i {
    color: var(--enjin-white);
    font-size: 20px;
}

/* EC-CUBEデフォルトのページトップボタンを非表示（全ページ） */
.ec-blockTopBtn,
.ec-blockTopBtn.pagetop {
    display: none !important;
}

/* ==============================================
   出店者別カート・注文関連
   ============================================== */
.enjin-vendor-name {
    background-color: var(--enjin-bg-gray);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-left: 4px solid #5cb1b1;
    font-weight: bold;
}

.enjin-vendor-fee-detail {
    padding-left: 15px;
    font-size: 0.9em;
}

.enjin-vendor-fee-detail dt,
.enjin-vendor-fee-detail dd {
    color: var(--enjin-text-light);
}

.enjin-vendor-total-label {
    font-size: 0.9em;
    color: var(--enjin-text-light);
}
